__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/5078920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setState(int state) { boolean check = isInState(STATE_INITIAL); super.setState(state); if (isInState(STATE_ACCESSIBLE_DRAG | STATE_DRAG_IN_PROGRESS | STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) { if (getCurrentInput().isModKeyDown(MODIFIER_CLONE)) { setCloneActive(true); handleDragInProgress(); } } if (check && isInState(STATE_DRAG | STATE_ACCESSIBLE_DRAG | STATE_ACCESSIBLE_DRAG_IN_PROGRESS)) captureSourceDimensions(); } COM: <s> extended to activate cloning and to update the captured source dimensions when </s>
funcom_train/32058213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetShowEdgesOnShow() { System.out.println("testSetShowEdgesOnShow"); GraphModel gm = null; CellViewFactory cvf = null; GraphLayoutCache cache = new GraphLayoutCache(gm, cvf); cache.setShowEdgesOnShow(true); assertEquals("isShowEdgesOnShow", cache.isShowEdgesOnShow() == true, true); } COM: <s> this function tests set show edges on show function of graph layout cache </s>
funcom_train/12566381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRow(String aRow) { StringTokenizer token = new StringTokenizer(aRow, ","); if(token.countTokens() != _columnCount) { // It is a exception. // TODO: throws an exception. return; } // convert them to an array. String[] cellContents = new String[_columnCount]; int i = 0; while(token.hasMoreTokens()) { cellContents[i] = token.nextToken(); i ++; } addRow(cellContents); } COM: <s> add a row to the table </s>
funcom_train/49791340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(ModeldocFactory factory, ModelDocumentation root) { for (EMFClass source : root.getClasses()) { for (EMFClass target : root.getClasses()) { // ignore self if (!source.equals(target)) { if (source.getTargetClass().getESuperTypes().contains(target.getTargetClass())) { // this class extends directly source.getSupertypes().add(target); } } } } } COM: <s> set up inheritance </s>
funcom_train/18462724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char readMatrix(String a_name, int a_col, int a_row) { char[][] m_matrix = m_matrices.get(a_name); if (m_matrix == null) { throw new IllegalArgumentException("Matrix with name " + a_name + " not found!"); } return m_matrix[a_col][a_row]; } COM: <s> reads a matrix cell and returns the value </s>
funcom_train/15821027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Group createGroup(Composite parent, String text, int columns) { Group group = new Group(parent, SWT.SHADOW_ETCHED_IN); GridLayout layout = new GridLayout(); layout.numColumns = columns; group.setLayout(layout); group.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); group.setText(text); return group; } COM: <s> create a composite controle with a grid layout </s>
funcom_train/3747618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int convertStringToInt(String convert) { if (convert == null) { return 0; } Integer integer; try { integer = new Integer(convert); } catch(NumberFormatException e) { System.err.println("Warning: NumberFormatException in theme trying to format '" + convert + "' as a number: " + e.getMessage()); return 0; } return integer.intValue(); } COM: <s> p used internally to convert strings to code int code values safely </s>
funcom_train/18256804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getSelectedSeries() { DataSeries[] allSelected = new DataSeries[selectedCount]; int index = 0; for (int i = 0; i < dataGroup.getSize(); i++) { if (seriesSelected[i]) { allSelected[index] = dataGroup.getSeries(i); index++; } } return Arrays.asList(allSelected); } COM: <s> returns a list of all selected series </s>
funcom_train/11693438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerHiddenStateNames(String[] stateNames) { if (stateNames != null) { hiddenStateNames = HashBiMap.create(); for (int i = 0; i < stateNames.length; ++i) { hiddenStateNames.put(stateNames[i], i); } } } COM: <s> register an array of hidden state names </s>
funcom_train/37052931
/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 (this == o) return true; if (!(o instanceof UndirectedGraph)) return false; final UndirectedGraph defaultGraph = (UndirectedGraph) o; if (relations != null ? !relations.equals(defaultGraph.relations) : defaultGraph.relations != null) return false; if (type != null ? !type.equals(defaultGraph.type) : defaultGraph.type != null) return false; return true; } COM: <s> two default graphs are equal if they have the same relationship table </s>
funcom_train/28763422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTheResource(uk.org.axioma.shark.Resource value) throws com.intersys.objects.CacheException { com.intersys.cache.Dataholder dh = new com.intersys.cache.Dataholder (value); mInternal.setProperty(ii_TheResource, jj_TheResource,kk_TheResource, com.intersys.objects.Database.RET_OBJECT, "TheResource", dh); return; } COM: <s> sets new value for code the resource code </s>
funcom_train/13504831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Document doSerializeOrFail(DigitalObject obj, int transContext) { Document result = null; try { result = doSerialize(obj, transContext); } catch (ObjectIntegrityException e) { e.printStackTrace(); fail("Serializer threw ObjectIntegrityException"); } catch (SAXException e) { e.printStackTrace(); fail("Serialized XML was not well-formed"); } return result; } COM: <s> serialize the object failing the test if an exception is thrown </s>
funcom_train/9442089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onDialerClose() { if (DBG) log("onDialerClose()..."); // reset back to a short delay for the poke lock. PhoneApp app = PhoneApp.getInstance(); app.updateWakeState(); mPhone.unregisterForDisconnect(mHandler); // Give the InCallScreen a chance to do any necessary UI updates. mInCallScreen.onDialerClose(); } COM: <s> dialer code that runs when the dialer is closed </s>
funcom_train/50078502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File dir, String name) { File file = new File(dir, name); if (file.isDirectory()) { if (name.equals(CVS_DIR_NAME)) { return false; } else { return true; } } else if (name.endsWith(CONFIG_DOC_NODE_EXTENSION) || name.endsWith(LINK_NODE_EXTENSION)) { return true; } else { return false; } } COM: <s> returns code true code if code name code is the name </s>
funcom_train/17828178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String doWord() { StringBuilder sb = new StringBuilder(); sb.append(sql.charAt(idx)); ++idx; while (idx < len && isNameChar(sql.charAt(idx))) { sb.append(sql.charAt(idx)); ++idx; } return sb.toString(); } COM: <s> used to process a word </s>
funcom_train/41817946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printBrandTask(String root, String icons, String name, String os) { printTab(); print("<eclipse.brand"); //$NON-NLS-1$ printAttribute("root", root, true); //$NON-NLS-1$ if (icons != null) printAttribute("icons", icons, true); //$NON-NLS-1$ printAttribute("name", name, true); //$NON-NLS-1$ printAttribute("os", os, true); //$NON-NLS-1$ println("/>"); //$NON-NLS-1$ } COM: <s> print a code brand code task to the ant script </s>
funcom_train/20308377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void listGraph(Graph g) { for (Iterator i = g.find(null,null,null); i.hasNext();) { Triple t = (Triple)i.next(); logger.info(PrintUtil.print(t)); } logger.info(" -------- "); } COM: <s> helper function to list a graph out to logger </s>
funcom_train/11071892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMatchChoiceWithQuestionMark() { RegularExpr expr = new RegularExpr("foo[?]bar"); assertFalse(expr.isMatch("foobar")); assertTrue(expr.isMatch("foo?bar")); assertFalse(expr.isMatch("fooxxbar")); assertFalse(expr.isMatch("fooabar")); } COM: <s> question mark is allowed as a choice character </s>
funcom_train/50751312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSelected(SwingMLModel model) { boolean result = false; TreePath[] paths = tree.getSelectionModel().getSelectionPaths(); if (paths != null) { for (int x = 0; x < paths.length; x++) { TreePath path = paths[x]; for (int y = 0; y < path.getPathCount(); y++) { Object component = path.getPathComponent(y); if (component == model) { result = true; break; } } } } return result; } COM: <s> returns true if the given model is currently selected on the screen </s>
funcom_train/17295663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePlayer(String player){ if(p2!=null && player.equals(p2.getName())){ p2=null; gameSlotUsed--; } else if(p1!=null && player.equals(p1.getName())){ p1=null; } else{ om.remove(player); } } COM: <s> function for removing a player from this room </s>
funcom_train/29698468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Team getTeamForPlayer(Player p) { for (Enumeration<Team> i = teams.elements(); i.hasMoreElements();) { final Team team = i.nextElement(); for (Enumeration j = team.getPlayers(); j.hasMoreElements();) { final Player player = (Player)j.nextElement(); if (p == player) { return team; } } } return null; } COM: <s> return a players team </s>
funcom_train/48075920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int size() { int size = 0; for (Map.Entry<UUID, Map<PastryId, Chunk<?>>> entry : store.entrySet()) { purge(entry.getKey()); size += entry.getValue().size(); } return size; } COM: <s> tells how many chunks are stored </s>
funcom_train/9118490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void validateWarnings() { if (!Util.isEmpty(getQualifier()) && Util.isEmpty(getValue())) addWarning("A qualifier has been set without an accompanying value attribute."); if (Util.isEmpty(getQualifier()) && Util.isEmpty(getValue())) addWarning("Neither a qualifier nor a value was set on this language."); } COM: <s> validates any conditions that might result in a warning </s>
funcom_train/31936508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { // Get rid of presentation. presentation.deactivate(); // Release each view. IViewPart [] views = getViews(); int length = views.length; for (int nX = 0; nX < length; nX ++) { getViewFactory().releaseView(views[nX].getSite().getId()); } } COM: <s> dispose the perspective and all views contained within </s>
funcom_train/33601508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startExecution(int eid, byte[] value) { //******* EDUARDO BEGIN **************// communication.send(this.reconfManager.getCurrentViewAcceptors(), factory.createPropose(eid, 0, value, null)); //******* EDUARDO END **************// } COM: <s> this method is called by the tomlayer or any other </s>
funcom_train/3740309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeDepartment(User who, User user, String departament) throws UserManagerException { if (!mayChangeInfo(who,user)) throw new UserManagerException(); try { Session sess = HibernateUtil.currentSession(); Transaction trans = sess.beginTransaction(); user.setDepartment(departament); sess.saveOrUpdate(user); trans.commit(); } catch (HibernateException e) { throw new UserManagerException(); } } COM: <s> change department attribute of the given user </s>
funcom_train/43852578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Expression parseFTWords() throws ParseException { if(curr('"') || curr('\'')) return parseLiteral(); consumeWS(); return curr('f') ? parseFTOr() : error(WRONGTEXT, "quote", (char) curr()); } COM: <s> parses an ftwords </s>
funcom_train/8011841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayPortletException(String ex, String font) { Props p = getPageProperties(); String txt = p.getProperty(Props.FONT_ERROR + Props.TAG_START); txt += ex; txt += p.getProperty(Props.FONT_ERROR + Props.TAG_END); _portletException = new SalmonPortletException(new PortletException(txt),false,false, txt); } COM: <s> displays an error message in the portlet instead of the contentg </s>
funcom_train/1448752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String updateZoneConfiguration() throws Exception { if (logger.isDebugEnabled()) { logger.debug("updateZoneConfiguration() - start"); //$NON-NLS-1$ } BannerZonesServiceDelegator.updateBannerZones(this.bannerZone); if (logger.isDebugEnabled()) { logger.debug("updateZoneConfiguration() - end"); //$NON-NLS-1$ } return SUCCESS; } COM: <s> update zone configuration </s>
funcom_train/45770466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(InputStream input) throws IOException { int numOfBytesRead = super.read(input); bBoolErr = (byte) input.read(); fError = (byte) input.read(); numOfBytesRead += 2; Debug.log(Debug.TRACE, " bBoolErr : " + bBoolErr + " fError : " + fError); return numOfBytesRead; } COM: <s> reads a bool err cell from the code input stream code </s>
funcom_train/24000631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToConcrete() throws Exception { JOCLAstParser p = new JOCLAstParser(OclTypeRegistry.OclBooleanType); p.define("self", OclTypeRegistry.OclBooleanType); OclExpressionAst ast = p.parse("self"); OclParsedExpression instance = new OclParsedExpression((LetAst)ast); assertEquals("self",instance.toConcrete()); } COM: <s> test of to concrete method of class ocl parsed expression </s>
funcom_train/40363406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireChangeEvent() { Iterator<ChangeListener> it; synchronized (listeners) { it = new HashSet<ChangeListener>(listeners).iterator(); } ChangeEvent ev = new ChangeEvent(this); while (it.hasNext()) { it.next().stateChanged(ev); } } COM: <s> notify the change listeners that our state has changed </s>
funcom_train/25282485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectZoneInTable(final int zone_number) { if (Display.getCurrent() != Display.getDefault()) Display.getDefault().asyncExec(new Runnable() { @Override public void run() { final TableItem ti = getTableItemByNumber(zone_number); if (ti != null) tbl_zones.setSelection(ti); } }); else { final TableItem ti = getTableItemByNumber(zone_number); if (ti != null) tbl_zones.setSelection(ti); } } COM: <s> selects zone in the gui table </s>
funcom_train/32319202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeTo(OutputStream out) throws IOException { int length = length(); int stopChunk = length / chunkSize; int stopColumn = length % chunkSize; for (int i = 0; i < stopChunk; i++) { out.write(array[i], 0, chunkSize); } if (stopColumn > 0) { out.write(array[stopChunk], 0, stopColumn); } } COM: <s> write the contents of the buffer to the output stream </s>
funcom_train/35845120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JComponent getAssociationSelector() { if (associationSelector == null) { associationSelector = new UMLSearchableComboBox( associationComboBoxModel, new ActionSetLinkAssociation(), true); } return new UMLComboBoxNavigator( Translator.localize("label.association.navigate.tooltip"), associationSelector); } COM: <s> returns the namespace selecter </s>
funcom_train/48982886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String remove() { performValidateRemove(); if (!hasActionErrors()) { course.setActive(false); //courseRemote.remove(course.getId()); courseRemote.update(course); return list(); } addActionError("Unable to remove a course"); return list(); } COM: <s> remove a course perform a validation on the method </s>
funcom_train/9278473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void confirmNonBootedDB(String dbName) { DataSource ds = JDBCDataSource.getDataSource(obtainDbName(dbName, null)); try { ds.getConnection(); } catch (SQLException sqle) { assertSQLState("Database booted? <state:" + sqle.getSQLState() + ", msg:" + sqle.getMessage() + ">", "XJ040", sqle); } } COM: <s> confirm that the specified encrypted database has not been booted </s>
funcom_train/10210253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAutoUpdate(boolean setActive) { if (setActive) { lowThreshold.addChangeListener(lowThresholdChangeListener); highThreshold.addChangeListener(highThresholdChangeListener); lowWidth.addChangeListener(lowWidthChangeListener); highWidth.addChangeListener(highWidthChangeListener); } else { lowThreshold.removeChangeListener(lowThresholdChangeListener); highThreshold.removeChangeListener(highThresholdChangeListener); lowWidth.removeChangeListener(lowWidthChangeListener); highWidth.removeChangeListener(highWidthChangeListener); } } COM: <s> connects certain signals to </s>
funcom_train/9162492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean typeAlreadySelected(Class type) { // An item of a certain class is selectable if there is no selection, // or if items of that class are already selected for ( Class selectedType : m_selection.keySet() ) { if ( ( type != selectedType ) && ( m_selection.get(selectedType).size() != 0 ) ) { return false; } } return true; } COM: <s> determines if the given class type is already selected </s>
funcom_train/22498519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createFrameAsNeeded(final int location) { if (location == SHTMLPlugin.DOCK_LOCATION_NONE) { if ((frame == null) && (c != null)) { createFrame(); } if (frame != null) { frame.setVisible(true); } } else { if (frame != null) { frame.setVisible(false); } } } COM: <s> create show or hide frame as needed depending </s>
funcom_train/21844521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(final InstructionContext env) throws JBasicException { Status status = null; /* * Get the array that we're to sort, put there previously. */ Value value1 = env.pop(); if (value1.fReadonly) throw new JBasicException(Status.READONLY, value1.toString()); value1 = value1.copy(); if (env.instruction.stringValid) { final String memberName = env.instruction.stringOperand; status = SortStatement.sortArray(value1, memberName); } else status = SortStatement.sortArray(value1); if (status.success()) env.push(value1); else throw new JBasicException(status); } COM: <s> sort an array thats on top of the stack </s>
funcom_train/29693488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void receiveEntityUpdate(Packet c) { int eindex = c.getIntValue(0); Entity entity = (Entity) c.getObject(1); Vector movePath = (Vector) c.getObject(2); // Replace this entity in the game. game.setEntity(eindex, entity, movePath); } COM: <s> loads entity update data from the data in the net command </s>
funcom_train/46759879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long store(final RefModel ref, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { IChainStore chain = new ChainStore(); try { Long refId = store(ref, chain, call); chain.execute(); // return primary key return refId; } catch (Exception ex) { Log.exception(ex); Log.error(ref); chain.rollback(); throw ex; } }}; return (Long) call(method, call); } COM: <s> save the ref model model creating a new ref or updating existing rows </s>
funcom_train/4694836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object visit(VirtualCall call) { if (call.isExternal()) { // field location is not null call.getLocation().setEnclosingScope(call.getEnclosingScope()); if (call.getLocation().accept(this) == null) return null; } for (Expression e: call.getArguments()){ e.setEnclosingScope(call.getEnclosingScope()); if (e.accept(this) == null) return null; } return true; } COM: <s> virtual call visitor </s>
funcom_train/39104413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDirectory(String file) { String ret = null; String s = null; for (s = m_path.firstItem(); s != null; s = m_path.nextItem()) { File f = new File(s, file); if (f.exists()) { ret = s; break; } } return ret; } COM: <s> look for the specified file in all the directories </s>
funcom_train/7685095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Uri insertMessage(Context context, SmsMessage[] msgs) { // Build the helper classes to parse the messages. SmsMessage sms = msgs[0]; if (sms.getMessageClass() == SmsMessage.MessageClass.CLASS_0) { displayClassZeroMessage(context, sms); return null; } else if (sms.isReplace()) { return replaceMessage(context, msgs); } else { return storeMessage(context, msgs); } } COM: <s> if the message is a class zero message display it immediately </s>
funcom_train/12562434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paint(Graphics g, int w, int h) { g.setFont(ENTRY_FONT); if (dir) { g.setColor(0, 0, 128); } else { g.setColor(0, 0, 0); } g.drawString(text, 5, (h - ENTRY_FONT.getHeight())/2, Graphics.LEFT | Graphics.TOP); } COM: <s> paints the content of a midlet representation in </s>
funcom_train/17302109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseStepName() { String prefix; int colonIndex = name.indexOf(":"); if (colonIndex == -1) { // no colon, so localpart is simply name (even if it's "*") prefix = null; localPart = name; } else { prefix = name.substring(0, colonIndex); localPart = name.substring(colonIndex + 1); } uri = mapPrefix(prefix); } COM: <s> lazily computes some information about our name </s>
funcom_train/11374907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canStartDataNode(Configuration conf) throws IOException { DataNode dn = null; try { dn = DataNode.createDataNode(new String[]{}, conf); } catch(IOException e) { if (e instanceof java.net.BindException) return false; throw e; } finally { if(dn != null) dn.shutdown(); } return true; } COM: <s> check whether the datanode can be started </s>
funcom_train/4871926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSourceEContractsURLs(String[] sourceFilesURLs){ // Get source eContracts URLs from parameter Strings URL newURL; for(int i=0; i<sourceFilesURLs.length; i++){ try { newURL = new URL(sourceFilesURLs[i]); if (!sourceEcontractURLs.contains(newURL)) sourceEcontractURLs.add(newURL); } catch (MalformedURLException e) { e.printStackTrace(); } } } COM: <s> add some e contracts source file urls to the e contracts source file </s>
funcom_train/5080335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scrollTo(int x, int y) { x = verifyScrollBarOffset(getViewport().getHorizontalRangeModel(), x); y = verifyScrollBarOffset(getViewport().getVerticalRangeModel(), y); if (x == getViewport().getViewLocation().x) scrollToY(y); else if (y == getViewport().getViewLocation().y) scrollToX(x); else getViewport().setViewLocation(x, y); } COM: <s> scrolls the contents to the new x and y location </s>
funcom_train/8228986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void antiBan() { if (bank.isOpen()) { return; } switch (random(0, 50)) { case 4: case 5: case 6: { openTab(TAB_STATS); moveMouse(580, 360, 10, 10); if(getCurrentTab() == TAB_STATS) wait(random(1000, 1250)); break; } default: { break; } } } COM: <s> how to not get screwed over by jagax </s>
funcom_train/21087524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLinkPortPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_OutputPort_linkPort_feature"), getString("_UI_OutputPort_linkPort_description"), SNI_Package.Literals.OUTPUT_PORT__LINK_PORT, true, false, true, null, getString("_UI_PortOUTPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the link port feature </s>
funcom_train/51812031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeListener(String channelName, Object listener) { List<GenericMessageListener> list = listeners.get(channelName); if ( list == null ) return false; if ( list.size() == 1 && list.contains(listener)) listeners.remove(channelName); return list.remove(listener); } COM: <s> removes the specified em listener em for the supplied channel </s>
funcom_train/38477802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveFile(byte[] data, String fileName, File srcFile ) throws IOException{ File destFile = new File(fileName); destFile.getParentFile().mkdirs(); OutputStream stream = new FileOutputStream(destFile); stream.write(data); stream.close(); if(srcFile != null){ destFile.setLastModified(srcFile.lastModified()); } } COM: <s> save a single file </s>
funcom_train/14460322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTarget(String target) throws MessageFormatException{ if (theMessage==null)throw new MessageFormatException("Trying to set values on null message"); try { theMessage.put("target", target); }catch(Exception e) { throw new MessageFormatException("Error setting target on JSONMessage" + e); } } COM: <s> set the target parameter on the message </s>
funcom_train/13848305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { List idle = new ArrayList(1); boolean done; do { try { Thread.sleep(TIMEOUT); } catch (InterruptedException e) { return; } long now = System.currentTimeMillis(); synchronized (ConnectionManager.this) { checkIdle(now, idle); done = muxes.isEmpty(); if (done) { reaper = null; } } for (int i = idle.size(); --i >= 0; ) { ((OutboundMux) idle.get(i)).shutdown("idle"); } idle.clear(); } while (!done); } COM: <s> sleep for timeout milliseconds </s>
funcom_train/20748860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doBlind(Pot pot, Blinds blinds, boolean sb) { double blind = 0; if (sb == Blinds.SMALL_BLIND) { blind = blinds.getSmallBlind(); act(pot,0, PlayerAction.ACTION_SMALL_BLIND, blind); } else { blind = blinds.getBigBlind(); act(pot,0,PlayerAction.ACTION_BIG_BLIND, blind); } } COM: <s> function that put the given blind in the pot </s>
funcom_train/49329991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printOnOnePage(final FinMarkingGuide theMarkingGuide) { Dimension d = getPageSize(); PdfContentByte cb = writer.getDirectContent(); Graphics2D g2 = cb.createGraphics(d.width, d.height); theMarkingGuide.print(g2); g2.dispose(); document.newPage(); } COM: <s> print the transition </s>
funcom_train/47717122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T sortBy(TextColumnBuilder<?> ...sortColumns) { Validate.notNull(sortColumns, "sortColumns must not be null"); Validate.noNullElements(sortColumns, "sortColumns must not contains null sortColumn"); for (TextColumnBuilder<?> sortColumn : sortColumns) { sortBy(DynamicReports.asc(sortColumn)); } return (T) this; } COM: <s> adds a sort field to the dataset </s>
funcom_train/19887202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetType() { System.out.println("setType"); String type = "Credit"; //Payment pmt = null; pmt.setType(type); // TODO review the generated test code and remove the default call to fail. //fail("The test case is a prototype."); } COM: <s> test of set type method of class edu </s>
funcom_train/36685367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMinimized(boolean b) { if (!isMinimized && b) { myGui.getFrame(myFrameID).removeTab( SocialProperties.get("CHAT_WINDOW_NAME"), Location.BOTTOM); isMinimized = true; } if (isMinimized && !b) { isMinimized = false; reInitialize(); } repaint(); } COM: <s> minimizes unminimizes the chatwindow </s>
funcom_train/4448418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getAuthenticatedUser() { User authenticUser = null; if(userId != null) { try { UserManager mgr = WebloggerFactory.getWeblogger().getUserManager(); authenticUser = mgr.getUser(userId); } catch (WebloggerException ex) { log.warn("Error looking up authenticated user "+userId, ex); } } return authenticUser; } COM: <s> authenticated user associated with this session </s>
funcom_train/31936141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean testCustom(Object object, IActionFilter filter) { if (filterProperties == null) return false; Iterator iter = filterProperties.keySet().iterator(); while (iter.hasNext()) { String key = (String)iter.next(); String value = (String)filterProperties.get(key); if (!filter.testAttribute(object, key, value)) return false; } return true; } COM: <s> returns whether the current selection passes a custom key value filter </s>
funcom_train/19378024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSqlTypeMappings(String sqlTypeMappingsUri) { if (sqlTypeMappingsUri != null) { try { this.sqlTypeMappings = Mappings.getInstance(sqlTypeMappingsUri); } catch (Exception ex) { logger.error("ERROR! (" + ex.getMessage() + ") Could not set URI --> '" + sqlTypeMappingsUri + "' for property 'sqlTypeMappings' please check your configuration"); } } } COM: <s> sets the configuration file for mappings of the sql type mappings </s>
funcom_train/29954616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetName() { System.out.println("getName"); ParametersSetObject instance = new ParametersSetObject(el); String expResult = "Exemple 2"; String result = instance.getName(); System.out.println(result); assertEquals(expResult, result); } COM: <s> test of get name method of class hbm </s>
funcom_train/17904821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTabTitleAt(int index, String title) { super.setTabTitleAt(index, title); TabComponent tabComponent = components.get(index); if (tabComponent.getTitleSuffix() != null) { title += tabComponent.getTitleSuffix(); } tabSelectionPopupMenu.renameTabMenuItem(index, title); tabPanel.repaint(); } COM: <s> sets the title at index to title which can be null </s>
funcom_train/28357032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dataArrived(BLMSourceEvent event) { Date timeStamp = event.getTimeStamp(); StringTokenizer tok = new StringTokenizer(timeStamp.toString(), " "); String timeStr = null; for(int k = 0; k < 4; k++) { timeStr = tok.nextToken(); } appendZData(event.getData(),timeStr); } COM: <s> called when new data has arrived from the blmsource </s>
funcom_train/29849026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readPatternConnections(ThreadSafeOptions options) { for (int i = 0; i < options.nodeArray.size(); i++) { NodeCacheEntry3d pi = (NodeCacheEntry3d) options.nodeArray.get(i); pi.patternNodes = getPatternNodes(options, pi); pi.connectedNodes = getConnectedNodes(options, pi); } } COM: <s> init cache entry for a node get pattern nodes call cache </s>
funcom_train/25647877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TestScript getTestScriptToExport(Object toExport) { TestScript script = null; try { TestScriptBuilder builder = new TestScriptBuilder(); script = builder.build(toExport); } catch (Exception ex) { throw new KendoException(ex.getMessage(), null, ex); } return script; } COM: <s> creates test script that is to be exported </s>
funcom_train/31955929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getData(int offset, Object array) throws FitsException { try { if (bstr == null || heapOffset > offset) { heapOffset = 0; bstr = new BufferedDataInputStream(new ByteArrayInputStream( heap)); } bstr.skipBytes(offset - heapOffset); heapOffset = offset; heapOffset += bstr.readArray(array); } catch (IOException e) { throw new FitsException("Error decoding heap area at offset=" + offset + ". Exception: Exception " + e); } } COM: <s> get data from the heap </s>
funcom_train/10843269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void spool(OutputStream out) throws IOException { URLConnection conn = this.getResourceURL().openConnection(); InputStream ins = null; try { ins = conn.getInputStream(); Repository.spool(ins, out); } finally { IOUtils.closeQuietly(ins); } } COM: <s> returns an code input stream code on the resource bundle file </s>
funcom_train/27759310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { // Hide the frame gui.setTitle(gui.getTitle() + " - " + language.getProperty("se.omnitor.tipcon1.AppController." + "CLOSING")); gui.setVisible(false); // Stop the local video if (avPlayer!=null) { avPlayer.close(); avPlayer = null; } try { Thread.sleep(2000); } catch (Exception e) { // Ignore interruptions } stopSip(); // End the program System.exit(0); } COM: <s> ends the program by shutting down the sip client and then exiting </s>
funcom_train/11321802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void renderContent(HtmlStringBuffer buffer, Context context) { if (getTemplate() != null) { Map<String, Object> templateModel = getModel(); if (templateModel == null) { templateModel = new HashMap<String, Object>(); } buffer.append(context.renderTemplate(getTemplate(), templateModel)); } if (getContent() != null) { buffer.append(getContent()); } } COM: <s> render the js script </s>
funcom_train/12760597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Response post(String file, String[][] form) throws HTTPException { Response rsp = null; try { rsp = post( new URL( lastURL, file ), form ); } catch( MalformedURLException exception ) { throw new HTTPClientException ( "Underlying Malformed URL exception / " + exception.getMessage() ); } return rsp; } COM: <s> get file using post method </s>
funcom_train/18209612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLeadingTab() { int i = getCaretPosition() - 1; try { while (i > 0 && getDocument().getText(i, 1).equals("\t")) i--; return i == 0 || getDocument().getText(i, 1).equals("\n"); } catch (BadLocationException e) { System.out.println("Can't find no tabs, dude."); return false; } } COM: <s> determines whether the tab is at the start of a given line </s>
funcom_train/33263892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processMouseMotionEvent( MouseEvent e ) { if (e.getID() == MouseEvent.MOUSE_DRAGGED) { if (!fakedit && (e.getY() > height || e.getX() < 0 || e.getX() > width)) { getShell().fakeMouseUp(); fakedit = true; } } super.processMouseMotionEvent( e ); } COM: <s> process mouse motion event </s>
funcom_train/34604321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document getDocument(ActionMapping mapping, String forward, HttpServletRequest request) throws IOException { String uri = mapping.findForward(forward).getPath(); log.debug("Mapping URI from forward: " + forward + ": " + uri); return getDocument(request, uri, mapping); } COM: <s> retrives a document object based on the specified forward </s>
funcom_train/29618750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJRadioDataManagement() { if (jRadioDataManagement == null) { jRadioDataManagement = new JRadioButton(); jRadioDataManagement.setBounds(new java.awt.Rectangle(31,70,351,21)); jRadioDataManagement.setText(AppTextsDAO.get("LABEL_MANAGE_YOUR_DATA")); jRadioDataManagement.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { updateSelectionDependentWidgets(); } }); } return jRadioDataManagement; } COM: <s> this method initializes j radio button </s>
funcom_train/45786008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJtxtFamilia() { if (jtxtFamilia == null) { jtxtFamilia = new JTextField(); jtxtFamilia.setEditable(false); jtxtFamilia.setBounds(164, 229, 195, 20); jtxtFamilia.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent e) { if (!jtxtFamilia.getText().equalsIgnoreCase("")) { jtxtFamilia.setBackground(Color.white); } } }); } return jtxtFamilia; } COM: <s> this method initializes jtxt familia </s>
funcom_train/18598900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StatusActions createStatusActions(ServiceContext context, Dbms dbms) throws Exception { Constructor ct = statusRules.getConstructor(); StatusActions sa = (StatusActions)ct.newInstance(); Method init = statusRules.getMethod("init", new Class[] { ServiceContext.class, /* context */ Dbms.class /* dbms channel */ }); init.invoke(sa, new Object [] { context, dbms }); return sa; } COM: <s> creates a status actions class and initializes it using reflections </s>
funcom_train/51162748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unbind(AbstractButton b1, AbstractButton b2) { AbstractButton bound1 = getBound(b1); AbstractButton bound2 = getBound(b2); if (bound1 != null && bound2 != null && bound1.equals(b2) && bound2.equals(b1)) { bindings.remove(b1); bindings.remove(b2); } } COM: <s> undoes binding created by code bind code </s>
funcom_train/3819933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void visit(File file, IVisitor visitor) { if (file.isDirectory()) { File[] files = file.listFiles(); for (int i = 0; i < files.length; i++) { visit(files[i], visitor); } } else { if (visitor != null) { visitor.onEntry(getPath(file)); } } } COM: <s> explores the filesystem from file </s>
funcom_train/15954499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInsertDouble() throws BMLException{ String lsValue = "Good"; DataString ldString = new DataString(fBlank); ldString.setString(lsValue); double lValue = 123.7; ldString.insert(1,lValue); assertEquals("G123.7ood",ldString.toString()); } COM: <s> test of insert method using offset double </s>
funcom_train/11164072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean back() { if (isCompleted()) { return false; } /* * Find the incoming transition for the current state */ IWizardTransition incomingTransition = currentState.getIncomingTransition(); /* * Traverse back if incoming transition exists */ if (incomingTransition != null) { currentState = incomingTransition.getSource(); clearWizardErrors(); return true; } return false; } COM: <s> tries to move to the previous state </s>
funcom_train/2582976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSeriesKeys(Comparable[] seriesKeys) { if (seriesKeys == null) { throw new IllegalArgumentException("Null 'seriesKeys' argument."); } if (seriesKeys.length != getSeriesCount()) { throw new IllegalArgumentException( "The number of series keys does not match the data."); } this.seriesKeys = seriesKeys; fireDatasetChanged(); } COM: <s> sets the names of the series in the dataset </s>
funcom_train/32061048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IntArray clone() { IntArray ret = new IntArray( ints.length, growthfactor, null ); ret.count = this.count; if( this.count == 0 ) return ret; System.arraycopy( this.ints, 0, ret.ints, 0, this.count ); return ret; } COM: <s> makes a copy of the int array </s>
funcom_train/9829455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getChildSize() { int totalSize = 0; TreeBrowserNode btNode; for (int i = 0; i < _children.size(); i++) { btNode = (TreeBrowserNode)_children.elementAt( i ); totalSize += btNode.getChildSize(); } totalSize += _children.size(); return totalSize; } // end method getChildSize COM: <s> gets the total number of children nodes recursive </s>
funcom_train/44825078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean includeQueryExpression (QueryExpression qe) throws QueryException { boolean include = false; IncludeCondition includeCondition = qe.getIncludeCondition(); // If include condition is blank or null, it gets included. if (includeCondition == null) { include = true; } else { include = includeCondition.evaluateCondition(this.getThreadContext(), scriptEngine); } return include; } COM: <s> evaluate the given query expressions include condition to determine </s>
funcom_train/5374539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextStyle (Font font, Color foreground, Color background) { if (font != null && font.isDisposed()) SWT.error (SWT.ERROR_INVALID_ARGUMENT); if (foreground != null && foreground.isDisposed()) SWT.error (SWT.ERROR_INVALID_ARGUMENT); if (background != null && background.isDisposed()) SWT.error (SWT.ERROR_INVALID_ARGUMENT); this.font = font; this.foreground = foreground; this.background = background; } COM: <s> create a new text style with the specified font foreground </s>
funcom_train/17904831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected BrowserTreeNode getSelectedBrowserNode() { // if path is null return null if (tree.isSelectionEmpty()) { return null; } // make sure we have a BrowserTreeNode Object object = tree.getLastPathComponent(); if (!(object instanceof BrowserTreeNode)) { return null; } return (BrowserTreeNode)object; } COM: <s> returns the currently selected nodes user object where the </s>
funcom_train/47603787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkInputCodeCommand() { if (okInputCodeCommand == null) {//GEN-END:|92-getter|0|92-preInit // write pre-init user code here okInputCodeCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|92-getter|1|92-postInit // write post-init user code here }//GEN-BEGIN:|92-getter|2| return okInputCodeCommand; } COM: <s> returns an initiliazed instance of ok input code command component </s>
funcom_train/13849532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void nextWriteLog() { // Don't check invariants at the top since we can get called // from readNextLog() with invalid state. // Normalize event count in case we were called due to a problem with // one of the log files long remainder = wcount % eventsPerLogFile; wcount += (eventsPerLogFile - remainder); wpos = 0; printControlData(persistenceLogger, "EventLog::nextWriteLog"); if (debugState) assertInvariants(); } COM: <s> advance the write state to the next available log </s>
funcom_train/43245194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNOKTwoWorkPhone() { System.out.println("setNOKTwoWorkPhone"); String nOKTwoWorkPhone = ""; EmergencyContactDG2Object instance = new EmergencyContactDG2Object(); instance.setNOKTwoWorkPhone(nOKTwoWorkPhone); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set noktwo work phone method of class org </s>
funcom_train/41229744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean execute(Context context) throws Exception { // Retrieve the ModuleConfig instance WebContext wcontext = (WebContext) context; ModuleConfig moduleConfig = (ModuleConfig) wcontext.get(getModuleConfigKey()); // If the module is configured for no caching, request no caching if (moduleConfig.getControllerConfig().getNocache()) { requestNoCache(context); } return (false); } COM: <s> p check to see if the controller is configured to prevent caching </s>
funcom_train/31668801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIntegerValue() throws SyntaxException{ int value=0; try { value=Integer.parseInt(textBox.getText()); } catch (NumberFormatException ex){ // if a SyntaxException is thrown, add more helpful // information to the box to be displayed. throw new SyntaxException("Syntax Error in parsing the integer: "+ textLabel.getText() + "\n" + textBox.getText() + "\n" + ex.getMessage()); } return value; } COM: <s> the method code get integer value code parses the string in </s>
funcom_train/41385587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getRButonAdministrador() { if (rButonAdministrador == null) { rButonAdministrador = new JRadioButton(); rButonAdministrador.setBounds(new Rectangle(110, 85, 20, 20)); rButonAdministrador.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { seleccionaCualquiera(rButonAdministrador, rButonUsuario); } }); } return rButonAdministrador; } COM: <s> this method initializes r buton administrador </s>
funcom_train/24077511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reloadCredibilitiesSorted() { if (m_categories == null) { throw new IllegalStateException("No order has been defined on the categories."); } for (Alternative alternative : m_credibilitiesSorted.keySet()) { final Map<Category, Double> map = m_credibilitiesSorted.get(alternative); final TreeMap<Category, Double> newSortedMap = new TreeMap<Category, Double>(m_categories.comparator()); newSortedMap.putAll(map); m_credibilitiesSorted.put(alternative, newSortedMap); } } COM: <s> reloads the sorted map on the basis of the current categories order </s>
funcom_train/47308152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { if (drawlisteners.isEmpty()) { System.err.println("--- Warning: no drawlistener registered! ---"); } // Start main loop timer = new java.util.Timer(); timer.scheduleAtFixedRate(new RenderTask(), RENDER_INTERVAL, RENDER_INTERVAL); } COM: <s> starts the main rendering loop </s>
funcom_train/26082712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Wallpaper getWallpaperById(String id) { if (this.wallpapers == null) { throw new IllegalStateException("loadAvailableWallpapers(Context) must be called first."); } for (Wallpaper wallpaper : this.wallpapers) { if (wallpaper.getId().equals(id)) { return wallpaper; } } return null; } COM: <s> gets wallpaper by id </s>