__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/29693390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(MapSettings mapSettings, boolean updateSize) { this.mapSettings = (MapSettings)mapSettings.clone(); if (updateSize) { refreshMapSize(); refreshMapButtons(); } refreshBoardsSelected(); refreshBoardsAvailable(); butOkay.setEnabled(true); } COM: <s> updates to show the map settings that have presumably just been sent </s>
funcom_train/44325325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IDataPageManager newPageManager() throws DataManagementException { String name = getClass().getName().replace('.', '_') + ".test"; File file = new File(name); if (file.exists()) file.delete(); return new FileDataPageManager(name, 10); } COM: <s> creates and returns a new instance of a page manager </s>
funcom_train/11742451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object convertToClobValue(Object value) { if (value instanceof char[]) { char[] chars = (char[]) value; return (chars.length == 0) ? null : chars; } else { String strValue = value.toString(); return (strValue.length() == 0) ? null : strValue; } } COM: <s> converts to char or string </s>
funcom_train/17277988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean walk(Node root) { if (!visitor.visit(root)) { if (root.hasChildren()) { Node child = root.getFirstChild(); for (; child != null; child = child.getNext()) { if (walk(child)) { return true; } } } } if (visitor.unvisit(root)) { return true; } return false; } COM: <s> walk the given ast tree from the given root node </s>
funcom_train/32222237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ITerm ellyTermAsIrisTerm(org.sti2.elly.api.terms.ITerm term) { if (term instanceof IIndividual) { return individualAsTerm((IIndividual) term); } if (term instanceof IConcreteTerm) { return ((ConcreteTerm)term).asIRISTerm(); } if (term instanceof IVariable) { return ellyVariableAsIrisVariable((IVariable) term); } throw new IllegalArgumentException("elly term cannot be handled."); } COM: <s> creates an iris term from an elly term </s>
funcom_train/44712761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void swapKeys(DataOperation operation, int key, int nextKey) { operation.setParameter("sortKey", new BigDecimal(key)); operation.setParameter("nextSortKey", new BigDecimal(nextKey)); operation.setParameter("parentID", getID()); operation.execute(); } COM: <s> this does the actual swapping of keys </s>
funcom_train/10361457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateLookupMethods(final BeanDefinition beanDefinition, final ElementBuilder builder) { if (beanDefinition instanceof AbstractBeanDefinition) { AbstractBeanDefinition def = (AbstractBeanDefinition) beanDefinition; MethodOverrides overrides = def.getMethodOverrides(); @SuppressWarnings({"unchecked"}) Set<MethodOverride> overridesSet = overrides.getOverrides(); for (MethodOverride override : overridesSet) { generateMethodOverride(override, builder); } } } COM: <s> generates lookup methods for given bean definition </s>
funcom_train/46702989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Appendable printSequenceInit(final UjoSequencer sequence, final Appendable out) throws IOException { Integer cache = MetaParams.SEQUENCE_CACHE.of(sequence.getDatabase().getParams()); out.append("INSERT INTO "); printSequenceTableName(sequence, out); out.append(" (id,seq,cache) VALUES (?,"+cache+","+cache+")"); return out; } COM: <s> print sql create sequence insert sequence row </s>
funcom_train/15607720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getSubjectSequenceLength(DataLoader featureLoader, OID featureOid) { String returnString = null; for (Iterator it = featureLoader.getSubjectSequenceOids(featureOid).iterator(); it.hasNext(); ) { OID subjectSequenceOid = (OID)it.next(); returnString = featureLoader.getSequenceLength(subjectSequenceOid); } // For all iterations. return returnString; } // End method: getSubjectSequenceLength COM: <s> returns subject sequence length property value which it calculates from value </s>
funcom_train/7271049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintComponent(java.awt.Graphics g) { if(isDithering && isOpaque() && !DITHERER.getFromColor().equals(DITHERER.getToColor())) { Dimension size = getSize(); DITHERER.draw(g, size.height, size.width); } else super.paintComponent(g); } COM: <s> does the actual placement of the background image </s>
funcom_train/36557787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getSkinTone(float[] rgbOut) { if (rgbOut == null || rgbOut.length < 3) throw new IllegalArgumentException("Unacceptable array provided!"); rgbOut[0] = skinTone[0]; rgbOut[1] = skinTone[1]; rgbOut[2] = skinTone[2]; } COM: <s> retrieve the skin tone value </s>
funcom_train/39896310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setUpEditDialog() { my_edit_dialog.add(createJPanel()); //adds a JPanel to the JDialog my_edit_dialog.setResizable(false); //disables resizing my_edit_dialog.pack(); my_edit_dialog.setLocationRelativeTo(null); my_edit_dialog.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); my_edit_dialog.setVisible(true); } COM: <s> sets up the edit dialog box </s>
funcom_train/48454652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isPlayerLeagueMember(Integer playerId, Long leagueId) { String sql = "select count(*) from " + LEAGUE_PLAYERS_TABLE + " where " + LEAGUE_PLAYERS_LEAGUE_ID + " = ? and " + LEAGUE_PLAYERS_PLAYER_ID + " = ?"; return simpleJdbcTemplate.queryForInt(sql, leagueId.intValue(), playerId) > 0; } COM: <s> determines if player is member of a specific league </s>
funcom_train/22850222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean needSubDevide( float threshold ) { if (!this.visible) { return false; } // compare each pair of patches for( int m = 0; m < 4; m++ ) { for( int n = 0; n < m; n++ ) { float diff = this.fourPatches[m].getMaxRadDifference(this.fourPatches[n]); if (diff > threshold) { return true; } } } return false; } COM: <s> checks if this patch group must be subdivided </s>
funcom_train/43036450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMessage(Player p, String s) { if (p == null || p.stream == null || p.disconnected[0]) { return; } p.stream.createFrameVarSize(218); p.stream.writeString(s); p.stream.endFrameVarSize(); } COM: <s> display a message in the chatbox </s>
funcom_train/19810653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testFindAllAffiliatedResearchers() { Researcher researcher = new Researcher(); researcher.setName("Test resaercher"); researcher.setOrganization("Test Organization"); assertFalse("Test Organization should not be found", this.myIsern.addResearcherToOrganization(researcher)); assertFalse("There are bugs in the system", this.myIsern.findAllAffiliatedResearchers()); } COM: <s> test find all affiliate researchers </s>
funcom_train/17787772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumOriginalPrecinctsWide() { CADIRectangle bounds = getBounds(); int tmp = getParent().getOriginalPrecinctWidths(rLevel); return (int)Math.ceil(1.0 * (bounds.x + bounds.width) / tmp) - (int)Math.floor(1.0 * bounds.x / tmp); } COM: <s> returns the number of virtual precincts in the wide dimension </s>
funcom_train/27782601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCmd(Character way, int cmd) { Cell c = at(way); if (c == null) { c = new Cell(); c.cmd = cmd; cells.put(way, c); } else { c.cmd = cmd; } c.cnt = (cmd >= 0) ? 1 : 0; } COM: <s> set the command in the cell of the given character to the given </s>
funcom_train/15677681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LinearShape2D formatLine(LinearShape2D line) { line = line.transform(AffineTransform2D.createTranslation(-xc, -yc)); line = line.transform(AffineTransform2D.createRotation(-theta)); line = line.transform(AffineTransform2D.createScaling(1.0/a, 1.0/b)); return line; } COM: <s> change coordinate of the line to correspond to a standard hyperbola </s>
funcom_train/11672900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL getHelpForClass(Class c) { String name = c.getName(); name = name.replace('.', '/') + ".html"; URL url = helpLocator.findResource(name); logger.debug("located help resource for '" + name + "' at " + ((url == null) ? "" : url.toExternalForm())); return (url != null) ? url : ChainsawConstants.URL_PAGE_NOT_FOUND; } COM: <s> determines the most appropriate help resource for a particular class </s>
funcom_train/16951448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fclTreeRuleBlockActivation(Tree tree) { String type = tree.getChild(0).getText(); if( debug ) Gpr.debug("Parsing: " + type); if( type.equalsIgnoreCase("MIN") ) ruleActivationMethod = new RuleActivationMethodMin(); else if( type.equalsIgnoreCase("PROD") ) ruleActivationMethod = new RuleActivationMethodProduct(); else throw new RuntimeException("Unknown (or unimplemented) 'ACT' method: " + type); } COM: <s> parse rule implication method or rule activation method </s>
funcom_train/18803678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { System.out.println("Copy action activated"); if (this.currentEditor.hasSelectedFiles()) { ICommodoreFile[] commodoreFiles = this.currentEditor.getSelectedFiles(); setClipboard(commodoreFiles); // update the enablement of the paste action // workaround since the clipboard does not suppot callbacks if (pasteAction != null) { pasteAction.setEnabled(true); } } else { //nothing to do } } COM: <s> the code copy action code implementation of this method defined </s>
funcom_train/35298832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processSequenceStarted(int minIndex) { if (progressListeners == null) { return; } int numListeners = progressListeners.size(); for (int i = 0; i < numListeners; i++) { IIOReadProgressListener listener = (IIOReadProgressListener)progressListeners.get(i); listener.sequenceStarted(this, minIndex); } } COM: <s> broadcasts the start of an sequence of image reads to all </s>
funcom_train/4375142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createPortAttribute(int[] ports) { StringBuffer portValue = new StringBuffer(); for (int i = 0, len = ports.length; i < len; i++) { if (i > 0) { portValue.append(","); } portValue.append(ports[i]); } return portValue.toString(); } COM: <s> retrieves valid port attribute value for the given ports array </s>
funcom_train/9642118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setColumnNames() { DataRecordSet dataset = om.getDataView().dataset(); java.util.Iterator<Attribute> attIter = dataset.attributeIterator(); List<String> columnNameList = new ArrayList<String>(); while (attIter.hasNext()) { columnNameList.add(attIter.next().getDescription()); } columnNames = columnNameList.toArray(new String[columnNameList.size()]); } COM: <s> sets the column names </s>
funcom_train/19761929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFinanceEnums() throws Exception { _logger.info("----------------------------------------------------------------------------"); _logger.info("Testing com.netstoke.core.finance package."); Class[] classes = new Class[]{AccountingTransactionType.class}; testEnumValues(classes); Long id = null; try { AccountingTransactionType.valueOf(id);fail(); } catch (NullPointerException e) {assertFalse(e.getMessage().contains("!"));} try { id = 9000L;AccountingTransactionType.valueOf(id);fail(); } catch (IllegalArgumentException e) {assertFalse(e.getMessage().contains("!"));} } COM: <s> tests finance package enum values </s>
funcom_train/3598101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPointerSimple() { try { List results = engine.search(nom, "($w word)($n np):$w>$n"); results.remove(0); // remove list of vars assertTrue(results.size()==1); NOMElement r1 = (NOMElement)((List)results.get(0)).get(0); NOMElement r2 = (NOMElement)((List)results.get(0)).get(1); assertTrue(r1.getID().equals("w_7")); assertTrue(r2.getID().equals("np_1")); } catch (Throwable ex) { ex.printStackTrace(); fail("Pointer (simple) failed!"); } } COM: <s> check simple pointers are correctly returned without checking </s>
funcom_train/21343744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); // Create an array of Strings, that will be put to our ListActivity // Create an ArrayAdapter, that will actually make the Strings above appear in the ListView this.setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, opts)); } COM: <s> called when the activity is first created </s>
funcom_train/19436497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void readTemplates(TemplatePack pack, Configuration config) { // -- determine the amount of templates int size = config.getList("template[@name]").size(); // -- read the templates for (int i = 0; i < size; i++) readTemplate(pack, config.subset(String.format("template(%d)", i))); } COM: <s> read all the templates from the given configuration </s>
funcom_train/3925420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getClassCount( String typeString ) { String[] typeList = (String[])NodeType.typeTable.get( typeString ); if ( typeList != null ) { System.out.println( "Count for nodeType '" + typeString + "' is " + typeList.length ); return( typeList.length ); } else { System.out.println( "Count for actualType '" + typeString + "' is 0" ); return( 0 ); } } COM: <s> how many node classes including protos exist for a particular actual type </s>
funcom_train/823454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DOMImplementation getDOMImplementation(final String features) { int size = sources.size(); for (int i = 0; i < size; i++) { DOMImplementationSource source = (DOMImplementationSource) sources.elementAt(i); DOMImplementation impl = source.getDOMImplementation(features); if (impl != null) { return impl; } } return null; } COM: <s> return the first implementation that has the desired features or </s>
funcom_train/3966520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix multiplyMatrix(Complex constant){ Matrix c = new Matrix(this.getWidth(),this.getHeight()); for ( int i=0; i < c.getHeight(); i++){ for ( int j = 0; j < c.getWidth(); j++){ c.setElement(j, i,Complex.multiplyComplex(constant,this.getElement(j, i))); } } return c; } COM: <s> a method to multiply a matrix by a constant complex number </s>
funcom_train/1123412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveImage(String filename) throws IOException { OutputStream out = new FileOutputStream(filename); Color bg = null; // Use this to make the background transparent bg = graph.getBackground(); // Use this to use the graph background BufferedImage img = graph.getImage(bg, 0); ImageIO.write(img, "png", out); out.flush(); out.close(); } COM: <s> saves image to a file of given name </s>
funcom_train/3810193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DateFormat getDateFormatForPattern(String pPattern) { if (pPattern == null) { return null; } Locale locale = getLocale(); if (locale == null) { return new SimpleDateFormat(pPattern); } else { return new SimpleDateFormat(pPattern, locale); } } COM: <s> p returns an instance of date format with the given </s>
funcom_train/48747560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getStatus() throws AuthValidationException { if (vq == null) { throw new AuthValidationException("Use loadQueueEntry(...) method first"); } try { String status = vq.getField(vq.FLD_STATUS_CODE); return status; } catch (DBException dbe) { throw new AuthValidationException("DB error", dbe); } } COM: <s> returns the current status of the validation request </s>
funcom_train/39475183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void randomize(Random random, double range) { for (int i = 0; i < weights.length; i++) { for (int j = 0; j < weights[i].length; j++) { weights[i][j] = random.nextGaussian() * range; } } } COM: <s> randomize the weights </s>
funcom_train/39369815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getTransposeFor(int dim1, int dim2, int shapeLength) { String s = ""; for (int i = 1; i <= shapeLength; i++) { if (i == dim1 + 1) { s += dim2 + 1; } else if (i == dim2 + 1) { s += dim1 + 1; } else { s += i; } } return s; } COM: <s> returns a string representing the transpose of two specified dimensions within a shape </s>
funcom_train/8311962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private StringBuffer getStringValue(Node node, StringBuffer buffer) { if (isText(node)) { buffer.append(node.getNodeValue()); } else { NodeList children = node.getChildNodes(); int length = children.getLength(); for (int i = 0; i < length; i++) { getStringValue(children.item(i), buffer); } } return buffer; } COM: <s> construct a nodes string value recursively </s>
funcom_train/40627260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start(boolean isAutoClean) { if(!isActive) { myIsAutoClean = isAutoClean; myTimer = new Timer("GWTEventService-UserActivityScheduler", true); myTimeoutTimerTask = new TimeoutTimerTask(); isActive = true; schedule(myTimer, myTimeoutTimerTask, myTimeoutInterval); } } COM: <s> that method starts the user activity scheduler to observe the users clients </s>
funcom_train/33835021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand3() { if (backCommand3 == null) {//GEN-END:|54-getter|0|54-preInit // write pre-init user code here backCommand3 = new Command("Back", Command.BACK, 0);//GEN-LINE:|54-getter|1|54-postInit // write post-init user code here }//GEN-BEGIN:|54-getter|2| return backCommand3; } COM: <s> returns an initiliazed instance of back command3 component </s>
funcom_train/3174699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSource(InputSource source) { unselect(source); // keep int oldSize = thumbs.size(); for (Thumbnail thumb : new ArrayList<Thumbnail>(thumbs)) { if (thumb.source==source) thumbs.remove(thumb); } // signal firePropertyChange("content", oldSize, thumbs.size()); // show showAll(); } COM: <s> remove a source </s>
funcom_train/17705795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private GamepadDirection getCompassDirection(int xA, int yA) { float xCoord = components[xA].getPollData(); float yCoord = components[yA].getPollData(); int xc = Math.round(xCoord); int yc = Math.round(yCoord); return GamepadDirection.getDirection(xc, yc); } COM: <s> return the axes as a single compass value </s>
funcom_train/13381805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setContradiction(long a, long b){ Integer cidA = elementToCid.get(a); if(areEquivalent(a, b)) return false; if(cidA==null){ cidA = createClass(); elementToCid.put(a, cidA); } Integer cidB = elementToCid.get(b); if(cidB==null){ cidB = createClass(); elementToCid.put(b, cidB); } cidToContradictingCids.get(cidA).add(cidB); cidToContradictingCids.get(cidB).add(cidA); return true; } COM: <s> marks the equivalence classes of a and b as contradictory </s>
funcom_train/44169202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canBeEquippedWith(EquipmentType equipmentType) { for (Entry<String, Boolean> entry : equipmentType.getUnitAbilitiesRequired().entrySet()) { if (hasAbility(entry.getKey()) != entry.getValue()) { return false; } } if (equipment.getCount(equipmentType) >= equipmentType.getMaximumCount()) { return false; } return true; } COM: <s> checks whether this unit can be equipped with the given </s>
funcom_train/50557539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { String value = getProperty(FILENAME_PROPERTY); if (value != null){ this.filename = value; }else{ throw new CanyamoRuntimeException("Propiedad 'filename' no especificada"); } value = getProperty(MIMETYPE_PROPERTY); if (value != null){ this.mimeType = value; }else{ throw new CanyamoRuntimeException("Propiedad 'mime-type' no especificada"); } } COM: <s> runs at displayers initialization time </s>
funcom_train/31684645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDetails(String sDetails) throws PopulateException { if (m_bIsDetailsPopulated == false) { try { populateDetails(); } catch (DataStoreException e) { throw new PopulateException("Error populating details", e); } } if (m_details.contains(sDetails) == false) { m_details.add(sDetails); m_bIsChanged = true; } } COM: <s> adds a path restriction to this domain </s>
funcom_train/10765194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Future invoke(Message request) { Future myFuture = null; for (MyRoleMessageExchange subscriber : subscribers) { BpelProcess process = ((MyRoleMessageExchangeImpl) subscriber)._process; if (process.getConf().getState() == ProcessState.ACTIVE) { Future theirFuture = subscriber.invoke(request); if (myFuture == null) { myFuture = theirFuture; } } } return myFuture; } COM: <s> propagate the invoke reliable call to each subscriber </s>
funcom_train/6321995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsAll(Collection c) { Object[] elementData = array(); int len = elementData.length; Iterator e = c.iterator(); while (e.hasNext()) if(indexOf(e.next(), elementData, len) < 0) return false; return true; } COM: <s> returns true if this collection contains all of the elements in the </s>
funcom_train/32630917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isTimeColumn(final DViewColumn column) { String formula = column.getFormula(); return (formula.indexOf("DeliveredDate") >= 0 || formula.indexOf("@Created") >= 0) && column.getTimeDateFmt() == DViewColumn.FMT_TIME; } COM: <s> checks if a view column shows the delivery time of an email </s>
funcom_train/7972530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(final String id, final List<ASExpression> singleCard, final Key publicKey){ if(_adderMode) throw new RuntimeException("Cannot mix Adder and VoteBox style ballots"); _pureMode = true; Runnable r = new Runnable(){ public void run(){ updateImpl(id, new ListExpression(singleCard), publicKey); } }; synchronized(_pendingActions){ _pendingActions.add(r); _pendingActions.notify(); } } COM: <s> updates a piecemeal encryption of a ballot using old school vote box ballots </s>
funcom_train/29032509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane initPlayersList() { this.playerlist = new JList(); this.playerlist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); this.playerlist.setLayoutOrientation(JList.VERTICAL); this.playerlist.setVisibleRowCount(-1); if (this.playersScrollPane == null) { this.playersScrollPane = new JScrollPane(this.playerlist); //this.playersScrollPane.setPreferredSize(new Dimension(150, 80)); } return this.playersScrollPane; } COM: <s> creates the player list </s>
funcom_train/9774623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawLabelForPicking(Renderer renderer){ for(int i=0; i<Drawable3D.DRAW_TYPE_MAX; i++) for (Iterator<Drawable3D> iter = lists[i].iterator(); iter.hasNext();) { Drawable3D d = iter.next(); renderer.pickLabel(d); /* loop++; renderer.glLoadName(loop); d.drawLabel(renderer,false,true); drawHits[loop] = d; */ } //return loop; } COM: <s> draw objects labels to pick them </s>
funcom_train/42262650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean passSingleRobot(int robotWithABall, int secondRobot) { double a1 = turnToRobot(robotWithABall, secondRobot); double a2 = getTurnToPositionAngle(secondRobot, Camera.getInstance().getRobotPosition(robotWithABall)); if (isTurnedToAngle(robotWithABall, a1, PASS_PRECISION) && isTurnedToAngle(secondRobot, a2, PASS_PRECISION)) { shoot(robotWithABall); gD.messageDone(); return true; } return false; } COM: <s> single robot version of pass method </s>
funcom_train/30172723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Resources getResourceInfo(Resources res) throws Exception { Resources resResp = null; if(this.provider != null && this.configurationState == false && this.provider.getNodeState() == ProviderClass.ACTIVE){ resResp = this.provider.getRequestes().getResourceInfo(res); } else{ throw new Exception("This Node is Off-Line"); } return resResp; } COM: <s> load details of a resource shared by a particular giews node </s>
funcom_train/29632645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeCHV1Pin(byte[] iNewPin) throws OpenPGPCardException { try{ iso.changePin(TLV_CHV1, iNewPin); }catch(ISO7816Exception ex){ throw new OpenPGPCardException("Could not change pin. Make sure you've entered the old pin before changing it (" + ex.getMessage()+ ")"); } } COM: <s> change the chv1 pin </s>
funcom_train/20846018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean appendToHeader(String fieldName, String fieldValue) { if (fieldValue == null) { return false; } String currentValue = getHeaderValue(fieldName); if (currentValue == null) { return false; } String trimmedLine = fieldValue.trim(); if (trimmedLine.equals("")) { return true; } setHeaderValue(fieldName, currentValue + " " + trimmedLine); return true; } COM: <s> extend an existing header </s>
funcom_train/49789901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInitial() throws Exception { beginAtSitemapThenPage("Home"); assertNoProblem(); { String field = getLabelIDForText("field1"); assertLabeledFieldEquals(field, "foo"); } { String field = getLabelIDForText("field2"); assertLabeledFieldEquals(field, "bar"); } { String field = getLabelIDForText("field3"); assertLabeledFieldEquals(field, "baz"); } // there shouldn't be any button present assertButtonNotPresentWithText("target"); } COM: <s> this operation is executed as soon as we hit the page so </s>
funcom_train/19083479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getProperties(HashSet<Integer> workSet) { if (activated) { if (hasNot) { workSet.remove(propertyId.getValue(ability, to, null)); } else { workSet.add(propertyId.getValue(ability, to, null)); } } if (next != null) { ((PropertyModifier) next).getProperties(workSet); } } COM: <s> return all properties built from specified set whrere some properties have </s>
funcom_train/43883522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List readAllRows() throws IOException { LinkedList list = new LinkedList(); try { setPosition(1); } catch (IOException exc) { // This indicates that there are no rows return list; } VPFRow row = readRow(); while (row != null) { list.add(row); row = readRow(); } return list; } COM: <s> describe code read all rows code method here </s>
funcom_train/18894709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyChange() throws IllegalStateException { try { Iterator iter = listeners.iterator(); ConstraintListener current = null; while (iter.hasNext()) { current = (ConstraintListener) iter.next(); current.constraintsHaveChanged(); } } catch (ClassCastException castException) { throw new IllegalStateException("Listener Set should only contain " + "ConstraintListeners"); } } COM: <s> notifies all constraint listeners that a change has occurred </s>
funcom_train/34319858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getParentQualifiedName(Object target) throws JQueryException { String result = null; JQueryResultSet rs = null; try { JQuery q = JQueryAPI.createQuery("child(?C,!this)"); q.bind("!this", target); rs = q.execute(); if (rs.hasNext()) { Object oParent = rs.next().get("?C"); result = _getQualifiedElementLabel(oParent); } } finally { if (rs != null) { rs.close(); } } return result; } COM: <s> added by abartho </s>
funcom_train/47673476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getBuildNumberValue() { ObjectName objectName = null; try { objectName = new ObjectName(muleDomain + ":type=org.mule.MuleContext,name=MuleServerInfo"); return (String) server.getAttribute(objectName, "BuildNumber"); } catch (Exception ex) { return "ERROR"; } } COM: <s> gets the build number from mules mbean server </s>
funcom_train/46766911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public V convertRow(Node<C, V> node) { List<Column<C, V>> columns = new Vector<Column<C, V>>(); for (Node<C, V> n : node) { columns.add(n.getColumn()); } return convertRow(columns); }; COM: <s> converts a row back to the original value type </s>
funcom_train/46752608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSourceRef(DisplayModel sourceRef) { if (Converter.isDifferent(this.sourceRef, sourceRef)) { DisplayModel oldsourceRef= new DisplayModel(this); oldsourceRef.copyAllFrom(this.sourceRef); this.sourceRef.copyAllFrom(sourceRef); setModified("sourceRef"); firePropertyChange(String.valueOf(DATABASETABLES_SOURCEREFID), oldsourceRef, sourceRef); } } COM: <s> original source of the database table </s>
funcom_train/45257149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void toggleToolbarVisibility() { boolean coolbarVisible = getCoolBarVisible(); boolean perspectivebarVisible = getPerspectiveBarVisible(); // only toggle the visibility of the components that // were on initially if (getWindowConfigurer().getShowCoolBar()) { setCoolBarVisible(!coolbarVisible); } if (getWindowConfigurer().getShowPerspectiveBar()) { setPerspectiveBarVisible(!perspectivebarVisible); } getShell().layout(); } COM: <s> toggle the visibility of the coolbar perspective bar </s>
funcom_train/8485161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ATObject base_try_using_using_using_(ATClosure tryBlock, ATHandler hdl1, ATHandler hdl2, ATHandler hdl3) throws InterpreterException { return base_try_usingHandlers_(tryBlock, NATTable.atValue(new ATObject[] { hdl1, hdl2, hdl3 })); } COM: <s> the tt try try block using hdl1 using hdl2 using hdl3 tt construct </s>
funcom_train/17500089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBinding(Binding binding) { if (bindings==null) { bindings = new HashMap<String, List<Binding>>(); } String category = binding.getCategory(); List<Binding> categoryBindings = bindings.get(category); if (categoryBindings==null){ categoryBindings = new ArrayList<Binding>(); bindings.put(category, categoryBindings); } categoryBindings.add(binding); } COM: <s> add an element parser to this parser that will handle parsing of </s>
funcom_train/22076209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object lookup(String param) throws MapperException { Object o = environment.get(param); if (o == null) { o = parameters.get(param); if (o == null) throw new MapperConfigurationException("Name " + param + " has not been found in this context"); } return o; } COM: <s> lookup name in this context </s>
funcom_train/19971561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SparseVector getRow(int i) throws IOException { Get get = new Get(BytesUtil.getRowIndex(i)); get.addFamily(Constants.COLUMNFAMILY); Result r = table.get(get); // return new SparseVector(r.getRowResult()); return new SparseVector(r); } COM: <s> gets the vector of row </s>
funcom_train/22947677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showConnectableTables() { Collection<Table> c = Facade.getInstance().getAllConnectableTablesIWS(); if (c.isEmpty()) System.out.println("INFO: There are no connectableTables in internal structure!"); for (Table cc : c) { System.out.println(cc); } } COM: <s> shows connectable tables </s>
funcom_train/2993953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStyle(int row, LinePars lp) { gs.setDataChanged(lp.dataChanged()); dataFile.setLinePars(row,lp); LineStyleButton ls = (LineStyleButton)selectedDataModel.getValueAt(row,1); ls.setLinePars(lp); selectedTable.repaint(); if (jplot.plotFrame != null) jplot.showGraph(true); } COM: <s> update the drawing style </s>
funcom_train/44177863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBit(long bitIndex) { long longIndex = bitIndex >>> ADDRESS_BITS_PER_UNIT; int arrayIndex = (int) (longIndex >>> SUBARRAY_POWER_OF_TWO); int subarrayIndex = (int) (longIndex & SUBARRAY_MASK); return ((bits[arrayIndex][subarrayIndex] & (1L << (bitIndex & BIT_INDEX_MASK))) != 0); } COM: <s> returns from the local bitvector the value of the bit with </s>
funcom_train/9429208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertCollationKey(long rawContactId, long dataId, int tokenCount) { mStringBuilder.setLength(0); for (int i = 0; i < tokenCount; i++) { mStringBuilder.append(mNames[i]); } insertNameLookup(rawContactId, dataId, NameLookupType.NAME_COLLATION_KEY, mStringBuilder.toString()); } COM: <s> inserts a collation key for the current contents of </s>
funcom_train/20059451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StructIO process(StructIO io) { Class c = io.getStructClass(); if (c == vector.class) { if (Platform.isWindows()) { // On Windows, vector begins by 3 pointers, before the start+finish+end pointers : io.prependBytes(3 * Pointer.SIZE); } } return io; } COM: <s> perform platform dependent structure bindings adjustments </s>
funcom_train/37831261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSwitches() { switches = new ArrayList<NineSwitchesGameSwitch>(); for (int iRow = 0; iRow < 3; iRow++) { for (int iCol = 0; iCol < 3; iCol++) { NineSwitchesGameSwitch gameSwitch = new NineSwitchesGameSwitch(this); gameSwitch.setPosition(x + iCol, y + iRow); zone.add(gameSwitch); switches.add(gameSwitch); } } resetBoard(); } COM: <s> creates the switches </s>
funcom_train/31433053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connectionClosed() { if (this.responses == null) { /* * Nothing to do! */ return; } /* synchronize on responses, as all threads accessing this proxy do so */ synchronized (this.responses) { logger.info("Connection broken down!"); this.disconnected = true; /* wake up all threads */ for (WaitingThread thread : this.waitingThreads.values()) { logger.debug("Interrupting waiting thread " + thread); thread.wakeUp(); } } } COM: <s> method to indicate that connection to remote </s>
funcom_train/5012543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void process(final File file) throws IOException { final ZipFile zipFile = new ZipFile(file); final URL url = file.toURI().toURL(); try { final Enumeration<? extends ZipEntry> zipEntries = zipFile.entries(); while (zipEntries.hasMoreElements()) { final ZipEntry zipEntry = zipEntries.nextElement(); if (zipEntry.getName().endsWith(".class")) { entries.add(newIndexEntry(url, zipEntry)); } } } finally { zipFile.close(); } } COM: <s> process the file to extract index entries </s>
funcom_train/13519499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double interpretFormula(String f, double[] parameters) throws Exception{ CompiledFunction cF=null; try{ FunctionParser parser=new FunctionParser(); cF= parser.compileFunction(f); } catch(Exception e){ throw new Exception("getFunctionValue_FunctionInterpreter: non valid function or parameters number"); } double result=cF.computeFunction(parameters); Double res=new Double(result); if(res.toString().equals("NaN")){ throw new Exception("getFunctionValue_FunctionInterpreter:NaN, maybe a division by zero"); } return result; } COM: <s> calculate the function at a certain point x1 x2 </s>
funcom_train/15636745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean execute() { double[] currentdata; init(); netadapt.init(); while(hasMoreData()) { currentdata = getNextData(); // insert current data in network netadapt.insert(currentdata); // if requested, add data to datastore as well if (store!=null) store.add(currentdata); } destroy(); netadapt.finish(); return false; // continue simulation } COM: <s> inserts data returned by </s>
funcom_train/40221960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void process(String s) { // process commands from keyboard. Message m = CommandParser.process(s); Client client = context.getClient(); if (m != null) { // all done. client.sendToServer(m); return; } // must have been a chat command all along. String cmd = "<command version='1.0' id='1'>\n" + "<chat>"; cmd += "<text>" + s + "</text></chat></command>"; Document d = Message.construct(cmd); m = new Message(d); client.sendToServer(m); } COM: <s> process string entered by user </s>
funcom_train/10661976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClone005() { try { UnicastRemoteObject uro = new EchoUnicast_Imp(); uro.clone(); fail("clone not supported, this class does not implements Clonable"); } catch (CloneNotSupportedException e) { } catch (Throwable e) { fail("Failed with:" + e); } } COM: <s> this test instance an object that extends unicas remote object and does not </s>
funcom_train/7882104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object configureValue(Object value) { if (value instanceof Integer) { value = new Font(DefaultXPTheme.getDefaultFontName(type), DefaultXPTheme.getDefaultFontStyle(type), ((Integer)value).intValue()); } return super.configureValue(value); } COM: <s> overriden to create a font with the size coming from the desktop </s>
funcom_train/25529122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getRankWeight(int iRank) { return (iRank == 1) ? (SymbolsPerRank.getValue(iRank) + NonSymbolsPerRank.getValue(iRank)) : (SymbolsPerRank.getValue(iRank - 1) + NonSymbolsPerRank.getValue(iRank - 1)) * (SymbolsPerRank.getValue(1) + NonSymbolsPerRank.getValue(1)); } COM: <s> returns the weight factor of a given rank </s>
funcom_train/35845877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Collection filterWithActivator(Collection c, Object/*MMessage*/a) { Iterator it = c.iterator(); List v = new ArrayList(); while (it.hasNext()) { Object m = /* (MMessage) */it.next(); if (Model.getFacade().getActivator(m) == a) { v.add(m); } } return v; } COM: <s> finds the messages in collection c that has message a as activator </s>
funcom_train/25529150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getTrainingSet() { ArrayList<CategorizedFileEntry> alRes = new ArrayList<CategorizedFileEntry>(); for (String sFile : hmDocsToCategories.keySet()) { alRes.add(new CategorizedFileEntry(sFile, hmDocsToCategories.get(sFile))); } return alRes; } COM: <s> returns whole set </s>
funcom_train/3596978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setObjectSetPath(String path) { try { Node n=XPathAPI.selectSingleNode(doc, NiteMetaConstants.objectsetpathxpath); if (n==null) { System.err.println("WARNING: Attempting to set the Object Set Path when no object sets are present"); return; } else { n.setNodeValue(path); } } catch (TransformerException e) { e.printStackTrace(); } relobjectsetpath=path; objectsetpath=null; objectsetpath=getObjectSetPath(); } COM: <s> change the path where the object sets are loaded and serialized </s>
funcom_train/29568781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteFile(File file) { log.info("Deleting file " + file); if(!file.exists()) { // nothing to do log.debug("File '" + file.getAbsolutePath() + "' does not exist. Nothing to delete"); return; } boolean success = file.delete(); if(!success) { throw new PackageException("Could not delete file '" + file + "'."); } } COM: <s> delete configuration files for pkgs </s>
funcom_train/13530357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TransferKinInfoVector getEffectiveGenerators(int orientation) { TransferKinInfoVector ret = new TransferKinInfoVector(); for(reset();isNext();) { TransferKinInfo k = getNext(); //System.out.println(" XXXXXZZZZZZZZZZZZZZZ k "+k +" orient "+k.getOrientation()); if (effectiveGenerator(k) != null && k.getOrientation() == orientation) { ret.addElement(k); } } return ret; } COM: <s> get all effective generators of a given orientation </s>
funcom_train/8131233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActive(boolean active) { // if the menu should be set active we have to deactivate all other menus if (active) { List<BaseControl> sameLevelElements = this.getParent().getChildren(); for (BaseControl baseControl : sameLevelElements) { if (baseControl instanceof Menu && !this.equals(baseControl)) { ((Menu) baseControl).setActive(false); } } } this.active = active; } COM: <s> use this method to realise highlighting of the menu </s>
funcom_train/22742065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connect(String device) throws IOException { if (isConnected()) { throw new IOException("Device already connected"); } cManager.connect(device); state = CONNECTING; log("sending handshake command"); send(new Event(this, Event.TYPE_BM, ProtocolHandler.CMD_CHCK)); lastDevice = device; state = CONNECTED; log("handshake ok."); } COM: <s> connect method for connecting to server device </s>
funcom_train/7825651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCommand(Command command) { for(int i=commands.size()-1; i>position; --i) // remove all after position commands.remove(i); if (position >= 0 && commands.get(position).canBeCombined(command)) { commands.get(position).combine(command); } else { ++position; commands.add(command); } } COM: <s> puts command on stack combines it with current top if possible </s>
funcom_train/22305431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isGrowlEnabled() { String [] script = new String[3]; script[0] = "tell application \"System Events\""; script[1] = "set isRunning to count of (every process whose name is \"" + GROWL_APPLESCRIPT_ID +"\") > 0"; script[2] = "end tell"; String result = this.executeAppleScript(script); // check if the result was true return result.contains("true"); } COM: <s> according to http growl </s>
funcom_train/44458705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { boolean equal = false; if (obj instanceof TargetDescriptor) { TargetDescriptor that = (TargetDescriptor) obj; equal = (_url.equals(that._url)) && (_timeOut == that._timeOut) && (_connectionTimeOut == that._connectionTimeOut) && (_socketTimeOut == that._socketTimeOut); } return equal; } COM: <s> indicates whether some other object is equal to this one </s>
funcom_train/50528587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeOldMarkers() { Set<String> markerSubTypes=new HashSet<String>(); markerSubTypes.add("iwrapper"); markerSubTypes.add("config"); markerSubTypes.add("statuscode"); try { IMarker[] markers=getProject().findMarkers(IMarker.PROBLEM,false,IResource.DEPTH_INFINITE); for(IMarker marker:markers) { String value=(String)marker.getAttribute("subtype"); if(value!=null && markerSubTypes.contains(value)) marker.delete(); } } catch (CoreException e) {} } COM: <s> remove markers from plugin version 0 </s>
funcom_train/10357523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean match(String match) { int matchLength = pattern.length(); int length = match.length() - matchLength; for (int i = 0; i <= length; i++) { if (match.regionMatches(ignoreCase, i, pattern, 0, matchLength)) { return true; } } return false; } COM: <s> determine if the pattern associated with this term is a substring of the </s>
funcom_train/4377623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private View createSlider() { LayoutInflater inflater = getLayoutInflater(); View view = inflater.inflate(R.layout.drawer, null, true); ListView drawerList = (ListView) view.findViewById(R.id.drawerList); if(configurationManager.getThemeChoice() == android.R.style.Theme_Light) drawerList.setBackgroundResource(android.R.color.background_light); else drawerList.setBackgroundResource(android.R.color.background_dark); return view; } COM: <s> creates the sliding menu </s>
funcom_train/23335435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String tokenToString(Token token) { String result; if (token instanceof StringToken) { result = ((StringToken) token).stringValue(); } else if (token instanceof ObjectToken) { result = ((ObjectToken) token).getValue().toString(); } else { result = token.toString(); } return result; } COM: <s> turns a token into a string </s>
funcom_train/10906805
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean sameRangeEntryAsNext(char[] charArray, int firstItem) { if (charArray[firstItem] + 1 != charArray[firstItem + 1]) { return false; } if (firstItem / 256 != (firstItem + 1) / 256) { return false; } return true; } COM: <s> determine whether two bytes can be written in the same bfrange entry </s>
funcom_train/48736852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Dimension getScaledSize(Dimension imageDim, Dimension boundingBox) { double widthScale = (double) imageDim.width / boundingBox.width; double heightScale = (double) imageDim.height / boundingBox.height; double maxScale = Math.max(widthScale, heightScale); return new Dimension((int) (imageDim.width / maxScale), (int) (imageDim.height / maxScale)); } COM: <s> scale to fit without changing aspect ratio </s>
funcom_train/31625547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Controller getManagingController() throws DBException, ControllerException { String controllerClassName = this.getField(FLD_EDITOR_CONTROLLER); if (controllerClassName == null || controllerClassName.length() == 0) { controllerClassName = DEFAULT_EDITING_CONTROLLER; } return ConfigManager.getControllerFactory().getController(controllerClassName); } COM: <s> returns the managing contorller </s>