__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/34960911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(TorontoSchool entity) { EntityManagerHelper.log("deleting TorontoSchool instance", Level.INFO, null); try { entity = getEntityManager().getReference(TorontoSchool.class, entity.getTorontoSchoolId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent toronto school entity </s>
funcom_train/8104383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRatedSynonym(String w) { if(DEBUG) { System.out.println("ResultTableModel.addRatedSynonym word is " + w); } SynonymRow r = getRow(w); if(null != r) { if(!r.rate) { r.rate = true; } } else { addSynonym(w, 0, 0, true); } } COM: <s> adds rated synonym to table if it is absent marks it as rated </s>
funcom_train/51114578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SOAPMessageWrapper createSOAPMessageWrapper(SOAPMessage message) throws SOAPException { if (m_wrapperFactory == null) throw new NullPointerException("Before this transceiver will work, you must define the class name of the MessageWrapperFactory to be used. Call 'setMessageWrapperFactoryClassName()'."); return m_wrapperFactory.createSOAPMessageWrapper(message); } COM: <s> return a soapmessage wrapper for the given message </s>
funcom_train/35020768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected BreakpointListener remove(BreakpointListener l) { if (l == listener1) { return listener2; } if (l == listener2) { return listener1; } // Recursively seek out the target listener. BreakpointListener l1 = remove(listener1, l); BreakpointListener l2 = remove(listener2, l); return (l1 == listener1 && l2 == listener2) ? this : add(l1, l2); } COM: <s> removes a breakpoint listener from this multicaster and returns the </s>
funcom_train/4991291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createUITextUserName() { // Create the text widget fTextUsername = new Text(fCompositeLogin, SWT.BORDER); // Configure layout data GridData data = new GridData(SWT.NONE, SWT.NONE, false, false); data.widthHint = F_TEXT_WIDTH_HINT; data.horizontalSpan = 2; fTextUsername.setLayoutData(data); } COM: <s> creates the ui text user name </s>
funcom_train/17787741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { for (int l = 0; l < tagTree.length; l++) { for (int r = 0; r < tagTree[l].length; r++) { for (int c = 0; c < tagTree[l][r].length; c++) { tagTree[l][r][c] = 0; states[l][r][c] = 0; } } } } COM: <s> sets attributes to its initial values </s>
funcom_train/29715247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { cubeView.update(); /* * check if undo or redo are enabled or not */ if (!rubikCube.canRedo()) { menu.deactivateMenuItem(2, false); } else { menu.deactivateMenuItem(2, true); } if (!rubikCube.canUndo()) { menu.deactivateMenuItem(1, false); } else { menu.deactivateMenuItem(1, true); } canvasRepaint(); } COM: <s> updates the view after something the cube has been changed </s>
funcom_train/3925926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VrmlElement getChildAt( int offset ) { if ( children == null ) { return( null ); } else if ( children instanceof Vector ) { Vector vchildren = (Vector)children; if ( vchildren.size() <= offset ) { return( null ); } else { return( (VrmlElement)vchildren.elementAt( offset )); } } else if ( offset == 0 ) { return( (VrmlElement)children ); } else { return( null ); } } COM: <s> get the specific child </s>
funcom_train/10633208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetObjectInstance_NoBuilder_AllNull() throws Exception { Object obj = DirectoryManager.getObjectInstance(null, null, null, null, null); assertNull(obj); Object originalObject = "original object"; obj = DirectoryManager.getObjectInstance(originalObject, null, null, null, null); assertSame(obj, originalObject); } COM: <s> when no factory builder is set and all fed parameters are null </s>
funcom_train/5017694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int checkSizeField() { if (! cacheSizeField.isEnabled()) { return 0; } try { new Integer(cacheSizeField.getText()).intValue(); Config.setProperty(ConfigFile_v3.NODE_CACHE, ConfigFile_v3.NODE_CACHE_SIZE, cacheSizeField.getText()); return 0; } catch (NumberFormatException ee) { return -1; } } COM: <s> check if size field is a number </s>
funcom_train/39036082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(final Graphics2D g) { g.setColor(Utils.getColorBackground()); g.fillRect(0, 0, root.getWidth(), root.getHeight()); g.drawImage(image, 0, 0, null); } COM: <s> paint the rendered image to the specified graphics object </s>
funcom_train/14310961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendShutdownCommand(int shutdownPort) throws IOException { Socket socket = new Socket("127.0.0.1",shutdownPort); PrintWriter printWriter=new PrintWriter(socket.getOutputStream()); printWriter.println("shutdown"); printWriter.close(); socket.close(); System.out.println("done."); System.exit(0); } COM: <s> opens a connection to a port and send shutdown to stop the program </s>
funcom_train/8662619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFload(int n) { if (n < 4) addOpcode(34 + n); // fload_<n> else if (n < 0x100) { addOpcode(FLOAD); // fload add(n); } else { addOpcode(WIDE); addOpcode(FLOAD); addIndex(n); } } COM: <s> appends fload or wide fload lt n gt </s>
funcom_train/50863345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToTrail(Coordinates location) { if (getSettlement() != null) { if (trail.size() > 0) trail.clear(); } else if (trail.size() > 0) { Coordinates lastLocation = trail.get(trail.size() - 1); if (!lastLocation.equals(location) && (lastLocation.getDistance(location) >= 2D)) trail.add(new Coordinates(location)); } else trail.add(new Coordinates(location)); } COM: <s> adds a location to the vehicles trail if appropriate </s>
funcom_train/72852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Module loadModule(int nextModule) { int mc = fileList.size(); while (nextModule <= 0) nextModule += mc; try { theUrl = new URL(protocol, host, port, fileList.get((nextModule + mc) % mc)); return ModuleLoader.getModuleLoader(theUrl).getModule(); } catch (Exception e) { throw new RuntimeException(e); } } COM: <s> load the code next module code th file in the file list </s>
funcom_train/3119210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean removeWithoutDispose(Page page) { final int index = pages.indexOf(page.getDeviceType(), page); if (index != -1) { pages.remove(page.getDeviceType(), page); fireElementRemoved(index, page); return true; } else { return false; } } COM: <s> removes the given page from this dialog </s>
funcom_train/42420705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setName(String name) throws InvalidAttributeValueException{ if (name != null && name.length() > 2 && name.length() <= 32 && !("").equals(name.trim())){ String strippedName = name.replaceAll(" ", "-"); strippedName = strippedName.replaceAll("[^a-zA-Z0-9-\\.]", ""); strippedName = strippedName.toLowerCase(); this.name = strippedName; }else{ throw new InvalidAttributeValueException("Invalid name length."); } } COM: <s> sets the name fo the brute </s>
funcom_train/12767058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean removeWaypoint(IWaypoint waypoint) { if (waypoint == null) return false; synchronized (getBlock()) { if (!exists()) return false; IWaypoint[] old = getWaypoints(); fWaypoints.remove(waypoint); TagSEAChangeSupport.INSTANCE.postTagChange(TagChangeEvent.createWaypointEvent(this, old)); if (getWaypointCount() == 0) { //remove this tag from the model. ((TagsModel)TagSEAPlugin.getTagsModel()).removeFromModel(this); } } return true; } COM: <s> removes the given waypoint from the list of waypoints if it exists </s>
funcom_train/44382858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void avoidTerrain(Vector3f cameraLocation) { float height = terrain.getHeightFromWorld(cameraLocation); if (height != Float.NaN) { height += terrain.getWorldTranslation().y + minDistanceToTerrain; if (height > cameraLocation.y) { cameraLocation.y = height; } } } COM: <s> adjusts the camera location so that it doesnt go under the terrain </s>
funcom_train/40412914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCategory() { String s = getClass().getName(); int j = s.lastIndexOf('.'); if (j < 0) { return "(none)"; } int i = s.lastIndexOf('.', j - 1); return Character.toUpperCase(s.charAt(i + 1)) + s.substring(i + 2, j); } COM: <s> get a category for this factory </s>
funcom_train/130270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOutputBitfield (byte count, int digout) { try { sendHeader (PLAYER_MSGTYPE_CMD, 5); /* 5 bytes payload */ os.writeByte (count); os.writeInt (digout); os.flush (); } catch (Exception e) { System.err.println ("[DIO] : Couldn't send output bitfield command request: " + e.toString ()); } } COM: <s> the dio interface accepts 4 byte commands which consist of the ouput bitfield </s>
funcom_train/40542477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSortDirection(int direction) { // If we're using external sort, don't refresh the table here // This is because the table is likely not even initialized fully yet if (sorter instanceof GraceColumnViewerExternalSorter) ((GraceColumnViewerExternalSorter) sorter).setSorter(sorter, direction, false); else sorter.setSorter(sorter, direction); } COM: <s> sets this column as the sorting column with the specified direction </s>
funcom_train/28763415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCsssubheadredosize(String newVal) { if ((newVal != null && this.csssubheadredosize != null && (newVal.compareTo(this.csssubheadredosize) == 0)) || (newVal == null && this.csssubheadredosize == null && csssubheadredosize_is_initialized)) { return; } this.csssubheadredosize = newVal; csssubheadredosize_is_modified = true; csssubheadredosize_is_initialized = true; } COM: <s> setter method for csssubheadredosize </s>
funcom_train/12186588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TransformationState getCurrentState() throws SAXException { TransformationState state = (TransformationState)states.peek(); if (null == state) { fatalError(new XMLStreamingException( "Transformation markup is not well formed", getPipelineContext().getCurrentLocator())); } return state; } COM: <s> returns the current processing state </s>
funcom_train/47193658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel1() { if (jPanel1 == null) { GridLayout gridLayout = new GridLayout(); gridLayout.setColumns(1); gridLayout.setHgap(0); gridLayout.setVgap(2); gridLayout.setRows(3); jLabel2 = new JLabel(); jLabel2.setText(Config.mapName); jPanel1 = new JPanel(); jPanel1.setLayout(gridLayout); jPanel1.add(jLabel2, null); jPanel1.add(getCreatenewVerse(), null); } return jPanel1; } COM: <s> this method initializes j panel1 </s>
funcom_train/16189456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String escape(String input, char[] matches) { StringBuffer buffer = new StringBuffer(input.length()+5); char[] chars = input.toCharArray(); for (int i=0; i < chars.length; i++) { char c = chars[i]; for (int j=0; j<matches.length; j++) { if (c==matches[j]) { buffer.append('\\'); } } buffer.append(c); } return buffer.toString(); } COM: <s> escapes the given characters by prepending a backslash </s>
funcom_train/33380128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SQLManager getSQLManager() { SQLManager datab = null; try { /* if (props != null) datab = SQLManager.getInstance(this.props); else */ datab = SQLManager.getInstance(); } catch (Exception pe) { throw new RuntimeException("Couldn't get a reference to the SQLManager: " + pe.toString()); } return datab; } COM: <s> reference the sqlmanager which contains all available jdbcpools </s>
funcom_train/4925221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddMultipleSections() { // Create the section type SectionType section = this .constructSectionType(new SectionTypeConstructor() { @Override public void construct(SectionTypeContext context) { } }); // Add the sections this.operations.addSection("SECTION", "Section1", "Location1", null, section, null).apply(); this.operations.addSection("SECTION", "Section2", "Location2", null, section, null).apply(); // Ensure appropriately added sections this.validateModel(); } COM: <s> ensure able to add multiple sections with clashing names </s>
funcom_train/32056604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDefaultGraphModelFileFormatXML() { DefaultGraphModelFileFormatXML dgmffs = new DefaultGraphModelFileFormatXML(); assertNotNull(dgmffs); assertNotNull(dgmffs.fileFilter.getDescription()); assertTrue(dgmffs.fileFilter.accept(new File("/tmp/tmp.pad_xml"))); assertFalse(dgmffs.fileFilter.accept(null)); assertFalse(dgmffs.fileFilter.accept(new File(""))); assertFalse(dgmffs.fileFilter.accept(new File("/tmp"))); } COM: <s> tests default constructor </s>
funcom_train/51704334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static class FilterEvent { protected Object source; protected IListFilter filter; /** Creates a new filter event. * @param source the object that issued the event * @param filter the new filter provided by this object */ public FilterEvent(Object source, IListFilter filter){ this.source = source; this.filter = filter; } /** @return the object that issued the event. */ public Object getSource(){ return this.source;} /** @return the new filter to use. */ public IListFilter getFilter(){ return this.filter;} } COM: <s> event issued when a search field or any other object providing filters </s>
funcom_train/41538218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteInstances(int[] rowIndices) { int[] realIndices; int i; realIndices = new int[rowIndices.length]; for (i = 0; i < rowIndices.length; i++) realIndices[i] = indexes[rowIndices[i]]; ((ArffTableModel) model).deleteInstances(realIndices); } COM: <s> deletes the instances at the given positions </s>
funcom_train/36003173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLsfileaeGenerate() throws Exception { /* Build the model */ CixsJbossEsbService cixsJbossEsbService = Samples.getLsfileaeService(); initCixsJbossEsbService(cixsJbossEsbService); mAntModel.setSampleConfigurationTransport(JBossESBTransport.JBM); mAntModel.getJbmTransportParameters().initialize(cixsJbossEsbService.getName()); processAnt(); } COM: <s> adapter case for an lsfileae </s>
funcom_train/31772065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeXMLHeader(String pstr_DocType, String pstr_DTD) throws IOException { write("<?xml version=\"1.0\"?>\n\r"); write("<!DOCTYPE " + pstr_DocType + " SYSTEM \"..\\XML\\" + pstr_DTD + ".dtd\">\n\r"); } COM: <s> writes the standard xml header and the given dtd to an export stream </s>
funcom_train/42259561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onStart(final Map<String, String> map) { /* * for (String key : map.keySet()) { log.info("Key: " + key + " Value: " * + map.get(key)); } */ final String args = map.get("args"); return args == null ? onStart(new String[0]) : onStart(args.split(",")); } COM: <s> the start method </s>
funcom_train/27976406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addMetamagicFeat (MetamagicFeat metamagicFeat) { // Create a new array of metamagic feats only when needed. if (this.metamagicFeats == null) { this.metamagicFeats = new Vector (); } boolean success = false; if (metamagicFeat.attachObject (this)) { this.metamagicFeats.add (metamagicFeat); success = true; } return (success); } COM: <s> add a metamagic feat to this spell </s>
funcom_train/18887034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getCharUnit(long offset) { return (encoding <= 2) ? XMLDoc.byteAt(offset) & 0xff : (encoding <= FORMAT_WIN_1258) ? decode(offset):(encoding == FORMAT_UTF_16BE) ? (XMLDoc.byteAt(offset << 1) << 8 | XMLDoc.byteAt((offset << 1) + 1)) : (XMLDoc.byteAt((offset << 1) + 1) << 8 | XMLDoc.byteAt(offset << 1)); } COM: <s> get the next char unit which gets decoded automatically </s>
funcom_train/27767659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getShortTemplateUsage(){ StringBuffer sb = new StringBuffer(200); if(options.length > 0){ sb.append(" "); if(!hasRequired){ sb.append("["); } sb.append("<options>"); if(!hasRequired){ sb.append("]"); } } return sb.toString(); } COM: <s> return a string describing the proper usage clause for the </s>
funcom_train/9533112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setIdField(CharacterI c, String id) { try { c.setValue("RefID",id); } catch (CharFieldException e) {log().error("cant set id field"+e.getMessage());} catch (TermNotFoundException x) { log().error(x); } } COM: <s> this should be read only and probably hidden </s>
funcom_train/21154721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endWaitScreenRequested(Displayable d) { //log("endWaitScreen >> begin; curr=" + getCurrDisplayable() + "; pBar=" + progressBarUI_); if (getCurrDisplayable() != d && d != getProgressBarUI()) { progressUI_ = null; replaceCurrent(d); } //log("endWaitScreen >> end"); } COM: <s> hide i wait i form and switch to other displayable object </s>
funcom_train/4008388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void process() { application.FieldUpdate fu = new application.FieldUpdate(); StringParser parse = new StringParser(); String hunter = m_Arguments.get("username"); int range = Integer.parseInt(m_Arguments.get("range")); int game = Integer.parseInt(m_Arguments.get("game")); fu.getUpdate(Integer.parseInt(m_Arguments.get("x")), Integer.parseInt(m_Arguments.get("y")), hunter, range, game, parse); m_Request.setAttribute("responseStr",parse.parse()); redirect(); } COM: <s> processes the field update </s>
funcom_train/28296254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLearnerID() { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - getLearnerID"); System.out.println(" ::--> " + mLearnerID); System.out.println(" :: SeqActivity --> END - getLearnerID"); } return mLearnerID; } COM: <s> retrives the a learner id associated with this activity </s>
funcom_train/22293763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Date getStartTime(List processSubtree) { long minTime = Long.MAX_VALUE; for (Iterator i=processSubtree.iterator(); i.hasNext(); ) { Process proc = (Process)i.next(); if (proc.startTime.getTime() < minTime) { minTime = proc.startTime.getTime(); } minTime = Math.min(minTime, getStartTime(proc.childList).getTime()); } return new Date(minTime); } COM: <s> returns the start time of the process subtree </s>
funcom_train/14372584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void gridStrips() { activeStripSet = new HashSet<Strip>(); inputChannelItemToStripSet = new HashMap<InputChannelItemInterface, Set<Strip>>(); for (Iterator<Strip> it = stripList.iterator() ; it.hasNext() ; ) { final Strip strip = it.next(); insertStripIntoGrid(strip); } fireStateChanged(STRIP_CHANGED, GridChangedEvent.ADD); } COM: <s> inserts the loaded strips into the strip split axis </s>
funcom_train/37590499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { try { // LOG.log("UndoAction.actionPerformed. _doc = "+_doc+", event = "+e); _doc.getUndoManager().undo(); _doc.updateModifiedSinceSave(); } catch (CannotUndoException ex) { throw new UnexpectedException(ex); } updateUndoState(); _redoAction.updateRedoState(); } COM: <s> what to do when user chooses to undo </s>
funcom_train/33373405
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BuildListener getListener(){ return (BuildListener)java.lang.reflect.Proxy.newProxyInstance( getClass().getClassLoader(), new Class[]{BuildListener.class}, new java.lang.reflect.InvocationHandler(){ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { return fire(method, args); } } ); } COM: <s> gets the build listener object that fires event to all </s>
funcom_train/2671843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String showInputDialog(Component parent, String message, String initial) { String answer; answer = (String) JOptionPane.showInputDialog(parent, message, Common.getAppTitle(), JOptionPane.PLAIN_MESSAGE, null, null, initial); return answer; } COM: <s> show a dialog with an input field and initial value </s>
funcom_train/36856239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Method findWriteMethod(String propertyName, Class cls, Class propertyType) { String name = "set" + Character.toUpperCase(propertyName.charAt(0)) + propertyName.substring(1); try { return cls.getMethod(name, propertyType); } catch (NoSuchMethodException ignore) {} return null; } COM: <s> attempt to find a write method for the specified property name </s>
funcom_train/10655963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetParagraphElement04() { final Element par = doc.getParagraphElement(doc.getLength() + 2); assertSame(root.getElement(root.getElementCount() - 1), par); assertEquals(BasicSwingTestCase.isHarmony() ? 1 : 2, par.getElementCount()); } COM: <s> tests getting paragraph at invalid offset to the right </s>
funcom_train/26133800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws RecordStoreNotOpenException, RecordStoreException { if (database.getNumRecords() == 0) { String fileName = database.getName(); database.closeRecordStore(); database.deleteRecordStore(fileName); } else { database.closeRecordStore(); } } COM: <s> p close the database and remove it from persistant </s>
funcom_train/15915106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIvyConfFile(String ivyConfigFilePath) { String fullFileName = ivyConfigFilePath; if (basedir != null) { fullFileName = basedir + System.getProperty("file.separator") + ivyConfigFilePath; } LOG.debug("Ivy conf file for project: [" + projectName + "] = " + fullFileName); this.ivyConfFile = new File(fullFileName); } COM: <s> will allow the resolver to be configured using this configuration file </s>
funcom_train/29900641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canModify(Object element, String property) { boolean result = true; // Find the index of the column. int columnIndex = m_attributeTree.getColumnNames().indexOf(property); Attribute attr = (Attribute) element; // Can't edit the attribute name column. if (columnIndex == 0) { result = false; } else { // Don't edit the tree node if it is read only. if (attr.isReadOnly()) { result = false; } else { // Prepare a new cell editor for the selected Attribute. prepCellEditor(attr); } } return result; } COM: <s> checks whether the given property of the given element can be modified </s>
funcom_train/9134353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setWeights(double[] weights) { assert locked == 0; double sum = 0; for (int i = 0; i < weights.length; ++i) sum += weights[i]; for (int i = 0; i < weights.length; ++i) weights[i] /= sum; this.weights = weights; // setMu(weights.length); double sum1 = 0; double sum2 = 0; for (int i = 0; i < mu; ++i) { sum1 += weights[i]; sum2 += weights[i] * weights[i]; } this.mueff = sum1 * sum1 / sum2; } COM: <s> normalizes recombination weights vector and sets mueff </s>
funcom_train/49628129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fullyInitVariants(final IHasVariants iHasVariants) { for (IHasVariants variant : iHasVariants.getVariants()) { if (variant instanceof StoreVariant) { StoreVariant storeVariant = (StoreVariant) variant; if (storeVariant.getMainImage() != null) { storeVariant.getMainImage().init(); } for (StoreContentImageGroup image : storeVariant .getAlternativeImages()) { image.init(); } } if (!variant.getVariants().isEmpty()) { fullyInitVariants(variant); } } } COM: <s> fully initialises the variants of the content </s>
funcom_train/6407643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performAction(InputActionEvent evt) { Vector3f loc = camera.getLocation(); if(upVector != null) { loc.addLocal(upVector.mult(speed * evt.getTime(), tempVa)); camera.update(); } else { loc.addLocal(camera.getUp().mult(speed * evt.getTime(), tempVa)); camera.update(); } } COM: <s> code perform action code moves the camera along the up vector for a </s>
funcom_train/8088366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String result; if (m_FilteredInstances == null) { result = "FilteredAssociator: No model built yet."; } else { result = "FilteredAssociator using " + getAssociatorSpec() + " on data filtered through " + getFilterSpec() + "\n\nFiltered Header\n" + m_FilteredInstances.toString() + "\n\nAssociator Model\n" + m_Associator.toString(); } return result; } COM: <s> output a representation of this associator </s>
funcom_train/41164265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(AgStatusTest entity) { EntityManagerHelper.log("saving AgStatusTest instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved ag status test entity </s>
funcom_train/46428080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void singlePremiseTask(BudgetValue budget, Term content, TruthValue truth) { Sentence sentence = currentTask.getSentence(); Sentence newSentence = Sentence.make(sentence, content, truth, sentence.getBase(), this); Task newTask = new Task(newSentence, budget, this); newTask.setStructual(); derivedTask(newTask); } COM: <s> shared final operations by all single premise rules called in structural rules </s>
funcom_train/15627467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean doExitPaste(final boolean performAction) { final MapView<G, A, R> mapView = currentMapView; if (mapView == null) { return false; } final Point targetLocation = mapView.getMapCursor().getLocation(); return targetLocation != null && exitConnectorActions.doExitPaste(performAction, mapView.getMapControl(), targetLocation); } COM: <s> performs or checks availability of the exit paste action </s>
funcom_train/9761780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setTrackParameters(String trackType, String trackLine, String[] trackNames) { if (outputFile != null && writer == null) { writer = new TDFWriter(outputFile, trackName, trackType, trackLine, trackNames, windowFunctions, compressed); nTracks = trackNames.length; TDFGroup rootGroup = writer.getRootGroup(); rootGroup.setAttribute("genome", trackName); rootGroup.setAttribute("maxZoom", String.valueOf(nZoom)); } } COM: <s> called to set inital parameters </s>
funcom_train/47184101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProcedureBean getCPTCode(String code) throws DBException { Connection conn = null; PreparedStatement ps = null; try { conn = factory.getConnection(); ps = conn.prepareStatement("SELECT * FROM CPTCodes WHERE Code = ?"); ps.setString(1, code); ResultSet rs = ps.executeQuery(); if (rs.next()) return procedureBeanLoader.loadSingle(rs); return null; } catch (SQLException e) { e.printStackTrace(); throw new DBException(e); } finally { DBUtil.closeConnection(conn, ps); } } COM: <s> returns a particular procedure description for a code </s>
funcom_train/8123226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertUpdate(DocumentEvent e) { int count = daddy.getLineCount() + 1; //the first byte is for line no. -1 int length = lineTypes.length; if (count >= length) { int amount = lineTypesIncrement; while (count >= length + amount) amount += lineTypes.length; byte tmp[] = new byte[lineTypes.length + amount]; System.arraycopy(lineTypes, 0, tmp, 0, length); lineTypes = tmp; } } COM: <s> this will ensure that line types vector is long enough to </s>
funcom_train/44490058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public boolean isBros ( Sbj a, Sbj b ) { return ( !a.getFTH ( _fml ).equals ( a.getMTH ( _fml ) ) && a.getFTH ( _fml ).equals ( b.getFTH ( _fml ) ) && a.getMTH ( _fml ).equals ( b.getMTH ( _fml ) ) ); } COM: <s> returns true if the subjects have the same father and mother </s>
funcom_train/1926979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (o.getClass() == this.getClass()) { if (!this.hasVar) return (!((VarBox)o).hasVar()); return var.equals(((VarBox)o).getVar()); } else return false; } COM: <s> test for equality </s>
funcom_train/21125496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addListener(EventReceivedListener oListener) { // check argument and list if((this.m_oEventReceivedListeners != null) && (oListener != null) && (!this.m_oEventReceivedListeners.contains(oListener))) { // add listener this.m_oEventReceivedListeners.add(oListener); } } COM: <s> adds listener for the event received event </s>
funcom_train/26208061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processForRuleEd(FzyRule fr) { infosapient.ui.InfoSapientRuleEditor sre = null; if (fr == null) { sre = new infosapient.ui.InfoSapientRuleEditor(this); } else { sre = new infosapient.ui.InfoSapientRuleEditor(this, fr); } sre.setVisible(true); } COM: <s> open an editor on the specified rule </s>
funcom_train/35278216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeChildShape(CollisionShape shape) { ((CompoundShape) cShape).removeChildShape(shape.getCShape()); for (Iterator<ChildCollisionShape> it = children.iterator(); it.hasNext();) { ChildCollisionShape childCollisionShape = it.next(); if (childCollisionShape.shape == shape) { it.remove(); } } } COM: <s> removes a child shape </s>
funcom_train/9296493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getCenterPanel() { if (centerPanel == null) { centerPanel = new JPanel(); centerPanel.setPreferredSize(new java.awt.Dimension(97,133)); centerPanel.add(getCopyRight(), null); centerPanel.add(getCopyLeft(), null); centerPanel.add(getMoveLeftBtn(), null); centerPanel.add(getMoveRightBtn(), null); } return centerPanel; } COM: <s> this method initializes center panel </s>
funcom_train/32304124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration getChildrenOf( Node node ) { isNodePresent( node ); // if its in this object, it must be a SparseNode // (guaranteed by representation given above) SparseNode snode = (SparseNode) node; ColorableGraphImpl.HiddenFilteringEnum filter = new ColorableGraphImpl.HiddenFilteringEnum(snode.getToNodes()); return filter; } COM: <s> constructs an enumeration for the children of a specific node </s>
funcom_train/43245137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPatientHRN() { System.out.println("getPatientHRN"); PatientDemographicsDG1Object instance = new PatientDemographicsDG1Object(); String expResult = ""; String result = instance.getPatientHRN(); 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 patient hrn method of class org </s>
funcom_train/20913965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String fmt(String message, Object expected, Object actual) { StringBuffer buf = new StringBuffer(); if (message != null) { buf.append(message).append(": "); } buf.append("Expected <"); buf.append(expected); buf.append("> but was <"); buf.append(actual).append(">"); return buf.toString(); } COM: <s> format a failure message </s>
funcom_train/25787938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(ODataType o) { if (o == null) { return 1; } int result = 0; String s1 = getFullClassName(); String s2 = o.getFullClassName(); if (s1 != null) { result = s1.compareTo(s2); } else if (s2 != null) { result = -1 * s2.compareTo(s1); } return result; } COM: <s> compares this object with the specified object for order </s>
funcom_train/50911057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMax(int max) throws EuclidRuntimeException { for (int i = 0; i < nelem; i++) { if (array[i] > max) { throw new EuclidRuntimeException("element in set (" + array[i] + ") greater than new max (" + max + S_RBRAK); } } this.max = max; } COM: <s> set maximum allowed value </s>
funcom_train/30046784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initResources(PortletSession session) { String resourcesStr = getInitParameter(GRAMJobConstants.RESOURCES); logger.debug("resources init param: " + resourcesStr); String[] resources = resourcesStr.split(","); if (resources != null) for (int i = 0; i < resources.length; i++) logger.debug("resource: " + resources[i]); session.setAttribute(GRAMJobConstants.RESOURCES, resources); } COM: <s> initialize the array of available resources to submit a job to </s>
funcom_train/12168256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void ensureModelObjectCompatability(Object modelObject) { TypeDescriptor descriptor = getTypeDescriptor(); Class typeClass = descriptor.getTypeClass(); if (modelObject != null && !typeClass.isInstance(modelObject)) { throw new IllegalArgumentException("Incompatible model object " + modelObject + " not instance of " + typeClass); } } COM: <s> check to see whether the model object is compatible with this proxy </s>
funcom_train/19309401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MetricsFile metricsFileFactory() throws IOException, FontException { switch (this.metricsFormat) { case MetricsFileReader.METRICSFORMAT_PFM: { return new MetricsFilePFM(this); } case MetricsFileReader.METRICSFORMAT_AFM: { return new MetricsFileAFM(this); } default: { return null; } } } COM: <s> creates an appropriate </s>
funcom_train/33606738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCopy() { System.out.println("copy"); R2 instance = new R2(); Coordinate expResult = null; Coordinate result = instance.copy(); 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 copy method of class r2 </s>
funcom_train/34068106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Model getModel(ResourceFile resource, boolean shared) throws IOException { URL url = resource.getURL(); if (!shared) { return new Model("", url, url); } if (modelCache.get(resource) == null) { Model geometry = new Model("", url, url); modelCache.put(resource, geometry); } return new SharedModel("", modelCache.get(resource), false); } COM: <s> loads a model </s>
funcom_train/47712366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGenerate(boolean isGenerate, int processorsCount) { try { JSONArray parameters = new JSONArray().element(isGenerate).element(processorsCount); JSONObject request = createRequest("setgenerate", parameters); session.sendAndReceive(request); } catch (JSONException e) { throw new BitcoinClientException("Exception when setting whether the server is generating coins or not", e); } } COM: <s> turn on off coins generation </s>
funcom_train/20989015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateLookAndFeel(String newlnfClassName) { if(newlnfClassName != null) { try { UIManager.setLookAndFeel(newlnfClassName); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (UnsupportedLookAndFeelException e) { e.printStackTrace(); } SwingUtilities.updateComponentTreeUI(getMe()); } } COM: <s> try to set an new look and feel </s>
funcom_train/46477785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDoDomainsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DomainsDiagram_DoDomains_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DomainsDiagram_DoDomains_feature", "_UI_DomainsDiagram_type"), SecurityContextPackage.Literals.DOMAINS_DIAGRAM__DO_DOMAINS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the do domains feature </s>
funcom_train/17458441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXFade(int xFade) throws MPDConnectionException, MPDPlayerException { try { mpd.sendMPDCommand(makeCommand(prop.getProperty(MPDPROPXFADE), new String[]{Integer.toString(xFade)})); } catch (MPDResponseException re) { throw new MPDPlayerException(re.getMessage(), re.getCommand()); } } COM: <s> sets the cross fade of the player in seconds </s>
funcom_train/10616656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNoSuchAlgorithmException01() { NoSuchAlgorithmException tE = new NoSuchAlgorithmException(); assertNull("getMessage() must return null.", tE.getMessage()); assertNull("getCause() must return null", tE.getCause()); } COM: <s> test for code no such algorithm exception code constructor assertion </s>
funcom_train/7617069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GraphicsConfiguration getGraphicsConfiguration() { // ???AWT /* * toolkit.lockAWT(); try { Window win = getWindowAncestor(); if (win == * null) { return null; } return win.getGraphicsConfiguration(); } * finally { toolkit.unlockAWT(); } */ return null; } COM: <s> gets the graphics configuration associated with this component </s>
funcom_train/36196340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setItemCount(int count) { checkWidget(); if (DEBUG) System.out.println("setCount" + count); if (count == 0) { // No items items = null; } else { // At least one item, create a new array and copy data from the // old one. GalleryItem[] newItems = new GalleryItem[count]; if (items != null) { System.arraycopy(items, 0, newItems, 0, Math.min(count, items.length)); } items = newItems; } updateStructuralValues(false); this.updateScrollBarsProperties(); redraw(); } COM: <s> sets the number of root level items contained in the receiver </s>
funcom_train/31651144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document getMessageAsDocument(byte[] message, String dataSource) throws Exception{ dsManager = DataSourceManager.newInstance( ); DataSource ds = dsManager.loadDataSource(dataSource); if(ds==null) throw new Exception("No DataSource defined with the name '"+dataSource+"'"); return ds.marshall(new ByteArrayInputStream(message)); } COM: <s> transforms a byte message into a org </s>
funcom_train/972396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void accelerate(final float direction, float power) { float accelCoeff = (0.3f + 0.7f * (tractionAxis.getVelocity() / carsConfig.WHEEL_SPEED)); if (accelCoeff > 1) accelCoeff = 1; if (accelCoeff < 0) accelCoeff = 0.1f; // System.out.println("accelCoeff" + accelCoeff); tractionAxis.setDesiredVelocity(direction * carsConfig.WHEEL_SPEED); tractionAxis.setAvailableAcceleration(carsConfig.WHEEL_ACCEL * accelCoeff); } COM: <s> accelerates this wheel by setting the desired velocity for its traction </s>
funcom_train/22383684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTrivialFunction() { ZZCell main = home.N(); main.setText("ten plus two"); Expression mul = new Expression(sp, "+"); mul.connect(main); mul.set("d.1", -1, 10); mul.set("d.1", 1, 2); Expression func = new Expression(sp, main); int result = Data.i(Archimedes.evaluateExpression(func, empty)); assertTrue(result == 12); } COM: <s> test a function without parameters </s>
funcom_train/23020228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setQuery(String queryName, String queryValue) throws URIException, NullPointerException { StringBuffer buff = new StringBuffer(); // set the charset to do escape encoding String charset = getProtocolCharset(); buff.append(encode(queryName, allowed_within_query, charset)); buff.append('='); buff.append(encode(queryValue, allowed_within_query, charset)); _query = buff.toString().toCharArray(); setURI(); } COM: <s> set the query as the name and value pair </s>
funcom_train/33728408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean roomConnect(IConnection conn, Object[] params) { if (conn instanceof IServiceCapableConnection) { IServiceCapableConnection sc = (IServiceCapableConnection) conn; String chatLog = chatListener.getChatLog(); // call client method remotely to send chat Log sc.invoke("setChatLog", new Object[]{chatLog}); } return true; } COM: <s> this method is called every time new client connects to the application </s>
funcom_train/9436062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setWatchdog(long accountId, AlarmManager alarmMgr) { PendingIntent pi = createAlarmIntent(accountId, null, true); long timeNow = SystemClock.elapsedRealtime(); long nextCheckTime = timeNow + WATCHDOG_DELAY; alarmMgr.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, nextCheckTime, pi); } COM: <s> create a watchdog alarm and set it </s>
funcom_train/28272993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void applyCustomerInfo(Order order){ Customer customer = remote.getCustomer(); order.setCustomer(customer); order.setCustomersTelephone(customer.getCustomersTelephone()); order.setCustomersEmailAddress(customer.getCustomersEmailAddress()); order.setCurrency(userCurrency.getCode()); order.setCurrencyValue(userCurrency.getValue().doubleValue()); order.setOrdersStatus(orderStatusId); order.setDatePurchased(FacesUtil.getTime()); order.setPaymentMethod(paymentMethod.getMethodName()); } COM: <s> apply customer info </s>
funcom_train/5815253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void install(AbstractUIProgressHandler listener) { IUnpacker unpacker = UnpackerFactory.getUnpacker(this.installdata.info.getUnpackerClassName(), installdata, listener); Thread unpackerthread = new Thread(unpacker, "IzPack - Unpacker thread"); unpackerthread.start(); /* Unpacker unpacker = new Unpacker(installdata, listener); unpacker.start(); */ } COM: <s> launches the installation </s>
funcom_train/28750207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxnumingroup(Long newVal) { if ((newVal != null && this.maxnumingroup != null && (newVal.compareTo(this.maxnumingroup) == 0)) || (newVal == null && this.maxnumingroup == null && maxnumingroup_is_initialized)) { return; } this.maxnumingroup = newVal; maxnumingroup_is_modified = true; maxnumingroup_is_initialized = true; } COM: <s> setter method for maxnumingroup </s>
funcom_train/11037908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TargetResolver getTargetResolverChain() { if (targetResolvers.isEmpty()) { return null; } return new TargetResolver() { public void resolveTarget(MessageContext messageContext) { Iterator<TargetResolver> iter = targetResolvers.iterator(); while (iter.hasNext()) { TargetResolver tr = iter.next(); tr.resolveTarget(messageContext); } } }; } COM: <s> get target resolver chain returns an instance of </s>
funcom_train/9772471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ZipEntry getZipEntry(String entryName) { ZipEntry ze = null; Enumeration entries = iZipFile.entries(); // list the contents of each zipped entry while (entries.hasMoreElements()) { ZipEntry e = (ZipEntry) entries.nextElement(); if (e.getName().equals(entryName)) { ze = e; break; } } return ze; } COM: <s> returns one entry from the zip file </s>
funcom_train/50878947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Envelope getLayerEnvelope() throws Exception{ // loop through all the layers getting the maximum and minimum bounds EnvelopeBuffer tempEnvelopeBuffer = new EnvelopeBuffer(); for (int i = 0; i < myLayers.length; i++) { tempEnvelopeBuffer.expandToInclude(myLayers[i].getEnvelope()); } return tempEnvelopeBuffer.getEnvelope(); } COM: <s> get the default bounds from all of the layers </s>
funcom_train/36147812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long next_long() { String str = readString(); if (str == null || "".equals(str)) { return 0; } char sep1 = StringUtils.nextCharacterSeparator(getBuffer().getDelimiter()); StringTokenizer stk = new StringTokenizer(str, sep1); stk.next(); String value = stk.next(); return Long.parseLong(value); } COM: <s> gets the next long object </s>
funcom_train/9498250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public double evaluate(double x) { if (interval) { // check if x is in interval [a, b] if ( !(a <= x && x <= b) ) return Double.NaN; } fVar.set(x); return ((NumberValue) expression.evaluate()).getDouble(); } COM: <s> returns this functions value at position x </s>
funcom_train/46747210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUpdateUserRef(DisplayModel updateUserRef) { if (Converter.isDifferent(this.updateUserRef, updateUserRef)) { DisplayModel oldupdateUserRef= new DisplayModel(this); oldupdateUserRef.copyAllFrom(this.updateUserRef); this.updateUserRef.copyAllFrom(updateUserRef); setModified("updateUserRef"); firePropertyChange(String.valueOf(REMINDERS_UPDATEUSERREFID), oldupdateUserRef, updateUserRef); } } COM: <s> date the reminder was last updated </s>
funcom_train/7882077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Icon getDisabledIcon(AbstractButton button) { Icon icon = button.getIcon(); if ((icon instanceof ImageIcon) && XPLookAndFeel.usingOcean()) { return XPUtils.getOceanDisabledButtonIcon( ((ImageIcon)icon).getImage()); } return button.getDisabledIcon(); } COM: <s> returns the icon to display when the button is disabled </s>