__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/18289131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replace(SearchWindow searchWindow) { String alternativeString = searchWindow.replaceTF.getText(); if (this.getSelectedText() != null) this.replaceSelection(alternativeString); else JOptionPane.showMessageDialog(null, BFrame.get_prop().getProperty( "beagtex.editor.replace"), BFrame.get_prop().getProperty( "beagtex.editor.replacetitle"), JOptionPane.INFORMATION_MESSAGE); } COM: <s> replaces a searched string by another </s>
funcom_train/14026160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rethrow() { if (exceptionOccurred()) { if (_e instanceof Error) { throw (Error)_e; } if (_e instanceof RuntimeException) { throw (RuntimeException)_e; } else { // avoid checked exceptions throw new AssertionFailedError("Exception in thread "+_t+": "+_e); } } } COM: <s> rethrow the exception if one was stored </s>
funcom_train/45146553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNativeCleanCode(String name) { if (castType.equals("prepare-function")) { return (castFunc == null ? "NatClean_"+Strings.replace(javaType, "[]", "Array")+"(" : "NatClean_"+castFunc+"(" +Strings.stripTrailingChars(javaType, "*")+", ") +name+");"; // Note: javaType above should be gtkType really... } return null; } COM: <s> return the clean up code to convert an object of this type from </s>
funcom_train/42451375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateRandom(int nodeCount,double lowerBound, double upperBound){ for (int i=0;i<nodeCount;i++){ x.setAsDouble((Math.random()*(upperBound-lowerBound))+lowerBound,0, i); y.setAsDouble((Math.random()*(upperBound-lowerBound))+lowerBound,0, i); } } COM: <s> this method generates random values for the x and y matrices </s>
funcom_train/10290830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getRoleValue(PlayerRoleVarPair prvp) { if (prvp.getRoleTopic() != null) return prvp.getRoleTopic(); if (prvp.getRolePlaceholder() != null) return prvp.getRolePlaceholder(); if (prvp.getRoleVar() != null) return prvp.getRoleVar(); return null; } COM: <s> returns the value or variable stored for the role part of </s>
funcom_train/36129775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addObserver(final ComponentBindingObserver observer) { String compName = observer.getComponentName(); // check if component is already in the map if (componentsMap.containsKey(compName)) { observer.updateField(componentsMap.get(compName)); } else { if (observersMap.containsKey(compName)) { observersMap.get(compName).add(observer); } else { List<ComponentBindingObserver> list = new ArrayList<>(); list.add(observer); observersMap.put(compName, list); } } } COM: <s> adds the supplied </s>
funcom_train/6273074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPlot(Plot plot) { if (plots.indexOf(plot) == -1) { plots.addElement(plot); plot.addGraphChangeListener(this); if (plot instanceof Plot2D) { //trying to automatically add these plot's axes Plot2D plot2d = (Plot2D)plot; this.addAxis(plot2d.getHorAxis()); this.addAxis(plot2d.getVertAxis()); } } } COM: <s> adds a plot to the graph </s>
funcom_train/31980972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initXMLDatabase() { LOG.info("Initializing database with id: \"" + dbId + "\" and root collection name: \"" + rootCollectionName + "\""); // Start the XML database dbAdapter = new DatabaseAdapter(dbId, dbPort, rootCollectionName, getRootPath(), Repository.LOGGER); } COM: <s> initializes the xml database </s>
funcom_train/8037101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHeader(final String headerKey, final String headerValue, final List<String> list) { final Header header = new Header(headerKey, headerValue, list); this.headerData.add(header); this.headerDataMap.put(headerKey.toLowerCase().trim(), header); } COM: <s> method add header </s>
funcom_train/47826809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reportSLA(final SLA slaModel) { getLogger().debug("SLA Received - UUID:" + slaModel.getUuid()); getLogger().debug("SLA Template - ID: " + slaModel.getTemplateId()); getLogger().debug("SLA AgreementTerms - Size: " + slaModel.getAgreementTerms().length); } COM: <s> logs information about the sla received </s>
funcom_train/17944509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CDATA setText(String str) { String reason; if (str == null) { value = EMPTY_STRING; return this; } if ((reason = Verifier.checkCDATASection(str)) != null) { throw new IllegalDataException(str, "CDATA section", reason); } value = str; return this; } COM: <s> p this will set the value of this code cdata code node </s>
funcom_train/46104859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canSet(int col, Class<?> c) { if (c == null || col < 0) { return false; } else { Class<?> columnType = this.getColumnType(col); return (columnType == null ? false : c.isAssignableFrom(columnType)); } } COM: <s> checks if the set method can accept for a specific column values that </s>
funcom_train/46911074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sessionCreated(HttpSessionEvent se) { HttpSession session = se.getSession(); sessions.put(session.getId(), session); activeSessions++; Debug.info("TT Session started ... " + session.getId() + " " + new Date()); } COM: <s> listener event when session is created </s>
funcom_train/3404369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean push(E o) { if(data.length==size) expandCapacity(); data[size] = o; int hash = hash(o); boolean r = findDuplicate(o, hash); next[size] = initialHash[hash]; initialHash[hash] = size+1; size++; return r; } COM: <s> pushes a new object to the stack </s>
funcom_train/28150683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface WorkerCallback { /** The task would send zero or more non-null Objects to this handler * (the objects will be serialized by the sub JVM and deserialized in the parent JVM). */ public void callback(Object msg); /** If the task completed successfully, this method will be called. */ public void done(); /** If the task terminated with an error, this method will be called. */ public void fail(); } COM: <s> this defines an interface for receiving results from a subprocess </s>
funcom_train/33983623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(ServletConfig config) throws ServletException { super.init(config); ontofilesDir = getServletContext().getRealPath("/"); fortunataBaseURL = config.getInitParameter("FortunataBaseURL"); //This must be in the servlet init file (web.xml) //getServletContext().getContextPath() only exists for servlet spec 2.6 -> Tomcat 6 } COM: <s> initializes the servlet </s>
funcom_train/40312183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetColumnName_InvalidColumn3() { try { ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry); resMetaData.getColumnName(10); fail("SQLException is expected."); } catch(SQLException e) { //ensure the SQLException is thrown by getColumnName method. assertEquals("The sqlstate mismatches", "22003", e.getSQLState()); } } COM: <s> tests get column name with column index larger than the number of column </s>
funcom_train/46591232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setupResources() { if (!arguments.hasNext()) { System.out.println("No directory names supplied"); } String directories = arguments.next(); System.out.println("Setting up resource with roots \"" + directories + "\""); resources = new DataRepository(Arrays.asList(directories.split(":"))); try { resources.connectToResources(); } catch(InvalidFileException e) { System.out.println("One or more resources incorrect"); resources = null; } } COM: <s> sets up a resource repository used for looking up event files </s>
funcom_train/30005044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getCommentArea() { if (this.commentArea == null) { this.commentArea = new JTextArea(); this.commentArea.setEditable(true); this.commentArea.setLineWrap(true); this.commentArea.setWrapStyleWord(true); this.commentArea.getDocument().addDocumentListener(this); } return this.commentArea; } COM: <s> gets the comment pane </s>
funcom_train/37565881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValidToCreate(UTF8 src) { String srcs = normalizePath(src); synchronized (rootDir) { if (srcs.startsWith("/") && ! srcs.endsWith("/") && rootDir.getNode(srcs) == null) { return true; } else { return false; } } } COM: <s> check whether the filepath could be created </s>
funcom_train/9993918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame(); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jFrame.setJMenuBar(getJJMenuBar()); jFrame.setSize(523, 365); jFrame.setContentPane(getJContentPane()); jFrame.setTitle("ListCopy"); } return jFrame; } COM: <s> this method initializes j frame </s>
funcom_train/9701153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createXMLFile() throws FileNotFoundException, IOException{ Document doc = createDocument(); String filePath =path+fileName; XMLOutputter out = new XMLOutputter( Format.getPrettyFormat() ); out.output( doc, new FileOutputStream(filePath) ); //out.output( doc, System.out ); } COM: <s> create a xml file from the model </s>
funcom_train/25145865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Cell getCell(String value, Font font, int horizAlign, int width) throws BadElementException { Cell cell = new Cell(new Chunk(StringUtils.trimToEmpty(value), font)); cell.setVerticalAlignment(Element.ALIGN_MIDDLE); cell.setHorizontalAlignment(horizAlign); cell.setLeading(8); if (width > 0) { cell.setWidth(width); } return cell; } COM: <s> returns a formatted cell for the given value </s>
funcom_train/17724856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getImageUrl() { if (this.imageUrl != null) { return this.imageUrl; } ValueBinding vb = getValueBinding("imageUrl"); //NOI18N if (vb != null) { return (String) vb.getValue(getFacesContext()); } return null; } COM: <s> returns the value of url of the 150x50 pixel image displayed as your </s>
funcom_train/29311469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedNode(Object selectObject) { Iterator it = jtreeNodes.iterator(); while (it.hasNext()) { DefaultMutableTreeNode node = (DefaultMutableTreeNode) it.next(); if (node.getUserObject() == selectObject) { TreePath path = new TreePath(node.getPath()); tree.setSelectionPath(path); tree.expandPath(path); tree.scrollPathToVisible(path); return; } } } COM: <s> selects the node in the tree that points to the given object </s>
funcom_train/46111591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateCustomConfigurations () { File dir = new File(customParmsDir); String res[] = dir.list(new DefaultFilenameFilter(CONFIGFILE_EXT)); clearConfigurations(true); // Only custom configurations if ( res == null ) return; for ( int i=0; i<res.length; i++ ) { addCustomConfiguration(Util.getFilename(res[i], false)); } } COM: <s> updates the custom configurations for this mapper </s>
funcom_train/42068112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFractionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SampleLoop_fraction_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SampleLoop_fraction_feature", "_UI_SampleLoop_type"), WavPackage.Literals.SAMPLE_LOOP__FRACTION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the fraction feature </s>
funcom_train/22233487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPointAntialiasingEnable(boolean state) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_ANTIALIASING_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("PointAttributes2")); if (isLive()) ((PointAttributesRetained)this.retained).setPointAntialiasingEnable(state); else ((PointAttributesRetained)this.retained).initPointAntialiasingEnable(state); } COM: <s> enables or disables point antialiasing </s>
funcom_train/3315042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeAll(Collection<?> c){ boolean reply = false; if (useMerge(c)){ reply = PipeUtil.removeAll( SortedCollectionFilter.intersectionIterator(iterator(), asE(c), comparator())); } else { reply = super.removeAll(c); } return reply; } COM: <s> removes from this set all of its elements that are contained in the </s>
funcom_train/48877457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Spacer getSpacer() { if (spacer == null) {//GEN-END:|18-getter|0|18-preInit // write pre-init user code here spacer = new Spacer(16, 1);//GEN-LINE:|18-getter|1|18-postInit // write post-init user code here }//GEN-BEGIN:|18-getter|2| return spacer; } COM: <s> returns an initiliazed instance of spacer component </s>
funcom_train/33624158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reportOrdering(PrintStream out) { out.print(this.domainName+" : "); for (int i=0, n=this.domainVariables.length; i<n; i++) { out.print(this.domainVariables[i].getLevel()+" "); } out.println(); } COM: <s> reports variable orderings in this domain from low to high </s>
funcom_train/27903839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void evalSubscript(Node node) { String value = node.getValue(); if(value.equals("subscript")) { Node exp = node.getChild("simpleExpression"); evalSimpleExpression(exp); cekIfTypeIsInt(exp); //C12 typeStack.pop(); //C11 generateCode(41); //R41 } else { syntaxError(node,"evalSubscript()"); } } COM: <s> evaluates an subscript production </s>
funcom_train/23340152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getEventsCheckBox() { if (eventsCheckBox == null) { eventsCheckBox = new JCheckBox(); eventsCheckBox.setText("Events"); eventsCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { toggleCheckBox(eventsCheckBox); } }); } return eventsCheckBox; } COM: <s> this method initializes events check box </s>
funcom_train/37116616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean retainAll(int startInclusive, int endInclusive) { checkRemoveModifiable(); boolean changed = false; for (IntIterator it = iterator(); it.hasNext(); ) { int value = it.nextInt(); if (value < startInclusive || value > endInclusive) { it.remove(); changed = true; } } return changed; } COM: <s> retains all occurences of a range of primitive values within this collection </s>
funcom_train/44304459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SchemaValue getSchemaValue(MtColumn col) throws MelbaException { for (int i = 0; i < lst.size(); i++) { SchemaValue val = (SchemaValue) lst.get(i); if (col.isCorrespondingTo(val.getSchemaColumn())) return val; } throw MelbaException.fromBug(this, "column <" + col + "> is unknown"); } COM: <s> return the code schema value code that is corresponding to the </s>
funcom_train/46743551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOrderStatusRef(DisplayModel orderStatusRef) { if (Converter.isDifferent(this.orderStatusRef, orderStatusRef)) { DisplayModel oldorderStatusRef= new DisplayModel(this); oldorderStatusRef.copyAllFrom(this.orderStatusRef); this.orderStatusRef.copyAllFrom(orderStatusRef); setModified("orderStatusRef"); firePropertyChange(String.valueOf(ORDERS_ORDERSTATUSREFID), oldorderStatusRef, orderStatusRef); } } COM: <s> order status e </s>
funcom_train/11733243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WriteOperation startWriteOperation() throws RepositoryException { boolean success = false; VersioningLock.WriteLock lock = acquireWriteLock(); try { stateMgr.edit(); success = true; return new WriteOperation(lock); } catch (IllegalStateException e) { String msg = "Unable to start edit operation."; throw new RepositoryException(msg, e); } finally { if (!success) { lock.release(); } } } COM: <s> starts a write operation by acquiring the write lock and setting the </s>
funcom_train/2685476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void joinChannel(Channel ch) { if (ch == null) { return; } joinedChannels.add(ch); //add this player to the channel ch.addPlayer(this); Protocol.joinChannel(this.getConnection(), ch); if (isPlaying && ch.equals(playingOn)) { Protocol.sendChannelPlayingStatus(ch, this); } } COM: <s> joins the specified channel </s>
funcom_train/5265067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendEncypted(byte[] packet, boolean flush) { if (cOut==null) { sendToSocket(packet, flush); } else { try { sendToSocket(cOut.doFinal(packet), flush); } catch (Throwable t) { Logger.getLogger("").log(Level.SEVERE, null, t); close(); } } } COM: <s> encrypt an packet and send it </s>
funcom_train/31668812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init2DPoly() { // Make new arrays for parent Polygon object if needed // and reset 'npoints' if needed also. if (rotVerts.size() != npoints) { if (this.rotVerts.size() > this.npoints) { xpoints = new int[rotVerts.size()]; ypoints = new int[rotVerts.size()]; } npoints = rotVerts.size(); } } COM: <s> initializes this objects parent polygon objects member </s>
funcom_train/2868619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void waitFormat() { for (int i = 0; i < 50; i++) { Result r = doCommand(""); if (r.status.startsWith("U F")) { return; } try { Thread.sleep(100); } catch (InterruptedException ex) {} } } COM: <s> waits for a formatted screen </s>
funcom_train/3400430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void generateTypes() { types = portDefinitions.types(); if (model.getJAXBContext() != null) { try { model.getJAXBContext().generateSchema(resolver); } catch (IOException e) { // TODO locallize and wrap this e.printStackTrace(); throw new WebServiceException(e.getMessage()); } } } COM: <s> generates the types section of the wsdl </s>
funcom_train/29830221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireItemsReceived(InfoQuery iq, PubsubItems items, String id) { for (Enumeration e = pubsubListeners.elements(); e.hasMoreElements(); ) { BSPubsubListener listener = (BSPubsubListener) e.nextElement(); listener.itemsReceived(iq, items, id); } } COM: <s> notifies pubsub listeners about result of items request </s>
funcom_train/50846160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetParameterMode() throws Exception { int param = 1; ParameterMetaData pmd = getMetaData(); int expResult = ParameterMetaData.parameterModeIn; int result = pmd.getParameterMode(param); assertEquals("pmd.getParameterMode(" + param + ")", expResult, result); } COM: <s> test of get parameter mode method of interface java </s>
funcom_train/40004695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setState(String name) { // clean up old state if (currentState != null) { currentState.stop(); } inputManager.clearAllMaps(); if (name == EXIT_GAME) { done = true; } else { // set new state currentState = (GameState)gameStates.get(name); if (currentState != null) { currentState.start(inputManager); } } } COM: <s> sets the current state by name </s>
funcom_train/11348936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensureFactory() { if (getFactory() == null) { throw new IllegalStateException("The factory associated with the component type is not created"); } else { if (getFactory().getState() == Factory.INVALID) { throw new IllegalStateException("The factory associated with the component type is invalid (not started or missing handlers)"); } } } COM: <s> checks if the factory is already created </s>
funcom_train/7699328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupColumns() { CsvReader cr = null; if (sd.getHeadersFile() != null) { cr = getSubstitueHeadersFromFile(); } else { cr = csvRead; } String[] columns = csv.getColumns(cr); columns = extendColumns(columns); columnData = processColumnsToColumnData(columns); tl.createColumn(dd.databaseData, columnData); } COM: <s> setup columns from csv header </s>
funcom_train/33513485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTableNotFoundExceptionWithoutAnyTables() { try { new HTable(conf, "notATable"); fail("Should have thrown a TableNotFoundException"); } catch (TableNotFoundException e) { // expected } catch (IOException e) { e.printStackTrace(); fail("Should have thrown a TableNotFoundException instead of a " + e.getClass()); } } COM: <s> for hadoop 2579 </s>
funcom_train/36200487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed() { // to test trackLaser() function, uncomment call below and // set thunkOn to false at the top. trackLaser((int)(this.mouseX*1.f/scaleFactorX),(int)(this.mouseY*1.f/scaleFactorY)); if (thunkOn) { objectController.thunk(this); } drawn=false; } COM: <s> mouse pressed is a built in method </s>
funcom_train/13490657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBodyOrConnected(boolean value) { cachedToString = null; if (prerequisitesConnectedByOr != value) { boolean oldValue = prerequisitesConnectedByOr; prerequisitesConnectedByOr = value; fireClauseSetChangeEvent(new ClauseSetChangeEvent(this, Boolean.valueOf(oldValue), Boolean.valueOf(value), ClauseSetChangeEvent.OTHER)); } } COM: <s> set a new value </s>
funcom_train/45016733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String sendMessageNativeClient(String message){ if (socket==null) { System.out.println("Messenger.sendMessage(); couldn't send message socket==null"); return null; } try { BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream(),"UTF-8")); writer.write(message+"\n"); writer.flush(); System.out.println("Messenger.sendMessage(); message sent"); } catch (Exception e) { socket = null; e.printStackTrace(); } return ""; } COM: <s> this method send the skype command to the net </s>
funcom_train/30211317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prerender() { if (getSessionBean1().getOptionValue() != null && getSessionBean1().getOptionValue().getOptionName() != null) { list.refreshList(getSessionBean1().getOptionValue().getOptionName()); } } COM: <s> p callback method that is called just before rendering takes place </s>
funcom_train/45718758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getDataIndexOfKey(Object key) { int dataSize = this.size << 1; Object[] data = this.data; for (int i = 0; i < dataSize; i += 2) { Object k = data[i]; if (key == null ? k == null : key.equals(k)) { return i; } } return -2; } COM: <s> returns the data index of the given key or </s>
funcom_train/32778375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNonNegative(boolean newValue) { this.nonNegative = newValue; sendWarning("Attempt to set a EntityDistEmpirical to " + (newValue ? "" : "not ") + "nonNegative. This will be done, but doesn't make sense!", "EntityDistEmpirical: " + this.getName() + " Method: public void " + "setNonNegative(boolean newValue)", "The given distribution does not return numerical samples.", "No necessity to set a non-numerical distribution to nonNegative."); } COM: <s> overrides the same method of code desmoj </s>
funcom_train/67038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gotoRecord(int pos) { curRecordIndex = pos; int rowNb = curRecordIndex-1+firstRowIndex; getCaller().trace.trace("Moving to record #"+pos+" (row #"+rowNb+")"); if(rowNb<firstRowIndex || rowNb>lastRowIndex) curRow = null; else curRow = curSheet.getRow(rowNb); } COM: <s> first record is 1 </s>
funcom_train/862632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addUrlProperty(HttpUrl url, String property, String value) { boolean change = false; addUrl(url); try { _rwl.writeLock().acquire(); change = _store.addUrlProperty(url, property, value); _rwl.readLock().acquire(); _rwl.writeLock().release(); if (change) { _urlModel.fireUrlChanged(url, 0); fireUrlPropertyChanged(url, property); } _rwl.readLock().release(); } catch (InterruptedException ie) { _logger.severe("Interrupted! " + ie); } _modified = _modified || change; return change; } COM: <s> adds the value to a list of existing values for the specified property </s>
funcom_train/43924846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getProfile() throws BlipConnectorException { URI uri; try { StringBuilder sb = new StringBuilder().append(baseUrl).append( PATH_PROFILE); uri = new URI(sb.toString()); } catch (URISyntaxException e1) { throw new BlipConnectorException("Error creating URI"); } HttpResponse<?> out = execute(METHOD_GET, uri, null, Boolean.TRUE); String res = handleResult(out); if (res != null) { try { return new User(new JSONObject(res)); } catch (JSONException e) { throw new BlipConnectorException(e); } } else { return null; } } COM: <s> returns current user profile </s>
funcom_train/29706184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readHeaderInfo(RandomAccessFile rFile_p) throws IOException { rFile_p.seek(0); _size = rFile_p.readShort(); _currentCount = rFile_p.readShort(); _lastPredefIndex = rFile_p.readShort(); _elementSize = rFile_p.readShort(); _templateRows = rFile_p.readShort(); _templateCols = rFile_p.readShort(); } COM: <s> initialize by reading the current state </s>
funcom_train/20948483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Event clone() { /** * TODO: think about removing unnecessary copying - how can we open * clone for editing? */ Event clone = new Event(indiv, calendar); clone.setDuration(getDuration()); clone.setEndDate(getEndDate()); clone.setOriginal(this); clone.setReminderInterval(getReminderInterval()); clone.setStartDate(getStartDate()); clone.setTitle(getTitle()); clone.setDescription(getDescription()); return clone; } COM: <s> returns clone of the event </s>
funcom_train/4422345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showSelectedItem(OverlayItem item, CacheTableItem cache) { Resources res = applicationContext.getResources(); Drawable[] merged = new Drawable[] { getCacheMarker(cache), res.getDrawable(org.ocm.android.R.drawable.circle) }; LayerDrawable dr = new LayerDrawable(merged); item.setMarker(boundCenter(dr)); } COM: <s> shows the item as surrounded by a red selection circle </s>
funcom_train/23297399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTree2DPainter(Tree2DPainter treePainter) { if (treePainter == null) { throw new IllegalArgumentException("Null 'tree painter' argument."); } if (!this.fTreePainter.equals(treePainter)) { this.removeTree2DPanelChangeListener(this.fTreePainter); this.fTreePainter = treePainter; this.notifyTree2DPanelChangeListeners(new Tree2DPanelChangeEvent(this, Tree2DPanelChangeEvent.PHYLOGENY_MODIFIED)); } } COM: <s> sets the tree painter and adds itself to it </s>
funcom_train/28218655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int turnRate(final float radius) { int direction; float radiusToUse; if (radius < 0) { direction = -1; radiusToUse = -radius; } else { direction = 1; radiusToUse = radius; } float ratio = (2 * radiusToUse - _trackWidth) / (2 * radiusToUse + _trackWidth); return Math.round(direction * 100 * (1 - ratio)); } COM: <s> calculates the turn rate corresponding to the turn radius br </s>
funcom_train/23791906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void subscribeSlot(int nodeId, int slotId) { if(isRegistered) { Object[] arg = {incoming_port, name, nodeId, slotId}; OSCMessage msg = new OSCMessage("/subscribe/slot", arg); out.send(msg); } else { if(verbo > 2) System.err.println("\nSenseWorldDataNetwork warning: the client is not yet registered. Cannot subscribe to slots."); } } COM: <s> subscribes to a specific slot on the network </s>
funcom_train/4118413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getText() { if (text == null) { text = new JTextArea(); text.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent e) { JPopupMenu menu = new JPopupMenu("Menu"); menu.add(new JMenuItem("Item 1")); menu.add(new JMenuItem("Item 2")); menu.add(new JMenuItem("Item 3")); menu.setVisible(true); } }); } return text; } COM: <s> this method initializes text </s>
funcom_train/17846785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getIconThemeFile(String theme) { File themeFile = new File(theme); if (!themeFile.exists()) { themeFile = new File(Settings.getUserDirectoryName(), theme); } if (!themeFile.exists() && OperatingSystem.isMacOs()) { themeFile = new File("/Library/Application Support/TV-Browser/", theme); } return themeFile; } COM: <s> trys to find the icon theme file </s>
funcom_train/44556523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getBytesPerPixel() { switch (fileType) { case GRAY8: case COLOR8: case BITMAP: return 1; case GRAY16_SIGNED: case GRAY16_UNSIGNED: return 2; case GRAY32_INT: case GRAY32_UNSIGNED: case GRAY32_FLOAT: case ARGB: case GRAY24_UNSIGNED: case BARG: return 4; case RGB: case RGB_PLANAR: case BGR: return 3; case RGB48: case RGB48_PLANAR: return 6; case GRAY64_FLOAT : return 8; default: return 0; } } COM: <s> returns the number of bytes used per pixel </s>
funcom_train/25440500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendPackage(StringBuilder stringBuilder) throws IOException { for (DbPackage dbPackage : ApplicationUtil.getProjectData().getDataBase().getDbPackages().getList()) { stringBuilder.append(ddlGeneratorInterface.getSqlPackage(dbPackage.getName(), true, false, false)); } } COM: <s> scrive il file dei package spec </s>
funcom_train/17730433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveToFile(String s) throws IOException { FileWriter filewriter = new FileWriter(s); for (int i = 0; i < getRowCount(); i++) { for (int j = 0; j < getColumnCount(); j++) filewriter.write(getValueAt(i, j) + " "); filewriter.write("\n"); } filewriter.close(); } COM: <s> saves the contents of the table model to a file </s>
funcom_train/18504213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerDataColumnListeners() { //Iterating over the columns and registering listeners for them Iterator i = dataSet.getColumnVector().iterator(); while (i.hasNext()) { DataColumn dCol = (DataColumn)i.next(); dCol.removeDataColumnListener(this); dCol.addDataColumnListener(this); } } COM: <s> registers column listeners for all of the columns in the dataset </s>
funcom_train/23666871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XComponent getCurrentComponent() { try { Object oDesktop = multiComponentFactory.createInstanceWithContext("com.sun.star.frame.Desktop", context); XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface(XDesktop.class, oDesktop); return xDesktop.getCurrentComponent(); } catch (Exception e) { return null; } } COM: <s> retrieves the currently active open office </s>
funcom_train/31687947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStageLayout(String sWorkflowPath, String sStagePath, Point2D.Float point) { HashMap stageMap = (HashMap) this.m_workflows.get(sWorkflowPath); if(stageMap==null) { stageMap = new HashMap(); this.m_workflows.put(sWorkflowPath, stageMap); } stageMap.put(sStagePath, point); } COM: <s> sets the layout position of a specific workflow stage instance as </s>
funcom_train/18835390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUserProxy(String identifier) { PortalUser user = new PortalUser(); user = user.getUserByName(identifier); String uid = user.getUid().toString(); List list = this.getDatabaseElements("uid", uid); for (int i = 0; i < list.size(); i++) { HibernateFederationDatabase db = (HibernateFederationDatabase)list.get(i); String uProxy = db.getProxy(); if (uProxy != null) { return uProxy; } } return null; } COM: <s> gets the user proxy </s>
funcom_train/7265370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addImpl(Range i) { int point = Collections.binarySearch(intervals, i, IntervalComparator.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/6514804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean evalCondition(WebContext context) throws ActionException { if (condition == null) return true; if (condition instanceof Directive) try { return !"".equals(((Directive) condition).evaluate(context)); } catch(PropertyException e) { throw new ActionException("Error while evaluating 'if' condition of <output-variable> $" + name, e); } return !(condition instanceof String); } COM: <s> evaluates if attribute </s>
funcom_train/47675296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel getPanel() { if (this.panel == null) { panel = new JPanel(); panel.setLayout(new BorderLayout()); panel.add(BorderLayout.CENTER, getTextField()); panel.add(BorderLayout.EAST, getOpenButton()); } return panel; } COM: <s> get the container for the textfield and the button </s>
funcom_train/10906779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ensureFilterInPlace(PDFFilter pdfFilter) { if (this.filters.size() == 0) { addFilter(pdfFilter); } else { if (!(this.filters.get(0).equals(pdfFilter))) { this.filters.add(0, pdfFilter); } } } COM: <s> checks the filter list for the filter and adds it in the correct </s>
funcom_train/30172180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGIEWSUser(GIEWSUser giews_user) { this.giews_user = giews_user; /* set values for the user attributes */ this.id = String.valueOf(giews_user.getID()); this.user_name = giews_user.getUserName(); this.display_name = giews_user.getFirstName() + " " + giews_user.getLastName(); } COM: <s> this method sets the value object for this particular giews user </s>
funcom_train/50863340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Unit findUnitOfClass(Class<? extends Unit> unitClass) { Unit result = null; if (containsUnitClass(unitClass)) { Iterator<Unit> i = containedUnits.iterator(); while (i.hasNext()) { Unit unit = i.next(); if (unitClass.isInstance(unit)) { result = unit; } } } return result; } COM: <s> finds a unit of a given class in storage </s>
funcom_train/24540369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processTerminatingException(final Throwable e) { e.printStackTrace(); try { vmServer.doCallback(new ICallbackRunnable() { public Object run(ICallbackHandler handler) throws CommandException { return handler.callbackWithParms(callbackID, ImageDataConstants.IMAGE_HAS_EXCEPTION, new Object[] {e}); } }); } catch (CommandException e1) { e1.printStackTrace(); } imageComplete(ImageDataConstants.IMAGE_ERROR); } COM: <s> terminating due to an exception </s>
funcom_train/8813395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateProgressBar() { if (max == 0) { bar.updateProgress(1, ""); } else { bar.updateProgress(new Double(counter) / new Double(max), counter + " / " + max + " " + I18N.CONSTANTS.refreshProjectListProjectLoaded() + "."); } } COM: <s> update the progress bar state </s>
funcom_train/15954459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInsertString() throws BMLException{ String lsValue = "Good"; DataString ldString = new DataString(fBlank); ldString.setString(lsValue); String lValue = "123"; ldString.insert(1,lValue); assertEquals("G123ood",ldString.toString()); } COM: <s> test of insert method using offset string </s>
funcom_train/35722048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeViewPortUpdate() { if (fTextWidget != null) { fTextWidget.removeKeyListener(fViewportGuard); fTextWidget.removeMouseListener(fViewportGuard); if (fScroller != null && !fScroller.isDisposed()) { fScroller.removeSelectionListener(fViewportGuard); fScroller= null; } fViewportGuard= null; } } COM: <s> removes all listeners and structures required to set up view port listeners </s>
funcom_train/28688223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scasw() throws MemoryException { RealModeAddress address = new RealModeAddress(m_state.getES(), m_state.getDI()); sub16(m_state.getAX(), m_memory.readWord(address)); byte diff = (m_state.getDirectionFlag() ? (byte)-2 : (byte)2); m_state.setDI((short)(m_state.getDI() + diff)); } COM: <s> implements the scasw opcode </s>
funcom_train/4694852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LIRUpType visit(ICClass icClass, Integer d){ // set current class name currClassName = icClass.getName(); // recursive calls to methods for(Method m: icClass.getMethods()){ m.accept(this,0); // each method will be responsible to insert its string rep. to the methods list } // fields: no need for recursive calls return new LIRUpType("", LIRFlagEnum.EXPLICIT,""); } COM: <s> icclass propagating visitor </s>
funcom_train/21778215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doBackgroundClick( int modifiers, Point docCoords, Point viewCoords) { if (MouseEventOSX.isMouseLeftClick( modifiers, PlanWorks.isMacOSX())) { // do nothing } else if (MouseEventOSX.isMouseRightClick( modifiers, PlanWorks.isMacOSX())) { TimelineView.docCoords = docCoords; mouseRightPopupMenu( viewCoords); } } // end doBackgroundClick COM: <s> code do background click code mouse right pops up menu </s>
funcom_train/27770624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void throwErrorIfLocked() throws ObjectLockedException{ if(owner != null && owner.get() != null){ throw new ObjectLockedException( "This object is not editable. If you own the lock on this object, unlock it first." + " Otherwise, you must wait for the lock owner to relinquish ownership." ); } } COM: <s> throw an object locked exception if the object associated with this </s>
funcom_train/3811049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JavaMethod getCloneMethod(JavaSource pSource) { initLogging(pSource); for (Iterator iter = tablesByOrder.iterator(); iter.hasNext(); ) { TableInfo tableInfo = (TableInfo) iter.next(); getInsertRowMethod(pSource, tableInfo); getInnerInsertRowMethod(pSource, tableInfo); } getCacheDataClass(pSource); getPublicCloneMethod(pSource); return null; } COM: <s> p creates a method for updating one row in the head table </s>
funcom_train/31545344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMessage(final String from, final String[] to, final String[] bcc, final String sSubject, final String sText, final String sFilename) throws MessagingException { if (!mailerThread.isRunning()) { throw new IllegalStateException("MailerThread has been terminated, cannot send Emails"); } sendMessageContent(from, to, bcc, sSubject, sText, sFilename); } COM: <s> sends an email </s>
funcom_train/12899345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(BundleContext context) throws Exception { super.start(context); logInfo("com.neusoft.ezingbuilder.designer plugin activated.", null); try { // RootPath = // Platform.asLocalURL(getBundle().getEntry("/")).getFile(); RootPath = System.getProperty("user.dir"); fckRootPath = RootPath + "/plugins/com.neusoft.ezingbuilder.designer_1.0.3"; } catch (Exception ex) { logError("Problems found while initializing plugin", ex); } } COM: <s> this method is called upon plug in activation </s>
funcom_train/15616485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void overrideFromSystemProperties() { logger.info("Overriding file properties with system properties."); Map<String, String> properties = propertiesToMap(this.props); for (String key : properties.keySet()) { String value = System.getProperty("jamwiki." + key); if (value != null) { this.props.setProperty(key, value); logger.info("Replaced property " + key + " with value: " + value); } } } COM: <s> overrides file properties from system properties </s>
funcom_train/39372264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void popSetNextOvalNames_click() { String desc = JOptionPane.showInputDialog(mainFrame, "Please enter the next state names!", Constants.APP_NAME, JOptionPane.QUESTION_MESSAGE); if (desc == null) return; int idx = -1; while (desc.length() > 0) { idx = desc.indexOf(","); if (idx > 0) { String pt1 = desc.substring(0, idx); desc = desc.substring(idx + 1); nextOvalName.add(pt1); } else { nextOvalName.add(desc); return; } } } COM: <s> the user specifies the the next names of ovals that are created </s>
funcom_train/18480600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Model flip() { List<PolyColl> new_polycolls = new ArrayList<PolyColl>() ; for(PolyColl pcoll: polycolls) { new_polycolls.add(pcoll.flip()) ; } Model gg = new Model() ; gg.setName(getName()) ; gg.setPolyColls(new_polycolls) ; return gg ; } COM: <s> returns a geometry that is the flipped version of this one </s>
funcom_train/3931418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NonManagedBeanDefinition findNonManagedBeanDefinitionByClassName(String className) throws DefinitionException { for(NonManagedBeanDefinition useBeanDefinition : this.useBeanDefinitions){ if (useBeanDefinition.isOfClass(className)) return useBeanDefinition; } StringBuffer buf = new StringBuffer(); buf.append("No UseBeanDefinition by ClassName ["); buf.append(className); buf.append("] exists."); throw new DefinitionNotFoundException(buf.toString()); } COM: <s> used in converting hierarchy vo into managed transient object </s>
funcom_train/36956343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageDescriptor getRubyImageDescriptor(IRubyElement element, int flags) { int adornmentFlags = computeRubyAdornmentFlags(element, flags); Point size = useSmallSize(flags) ? SMALL_SIZE : BIG_SIZE; return new RubyElementImageDescriptor(getBaseImageDescriptor(element, flags), adornmentFlags, size); } COM: <s> returns an image descriptor for a java element </s>
funcom_train/40900853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLogo() throws AssertionFailedException { System.out.println("getLogo"); ImageCreator instance = new ImageCreator(); Image expResult_1 = null; Image result_1 = instance.getLogo(); assertEquals(expResult_1, result_1); fail("The test case is a prototype."); } COM: <s> test of test get logo method of class image creator </s>
funcom_train/20885139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLongFLR() { LongDTO dto = new LongDTO(); dto.longField = new Long(92837); assertTrue(JSefaTestUtil.serialize(FLR, dto).indexOf("92837") >= 0); JSefaTestUtil.assertRepeatedRoundTripSucceeds(FLR, dto); } COM: <s> tests long flr </s>
funcom_train/16358229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String dateLookForItems(String template) { // tokenize the template String[] items = tokenize(template); if (items == null) { nb_date_items = 1; return "null"; } if (items.length == 0) { nb_date_items = 1; return "null"; } // set the number of items nb_date_items = items.length; // format the template String formated = items[0]; for(int i=1;i<nb_date_items;i++) formated += " " + items[i]; return formated; } COM: <s> look for items and replace it by one space character and set the </s>
funcom_train/7638961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void selectItemName(String itemName) { if (itemName == null) { return; } IResourceRepository repo = getCurrentRepository(); ResourceItem[] items = repo.getResources(mResourceType); for (ResourceItem item : items) { if (itemName.equals(item.getName())) { setSelection(new Object[] { item }); break; } } } COM: <s> select an item by its name if possible </s>
funcom_train/34675495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CurrencyAmount add(CurrencyAmount that) throws IllegalArgumentException { if (this.currency!=null && !this.currency.equals(that.currency)) { throw new IllegalArgumentException("Currencies do not match, cannot add "+that.toFormattedString()+" from "+this.toFormattedString()); } CurrencyAmount ret=new CurrencyAmount(amount.add(that.amount), that.currency); return ret; } COM: <s> add another currency amount to this one creating and returning a new instance </s>
funcom_train/15685894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float calcPlayerStk(List<Spieler> spieler, int spielerId, byte position, boolean mitForm) { if (spieler != null) { for (Spieler current : spieler) { Spieler player = (Spieler) current; if (player.getSpielerID() == spielerId) { return player.calcPosValue(position, mitForm); } } } return 0.0f; } COM: <s> calculate player strength for the given position </s>