__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/33552842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteClient(int clientId) { String errorMsg; try { clientDaoIF.deleteClient(clientId); } catch (NotFoundException e) { errorMsg = "Client with id " + clientId + " does not exist so cannot be deleted"; logger.warning(errorMsg); EwsUtility.printStackTrace(logger, e); } catch (SQLException e) { errorMsg = "SQL error while calling clientDaoIF.deleteClient"; logger.severe(errorMsg); EwsUtility.printStackTrace(logger, e); } } COM: <s> deletes a client from the system and removes it from any lists </s>
funcom_train/3990075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUwagi_szpitalaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SkierowanieSzpital_uwagi_szpitala_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SkierowanieSzpital_uwagi_szpitala_feature", "_UI_SkierowanieSzpital_type"), PrzychodniaPackage.Literals.SKIEROWANIE_SZPITAL__UWAGI_SZPITALA, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the uwagi szpitala feature </s>
funcom_train/50492901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String snip) { try { String snipName = (String) ExpressionEvaluatorManager.evaluate("snip", snip, String.class, this, pageContext); this.snip = snipsnap.api.snip.SnipSpaceFactory.getInstance().load(snipName); } catch (JspException e) { Logger.warn("unable to evaluate expression", e); } } COM: <s> set the snip for the context of permission checking </s>
funcom_train/133847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBasesTrimmedLeft(int theBasesTrimmed) { this.leftTrim = theBasesTrimmed; Rectangle2D.Double coordbox = bar_glyph.getCoordBox(); if (left_trim_glyph != null) { bar_glyph.removeChild(left_trim_glyph); } left_trim_glyph = new FillRectGlyph(); left_trim_glyph.setColor(trim_color); left_trim_glyph.setCoords(coordbox.x, coordbox.y, theBasesTrimmed, coordbox.height); bar_glyph.addChild(left_trim_glyph); bar_map.toBack(left_trim_glyph); } COM: <s> highlights the first n bases called </s>
funcom_train/10680846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public short getNextValueAsShort() { reading_data_index = reading_data_index + TypesLengths.getTypeLength(TypesLengths.SHORT_ID); return (short)readFromByteArray(data, reading_data_index - TypesLengths.getTypeLength(TypesLengths.SHORT_ID), TypesLengths .getTypeLength(TypesLengths.SHORT_ID)); } COM: <s> gets the next value of the data of the packet as short </s>
funcom_train/20750898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void wakeup() { // wakeup the transmission manager, which checks to see if any packets have // been lost transmissionManager.wakeup(); // if there are pending acks/pings, make sure that we are interested in writing if (ackQueue.size() > 0) key.interestOps(key.interestOps() | SelectionKey.OP_WRITE); } COM: <s> called by the selector manager whenever it is awoken </s>
funcom_train/48406340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRelatedElementPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Relationship_relatedElement_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Relationship_relatedElement_feature", "_UI_Relationship_type"), SpemxtcompletePackage.eINSTANCE.getRelationship_RelatedElement(), false, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the related element feature </s>
funcom_train/49160135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showMainScreen(Scenario scenario) { // cleanUp this.cleanUp(); this.getContentPane().setLayout(flowLayout); this.turnMenuOff(); PanelMain panel = new PanelMain(this, scenario); panel.updateTranslation(); this.getContentPane().add(panel, BorderLayout.CENTER); this.getContentPane().validate(); this.state = STATE_SPECIAL; } COM: <s> show the main screen </s>
funcom_train/9786481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updatePanel() { // load content if panel was hidden till now if(view == null && info.isVisible()) { loadView(); add(view, BorderLayout.CENTER); } titlePanel.setVisible(dockManager.getLayout().isTitleBarVisible()); // update the title bar if necessary if(dockManager.getLayout().isTitleBarVisible()) { updateTitleBar(); } } COM: <s> update the panel </s>
funcom_train/21846410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "tokenOffset=" + tokenOffset // NOI18N + ", offset=" + offset // NOI18N + ", state=" + getStateName(state) // NOI18N + ", stopOffset=" + stopOffset // NOI18N + ", lastBuffer=" + lastBuffer; // NOI18N } COM: <s> syntax information as string </s>
funcom_train/3375283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isVisible() { AccessibleContext ac = getCurrentAccessibleContext(); if (ac instanceof AccessibleComponent) { return ((AccessibleComponent) ac).isVisible(); } else { Component c = getCurrentComponent(); if (c != null) { return c.isVisible(); } else { return false; } } } COM: <s> determines if this object is visible </s>
funcom_train/16304203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLabel(Object object) { if (object instanceof NeuralNetwork) { return ((NeuralNetwork)object).getLabel(); } else if (object instanceof Layer) { return ((Layer)object).getLabel(); } else if (object instanceof Neuron) { return ((Neuron)object).getLabel(); } else { return labels.get(object); } } COM: <s> returns label for the specified object </s>
funcom_train/870306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String DOM2String(Element element) throws XBRLException { try { LSSerializer writer = domImplementation.createLSSerializer(); return writer.writeToString(element); } catch (Exception e) { throw new XBRLException("The XML DOM element could not be written to a string for persisting.",e); } } COM: <s> convert a dom element and its descendents to a string </s>
funcom_train/36920841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Directory addDirectory(String name) { if (!validateName(name)) throw new IllegalArgumentException("Directory name must be a non-null string not containing '/'"); if (!validateNameAndParentPath(name, this.getPath())) throw new IllegalArgumentException("Directory name of may only be empty for root directories."); if (this.containsFile(name)) throw new IllegalArgumentException("A file or directory with the requested name already exists."); Directory directory = new Directory(name, this.getPath()); this.children.add(directory); return directory; } COM: <s> add a directory as a child </s>
funcom_train/2518140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bookEffort(IndividualResource resource, Calendar cal, int effortWanted) { activate(ActivationPurpose.WRITE); TaskResourceProfile trp = getTaskResourceProfile(resource); trp.bookEffort(cal, effortWanted); firePropertyChange("workPlanned", Integer.toString(effortWanted), " booked on " + cal.toString()); } COM: <s> this should only be called from </s>
funcom_train/34340174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getUsuario() { if (Usuario == null) {//GEN-END:|22-getter|0|22-preInit // write pre-init user code here Usuario = new TextField("Usuario: ", null, 10, TextField.ANY);//GEN-LINE:|22-getter|1|22-postInit // write post-init user code here }//GEN-BEGIN:|22-getter|2| return Usuario; } COM: <s> returns an initiliazed instance of usuario component </s>
funcom_train/50392830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runLocally() { try{ logger.info("Executing "+getDescription()); URL url=IOUtils.addFTPCredentials(new URL(source), credentials); InputStream is=url.openStream(); OutputStream os=null; if(storageAdapter==null){ TSI tsi=configuration.getTargetSystemInterface(client); tsi.setStorageRoot(workingDirectory); os=tsi.getOutputStream(target); }else{ os=storageAdapter.getOutputStream(target, false); } status=Status.RUNNING; copy(is, os); is.close(); os.flush(); os.close(); status=Status.DONE; }catch(Exception ex){ reportFailure("Could not do FTP download", ex); } } COM: <s> performs ftp download using java </s>
funcom_train/25388983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadMappings() { try { logger.info("Loading FileParser mappings"); mappings = new Properties(); mappings.load(this.getClass().getClassLoader().getResourceAsStream(PARSER_MAPPINGS_PROPERTIES)); } catch (IOException e) { logger.fatal("Unable to load FileParser mappings", e); // If this happens, there is no sense to continue throw new RuntimeException("Unable to load FileParser mappings", e); } } COM: <s> load mappings from classpath </s>
funcom_train/26524368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int apply(List rule, List state) { String str = ""; for(int i = 0; i < state.size(); i++) str += state.get(i); //System.out.println(str); return Integer.valueOf(str, code).intValue(); } COM: <s> method in test phase </s>
funcom_train/37227706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initMessageContext() { StringMap messageToHandlerMap = (StringMap)Config.getInstance() .fetchConfiguration(getMessageHandlerConfigurationName()); MessageHandlerFactory handlerFactory = new MessageHandlerFactory(messageToHandlerMap, getClass().getClassLoader()); this.messageContext = new MessageContext(handlerFactory); } COM: <s> initializes the message context </s>
funcom_train/49866211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection getConnection() throws ClassNotFoundException, SQLException, InstantiationException, IllegalAccessException { Connection connection = null; synchronized (pool) { ArrayList<String> brokenKeys = new ArrayList<String>(); connection = check(pool, brokenKeys); for (String key : brokenKeys) { MultithreadedConnection jc = pool.get(key); try { jc.getConnection().close(); } catch (SQLException sqle) { } pool.remove(key); } } if (connection == null) { return createConnection(); } else { return connection; } } COM: <s> methods that give available connection to requester </s>
funcom_train/15915397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test4() throws Throwable { CConstraint c = ConstraintManager.getConstraintSystem().makeCConstraint(); c.addBinding(a,u); c.addBinding(v,u); c=c.substitute(e0,u); System.out.print("(test4: Should print a=v) "); print(c); assertTrue(c.entails(a, v)); } COM: <s> exists u a u v u a v </s>
funcom_train/25277062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void publish() throws ServiceServerException { if (isPublished()) { throw new ServiceServerException("Service is already published on " + address + ". Try stop service and try again."); } try { endpoint = Endpoint.publish(address, BPEWebService); } catch (Exception e) { endpoint = null; throw new ServiceServerException("Invalid address or selected port already in use."); } } COM: <s> publishing web service of business process engine on server </s>
funcom_train/8077262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer text = new StringBuffer(); for (int i = 0; i < m_AttValues.length; i++) { if (i > 0) text.append(","); text.append(toString(i)); } return text.toString(); } COM: <s> returns the description of one instance </s>
funcom_train/9115084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSize(int size) { // if we have already used more data, ignore it ! if (size < used) { return; } this.size = size; // create a new (larger) array byte[] newBuff = new byte[size]; // copy contents for (int i = 0; i < used; i++) { newBuff[i] = buff[i]; } buff = newBuff; } COM: <s> sets the size of the internal buffer to the given value </s>
funcom_train/26532693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleProcessPage() { String selectedProcess = getParameter("processID"); String selectedProcessName = getParameter(selectedProcess + "_Full_Name"); putValue(TEAM_PID, selectedProcess); putValue(TEAM_PROC_NAME, selectedProcessName); redirectToTeamSetupWizard(selectedProcess); } COM: <s> handle values posted from the process selection page </s>
funcom_train/43326407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public double covar() { double n = (double)samples(); if (n == 0) return 1.0; double avg_x = average(); double avg_y = ySampler.average(); double sum_y = ySampler.sum_x; return (sum_xy - (sum_x*avg_y) - (sum_y*avg_x) + (n*avg_x*avg_y)) / n; } COM: <s> returns the covariance of values sampled </s>
funcom_train/34139339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getVersion() { PackageInfo pInfo = new PackageInfo(); try { PackageManager pm = mSelf.getPackageManager(); pInfo = pm.getPackageInfo(mSelf.getPackageName(), 0); } catch (NameNotFoundException e) { // Ignore this exception - the packagename is itself, can't fail // here e.printStackTrace(); } return pInfo.versionCode; } COM: <s> returns the version number of the tts this version number is the </s>
funcom_train/2876886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { //System.out.println("Event"); try { if ((this.jCheckBoxMenuItemPause.isSelected()) && screenScrollChanged) { scrollDownScreen(); } if ((e.getActionCommand()).equals("stopResume")) { stopResume_actionPerformed(e); } } catch (Exception exc) { } } COM: <s> performs the action corresponding to an event </s>
funcom_train/36191391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEx_Pro_No(){ Hashtable<String, Object> params = new Hashtable<String, Object>(); params.put("action", new Action("push", "no_button")); Object tmp = (Object)feedback.getExplicitFB( FeedbackGUITypes.PROACTIVITY, params); Boolean returned_feedback = (Boolean)tmp; assertFalse(returned_feedback); } COM: <s> call explicit proactivity feedback gui and press no button </s>
funcom_train/46455345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public boolean isVista() { if(System.getProperty("os.name", "").toLowerCase().indexOf("vista")>-1) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ return true; } return false; } COM: <s> determines if os is vista </s>
funcom_train/3393248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void endScope(int adr) { LocalVar v = lvar[adr]; if (v != null) { lvar[adr] = null; if (v.start_pc != Character.MAX_VALUE) { char length = (char)(curPc() - v.start_pc); if (length < Character.MAX_VALUE) { v.length = length; putVar(v); } } } state.defined.excl(adr); } COM: <s> end the scope of a variable </s>
funcom_train/47304233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean visit(SQLObject item) { boolean subtreeAccepted = true; if (item instanceof SQLColumn) { return sourceDatabaseAccessible((SQLColumn) item, targetSession); } for (SQLObject child : item.getChildren()) { if (!(subtreeAccepted &= visit(child))) { break; } } return subtreeAccepted; } COM: <s> checks if this item and its entire subtree pass the filter </s>
funcom_train/35035402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAlwaysOnTop(boolean alwaysOnTop) { boolean oldAlwaysOnTop = isAlwaysOnTop(); this.alwaysOnTop = alwaysOnTop; checkPropertyChangeSupport(); notifier.firePropertyChange(ALWAYS_ON_TOP_PROPERTY, oldAlwaysOnTop, alwaysOnTop); } COM: <s> sets whether this note is displayed always on top or not </s>
funcom_train/18325768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSourceStatePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Transition_sourceState_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Transition_sourceState_feature", "_UI_Transition_type"), CoremodelPackage.Literals.TRANSITION__SOURCE_STATE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the source state feature </s>
funcom_train/3276176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void promote (ChessPiece pawn, ChessPiece promo) { promo.orig = pawn.orig; promo.orig.piece = promo; promo.board = this; promo.isBlack = pawn.isBlack; if (pawn.isBlack) { blackTeam.set(blackTeam.indexOf(pawn), promo); } else { whiteTeam.set(whiteTeam.indexOf(pawn), promo); } } COM: <s> used for pawn promotion </s>
funcom_train/2033671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEliminarReserva() { System.out.println("eliminarReserva"); Reserva v = new Reserva(); Reserva instance = new Reserva(); boolean expResult = false; boolean result = instance.eliminarReserva(v); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. } COM: <s> test of eliminar reserva method of class reserva </s>
funcom_train/15931456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int busyJoin(ForkJoinWorkerThread w) { int s; ForkJoinTask<?> t; while ((s = status) >= 0 && (t = w.scanWhileJoining(this)) != null) t.quietlyExec(); return (s >= 0)? awaitDone(w, false) : s; // block if no work } COM: <s> main implementation of help join </s>
funcom_train/18660518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDtd() { // not sure how I want to create the object as it needs input streams and stuff so I'll just do the code that // the method resolveEntity does. InputSource s = new InputSource( Settings.cl.getResourceAsStream( "jpo/collection.dtd" ) ); assertNotNull( "No collection.dtd found", s ); } COM: <s> jpo uses the dtd file in the classpath </s>
funcom_train/45916071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void renderStarPixel(Graphics2D g2, int x, int y) { if (zoomFactor < 2) { g2.fillRect(x, y, 1, 1); // g2.drawLine(x, y, x, y); } else { g2.fillRect(x, y, 2, 2); // g2.drawLine(x, y, x + 1, y); // g2.drawLine(x, y + 1, x + 1, y + 1); } } COM: <s> renders a star pixel with the current color to the target location </s>
funcom_train/25597697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImage (Image image) { if (this.image == image) return; int oldWidth = width; int oldHeight = height; this.image = image; width = image != null ? image.getWidth (null) : 0; height = image != null ? image.getHeight (null) : 0; if (oldWidth == width && oldHeight == height) repaint (); else revalidate (); } COM: <s> sets an image </s>
funcom_train/50834915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DatagramPacket receive() throws NetworkException { byte[] bytes = new byte[MAX_PACKET_SIZE]; DatagramPacket recv = new DatagramPacket(bytes, MAX_PACKET_SIZE); try { socket.receive(recv); } catch (IOException e) { throw new NetworkException("Could not receive packets."+e.toString()); } return recv; } COM: <s> receives a datagram packet from the multicast pipe </s>
funcom_train/7427949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flipSiblingBoundsHandles(final boolean flipX, final boolean flipY) { final Iterator i = getParent().getChildrenIterator(); while (i.hasNext()) { final Object each = i.next(); if (each instanceof PSWTBoundsHandle) { ((PSWTBoundsHandle) each).flipHandleIfNeeded(flipX, flipY); } } } COM: <s> iterates over all of this nodes handles flipping them if necessary </s>
funcom_train/10813142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @SuppressWarnings("unchecked") public void deserialize() throws IOException { udfConfs = (HashMap<UDFContextKey, Properties>)ObjectSerializer.deserialize(jconf.get(UDF_CONTEXT)); clientSysProps = (Properties)ObjectSerializer.deserialize( jconf.get(CLIENT_SYS_PROPS)); } COM: <s> populate the udf confs field </s>
funcom_train/5021985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setupTestHarness() { TestHarness.name(container, TestHarness.PERSONAL_PLANNER); TestHarness.name(toolBarManager.getControl(), TestHarness.PERSONALPLANNER_TOOL_BAR_MANAGER); TestHarness.name(datelabel, TestHarness.PERSONAL_PLANNER_DATE_LABEL); TestHarness.name(rightNavigationToolBar, TestHarness.NAVIGATE_TO_RIGHT_TOOLBAR); } COM: <s> setting up the abbot </s>
funcom_train/17727076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMsg(jason.asSemantics.Message m) throws Exception { saci.Message msaci = jasonToKQML(m); msaci.put("receiver", m.getReceiver()); if (m.getInReplyTo() != null) { msaci.put("in-reply-to", m.getInReplyTo()); } getMBox().sendMsg(msaci); } COM: <s> the saci implementation of the send msg interface </s>
funcom_train/14246160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanel getNamedTab(String tabName) { for (int i = 0; i < _tabPanels.size(); i++) { String title = _tabs.getTitleAt(i); if (title != null && title.equals(tabName)) return (JPanel)_tabs.getComponentAt(i); } return null; } COM: <s> get the jpanel of the tab with the given name </s>
funcom_train/27862898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleImageFramebufferUpdate(int window, boolean isroot, byte img[], int x, int y, int w, int h){ for(RfbMessageHandler l : listeners){ l.handleImageFramebufferUpdate(window, isroot, img, x, y, w, h); } } COM: <s> handles fb update messages </s>
funcom_train/19747836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean stopOnError(ModuleConfig config) { PageContext pageContext = (PageContext) getJspContext(); Object stopOnErrorObj = pageContext.getAttribute(ValidatorPlugIn.STOP_ON_ERROR_KEY + '.' + config.getPrefix(), PageContext.APPLICATION_SCOPE); boolean stopOnError = true; if ( stopOnErrorObj instanceof Boolean ) { stopOnError = ((Boolean) stopOnErrorObj).booleanValue(); } return stopOnError; } COM: <s> determines if validations should stop on an error </s>
funcom_train/39062048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSettingsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IMarkingStrategyContainer_settings_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IMarkingStrategyContainer_settings_feature", "_UI_IMarkingStrategyContainer_type"), MarkingPackage.eINSTANCE.getIMarkingStrategyContainer_Settings(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the settings feature </s>
funcom_train/47843512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean _isGood (Object module) { if (_modClass == null) return true; if (module != null) { if (module.getClass () == _modClass) { try { Boolean retVal = (Boolean) _modMethod.invoke (module, null); return retVal.booleanValue (); } catch (Exception e) { return false; } } else { return false; } } else return false; } COM: <s> evaluate a modules optional code boolean b is good b code method </s>
funcom_train/28500771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JC_Nodeable getRootNode() throws JC_Exception { if (mRootNode==null) { try { mRootNode = (JC_RootNode)createNodeClass( "[root]" ); mRootNode.setClient( this ); mRootNode.setPath( "/" ); } catch( Exception e ) { throw new JC_Exception( e ); } } return mRootNode; } COM: <s> get root node </s>
funcom_train/11389456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read() throws IOException { if (!useWrap) { return inStream.read(); } if (ostart >= ofinish) { // we loop for new data as we are blocking int i = 0; while (i == 0) i = readMoreData(); if (i == -1) return -1; } return ((int) obuffer[ostart++] & 0xff); } COM: <s> reads the next byte of data from this input stream </s>
funcom_train/46384573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCellSetup(String cellSetup) { /* Check to see if the cell is no longer valid */ super.checkInvalid(); /* Make sure the thread has write permissions */ this.wfsRef.get().checkOwnership(); /* * Sets the cell setup class and indicates the cell to be updated upon * the next write */ this.cellSetup = cellSetup; this.cellSetupUpdate = true; } COM: <s> updates the cells properties in memory </s>
funcom_train/16181786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String encodeUri(String uri) { String newUri = ""; StringTokenizer st = new StringTokenizer(uri, "/ ", true); while (st.hasMoreTokens()) { String tok = st.nextToken(); if (tok.equals("/")) newUri += "/"; else if (tok.equals(" ")) newUri += "%20"; else { try { newUri += URLEncoder.encode(tok, "UTF-8"); } catch (UnsupportedEncodingException uee) { } } } return newUri; } COM: <s> url encodes everything between characters </s>
funcom_train/18037109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator getChildAxisIterator(Object contextNode) { if (debugging) { System.out.println("getChildAxisIterator() : " + ((XMLEvent) contextNode).toString()); } Vector v = new Vector(); v.add((Object) contextNode); return v.iterator(); // return EMPTY_ITERATOR; } COM: <s> get an iterator over all of this nodes children </s>
funcom_train/13199644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRank(Rank rank) throws TuboException { int i=0; for(Iterator it=ranks.iterator(); it.hasNext(); i++) { Rank irank = (Rank)it.next(); if(irank.getUpperLimit()>rank.getUpperLimit()) break; } ranks.add(i,rank); } COM: <s> add rank to global rank list </s>
funcom_train/9886374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onDataChanged(IData data) { this.data = data; if(data == null || data.getFeaturesSize() <= 0) { probes = 0; features = 0; setDefaultLabel(); thumbnail.onDataChanged(data); } else { if (emptyMacLabel!=null) remove(emptyMacLabel); features = data.getFeaturesCount(); probes = data.getFeaturesSize(); setDrawChain(false); updateSize(); header.setData(data); thumbnail.onDataChanged(data); } } COM: <s> updates the viewer when data is changed </s>
funcom_train/44723070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRace(String race) { if (race.equals("Dwarf")) { strSpin.setMinValue(8); endSpin.setMinValue(8); } else if (race.equals("Elf")) { aglSpin.setMinValue(8); intSpin.setMinValue(8); } else if (race.equals("Halfling")) { quiSpin.setMinValue(8); endSpin.setMinValue(8); } calculateChecks(); } COM: <s> sets the racial minimums for the ability scores </s>
funcom_train/45572565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set1Value(int index, ConstSFColor color) { float[] c = { 0.0f, 0.0f, 0.0f }; color.getValue(c); this.set1Value(index, c[0], c[1], c[2]); } COM: <s> set an element in an mfcolor field </s>
funcom_train/10772254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFetchPlanIsolation() { query.setHint("openjpa.FetchPlan.Isolation", "SERIALIZABLE"); assertTrue(query.getHints().containsKey("openjpa.FetchPlan.Isolation")); assertEquals(IsolationLevel.SERIALIZABLE, ((JDBCFetchPlan)query.getFetchPlan()).getIsolation()); } COM: <s> verifies a valid fetchplan isolation level hint can be set and retrieved </s>
funcom_train/14416005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(CIMValue pValue) { if (iType != null && pValue != null && pValue.getType().getType() != iType.getType()) { throw new IllegalArgumentException( "value type does not match property type"); } iValue = pValue; if (iType == null && pValue != null) { iType = pValue.getType(); } } COM: <s> sets the value of this cimproperty to the specified cimproperty </s>
funcom_train/24370169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public GeoConicPart ConicArc(String label, GeoConic conic, GeoPoint P, GeoPoint Q) { AlgoConicPartConicPoints algo = new AlgoConicPartConicPoints(cons, label, conic, P, Q, GeoConicPart.CONIC_PART_ARC); processCreateCommand(algo.getConicPart()); //VMT modification return algo.getConicPart(); } COM: <s> conic sector from conic and points </s>
funcom_train/13647348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertResponse(AS2MessageInfo info, Partner initiator, Partner receiver, EDIINTCertificateExchangeResponse response) { List<TrustResponse> responseList = response.getTrustResponseList(); for (TrustResponse trustResponse : responseList) { this.insertResponse(info, initiator, receiver, response, trustResponse); } } COM: <s> inserts a new cem response into the database </s>
funcom_train/28116393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testJMSGroupSeqRange() throws Exception { Message message = getContext().getMessage(); checkSequenceValue(message, -1, false); checkSequenceValue(message, 0, false); checkSequenceValue(message, 1, true); checkSequenceValue(message, Integer.MAX_VALUE, true); } COM: <s> verifies that jmsxgroup seq only handles ints 0 </s>
funcom_train/29017915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaximum (int value) { checkWidget (); int minimum = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMIN, 0, 0); if (0 <= minimum && minimum < value) { OS.SendMessage (handle, OS.TBM_SETRANGEMAX, 1, value); } } COM: <s> sets the maximum value that the receiver will allow </s>
funcom_train/4534097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void callRejectedRemotely(CallRejectedEvent evt) { Call call = evt.getCall(); TelephoneTextField telephoneTextField = dialControl.getCallField(); telephoneTextField.setForeground((Color)UIManager.get("TextField.lightforeground")); telephoneTextField.setText(PhoneRes.getIString("phone.invalidnumber")+":" + call.getNumber()); } COM: <s> handle invalid dialed numbers or not found numbers </s>
funcom_train/9910624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasPermission(String enitityName, String oid, PermissionItem... permissions) { boolean hasPermission = true; if (permissions == null || permissions.length == 0) { hasPermission = true; } else { for (PermissionItem item : permissions) { if (!permissionService.hasPermission(enitityName, oid, item)) { hasPermission = false; break; } } } return hasPermission; } COM: <s> checks for permission </s>
funcom_train/3414179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(PopupMenu popup) { synchronized (getTreeLock()) { if (popup.parent != null) { popup.parent.remove(popup); } if (popups == null) { popups = new Vector(); } popups.addElement(popup); popup.parent = this; if (peer != null) { if (popup.peer == null) { popup.addNotify(); } } } } COM: <s> adds the specified popup menu to the component </s>
funcom_train/20352827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getUsrOnlineStatus() { usrOnlineStatus = new JTextArea(); usrOnlineStatus.setEditable(false); usrOnlineStatus.setFont(new Font("Segoe", Font.BOLD, 12)); usrOnlineStatus.setBounds(new Rectangle(17, 43, 412, 15)); return usrOnlineStatus; } COM: <s> a text area to show the contacts status </s>
funcom_train/5714147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flush() throws IOException { if (closed == true){ throw new IOException("stream closed"); } if (!beforeWritten && ((!fromRight && pos != 7) || (fromRight && pos != 0))){ sink.write(current); current = 0; pos = fromRight ? 0 : 7; } beforeWritten = true; sink.flush(); } COM: <s> flush the current buffered byte to the stream and then the subsequent </s>
funcom_train/29409338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Command getDropObjectsCommand(DropObjectsRequest request) { CompoundCommand cm = new CompoundCommand(); Iterator elements = request.getObjects().iterator(); while (elements.hasNext()) { Object obj = elements.next(); if (obj instanceof EObject) { Command cmd = getDropElementCommand((EObject) obj, request); if (cmd != null) cm.add(cmd); } } if (cm.isEmpty()) return null; return new ICommandProxy(new CommandProxy(cm.unwrap())); } COM: <s> get drop objects command this provides a generic implementation for handling </s>
funcom_train/14326923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertRelationship(OpPrototype prototype, String relationshipName, String expectedType) { OpMember relationship = prototype.getDeclaredMember(relationshipName); assertNotNull("Member not found ", relationship); assertTrue("The member is not a relationship ", relationship instanceof OpRelationship); assertEquals("The relationship has an invalid type ", expectedType, relationship.getTypeName()); } COM: <s> asserts that a relationship matches the given criteria </s>
funcom_train/2862258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String encodeBuffer(byte aBuffer[]) { ByteArrayOutputStream outStream = new ByteArrayOutputStream(); ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer); try { encodeBuffer(inStream, outStream); } catch (Exception IOException) { // This should never happen. throw new Error("ChracterEncoder::encodeBuffer internal error"); } return (outStream.toString()); } COM: <s> a streamless version of encode that simply takes a buffer of </s>
funcom_train/49421056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton2() { if (jButton2 == null) { jButton2 = new JButton(); jButton2.setText("Perform"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { perform(); } }); } return jButton2; } COM: <s> this method initializes j button2 </s>
funcom_train/12835968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAllForPatternWithRule(){ String p1 = new String("test data"); String p2 = new String("data test"); store.add(p1); store.add(p2); Object[] result = store.getAllForPattern(new StoreFilterAdapter(new Class[] {String.class}) { // our rule public boolean isMatch(Object o){ String s = (String)o; return s.startsWith("test"); } }); assertEquals(1, result.length); assertSame(p1, result[0]); } COM: <s> tests get all for pattern pattern </s>
funcom_train/44136828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void play() { if(!m_PlayList.isEmpty()) { String filename = this.getFileAt(m_PlayingFile); if(filename != null) { m_IsPlaying = true; m_Player.setFileName(filename); m_Player.play(); } } } COM: <s> to play the sounds </s>
funcom_train/19257406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getMaximumWindowBounds() throws HeadlessException { if (isHeadless()) throw new HeadlessException(); return new Rectangle(0, 0, Toolkit.getDefaultToolkit().getScreenSize().width, Toolkit.getDefaultToolkit().getScreenSize().height); } COM: <s> returns the maximum size of a centred window taking into account platform </s>
funcom_train/28872451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void findSleep() { int i = 0; while (i < program.program_length) { LegacyInstr instr = (LegacyInstr)program.readInstr(i); if (instr != null) { if ("sleep".equals(instr.properties.name)) { simulator.insertProbe(sleepProbe, i); } i += instr.getSize(); } else i += 1; } } COM: <s> find all sleep opcodes in the program </s>
funcom_train/8607803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Schema getSchema() { Schema schema = null; SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); try { schema = sf.newSchema(new File(XML_SCHEMA_FILE)); } catch (SAXException saxe) { log.fatal("Error while getting schema", saxe); throw new Error("Error while getting schema", saxe); } return schema; } COM: <s> creates and returns </s>
funcom_train/27778577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEquals() throws Exception{ System.out.println("testEquals"); System.out.println("Special test"); BindingContext bc = (BindingContext)SerializationUtils.toObject(SerializationUtils.toBytes(c)); System.out.println(bc.hashCode()); System.out.println(bc.listBindings()); } COM: <s> test of equals method of class jxl </s>
funcom_train/50605649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createRootModule (ModuleCfg moduleCfg) { if (moduleCfg == null) return; if (moduleCfg.getVariables().length > 0) throw new SystemException("Cannot declare variables in the root module"); rootModule = new Module(this, "", moduleCfg, Collections.EMPTY_MAP); } COM: <s> creates the root module of this application </s>
funcom_train/12129739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mergeVertices(VertexType vertex1, HashSet<VertexType> eqVertices) { for (VertexType vertex2 : eqVertices){ if ( ! vertices.containsKey(vertex2)){ return; } VertexAttributes<VertexType> vertexTwoAttributes = vertices.get(vertex2); for (Edge<VertexType> e : vertexTwoAttributes.inEdges){ e.setDest(vertex1); } for (Edge<VertexType> e : vertexTwoAttributes.outEdges){ e.setSource(vertex1); } vertices.remove(vertex2); } } COM: <s> merge equivalent vertices </s>
funcom_train/26035906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isGenuineAnon(Resource r) { if (!r.isAnon()) return false; Integer v = objectTable.get(r); return v == null || ((!prettyWriter.sResourcePropertyElt) && v.intValue() <= 1 && (!haveReified .contains(r))); } COM: <s> local and or anonymous resources </s>
funcom_train/35838694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNodeCount(PCSession session, String sViewID) throws SQLException { // // DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()) ; // // int count = DBViewNode.getNodeCount(dbcon, sViewID); // // getDatabaseManager().releaseConnection(session.getModelName(),dbcon); return 0; } COM: <s> returns nodepositions count for this view </s>
funcom_train/1872628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void tarjanVisit(int i) { color[i]=counter++; root[i]=i; stack.push(i); for(int j:g.getNeighbours(i)) { if( color[j]==WHITE ) { tarjanVisit(j); } if( color[j]>0 && color[root[j]]<color[root[i]] ) // inComponent is false and have to update root { root[i]=root[j]; } } int j; if(root[i]==i) //this node is the root of its cluster { do { j=stack.pop(); color[j]=-color[j]; root[j]=i; } while(j!=i); } } COM: <s> the recursive part of the tarjan algorithm </s>
funcom_train/18090910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetUsernameSetsHeader() { Request req = new Request(); // there is no Authentication header if there is no username req.setPassword("secret"); assertNull(req.getHeader("Authentication")); req.setUsername("Richard"); assertNotNull(req.getHeader("Authentication")); } COM: <s> test of set username method of class request </s>
funcom_train/2289929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isManagerOfProject(CmsRequestContext context) { try { return getAllManageableProjects( context, readOrganizationalUnit(context, context.currentProject().getOuFqn()), false).contains(context.currentProject()); } catch (CmsException e) { // should never happen if (LOG.isErrorEnabled()) { LOG.error(e.getLocalizedMessage(), e); } return false; } } COM: <s> checks if the current user has management access to the current project </s>
funcom_train/9018983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAutoRangeMinimumSize(double size, boolean notify) { if (size <= 0.0) { throw new IllegalArgumentException( "NumberAxis.setAutoRangeMinimumSize(double): must be > 0.0."); } if (this.autoRangeMinimumSize != size) { this.autoRangeMinimumSize = size; if (this.autoRange) { autoAdjustRange(); } } } COM: <s> sets the minimum size allowed for the axis range when it is automatically </s>
funcom_train/3004312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getLong(String key, long def) { long result = def; try { String value = get(key, null); if (value != null) result = Long.parseLong(value); } catch (NumberFormatException e) { // Ignoring exception causes specified default to be returned } return result; } COM: <s> implements the tt get long tt method as per the specification in </s>
funcom_train/9531376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: //private void setInputType(String inputTypeString) { // actually i think this is adapter dependent - for game want to do // stringToType - for chado its a so type //try {inputType = DataInputType.stringToType(inputTypeString); } //catch (UnknownTypeException e) { // System.out.println(e.getMessage()+" Can not set input type"); } //} COM: <s> type of input type only needed for input </s>
funcom_train/13875256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsResetPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AssignExp_isReset_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AssignExp_isReset_feature", "_UI_AssignExp_type"), ImperativeoclPackage.Literals.ASSIGN_EXP__IS_RESET, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is reset feature </s>
funcom_train/8486673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appliqueCoup(int ord, int abs) { if (goban.play(abs, ord, actualColor)) { goPan.paintImmediately(0, 0, goPan.getWidth(), goPan.getHeight()); if (this.onePlayerGame) { coupIA(); } else { this.switchColor(); } // if } } COM: <s> do a move and display it </s>
funcom_train/41164733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoWordsCompleteE2 entity) { EntityManagerHelper.log("saving CoWordsCompleteE2 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 co words complete e2 entity </s>
funcom_train/19073063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllInputs() { if (inputPatternListeners != null) { Vector tempVect = (Vector) inputPatternListeners.clone(); for (int i = 0; i < tempVect.size(); ++i){ this.removeInputSynapse( (InputPatternListener) tempVect.elementAt(i)); } inputPatternListeners = null; } } COM: <s> remove all the input listeners of the layer </s>
funcom_train/50955786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDOMListeners(EventTarget evtTarget) { if(evtTarget != null) { evtTarget.removeEventListener("DOMAttrModified", domEventListener, true); evtTarget.removeEventListener("DOMNodeInserted", domEventListener, true); evtTarget.removeEventListener("DOMNodeRemoved", domEventListener, true); evtTarget.removeEventListener("DOMCharacterDataModified", domEventListener, true); } } COM: <s> removes event listeners from the dom </s>
funcom_train/25192891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closePool() { log.debug("closePool::1"); synchronized(log){ try{ while(!_pool.isEmpty()){ Object o = _pool.pop(); _resourceFactory.closeResource(o); } }catch(Exception e) { log.error("Some error in getFromPool(): " + e, e); } } } COM: <s> this function will close the pool which will result in that </s>
funcom_train/51412916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CMInteger getPrimaryKeyAsInt() throws CMExceptionTableRowValueNotExists { try { return (CMInteger)getValue(getPrimaryKeyColumnName()); } catch (CMExceptionTableRowValueNotExists e) { e.addContextInfo("Fatal Error: A PKey for a row within the table <"+ getFullTableName()+"> wasnt found."); throw e; } } COM: <s> getter for the primary key as its cminteger dataobject </s>
funcom_train/22087078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLanguageVersion(int version) { Object[] array = listeners; if (array != null && version != this.version) { firePropertyChangeImpl(array, languageVersionProperty, new Integer(this.version), new Integer(version)); } this.version = version; } COM: <s> set the language version </s>
funcom_train/5427090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void otherToken() throws XMLStreamException { TermToken t = parser.current(); switch(t.kind()) { case LEXICAL_ERROR: case SYNTAX_ERROR: case GRAMMAR_ERROR: case SEGMENT_ERROR: ErrorInfo errorInfo = t.errorInfo(); StringBuilder e = new StringBuilder(); e.append(t.kind()); e.append(": "); e.append(errorInfo.location().toShortString()); e.append(": "); e.append(errorInfo.message()); out.writeComment(e.toString()); out.writeCharacters("\n"); } parser.advance(); } COM: <s> process the token not handled by the structural output </s>