__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/9216539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long dateDiff(Calendar end) { Calendar today = Calendar.getInstance(Locale.US); // If the book is overdue return 0. if (end.before(today)) { return 0; } // Otherwise return the difference from today and the due date. long dif = (end.getTimeInMillis() - today.getTimeInMillis()); return (dif / (1000L * 60L * 60L * 24L)); } COM: <s> calculates the difference between today and this books due date </s>
funcom_train/2573205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(byte[] b) throws IOException { // no write until authorization is done if(!auth) return; for (int i=0;i<b.length;i++) { switch (b[i]) { case 10: /* \n -> \r */ b[i] = 13; break; } } handler.sendData(new String(b)); } COM: <s> write data to the back end </s>
funcom_train/20230501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintGameOver() { adminGame.paint(g); g.drawImage(menuImages[0], SCREEN_X_CENTER, SCREEN_Y_CENTER, Graphics.VCENTER | Graphics.HCENTER); g.drawImage(menuImages[7], SCREEN_X_CENTER, SCREEN_Y_CENTER, Graphics.VCENTER | Graphics.HCENTER); } COM: <s> paints the game over screen </s>
funcom_train/27943178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addItem( JContactListItem item ) { if( listModel.contains( item ) ) { /* * If item is already in list, update all item object. */ JContactListItem tmpItem = getItem( item.getPluginId(), item.getUserId() ); tmpItem.copy( item ); return false; } listModel.addElement( item ); return true; } COM: <s> adds a item to this jlist </s>
funcom_train/34710493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPolarPoint(Polygon p, double deg, double mag){ double r = (deg/180.0) * Math.PI; double x = (Math.sin(r)*mag)+50; double y = (Math.cos(r)*-mag)+50; p.addPoint((int)x,(int)y); } COM: <s> add a point to a polygon using polar co ordinates </s>
funcom_train/534293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAlwaysShowScrollBars(boolean show) { checkWidget(); if (show == alwaysShowScroll) return; alwaysShowScroll = show; ScrollBar hBar = getHorizontalBar (); if (hBar != null && alwaysShowScroll) hBar.setVisible(true); ScrollBar vBar = getVerticalBar (); if (vBar != null && alwaysShowScroll) vBar.setVisible(true); layout(); } COM: <s> set the always show scrollbars flag </s>
funcom_train/27720247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentSelectedBorderColor(BorderColor currentSelectedBorderColor) { if (this.currentSelectedBorderColor != null){ this.currentSelectedBorderColor.stopListening(); } this.currentSelectedBorderColor = currentSelectedBorderColor; this.currentSelectedBorderColor.startListening(); resetSelectedBorder(); } COM: <s> setter for property current selected border color </s>
funcom_train/45237163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdSetMyselfAway() { if (cmdSetMyselfAway == null) {//GEN-END:|161-getter|0|161-preInit // write pre-init user code here cmdSetMyselfAway = new Command("Definir Ausente", Command.ITEM, 0);//GEN-LINE:|161-getter|1|161-postInit // write post-init user code here }//GEN-BEGIN:|161-getter|2| return cmdSetMyselfAway; } COM: <s> returns an initiliazed instance of cmd set myself away component </s>
funcom_train/26224428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MsgCommand (String notificationFlag, String lengthString, long transactionID) { super.setSupportsLength (true); String[] args = new String[2]; args[0] = notificationFlag; setArgs(args); int length = 0; try { length = Integer.parseInt (lengthString); } catch (NumberFormatException nfExc) { nfExc.printStackTrace(); } setLength (length); setTransactionID (transactionID); } COM: <s> creates a new msg command </s>
funcom_train/25788894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean supportsWrite(Class<?> entityClass, Type genericType) { if (entityClass == null) { return false; } if (genericType == null) { // LATER use Type instead of Class } if (this.genericMbwType == null) { return false; } final boolean supportsWrite = this.genericMbwType .isAssignableFrom(entityClass); return supportsWrite; } COM: <s> checks if this message body writer supports the given type by the type </s>
funcom_train/16976001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getVoltar() { if (Voltar == null) { Voltar = new JButton(); Voltar.setBounds(new Rectangle(338, 21, 105, 20)); Voltar.setText("Voltar"); Voltar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { fp.setContentPane(new PanelPrincipalAleatorio(fp)); } }); } return Voltar; } COM: <s> this method initializes voltar </s>
funcom_train/50846400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetSQLXML() throws Exception { if (!getBooleanProperty("test.types.sqlxml", true)) { return; } SQLXML xmlObject = null; PreparedStatement stmt = queryBy("c_xml"); try { stmt.setSQLXML(1, xmlObject); } catch (SQLException ex) { fail(ex.toString()); } } COM: <s> test of set sqlxml method of interface java </s>
funcom_train/20728493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getJFreeReportFile() { File file1 = null; try { file1 = Fileio.getFile("SpecialGen5.xml", "reports", false, false); } catch (Exception ee) { Log.log(Log.DEBUG, this, "No file? error=" + ee); } return file1; }//}}} //{{{ +getJFreeReportTable(String, int) : TableModel COM: <s> gets the j free report file attribute of the account sum reporter object </s>
funcom_train/34311774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resumePlayback() { if (m_line != null) { if (m_status == PAUSED) { m_line.start(); m_status = PLAYING; synchronized (m_audioInputStream) { m_audioInputStream.notifyAll(); } log.info("resumePlayback() completed"); notifyEvent(BasicPlayerEvent.RESUMED, getEncodedStreamPosition(), -1, null); } } } COM: <s> resumes the playback </s>
funcom_train/28126870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Color brighten(Color clr) { int r; int g; int b; r = (int) min(clr.getRed() * 1.2, 255.0); g = (int) min(clr.getGreen() * 1.2, 255.0); b = (int) min(clr.getBlue() * 1.2, 255.0); return new Color(r, g, b); } COM: <s> create a color representation that is brighter than the standard color </s>
funcom_train/28269049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String readStringToken(){ StringBuffer buffer = new StringBuffer(); while(true){ int c = reader.nextChar(); if(c==-1){ break; } if((c>='A' && c<='Z') || (c>='a' && c<='z') || (c=='_') || (c>='0' && c<='9')){ buffer.append((char)c); }else{ reader.pushback(); break; } } int c = reader.peek(); if(c=='!' || c=='?'){ buffer.append((char)c); reader.nextChar(); } return buffer.toString(); } COM: <s> helper function to read characters of a string token </s>
funcom_train/16769139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void seekToCurrentPlayback() { if (engine.isPullMode()) { try { // TODO: figure out if this is the correct position to seek to final long delta = System.currentTimeMillis() - engine.getPlaybackStart(); engine.seek((int) delta); } catch (OperationNotSupportedException err) { // Ignore error, should not happen for pullMode engines } } } COM: <s> seek to current position to restart playback with audio and or video </s>
funcom_train/15494530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetContext() throws Exception { System.out.println("getContext"); TomcatXMLContext instance = new TomcatXMLContext( TomcatXMLContext.class.getClassLoader()); String expResult = "/test"; String result = instance.getContext(); assertEquals(expResult, result); } COM: <s> test of get context method of class com </s>
funcom_train/17201127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // Make a blocking call to deleteMin to get a plan and then execute it. // Repeat... while (true) { Object plan = Controller.compilationQueue.deleteMin(); if (plan instanceof ControllerPlan) { ((ControllerPlan) plan).doRecompile(); } else if (plan instanceof OnStackReplacementPlan) { ((OnStackReplacementPlan) plan).execute(); } } } COM: <s> this is the main loop of the compilation thread </s>
funcom_train/38875038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void patchPropertyInfo(PropertyInfo info, EntityDescriptor ed) { ed.getPersistenceAttributes().put(info.getPhysName(), info); if (ed.getSkipList() != null && ed.getSkipList().containsKey(info.getName())) info.setPersistent(false); else info.setPersistent(true); } COM: <s> callback to extend change introspection </s>
funcom_train/37062141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processSizeChanges() { updateImageSize(); prop.createFilledProfileImage( imgWidth, imgHeight ); coosy.setDimensionValues( imgWidth, imgHeight ); coosy.calculateTickIntervals(); if ( graph != null ) { graph.setDimensionValues( imgWidth, imgHeight ); graph.calculatePixelIntervals(); } refreshPanel( true ); } COM: <s> updates the dimensions of the off screen image </s>
funcom_train/22233617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertScope(Group scope, int index) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_SCOPE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Fog9")); if (isLive()) ((FogRetained)this.retained).insertScope(scope, index); else ((FogRetained)this.retained).initInsertScope(scope, index); } COM: <s> inserts the specified group node into this fog nodes </s>
funcom_train/12158151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeCatchSQLException (String indent) { out.println (indent + "catch (SQLException e) {"); out.println (indent + " logger.error (\"sql-exception\", e);"); out.println (indent + " throw new JDBCRepositoryException (e);"); out.println (indent + "}"); } COM: <s> write code which catches logs and rethrows an sqlexception </s>
funcom_train/31872178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public class FrameTRDA extends FrameT { public String getLongName () { return "Recording date frame"; } public FrameTRDA (ID3V2Frame frm) { super (frm); } public FrameTRDA (ID3V2Frame frm, DataSource ds) throws SeekPastEndException { super (frm, ds); } public String toString () { return getLongName () + " Encoding: "+encoding+"\nRecording date: " + text; } } COM: <s> recording date frame </s>
funcom_train/22918788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void play() { UPNPMessageFactory factory = UPNPMessageFactory.getNewInstance(avTransportService); ActionMessage message = factory.getMessage("Play"); message.setInputParameter("InstanceID", ""); message.setInputParameter("Speed", 1); try { message.service(); setTransportState(PLAYING); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (UPNPResponseException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> starts the current track in the queue if not already started </s>
funcom_train/11320599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Page testPage(String path) { if (path == null) { throw new IllegalArgumentException("path cannot be null"); } path = appendLeadingSlash(path); Class<? extends Page> pageClass = getClickServlet().getConfigService().getPageClass(path); return testPage(pageClass); } COM: <s> this method simulates a browser requesting get or submitting post </s>
funcom_train/10597437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startElement(String uri, String loc, String raw, Attributes a) throws SAXException { super.contentHandler.startElement(uri, loc, raw, a); this.serializer.startElement(uri, loc, raw, a); } COM: <s> receive notification of the beginning of an element </s>
funcom_train/25194310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Signature newSig() throws DkimException { Signature mailSig = null; try { mailSig = Signature.getInstance(dkimSig.getJavaAlg()); mailSig.initSign(privateKey); } catch (NoSuchAlgorithmException e) { throw new DkimException(DkimError.LIBERROR,"Failed to find specified algorithm",e); } catch (InvalidKeyException e) { throw new DkimException(DkimError.LIBERROR,"Invalid key specified",e); } return mailSig; } COM: <s> generate a new signature object to be used to generate the dkim </s>
funcom_train/28589135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getMemberFromAttribute(Attributes attributes) { String varName = attributes.getValue(NAME); String varValue = attributes.getValue(VALUE); if (attributes.getValue(INIT_PK) != null){ varValue = attributes.getValue(INIT_PK); } String memberDeclaration = "$"+varName; if (varValue!=null || !"".equals(varName)){ memberDeclaration += " = "+varValue; } else if("".equals(varName)){ memberDeclaration += " = ''"; } else { } return memberDeclaration; } COM: <s> get the php member declaration from the name and value attribute </s>
funcom_train/3130699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void signalBeginChange (Getter g) { if (monitors != null) { // This runs backwards and signalEndChange forwards so that the // monitors are properly framed. int size = monitors.size(); for (int i = size-1; i >= 0; --i) { Monitor m = (Monitor) monitors.elementAt(i); m.beginChange (g); } } } COM: <s> signal the start of a change to the monitored resource </s>
funcom_train/48076867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean updateUsedUpStream(StarStreamMessage msg) { boolean proceed = false; if(usedUpStream+msg.getType().getEstimatedBandwidth()<=upStream) { usedUpStream+=msg.getType().getEstimatedBandwidth(); proceed = true; } return proceed; // return true; } COM: <s> this method must be invoked after every send operation just to increase </s>
funcom_train/18551006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMessageCollection_putMessageFN() { MessageContainer mc = null; try { mc = new MessageContainer(fileName); } catch (MessageException e) { fail(); } try { mc.putMessage(message); } catch (MessageException e1) { fail(); } Message returned = null; try { returned = mc.getMessage(message.getCode()); } catch (MessageException e2) { fail(); } assertEquals(message,returned); } COM: <s> tests the functionality of the put message method </s>
funcom_train/20874508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getValue() { double value = 0.0; for (int i = 0; i < iAssignment.length; i++) if (iAssignment[i] != null) value += getWeight(iAssignment[i], getDistanceConflicts(i), getTimeOverlappingConflicts(i)); return value; } COM: <s> value of the current schedule </s>
funcom_train/44166862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ColonyPanel getColonyPanel(Colony colony) { for (Component c1 : getComponents()) { if (c1 instanceof JInternalFrame) { for (Component c2 : ((JInternalFrame) c1).getContentPane().getComponents()) { if (c2 instanceof ColonyPanel && ((ColonyPanel) c2).getColony() == colony) { return (ColonyPanel) c2; } } } } return null; } COM: <s> gets any currently displayed colony panel for the specified colony </s>
funcom_train/2624041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExtractGUIProperties() { System.out.println("extractGUIProperties"); JFCXWindow instance = null; GUIType expResult = null; GUIType result = instance.extractGUIProperties(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of extract guiproperties method of class jfcxwindow </s>
funcom_train/11324373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getAutoMapping(IProject project) { IStructuredModel model = ClickUtils.getClickXMLModel(project); try { NodeList list = (((IDOMModel)model).getDocument()).getElementsByTagName(ClickPlugin.TAG_PAGES); if(list.getLength()==1){ Element pages = (Element)list.item(0); if(pages.hasAttribute(ClickPlugin.ATTR_PACKAGE)){ String autoMapping = pages.getAttribute(ClickPlugin.ATTR_AUTO_MAPPING); if("false".equals(autoMapping)){ return false; } return true; } } } catch(Exception ex){ } finally { if(model!=null){ model.releaseFromRead(); } } return true; } COM: <s> returns the status of the auto mapping in the specified project </s>
funcom_train/18367610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Bet getPassLineBet(IBetOwner a) { if(passLine_ != null) { for(Iterator i = passLine_.iterator(); i.hasNext();) { Bet b = (Bet)i.next(); if(b.getOwner() != null && b.getOwner().equals(a)) return b; } } return null; } COM: <s> get the pass line bet made by a given bet owner </s>
funcom_train/40478025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData(float[][] newData) { if (newData.length != height) { throw new IllegalArgumentException( "The given data array has an incorrect size."); } for (int i = 0; i < height; i++) { if (newData[i].length != width) { throw new IllegalArgumentException( "The given data array has an incorrect size."); } System.arraycopy(newData[i], 0, data[i], 0, width); } } COM: <s> sets the new data of the float matrix </s>
funcom_train/43293903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyFile(File in, File out) throws Exception { // get input stream FileInputStream fis = new FileInputStream(in); // get output stream FileOutputStream fos = new FileOutputStream(out); // create buffer byte[] buf = new byte[4096]; int i = 0; // while you can read from input while ((i = fis.read(buf)) != -1) { // write to output fos.write(buf, 0, i); } // close streams fis.close(); fos.close(); } COM: <s> p copy a file p </s>
funcom_train/22962530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { OptionalKeyIndexes clone = new OptionalKeyIndexes(null); clone.setKeyName(keyName); java.util.Iterator iter = keys.iterator(); while(iter.hasNext()) { KeyIndex ix = (KeyIndex)iter.next(); if (ix instanceof OptionalKeyIndexes) ix = (OptionalKeyIndexes)ix.clone(); else if (ix instanceof KeyIndexes) ix = (KeyIndexes)ix.clone(); else if (ix instanceof RecurringKeyIndexes) ix = (RecurringKeyIndexes)ix.clone(); else ix = (KeyIndex)ix.clone(); ix.parent = clone; clone.keys.add(ix); } return clone; } COM: <s> clone the object </s>
funcom_train/15408942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void broadcast(RemoteTransactionEvent remoteTransEvent) { synchronized (managerThread) { try { List<Packet> packets = packetWriter.write(remoteTransEvent); if (sendPackets(true, packets)){ ++totalTxnEventsSent; } } catch (IOException e) { String msg = "Error sending RemoteTransactionEvent " + remoteTransEvent; logger.log(Level.SEVERE, msg, e); } } } COM: <s> send the remote trans event to all the other members of the cluster </s>
funcom_train/32057749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClose() { System.out.println("testClose"); GPGraphpad pad = new GPGraphpad(); GPGraph graph = new GPGraph(); GraphUndoManager undo = new GraphUndoManager(); GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo); assertEquals("close failed", newDoc.close(false), true); } COM: <s> test of close method of class gpdocument </s>
funcom_train/28506024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { try { java.awt.EventQueue.invokeAndWait(new Runnable() { public void run() { initComponents(); } }); this.setSize(600,300); JPanel pnl = new JPanel(); pnl.setSize(600,300); this.add(pnl); } catch (Exception ex) { ex.printStackTrace(); } } COM: <s> initializes the applet main </s>
funcom_train/33804432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws ExecutionException { ScriptManager.getScriptManager().loadScripts(Constants.SCRIPTS_DIRECTORY); if(World.getWorld().getBackgroundLoader().getPendingTaskAmount() > 0) { logger.info("Waiting for pending background loading tasks..."); World.getWorld().getBackgroundLoader().waitForPendingTasks(); } World.getWorld().getBackgroundLoader().shutdown(); engine.start(); logger.info("Ready"); } COM: <s> starts the code game engine code </s>
funcom_train/45803553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTemplate(String templateString) { template = templateString; // special extension for the needs of the MVS support // replace view placeholder with current view value if (template.indexOf(VIEW_PLACEHOLDER) >= 0) { UserIF user = FrameworkUtils.getUser(pageContext); String view = user.getView(); template = StringUtils.replace(template, VIEW_PLACEHOLDER, view); } } COM: <s> sets according to attribute template a path to the template </s>
funcom_train/34137995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setGranularity(int granularity) { AccessibleInputConnection.checkValidGranularity(granularity); String speak = String.format(mGranularitySet, mGranularityTypes[granularity]); getCurrentInputConnection().trySendAccessiblityEvent(speak); if (mGranularity == granularity) { return false; } mGranularity = granularity; onGranularityChanged(granularity); return true; } COM: <s> sets granularity unit type for text navigation </s>
funcom_train/18835165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeOpenCheque(GridCheque cheque) throws DBException { try { String chequeID = cheque.getSerialNumber().toString()/* + "#" + cheque.getIssuer()*/; String query = "DELETE FROM Cheques WHERE issuer_serialNumber='" + chequeID + "'"; //System.out.println(query); this.mycon.SQLUpdate(query); } catch (Exception e) { //virhe throw new DBException("Removing the Cheque failed", e); } } COM: <s> removes a cheque from the database </s>
funcom_train/29774132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPasswordValid(final String encPass, final String rawPass, final Object salt) { checkInitialization(); if (this.useEncryptor.booleanValue()) { return this.passwordEncryptor.checkPassword(rawPass, encPass); } return this.stringDigester.matches(rawPass, encPass); } COM: <s> checks a passwords validity </s>
funcom_train/44011463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCoupon() { System.out.println("getCoupon"); TransLineBO instance = new TransLineBO(); CouponBO expResult = null; CouponBO result = instance.getCoupon(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get coupon method of class edu </s>
funcom_train/40494812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHistorySupport() { // History.addHistoryListener(this); History.addValueChangeHandler(this); // Now that we've setup our listener, fire the initial history state. History.fireCurrentHistoryState(); historySupport=true; String initToken = History.getToken(); if (initToken.length() == 0) initToken = "GWTigerScreenEntry"; // onHistoryChanged() is not called when the application first runs. // Call // it now in order to reflect the initial state. // onHistoryChanged(initToken); } COM: <s> call this method from on module load </s>
funcom_train/19275579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getMaximumSize() { Dimension d = super.getMaximumSize(); int w = d.width; int h = d.height; if (width != -1) w = width; if (height != -1) h = height; if (minWidth != -1 && w < minWidth) w = minWidth; if (minHeight != -1 && h < minHeight) h = minHeight; return new Dimension(w, h); } COM: <s> returns the maximum size according to the given dimension </s>
funcom_train/37742009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTimer (Object timer) { try { ((TimerHandle)timer).getTimer().cancel (); } catch (NoSuchObjectLocalException e) { logger.warn ("Trying to cancel no longer existing timer " + "(may be due to a race condition): " + e.getMessage(), e); } } COM: <s> remove a previously created timer </s>
funcom_train/34982797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copy(SmTbAccountPayBean bean) { setIndex(bean.getIndex()); setUserId(bean.getUserId()); setPayed(bean.getPayed()); setCreateDate(bean.getCreateDate()); setCreateUser(bean.getCreateUser()); setModifyDate(bean.getModifyDate()); setModifyUser(bean.getModifyUser()); } COM: <s> copies the passed bean into the current bean </s>
funcom_train/36915451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getVariable(String variable) { try { getVariable.setString(1, variable); ResultSet rs = getVariable.executeQuery(); if (rs.next()) { return rs.getString(1); } } catch (SQLException ex) { Logger.getLogger(MySQLVariableDAO.class.getName()).log(Level.SEVERE, null, ex); } return ""; } COM: <s> gets a varible from the database </s>
funcom_train/42517101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Process copyStructure() throws Exception { Process dest=clone(); dest.destinationTypes=destinationTypes; dest.sourceTypes=sourceTypes; dest.namedOutputs=namedOutputs; dest.namedInputs=namedInputs; dest.inputs=inputs; dest.outputs=outputs; dest.subprocesses=subprocesses; dest.createTemplate(); if(name!=null){ dest.abstractName=name.getText(); dest.instanceName=name.getText()+copyCount++; }else{ dest.abstractName="anonymous process"; dest.instanceName="anonymous process"+copyCount++; } return dest; } COM: <s> create a complete working copy of this process template </s>
funcom_train/24000647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEvaluate() throws Exception { JOCLAstParser p = new JOCLAstParser(OclTypeRegistry.OclBooleanType); p.define("self", OclTypeRegistry.OclBooleanType); OclExpressionAst ast = p.parse("self"); OclParsedExpression instance = new OclParsedExpression((LetAst)ast); assertEquals(Boolean.TRUE,instance.evaluate(Boolean.TRUE)); } COM: <s> test of evaluate method of class ocl parsed expression </s>
funcom_train/8104490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSelectedLanguageIndex() { for(int i=0; i<LANG_CODE.length; i++) { if(lang_code.equalsIgnoreCase(LANG_CODE[i])) { return i; } } System.out.println("Error in BrowserParameters.getSelectedLanguageIndex()"); return 0; } COM: <s> gets the selected language index in lang code </s>
funcom_train/40843777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void center(MindMap map, int width, int height) { delayY = ((height - map.getHeight())/2);//-delayY; delayX = ((width - map.getWidth())/2);//-delayX; centerNode(map.getMap()); map.setHeight((int)height); map.setWidth((int)width); } COM: <s> centers the map according to its size </s>
funcom_train/169386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getValue(String key, boolean defaultValue) { String query = "select VALUE from TEAMANALYZER_SETTINGS where NAME='" + key + "'"; ResultSet rs = Commons.getModel().getAdapter().executeQuery(query); try { rs.next(); return rs.getBoolean("VALUE"); } catch (SQLException e) { return defaultValue; } } COM: <s> returns a value </s>
funcom_train/3413351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int result = super.hashCode(); result = 37 * result + ((indexedWriteMethodName == null) ? 0 : indexedWriteMethodName.hashCode()); result = 37 * result + ((indexedReadMethodName == null) ? 0 : indexedReadMethodName.hashCode()); result = 37 * result + ((getIndexedPropertyType() == null) ? 0 : getIndexedPropertyType().hashCode()); return result; } COM: <s> returns a hash code value for the object </s>
funcom_train/5655148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void SetMemento(Memento m) { tokens = ((PlaceMemento) m).getTokens(); // set back the conflict flags // as there cannot be a conflict at this place when you go one step back // needed for the drawing: the place should not be drawn in the color // indicating that a conflict has occurred anymore outConflict = false; inConflict = false; } COM: <s> sets the internal state of the place to the state </s>
funcom_train/31871758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public class FrameWOAR extends FrameW { public String getLongName () { return "Official artist URL frame"; } public FrameWOAR (ID3V2Frame frm) { super (frm); } public FrameWOAR (ID3V2Frame frm, DataSource ds) throws SeekPastEndException { super (frm, ds); } public String toString () { return getLongName () + "\nURL : " + url; } } COM: <s> oficial artist url frame </s>
funcom_train/33474523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(MouseEvent e) { if(((e.getModifiers() & e.BUTTON3_MASK) != 0) || e.isPopupTrigger()) { if( (null == hideColumnPopup) ) { initPopupMenu(); } hideColumnPopup.show( e.getComponent(), e.getX(), e.getY() ); } } COM: <s> implementation of mouse listener interface used to show the popup menu </s>
funcom_train/7630465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRouting(int mode, int routes, int mask) { IAudioService service = getService(); try { service.setRouting(mode, routes, mask); } catch (RemoteException e) { Log.e(TAG, "Dead object in setRouting", e); } } COM: <s> sets the audio routing for a specified mode </s>
funcom_train/26247406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaxPopulation() { if (factory == null) { factory = new ObjectFactory(); } long max = factory.getMaximum("planet", "population", "system_id="+id); if (planets == null) { planets = factory.getPlanetsBySystem(this.id); } for (Planet p : planets) { if (p.getPopulation() > max) { max = p.getPopulation(); } } if (max < 10) { return 0; } else { return (int) Math.log10(max); } } COM: <s> get the digit code for the largest population in this system </s>
funcom_train/21701211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void activateContent(UserRequest ureq, Object uObj, String activationArgs) { if (uObj instanceof ActionExtension) { ActionExtension ae = (ActionExtension) uObj; removeAsListenerAndDispose(resC); Controller extC = ae.createController(ureq, getWindowControl(), null); content.setContent(extC.getInitialComponent()); this.resC = extC; listenTo(resC); } else { String cmd = (String) uObj; doActivate(cmd, ureq, activationArgs); } } COM: <s> activate the content in the content area based on a user object </s>
funcom_train/648308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean connect(String server, int port) throws IOException { if (!isConnected() && server != null) { if (control.connect(server, port)) { if (!control .completeCommand(FtpInterpret.getReplies("login-done"))) { printlog("< Can't obtain welcome message from host! >"); control.disconnect(); return false; } else return true; } else return false; } else return false; } COM: <s> connect to server open control connection </s>
funcom_train/49049856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean swapItems (String inIdentifier1, String inIdentifier2) { boolean swapped = false; ItemType item1 = getItem (inIdentifier1); if (item1 != null) { ItemType item2 = getItem (inIdentifier2); if (item2 != null) { swapped = swapItems (item1, item2); } } return swapped; } // end swapItems (inIdentifier1, inIdentifier2) COM: <s> swap the items given their identifiers </s>
funcom_train/22686875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Fraction reduce(int divisor) { int num = this.num; int den = this.den; while (num % divisor == 0 && den % divisor == 0 && den > 1 && Math.abs(num) > 0) { num /= divisor; den /= divisor; } return new Fraction(num, den); } COM: <s> reduces the fraction by the given divisor </s>
funcom_train/5341074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void panelize(JComponent c) { GUIUtils.setOpaque(false, c); if(!ThemeSettings.isNativeTheme()) c.setOpaque(true); c.setBackground(ThemeFileHandler.SEARCH_PANEL_BG_2.getValue()); c.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 0)); } COM: <s> sets all components in this component to be not opaque </s>
funcom_train/10863617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeFacetQuery(String q) { boolean b = this.remove(FacetParams.FACET_QUERY, q); if (this.get(FacetParams.FACET_FIELD) == null && this.get(FacetParams.FACET_QUERY) == null) { this.setFacet(false); } return b; } COM: <s> remove a facet query </s>
funcom_train/23940511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector position(Disk d, double dt) { double translate = dt * (d.momentum.abs() / d.getMass()) / this.terrain.sphere.rad; Vector direction = new Vector(d.momentum).mul(d.position); Vector axis = Vector.vec(d.position.c, direction); // axis == 0? -> // Matrix.rot(...) = 1! return Vector.mul(d.position.c, Matrix.rot(axis, translate)); } COM: <s> calculates the anticipated position of a disk assuming that there is no </s>
funcom_train/41510444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void move(String from, String to) throws IOException { File file = new File(wcPath, from); File toFile = new File(wcPath, to); if (!file.renameTo(toFile)) { throw new IOException("Could not rename '" + from + "' to '" + to + "'"); } } COM: <s> renames an existing file or directory inside the working copy wc path </s>
funcom_train/18655843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean removeFromLab(String sessionKey) { for (Lab lab : runningLabs) if (lab.inLab(sessionKey)) { lab.leaveQueue(sessionKey); lab.removeUser(sessionKey); //callback all other students in the lab //with the updated lab queue callback(lab); return true; } return false; } COM: <s> a private helper method that removes a specified student from the </s>
funcom_train/13967570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WOActionResults response(ERXRestFormat format, Object value, ERXKeyFilter filter) { ERXRestRequestNode responseNode; try { responseNode = ERXRestRequestNode.requestNodeWithObjectAndFilter(value, filter, delegate()); } catch (ObjectNotAvailableException e) { return errorResponse(e, WOMessage.HTTP_STATUS_NOT_FOUND); } catch (SecurityException e) { return errorResponse(e, WOMessage.HTTP_STATUS_FORBIDDEN); } catch (Throwable t) { return errorResponse(t, WOMessage.HTTP_STATUS_INTERNAL_ERROR); } return response(format, responseNode); } COM: <s> returns the given object as a woresponse in the given format </s>
funcom_train/40369628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveLeft() { if(getActiveFigureAbsoluteX() > 0) { for (int i = 0; i < 5; i++) { if (board[activeFigure.getX(i) + activeFigurePositionX - 1][activeFigure.getY(i) + activeFigurePositionY] != 0) { return; } } activeFigurePositionX -= 1; } } COM: <s> moves active figure to left </s>
funcom_train/21154591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addStation(StationInfo si) { if (si != null) { if (!model_.hasURL(si.Url)) { model_.addStationInfo(si); } else { StationInfo si2 = model_.getStationInfo(si.Url); showWarning(locale.getString(Constants.STR_Station_in_playlist) + si2.Title , currDisplayable_); } } } COM: <s> insert new station information into playlist </s>
funcom_train/23985991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Data getComponent(int i) throws VisADException, RemoteException { if (isMissing()) { return ((TupleType) Type).getComponent(i).missingData(); } else if (0 <= i && i < getDimension()) { return (Data) tupleComponents[i]; } else { throw new TypeException("Tuple: component index out of range: " + i); } } COM: <s> returns a component of this instance </s>
funcom_train/16604005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int readChunk(byte[] buffer, int offset, int length) throws IOException { if(length > chunkRemaining) { length = chunkRemaining; } readFully(buffer, offset, length); crc.update(buffer, offset, length); chunkRemaining -= length; return length; } COM: <s> read some data from the current chunk </s>
funcom_train/44773172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parseNumbers() { numbers = true; for (int i = '0'; i <= '9'; i++) { ctype[i] |= CT_DIGIT; ctype[i] &= ~CT_ALPHA; } ctype['.'] |= CT_DIGIT; ctype['.'] &= ~CT_ALPHA; ctype['-'] |= CT_DIGIT; ctype['-'] &= ~CT_ALPHA; } COM: <s> specifies that numbers should be parsed </s>
funcom_train/14615177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Instruction getNextInstruction() throws ParseException { Instruction fmInstruction = nextFMInstruction; if( fmInstruction != null ) { nextFMInstruction = null; return fmInstruction; } fmInstruction = getNextInstructionTag(); if(foundPos > previousParsePos) { nextFMInstruction = fmInstruction; String textBlock = text.substring(previousParsePos, foundPos); return new TextBlockInstruction(textBlock); } return fmInstruction; } COM: <s> p searches the text for an instruction starting at the current </s>
funcom_train/28750475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChargedate(String newVal) { if ((newVal != null && this.chargedate != null && (newVal.compareTo(this.chargedate) == 0)) || (newVal == null && this.chargedate == null && chargedate_is_initialized)) { return; } this.chargedate = newVal; chargedate_is_modified = true; chargedate_is_initialized = true; } COM: <s> setter method for chargedate </s>
funcom_train/17274491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private T successor(T subtree) { if (subtree.getRightChild() != null) { T rightNode = subtree.getRightChild(); return minimum(rightNode); } T prev = subtree.getParentNode(); while (prev != null && subtree == prev.getRightChild()) { subtree = prev; prev = subtree.getParentNode(); } // end while return prev; } COM: <s> returns the successor node of a subtree </s>
funcom_train/31093175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTargetFolder(File newTargetFolder, boolean withField) { this.targetFolder = newTargetFolder; if (!targetFolder.exists()) this.setStatus("target Folder " + newTargetFolder + " does not exist!"); if (withField) try { targetFolderField.setText(targetFolder.getCanonicalPath()); } catch (IOException e) { setStatus(e.getMessage()); } } COM: <s> set a new target folder </s>
funcom_train/11004904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getMarginBottom(){ EscherOptRecord opt = (EscherOptRecord)getEscherChild(_escherContainer, EscherOptRecord.RECORD_ID); EscherSimpleProperty prop = (EscherSimpleProperty)getEscherProperty(opt, EscherProperties.TEXT__TEXTBOTTOM); int val = prop == null ? EMU_PER_INCH/20 : prop.getPropertyValue(); return (float)val/EMU_PER_POINT; } COM: <s> returns the distance in points between the bottom of the text frame </s>
funcom_train/50570780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder buf = new StringBuilder("SessionManagerEvent=[session="); buf.append(this.session); buf.append(", source="); buf.append(getSource()); buf.append(']'); return buf.toString(); } COM: <s> returns a string representation of this session manager event </s>
funcom_train/12837154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object checkout(SessionKey key) throws SessionException { Object o = null; touch(); if (!checkoutTable.contains(key.toString())) { checkoutTable.addElement(key.toString()); o = sessionDataHashtable.get(key.toString()); } else { throw new SessionException(key + " is already checked out.", SessionException.ALREADY_CHECKEDOUT); } return o; } COM: <s> checks out an object from code this code session thereby locking </s>
funcom_train/18131243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object toPerlArray(Item<?> item, SyntacticType syntacticType) { Vector<Object> perlObjects = new Vector<Object>(); if (item instanceof CompositeItem) { for (Item<?> subItem : ((CompositeItem)item).getAllItems()) { perlObjects.add(toPerl(subItem, syntacticType)); } } else if (item instanceof NullItem) { } return perlObjects; } COM: <s> method for converting an item to a perl array </s>
funcom_train/26216243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readNullTerminatedString() throws IOException { StringBuffer stringBuffer = new StringBuffer(); int input; do { input = in.read(); if (input != 0) stringBuffer.append((char)input); } while(input != 0); return stringBuffer.toString().trim(); } // END readNullTerminatedString COM: <s> read a null terminates string and returns it as a java string object </s>
funcom_train/36376463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelAndView activate(HttpServletRequest request, HttpServletResponse response) { ModelAndView mav = new ModelAndView(); try { itemService.activate(request); return MessageBlock.createSingle(mav, MSG.OPERATION_SUCCESSFUL, "deactivate", MSG.SUCCESS); } catch (Exception e) { return MessageBlock.createSingle(mav, MSG.ITEM_NOT_EXISTS, "deactivate", MSG.ERROR); } } COM: <s> activates an item </s>
funcom_train/20044572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _remove () { requiredMethod("add()"); boolean result = false; log.println("removing the shape..."); int cntBefore = oObj.getCount(); oObj.remove((XShape) oShape); int cntAfter = oObj.getCount(); result = cntBefore == cntAfter + 1; tRes.tested("remove()", result); } COM: <s> removes the shape added before from the collection </s>
funcom_train/37820178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getDiagramSize(SyntaxDiagram sd) { VirtualDim vdim = getDimFromElement(sd.getRoot(), rv.radius, 2 * rv.radius, 0, true, true, false); Dimension dimension = new Dimension(); dimension.width = vdim.width + 2 * rv.radius; dimension.height = vdim.virtualHeight + 2 * rv.radius; return dimension; } COM: <s> calculates the size of the given diagram </s>
funcom_train/25291320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNormalIndex(int index) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_NORMAL_INDEX_READ)) throw new CapabilityNotSetException(Ding3dI18N.getString("IndexedGeometryArray13")); return ((IndexedGeometryArrayRetained)this.retained).getNormalIndex(index); } COM: <s> retrieves the normal index associated with the vertex at </s>
funcom_train/22234206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setBasePathFromFilename(String fileName) { if (fileName.lastIndexOf(java.io.File.separator) == -1) { // No path given - current directory setBasePath("." + java.io.File.separator); } else { setBasePath( fileName.substring(0, fileName.lastIndexOf(java.io.File.separator))); } } // End of setBasePathFromFilename COM: <s> takes a file name and sets the base path to the directory </s>
funcom_train/36949008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { OverflowingLRUCache newCache = (OverflowingLRUCache)newInstance(fSpaceLimit, fOverflow); LRUCacheEntry qEntry; /* Preserve order of entries by copying from oldest to newest */ qEntry = this.fEntryQueueTail; while (qEntry != null) { newCache.privateAdd (qEntry._fKey, qEntry._fValue, qEntry._fSpace); qEntry = qEntry._fPrevious; } return newCache; } COM: <s> returns a new cache containing the same contents </s>
funcom_train/9164004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String serialize(){ int numOfInstances = elements.size(); if (numOfInstances == 0){ return numOfInstances + "\n" + patientId + "," + elementDef.getElementType() + "," + elementDef.getName() + "\n"; }else{ StringBuilder sb = new StringBuilder(String.valueOf(numOfInstances)) .append("\n"); for (Element e : elements){ e.serializeMillis(patientId, sb).append("\n"); } return sb.toString(); } } COM: <s> serializes the elements in the batch with start times in milliseconds </s>
funcom_train/16981095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Message createProfileRequestMessage() { // Create message Message message = new Message(); StringMessageElement messageContent = new StringMessageElement( CommunicationModuleImpl.PROFILE_REQUEST_TYPE, "", null); message.addMessageElement(CommunicationModuleImpl.NAMESPACE, messageContent); return message; } COM: <s> method for creating a profile request message to be sent through jxta </s>
funcom_train/18084426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TransactionManager create() throws Exception { if (jotmCurrent == null) { // check for already active JOTM instance jotmCurrent = Current.getCurrent(); // if none found, create new local JOTM instance if (jotmCurrent == null) { jotm = new Jotm(true, false); jotmCurrent = Current.getCurrent(); } } return jotmCurrent; } COM: <s> retrieves the jotm current object that implements the </s>
funcom_train/25186673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String encodeStringValue(String value) { if (value == null) { return null; } if (getReplacements() != null) { for (String key : getReplacements().keySet()) { value = value.replace(key, getReplacements().get(key)); } } return value; } COM: <s> performs character replacements in string values to match json specification </s>
funcom_train/22399393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String fingerprint(byte[] host_key) { byte[] fprint = md5.digest(host_key); StringBuffer buf = new StringBuffer(); int n = fprint.length; for (int i = 0; i < n; i++) { int j = fprint[i] & 0xff; String hex = Integer.toHexString(j); if (hex.length() == 1) { buf.append('0'); } buf.append(hex); if (i + 1 < n) buf.append(':'); } return buf.toString(); } COM: <s> given a host key return the finger print string for that key </s>