__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/47926024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRound(final int no) { if (firstRound == null) { firstRound = Boolean.TRUE; } else if (firstRound.booleanValue()) { firstRound = Boolean.FALSE; // the turn order is determined only in the first round for (final Combatant player : onliners.keySet()) { if (!turnOrder.contains(player)) { LOG.info("could not determine turn order for " + player); } } } currentRoundNo = no; } COM: <s> set the current round </s>
funcom_train/42188995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putAll(Map t) { // I'd like to be as arrogant about this as possible. System.out.println("The 'putAll' method is not supported in " + PreservingHashMap.class.getName() + "."); throw new UnsupportedOperationException("This method is not supported."); } COM: <s> copies all of the mappings from the specified map to this map </s>
funcom_train/8220804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int alignmentY(JLabel label, FontMetrics fm, Rectangle bounds) { final int height = getAvailableHeight(label); int textHeight = bounds.height; // Center alignment int textY = paintViewInsets.top + (height - textHeight) / 2 + getAscent(fm); return Math.max(textY, getAscent(fm) + paintViewInsets.top); } COM: <s> establish the vertical text alignment </s>
funcom_train/38288758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNamespace(String prefix) { if (StringUtils.isEmpty(prefix)) return ""; //$NON-NLS-1$ if (prefix.equals(ExportUtils.GENE_ID_ATTRIBUTE_QNAME.getPrefix())) return ExportUtils.GENE_ID_ATTRIBUTE_QNAME.getNamespaceURI(); if (parent != null) { final String result = parent.getNamespace(prefix); if (result != null) return result; } return mapPrefixToNs.get(StringUtils.defaultString(prefix)); } COM: <s> returns namespace that is currently mapped to given prefix </s>
funcom_train/50391713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addSAMLOutHandler(ClientProperties sp){ String outHandlers = properties.getProperty( ClientProperties.UAS_OUTHANDLER_NAME, ""); if (useSAMLPush && !outHandlers.contains( SAMLAttributePushOutHandler.class.getCanonicalName())) { outHandlers = (outHandlers + " " + SAMLAttributePushOutHandler.class.getCanonicalName()).trim(); sp.setProperty(ClientProperties.UAS_OUTHANDLER_NAME, outHandlers); } } COM: <s> adds saml handler which will add saml assertion to the outgoing messages </s>
funcom_train/50328718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int value() { String s = toString(); String[] part = s.split("\\s", 10); int val = -1; try { int tmp = Integer.valueOf(part[8],10).intValue(); val = tmp; // don't do this assign until now in case the conversion throws } catch (Exception e) { log.error("Unable to get number from reply: \""+s+"\""); } return val; } COM: <s> extracts read cv returned value from a message </s>
funcom_train/38474075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setYTDActual(double newValue) { double oldDifference = getDifference(); double oldValue = YTDActual; YTDActual = newValue; pcs.firePropertyChange("YTDActual", new Float(oldValue), new Float(YTDActual)); differenceChangeSupport.firePropertyChange("prop", new Double(oldDifference), new Double(getDifference())); } COM: <s> method set ytdactual </s>
funcom_train/38326333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone(){ Slot2 newslot = new Slot2(); newslot.setId(this.getId()); newslot.setName(this.getName()); newslot.setEqualList(this.getEqualList()); newslot.setNotEqualList(this.getNotEqualList()); newslot.setValueType(this.getValueType()); return newslot; } COM: <s> a convienance method to clone slots </s>
funcom_train/39048483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cancel() { synchronized (this) { if (cancelled) { throw new IllegalStateException("cannot cancel task"); } cancelled = true; } if (task.cancel(false)) { queue.notifyCancelled(task); } if (currentTimerTask != null) { currentTimerTask.cancel(); } } COM: <s> cancels this handle which will also cancel the associated </s>
funcom_train/20237835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdHelpCadastroUsuario() { if (cmdHelpCadastroUsuario == null) {//GEN-END:|30-getter|0|30-preInit // write pre-init user code here cmdHelpCadastroUsuario = new Command("Help", Command.HELP, 0);//GEN-LINE:|30-getter|1|30-postInit // write post-init user code here }//GEN-BEGIN:|30-getter|2| return cmdHelpCadastroUsuario; } COM: <s> returns an initiliazed instance of cmd help cadastro usuario component </s>
funcom_train/20310273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void translateRoles( Element expr ) { Set roles = new HashSet(); collectRoleProperties( roles ); for (Iterator i = roles.iterator(); i.hasNext(); ) { translateRole( expr, (ObjectProperty) ((Property) i.next()).as( ObjectProperty.class ), m_sourceData ); } } COM: <s> translate all of the roles object properties in the kb </s>
funcom_train/26570690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resurrect() { if (!alive) { this.alive = true; this.dying = false; super.sprite.setAnimation("stopDown"); Display.getDisplay().drawSprite(super.sprite, 0, 0, LAYER_DUDES); currentTileX = startTileX; currentTileY = startTileY; insideTileX = 0; insideTileY = 0; positionSprite(); } } COM: <s> revives the death player </s>
funcom_train/43230507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void beginTransaction() { try { this.getContext().getTransactionController().beginTransaction(); } catch (final PendingCommitException e) { this.showQuestion("Es existieren noch nicht übertragene Änderungen. Wie sollen diese behandelt werden?", new Answer("An den Server senden.") { @Override public void onAction(final QuestionDialog widget) { WritePresenter.this.commitTransaction(); widget.hide(); } }, new Answer("Verwerfen") { @Override public void onAction(final QuestionDialog widget) { WritePresenter.this.rollbackTransaction(); widget.hide(); } }); } } COM: <s> this method begins a transaction which could be commited </s>
funcom_train/39315717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLine4ActionPerformed() { System.out.println("testLine4ActionPerformed"); f.currentTool=f.toolLine; f.line4ActionPerformed(actionEvent); assertEquals(f.curLine,f.line4); t.currentTool=t.toolCurve; t.line4ActionPerformed(actionEvent); assertEquals(t.curCurve,t.line4); } COM: <s> test of line4 action performed method of class terp paint </s>
funcom_train/45792718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List pageGroupLinks(final String queryStr, final int page, final int pageSize, final int groupId) { return getHibernateTemplate().executeFind( new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException { Query query = session.createQuery(queryStr); // Set the maximum results query.setFirstResult(page * pageSize); query.setMaxResults(pageSize); query.setInteger("groupId", groupId); return query.list(); } }); } COM: <s> list the entity links including paging the results </s>
funcom_train/36852101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(Reader in, CsvConfig config) throws CsvException { separator = config.getSeparator(); escapeDefined = (config.getEscapeChar() != null); if (escapeDefined) { escapeChar = config.getEscapeChar(); } lineReader = (in instanceof BufferedReader) ? (BufferedReader) in : new BufferedReader(in); } COM: <s> initializes the parser </s>
funcom_train/19159826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Collection getRelationships(String type, int id){ Collection relVec = null; try { relVec = ds.loadRelationships(id); } catch (Exception e) { e.printStackTrace(); } List relationships = new ArrayList(); Iterator iterator = relVec.iterator(); while (iterator.hasNext()) { Relationship element = (Relationship)iterator.next(); if(element.getType().compareTo(type) == 0) { relationships.add(element); } } return relationships; } COM: <s> copies all relationships of code type code for code id code </s>
funcom_train/25506602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DateWidget getDateFromField() { if (dateFrom == null) { dateFrom = new DateWidget(); dateFrom.setToolTipText(wordings.fromTooltip); dateFrom.getDateField().addFocusListener(AutoSelectFocusListener.INSTANCE); dateFrom.addPropertyChangeListener(DateWidget.DATE_PROPERTY, consistencyChecker); dateFrom.addPropertyChangeListener(DateWidget.CONTENT_VALID_PROPERTY, consistencyChecker); } return dateFrom; } COM: <s> this method initializes date from </s>
funcom_train/47164257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Properties createApplicationProperties() throws Exception{ Properties properties = new Properties(); properties.setProperty("comment", "Properties of the application"); try { properties.setProperty(START_USECASE, navigation.getInitialNavigationEntry().getUseCase()); } catch (Exception ex) { if (skipExceptions) properties.setProperty("exception.during.generation", ex.toString()); else throw ex; } return properties; } COM: <s> exceptions are written into the properties </s>
funcom_train/17976723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTree getJTreePlanner() { if (jTreePlanner == null) { jTreePlanner = new JTree(); jTreePlanner.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() { public void valueChanged(javax.swing.event.TreeSelectionEvent e) { if(listener != null){ listener.treeValueChanged(e); } } }); } return jTreePlanner; } COM: <s> this method initializes j tree planner </s>
funcom_train/47547540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean forward() { checkWidget(); int /*long*/[] result = new int /*long*/[1]; int rc = webBrowser.QueryInterface(nsIWebNavigation.NS_IWEBNAVIGATION_IID, result); if (rc != XPCOM.NS_OK) error(rc); if (result[0] == 0) error(XPCOM.NS_ERROR_NO_INTERFACE); nsIWebNavigation webNavigation = new nsIWebNavigation(result[0]); rc = webNavigation.GoForward(); webNavigation.Release(); return rc == XPCOM.NS_OK; } COM: <s> navigate to the next session history item </s>
funcom_train/39267423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireTableDataChanged() { TableModelEvent e = new TableModelEvent(this); if (tableModelListeners != null) { for (int i = 0; i < tableModelListeners.size(); i++) { ((TableModelListener)tableModelListeners.elementAt(i)).tableChanged(e); } } } COM: <s> notifies all listeners that all cell values in the tables </s>
funcom_train/13197347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(FilterConfig filterConfig) { this.filterConfig = filterConfig; if (filterConfig != null) { if (debug) { log("HibernateFilter:Initializing filter"); } } try { sf = HibernateUtil.getSessionFactory(); }catch (Exception ex){ log.error(ex,ex); } } COM: <s> init method for this filter </s>
funcom_train/23284916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getZoneAlbums(String zoneID, String startIndex, String numEntries, String artist) throws IOException, UPNPResponseException, JanosWebException { Element zone = getZoneElement(zoneID, false); zd.getZoneAlbums(zoneID, startIndex, numEntries, artist, zone); return zone; } COM: <s> get an element representation of a zone players list of albums </s>
funcom_train/18058105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInterval(int intervalSeconds) { if (intervalSeconds == PpInterval / 1000) return; boolean isRunning = PpTimer.isRunning(); PpInterval = intervalSeconds * 1000; if (isRunning) PpTimer.stop(); PpTimer.setDelay(PpInterval); if (isRunning) PpTimer.start(); } COM: <s> set the interval between updates </s>
funcom_train/27779619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Reader getReader(Reader i, String baseURL) throws IOException { StringWriter w = new StringWriter(16 * 1024); b.reset(w); b.baseURL = baseURL; parser.parse(i, b, true); i.close(); return new StringReader(w.toString()); } COM: <s> return a string reader that will use the given input stream and read </s>
funcom_train/25491964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getImage(String fileName) throws IOException { Image image = imageMap.get(fileName); if (image == null) { URL url = this.getClass().getResource("/".concat(fileName)); if (url == null) { url = (new File(fileName)).toURI().toURL(); } image = ImageIO.read(url); // image = ImageIO.read(new File(fileName)); imageMap.put(fileName, image); } return image; } COM: <s> returns the image with the given name </s>
funcom_train/33851143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TypeQualifierAnnotation getReturnValue(MethodDescriptor methodDesc, TypeQualifierValue tqv) { // // TODO: handling of overridden methods? // Map<TypeQualifierValue, TypeQualifierAnnotation> map = returnValueMap.get(methodDesc); if (map == null) { return null; } return map.get(tqv); } COM: <s> get the type qualifier annotation on a method return value </s>
funcom_train/36442203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateStatusBar(String s) { // trim() removes whitespace and control characters at both ends of the string statusField.append(s.trim() + "\n"); // This informs the scroll pane to update itself and its scroll bars. // The scroll pane does not always automatically scroll to the message that was // just added to the text area. This line guarantees that it does. statusField.revalidate(); } COM: <s> adds the given string to the status text area </s>
funcom_train/46449679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLocalizedJasperFileName(String reportName, String localeId) { String localizedName = (String) getAttributeForReport(reportName, localeId, jasperReports); // maybe we do not have the right locale, but English is mandatory... if (localizedName == null) { localizedName = (String) getAttributeForReport(reportName, MANIFESTFILE_MANDATORY_DEFAULTLANGUAGE, jasperReports); } return localizedName; } COM: <s> gives the localized name of the requested jasper report </s>
funcom_train/8638449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCheckType(int checkType) { if (checkType < TYPE_CHECK || checkType > TYPE_STAR) checkType = TYPE_CIRCLE; this.checkType = checkType; setText(typeChars[checkType - 1]); try { setFont(BaseFont.createFont(BaseFont.ZAPFDINGBATS, BaseFont.WINANSI, false)); } catch (Exception e) { throw new ExceptionConverter(e); } } COM: <s> sets the checked symbol </s>
funcom_train/38541493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSource(CommentSniffer parser) { commentParser = parser; parser.setOutput(this); new IgnoreCommentListener().registerTo(parser); new DefineCommentListener().registerTo(parser); new IncludeCommentListener().registerTo(parser); new InsertCommentListener().registerTo(parser); ifDef = new IfDefCommentListener(); ifDef.registerTo(parser); } COM: <s> sets the code comment sniffer code used to parse for the preprocessing instructions </s>
funcom_train/14275772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getHeadingForPosition(int posX, int posY) { int reqHead = getHeading(); if (posX == getX() || posY == getY()) { if (posX > getX()) reqHead = HEADING_EAST; else if (posX < getX()) reqHead = HEADING_WEST; if (posY > getY()) reqHead = HEADING_SOUTH; else if (posY < getY()) reqHead = HEADING_NORTH; } return reqHead; } COM: <s> computes which heading this creature should be facing </s>
funcom_train/2369633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearTricks() { synchronized (this) { this.playerTricks = new Hashtable<Player, List<CardSet>>(); final Iterator<Player> iterator = this.players.iterator(); while (iterator.hasNext()) { this.playerTricks .put(iterator.next(), new ArrayList<CardSet>()); } this.fireChange(); } } COM: <s> clears all tricks from each player </s>
funcom_train/21263821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(SubactividadPorActividad entity) { EntityManagerHelper.log("saving SubactividadPorActividad instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved subactividad por actividad entity </s>
funcom_train/31678025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getJMenuFile() { if (jMenuFile == null) { jMenuFile = new JMenu(); jMenuFile.setText("File"); // jMenuFile.add(getJMenuItemSkriptPath()); // Generated jMenuFile.add(getJMenuItemBreak()); // Generated jMenuFile.add(getJMenuItemExit()); } return jMenuFile; } COM: <s> this method initializes j menu </s>
funcom_train/24640843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pauseWorker(KreatorWorker<?> w) { if(w == null) { throw new IllegalArgumentException("w may not be null"); } //LOG.debug("Pausing worker: "+w); synchronized (w) { w.pleaseWait(); } // TJ: Not every worker is bind to a console. bug #200 if(w.getConsole() != null) w.getConsole().startWorkerCheckTimer(); } COM: <s> tells the given worker to sleep until resumed </s>
funcom_train/33543959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnect(Presence unavailablePresence) { // If not connected, ignore this request. if (packetReader == null || packetWriter == null) { return; } shutdown(unavailablePresence); if (roster != null) { roster.cleanup(); roster = null; } wasAuthenticated = false; packetWriter.cleanup(); packetWriter = null; packetReader.cleanup(); packetReader = null; chatManager = null; } COM: <s> closes the connection </s>
funcom_train/22213287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testZZZ() { /** * You will want to use the following methods of TestCase * to perform assertions: * assert(expression) where expression can be any valid Java expression * assertEquals(a,b) * assertNotEqual(a,b) * assertNull(a) * assertNotNull(b) * and also fail(String msg) when something fails unexpectedly */ } COM: <s> basic zzz tests </s>
funcom_train/29504924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set listTemplatesByArea(Area area) throws Exception { try { Set<Template> ret = new HashSet<Template>(); ret.addAll(manager.createQuery("from Template t where t.area = :x").setParameter("x",area).getResultList()); return ret; } catch (Exception e) { log.error("listTemplatesByArea("+area+") - Failed to find templates: "+e); throw e; } } COM: <s> returns all templates of the area specified </s>
funcom_train/42445687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QcLink createLink(final int pBugId1, final QcLink pLink) throws QcException { try { final QcBug bug = getBug(pBugId1); final AbstractQcItem target = pLink.getTarget(); if (target == null) { throw new QcException("Linked bug Id not set"); } return bug.getLinks().createLink(target); } catch (final ComFailException e) { throw new QcException(e); } } COM: <s> link 2 existing bugs </s>
funcom_train/43245265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetEffectiveDate() { System.out.println("setEffectiveDate"); Calendar effectiveDate = null; FamilyDemographicDependentObject instance = new FamilyDemographicDependentObject(); instance.setEffectiveDate(effectiveDate); // 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 effective date method of class org </s>
funcom_train/22155013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawRect(int x,int y,int w,int h) { np(); pw.print(cxy(x,y)+cwh(w,h)+"re "); // rectangle lx=x; // I don't know if this is correct, but lets see if PDF ends ly=y; // the rectangle at it's start. // stroke (optimised) } COM: <s> we overide graphics </s>
funcom_train/35833784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJtxfld_Current() { if (jtxfld_Current == null) { jtxfld_Current = new JTextField(); jtxfld_Current.setHorizontalAlignment(JTextField.CENTER); jtxfld_Current.setLocation(new Point(92, 10)); jtxfld_Current.setText(""); jtxfld_Current.setEditable(false); jtxfld_Current.setSize(new Dimension(160, 21)); } return jtxfld_Current; } COM: <s> this method initializes jtxfld current </s>
funcom_train/646824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDisplayValue(Object value) { if (value == null) return "<null>"; // Get the column definition and have it do the formatting Format format = getFormat(); if (format != null) return format.format(value); // No formatting, default output return value.toString(); } COM: <s> called to return a non null displayable version of the given value </s>
funcom_train/9645447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getMainElement() throws XMLNotValidException { Element elementOperator = super.getEditor().getDoc().getRootElement() .getChild("initialSubgroup"); if (elementOperator != null) elementOperator = elementOperator.getChild("sgDescription"); else return createMainElement(); if (elementOperator != null) { elementOperator = elementOperator.getChild("operator"); addOperatorType(elementOperator); } else return createMainElement(); return elementOperator; } COM: <s> return the subgroup element </s>
funcom_train/48142931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double norm(final int n) { final double answer=Math.pow(vector[0],n)+Math.pow(vector[1],n)+Math.pow(vector[2],n); return Math.pow(answer,1.0/n); } COM: <s> returns the l sup n sup norm </s>
funcom_train/33265734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getPreferredSize() { if ( valid && ( pref_width >= 0 ) && ( pref_height >= 0 ) ) { return new Dimension( pref_width, pref_height ); } Dimension pref = getOuterPreferredSize(); Dimension scrolledSize = getScrolledPreferredSize(); pref.width += scrolledSize.width; pref.height += scrolledSize.height; return pref; } COM: <s> gets the preferred size </s>
funcom_train/2861218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openLog(String logName, String logDir, int logLevel) { this.logName = logName; this.logDir = logDir; this.loglevel = logLevel; this.logId = ZBase.hostId + "-" + String.valueOf(ZBase.getPort())+"."+sessionId; openLog(logLevel); } COM: <s> open the user log and save the filenames </s>
funcom_train/36954316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeleteMiddle() throws CoreException { IBuffer buffer = this.createBuffer( "P/x/y/A.rb", "package x.y;\n" + "public class A {\n" + "}" ); try { // delete "public " buffer.replace(13, 7, ""); assertBufferEvent(13, 7, null); assertSourceEquals( "unexpected buffer contents", "package x.y;\n" + "class A {\n" + "}", buffer.getContents() ); assertTrue("should have unsaved changes", buffer.hasUnsavedChanges()); } finally { this.deleteBuffer(buffer); } } COM: <s> tests deleting text in the middle of a buffer </s>
funcom_train/18481069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultMat(ObjLink link) { ObjLink old = getDefaultMat() ; if (link != null && !link.equals(old) || link == null && old != null) { this.default_mat_model = link ; notifyChanged(DEFAULTMATERIAL,old,default_mat_model) ; } } COM: <s> sets a pointer to the default image object </s>
funcom_train/18519359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void cleanupFontDeclCache() { synchronized (cacheSemaphore) { // check cache validity and act accordingly if (!checkFontDeclCacheValid()) { fontMapper = null; // clear dependent definitions mapStyleDefCache.clear(); mapFieldDefCache.clear(); mapLayoutCache.clear(); } } } COM: <s> checks the validity of cached font declaration items and cleans up caches </s>
funcom_train/11728196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOr() throws RepositoryException { String stmt = xpathRoot + "/*[@" + jcrPrimaryType + " or @" + jcrMixinTypes + "]"; try { qm.createQuery(stmt, Query.XPATH); } catch (InvalidQueryException e) { fail("invalid statement syntax for '" + stmt + "'"); } } COM: <s> verifies that the or operator is accepted for a property name </s>
funcom_train/40334809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double inverseCdf(double x) throws IllegalArgumentException { if (x >= 0 && x <= 1) { return Math.sqrt(-2d * Math.pow(params[ALPHA], 2) * Math.log(1 - x)); } else { throw new IllegalArgumentException(Resource.getString("RAYLEIGHDISTRIBUTION.INVERSECDF_X_MUST_BE_>_0_AND_<_1")); } } COM: <s> return the value of inverse function at x </s>
funcom_train/36201174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadTasks(String codeFileName, LinkedList<Behaviour> scheduledTasks, String agentName) { InputStream cipheredCode; byte[] code; // Get ciphered code from the main JAR. cipheredCode = getClass().getClassLoader().getResourceAsStream( JAR_CODE_PATH + codeFileName + CIPHERED_CODE_EXTENSION); code = decipherAndVerifyCode(cipheredCode); loadTasksFinal(scheduledTasks, code); } COM: <s> method that decipher and loads the tasks behaviours </s>
funcom_train/12164776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddWidthNoParam() throws Exception { String string = "http://ahost/path"; StringBuffer url = new StringBuffer(string); transcoder.addWidth(null, url, 5, null); assertEquals("There should be a single width param", (string + "&" + getWidthParameter() + "=" + 5), url.toString()); } COM: <s> test that the add width method works as expected when there is no </s>
funcom_train/20645266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SNumField getNumberField() { if(numberField == null) { numberField = new SNumField("1",true) { public void stopEditing() { Integer i = getInteger(); if (i != null) { optionMA.setNumberOfLines(i.intValue()); } } public void startEditing() { setStatus(false); }}; setDim(numberField,NUMBERFIELD_W,DEF_COMPONENT_H); } return numberField; } COM: <s> this method initializes number field </s>
funcom_train/18569394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getTab1Panel() { if (tab1Panel == null) { tab1Panel = new JPanel(); tab1Panel.setLayout(new BorderLayout()); tab1Panel.add(getHeading1Panel(), java.awt.BorderLayout.NORTH); tab1Panel.add(getDetail1Panel(), java.awt.BorderLayout.WEST); } return tab1Panel; } COM: <s> this method initializes tab1 panel </s>
funcom_train/9712973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fromOM(OMElement omElement) throws AxisFault { QName qname = omElement.getQName(); if (!wsamQName.equals(qname) && !wsawQName.equals(qname) && !subQName.equals(qname)) { throw new AxisFault("Unrecognized element."); } name = omElement.getTextAsQName(); } COM: <s> convenience method to extract metadata from an element </s>
funcom_train/20310362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void translateBinaryPropertyAxioms( Element expr, String propURI, String axiomType, Iterator i, String propType ) { while (i.hasNext()) { Property prop = (Property) i.next(); Element binaryAxiom = addElement( expr, axiomType ); addNamedElement( binaryAxiom, propType, propURI ); addNamedElement( binaryAxiom, propType, prop.getURI() ); } } COM: <s> helper method for binary axioms each argument of which is an ratom element </s>
funcom_train/7725451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int lookUpServer(String name) { print("Looking up server "+name+"..."); try { Server s = (Server)registryProxy.lookup(name); int id = s.getServerId(); println("Server found."); servers.put(new Integer(id), s); return id; } catch(NotBoundException nbe) { println("Server recently disconnected."); return -1; } catch(RemoteException re) { println("Server unavailable. Server removed from registry."); try { registryProxy.unbind(name); } catch(Exception e) {} return -1; } } COM: <s> tries to look up a server specified by the given name </s>
funcom_train/16380693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNumberOfCorrectorsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new UnsettablePropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MultipleCorrectorsType_numberOfCorrectors_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MultipleCorrectorsType_numberOfCorrectors_feature", "_UI_MultipleCorrectorsType_type"), CTEPackage.Literals.MULTIPLE_CORRECTORS_TYPE__NUMBER_OF_CORRECTORS, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the number of correctors feature </s>
funcom_train/29519937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float CalculateNodeDistance(AP node1, AP node2) { return (float) Math.sqrt(Math.pow((node1.x - node2.x), 2) + Math.pow((node1.y - node2.y), 2) + Math.pow((node1.z - node2.z), 2)); } COM: <s> return the distance in metres between two nodes </s>
funcom_train/14435950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getMainSplitPane(), BorderLayout.CENTER); jContentPane.add(getToolBar(), BorderLayout.NORTH); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/34311907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReturnValue run() { if (example.hasErrors()) return abort(example.getErrors()); if (example.method.isIgnorePresent()) return ignore(); if (!runDependencies()) return ignore(); started(); try { return runExample(); } finally { finished(); } } COM: <s> runs the example and returns test color </s>
funcom_train/25476788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initHashtable() { imageHash = new Hashtable<String, Image>(4); imageHash.put("splash", getImageForHash("splash.png")); imageHash.put("application", getImageForHash("application.png")); imageHash.put("options_active", getImageForHash("options_active.png")); imageHash.put("options_inactive", getImageForHash("options_inactive.png")); } COM: <s> inits the image hash table </s>
funcom_train/40484310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEffectsLength(double duration) { for (Iterator<Effect> it = iterator(); it.hasNext();) { Effect theEffect = it.next(); if (theEffect instanceof ParallellCompositeEffect) ((ParallellCompositeEffect) theEffect).setDuration(duration); else theEffect.setDuration(duration); } } COM: <s> sets each effects duration to a specified number of seconds </s>
funcom_train/14005384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String buildCustSearchURL(String id, String key) { StringBuffer buffer = new StringBuffer(); buffer.append(custSearchURL); buffer.append("?"); buffer.append(CustSearchXML.QUERY_REQUEST).append("="); buffer.append(CustSearchXML.buildRequest(id, key)); return buffer.toString(); } COM: <s> create the customer search url with parameters for sending to the server </s>
funcom_train/3080607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAutoCreateColumnsFromModel(boolean newValue) { boolean oldValue = autoCreateColumnsFromModel; autoCreateColumnsFromModel = newValue; if (!oldValue && newValue) { createDefaultColumnsFromModel(); } firePropertyChange(AUTO_CREATE_COLUMNS_FROM_MODEL_CHANGED_PROPERTY, oldValue, newValue); } COM: <s> sets whether the code table column model code will be directly </s>
funcom_train/12179462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvokeMissingStringDefault() throws Exception { Expression expression = parser.parse(getFunctionQName() + "('name', 'value')"); addSingleValueExpectations("name", null); Value result = expression.evaluate(expressionContext); assertEquals("Result not as", "value", result.stringValue().asJavaString()); } COM: <s> test invoke with a missing entity and a string default </s>
funcom_train/41535829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String globalInfo() { return "SVMAttributeEval :\n\nEvaluates the worth of an attribute by " + "using an SVM classifier.\n\n" + "For more information see:\n" + "Guyon, I., Weston, J., Barnhill, S., & Vapnik, V. (2002). " + "Gene selection for cancer classification using support " + "vector machines. Machine Learning, 46, 389-422"; } COM: <s> returns a string describing this attribute evaluator </s>
funcom_train/22385712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public View hardcodedView(Cell id) { View v = null; if(Id.equals(id, c_vanishing)) { // v = new VanishingView(); // v = new PlainVanishing(); v = new SpanView(); //s.setJavaObject(vc,new VanishingView()); } else if (Id.equals(id, c_vstreamv)) { v = new VStreamView(true, false, true); } else { pa("No matching view found for view parameter"); } return v; } COM: <s> resolves the view corresponding to a cell identity </s>
funcom_train/51346371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public V asValue(final ExtensionIV iv, final BigdataValueFactory vf) { final byte b = iv.getDelegate().byteValue(); final Color c = Color.valueOf(b); if (c == null) throw new RuntimeException("bad color got encoded somehow"); return (V) vf.createLiteral(c.toString(), color); } COM: <s> attempt to convert the </s>
funcom_train/49462639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String concatList(List<String> in) { StringBuffer output = new StringBuffer(); for(int i=0; i<in.size(); ++i) { String part = in.get(i); if (part != null && !"".equals(part)) { if (i > 0) output.append(' '); // add whitespace if necessary. output.append(part); } } return output.toString(); } COM: <s> concatenate as string a list with </s>
funcom_train/27810489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTranscodingsForPlayer(String playerId, int[] transcodingIds) { update("delete from player_transcoding2 where player_id = ?", playerId); String sql = "insert into player_transcoding2(player_id, transcoding_id) values (?, ?)"; for (int transcodingId : transcodingIds) { update(sql, playerId, transcodingId); } } COM: <s> sets the list of active transcodings for the given player </s>
funcom_train/10708319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValueOfDoublePos1() { double a = 65678765876567576.98788767; BigDecimal result = BigDecimal.valueOf(a); String res = "65678765876567576"; int resScale = 0; assertEquals("incorrect value", res, result.toString()); assertEquals("incorrect scale", resScale, result.scale()); } COM: <s> create a big decimal from a positive double value </s>
funcom_train/4990249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPointedColumn(Point mouseposition) { int x = mouseposition.x; // + lineTableViewer.getTable().get; int sumWidthColumn = this.nColumn.getWidth(); if (x < sumWidthColumn) return 0; sumWidthColumn += this.unitColumn.getWidth(); if (x < sumWidthColumn) return 1; sumWidthColumn += this.freqColumn.getWidth(); if (x < sumWidthColumn) return 2; return 2; } COM: <s> gets the pointed column </s>
funcom_train/39062076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addResourcePathPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IMarkingAnnotationNode_resourcePath_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IMarkingAnnotationNode_resourcePath_feature", "_UI_IMarkingAnnotationNode_type"), MarkingPackage.eINSTANCE.getIMarkingAnnotationNode_ResourcePath(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the resource path feature </s>
funcom_train/6254300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (object == null || object.getClass() != getClass()) { return false; } SslEndpointImpl other = (SslEndpointImpl) object; return serverHost.equals(other.serverHost) && port == other.port && Util.sameClassAndEquals(socketFactory, other.socketFactory); } COM: <s> two instances of this class are equal if they have the same actual </s>
funcom_train/6408440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(JMEExporter e) throws IOException { super.write(e); OutputCapsule capsule = e.getCapsule(this); capsule.write(planes, "planes", 0); capsule.write(radialSamples, "radialSamples", 0); capsule.write(radius, "radius", 0); capsule.write(center, "center", Vector3f.ZERO); } COM: <s> generates the connections </s>
funcom_train/31929624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getACK() throws IOException { int command = in.read(); if (command != ACK) { if (ignoreProtocolErrors) { in.unread(command); report("Acknowledge expected but got \"" + (char) command + "\""); } else { throw new IOException("Acknowledge expected but got \"" + (char) command + "\""); } } } COM: <s> get an acknowledge </s>
funcom_train/26441494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void allowEverything() { bNick.setEnabled(true); bKick.setEnabled(true); bList.setEnabled(true); bTopic.setEnabled(true); bJoin.setEnabled(true); bNames.setEnabled(true); bQuery.setEnabled(true); bBan.setEnabled(true); } COM: <s> allow the user to use everything chatter is an admin </s>
funcom_train/28743246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getSamplesByGroup(Integer groupId) throws LimsException { Collection samples = null; try { samples = sampleSession.getSamplesInGroup(groupId); } catch (Exception ex) { LogManager.logMessage("LimsDelegate.getSamplesByGroup():: ", ex); throw new LimsException(ex.getMessage()); } return samples; } COM: <s> todo get sample infos in group </s>
funcom_train/36428359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Update(byte [] bytes, int offset, int length) { if (md5 != null) { md5.Update(bytes, offset, length); return; } switch (algo) { case ADLER32: case CRC32: checksum.update(bytes, offset, length); return; case MD5: case MD2: case SHA1: case SHA256: case SHA384: case SHA512: digest.update(bytes, offset, length); return; } } COM: <s> update the digest with new bytes </s>
funcom_train/1440424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeConnection() { if ( cachedConnection != null ) { try { cachedConnection.close(); } catch (final SQLException ex) { logger.debug( "JDBCConnection.closeConnection()", ex ); } cachedConnection = null; } logger.info( "Database connection closed." ); } COM: <s> closes the connection </s>
funcom_train/42977624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStatusPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ConstraintDescription_status_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ConstraintDescription_status_feature", "_UI_ConstraintDescription_type"), ConstraintPackage.Literals.CONSTRAINT_DESCRIPTION__STATUS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the status feature </s>
funcom_train/5863382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRootAttribute(String name, String value) { if (name == null || name.length() == 0) throw new IllegalArgumentException(); if (_rootAttrs == null) { if (value == null) return; //nothing to _rootAttrs = new LinkedHashMap(); } if (value == null) _rootAttrs.remove(name); else _rootAttrs.put(name, new ExValue(value, String.class)); } COM: <s> adds a root attribute </s>
funcom_train/34795576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getDivider(Container parent) { Insets insets = parent.getInsets(); int half = (parent.getWidth() - insets.left - insets.right) / 2; int divider = 0; for (int k = 0; k < parent.getComponentCount(); k += 2) { Component comp = parent.getComponent(k); Dimension d = comp.getPreferredSize(); divider = Math.max(divider, d.width); } divider += hGap; return Math.max(divider, half); } COM: <s> returns the divider for the labels </s>
funcom_train/8369499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int berParseHeader(RdpPacket_Localised data, int tagval) throws RdesktopException { int tag=0; int length=0; int len; if (tagval > 0x000000ff) { tag = data.getBigEndian16(); } else { tag = data.get8(); } if (tag !=tagval) { throw new RdesktopException("Unexpected tag got " + tag + " expected " +tagval); } len=data.get8(); if ((len&0x00000080)!=0) { len &= ~0x00000080; // subtract 128 length = 0; while(len--!=0){ length=(length << 8)+data.get8(); } } else { length=len; } return length; } COM: <s> parse a ber header and determine data length </s>
funcom_train/5896764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocalized(boolean localized) { if (_localized != localized) { if (localized && "instant".equals(_mode)) throw new UnsupportedOperationException("localized not supported in instant mode yet"); _localized = localized; if (_localized) fixMode(); //becomes defer mode if auto if (!_instantMode) invalidate(); else super.invalidate(); //invalidate is redudant in instant mode, but less memory leak in IE } } COM: <s> sets whether the source depends on the current locale </s>
funcom_train/168611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetRowSelection() { if(!updatingListSelectionModel) { updatingListSelectionModel = true; try { super.resetRowSelection(); } finally { updatingListSelectionModel = false; } } // Notice how we don't message super if // updatingListSelectionModel is true. If // updatingListSelectionModel is true, it implies the // ListSelectionModel has already been updated and the // paths are the only thing that needs to be updated. } COM: <s> this is overridden to set code updating list selection model code </s>
funcom_train/33510620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Unit getOffender() { double defParamRad = oppforsel.getBaseSenseRange(); Point mainb = GameState.getComputer().getMainBuilding().getPosition(); for(Unit unit: GameState.getUnits().getUnits()) { if(unit.getPlayer().equals(GameState.getHuman()) && mainb.distance(unit.getPosition())<defParamRad ) { return unit; } } return null; } COM: <s> the ai gets the unit that it wants to defend itself against </s>
funcom_train/46695980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetParameter_0args() { System.out.println("getParameter"); CombineProperty instance = new CombineProperty(); Properties expResult = null; Properties result = instance.getParameter(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get parameter method of class combine property </s>
funcom_train/41302079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyPressed(int key) { super.keyPressed(key); if (!isMenuOpened()) { int action = getGameAction(key); switch (action) { case Canvas.LEFT: setPrevEnabled(); repaint(); break; case Canvas.RIGHT: setNextEnabled(); repaint(); break; case Canvas.FIRE: selectedAction(); repaint(); break; } } } COM: <s> called when a key is pressed </s>
funcom_train/22064367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getPicBack() { if (picBack == null) { picBack = new JButton(); picBack.setText("<"); picBack.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { getADLPics().getHorizontalScrollBar() .setValue( getADLPics().getHorizontalScrollBar() .getValue() - 96); } }); } return picBack; } COM: <s> this method initializes pic back </s>
funcom_train/2845853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Annotation getNextLeaf() { if (parent == null) return null; else if (parent.indexOf(this) < parent.size() - 1) return ((Annotation) parent.get(parent.indexOf(this) + 1)).getFirstLeaf(); else return parent.getNextLeaf(); } COM: <s> returns the first leaf terminal node that comes after this code annotation code </s>
funcom_train/27942672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map deleteDomains(List domains) throws Exception { Map responses = new HashMap(); Iterator i = domains.iterator(); while (i.hasNext()) { GRIDomain domain = (GRIDomain) i.next(); RegistryResponse response = deleteDomain(domain); responses.put(domain, response); } return responses; } COM: <s> delete multiple domains from their appropriate registries </s>
funcom_train/27834961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteElement(String element) { for (int i = 0; i < _listElements.getItemCount(); i++) { String tmp = (String) _listElements.getItemAt(i); if (tmp.equals(element)) { _parentWindow.removeComponent(_parentWindow.getFormData() .removeElement(element)); _listElements.removeItemAt(i); } } } COM: <s> deletes element form the elments code jcombo box code </s>
funcom_train/4135061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SQLWarning getNextWarning() { // try { // return ((SQLWarning)getNextException()); // } catch (ClassCastException ex) { // // The chained value isn't a SQLWarning. // // This is a programming error by whoever added it to // // the SQLWarning chain. We throw a Java "Error". // throw new Error("SQLWarning chain holds value that is not a SQLWarning"); // } return null; } COM: <s> retrieves the warning chained to this code sqlwarning code object by </s>
funcom_train/26526403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(HttpServletRequest req) { clear(); for (Enumeration enum = req.getParameterNames(); enum.hasMoreElements(); ) { String parameter = (String) enum.nextElement(); parameters.put(parameter,Arrays.asList(req.getParameterValues(parameter))); } } COM: <s> sets this form data objects parameters from a http servlet request </s>