__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/6489054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doubleClicked(TreePath path) { LogTools.trace(logger, 25, "RankingController.doubleClicked()"); Node node = _adapter.getRankingNode(((DefaultMutableTreeNode)path.getLastPathComponent())); MutableRankingNode parent = (MutableRankingNode) node.getParent(); parent.toggleNode(node); } COM: <s> a double click occurred </s>
funcom_train/49053925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createLogFile() { String nomeDoArquivo = ""; if (user1.compareTo(user2) > 0) { nomeDoArquivo = user2 + "-" + user1; } else { nomeDoArquivo = user1 + "-" + user2; } try { FileWriter file = new FileWriter(new File(nomeDoArquivo + ".log"), true); for (String daVez : msgs) { file.write(daVez + LINE_SEPARATOR); } file.close(); } catch (Exception ie) { ie.getMessage(); } } COM: <s> create log file of chat </s>
funcom_train/40312353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsCaseSensitive_InvalidColumn2() { try { ResultSetMetaData resMetaData = new DefaultResultSetMetaData(metaDataEntry); resMetaData.isCaseSensitive(0); fail("SQLException is expected."); } catch(SQLException e) { //ensure the SQLException is thrown by isCaseSensitive method. assertEquals("The sqlstate mismatches", "22003", e.getSQLState()); } } COM: <s> tests is case sensitive with column index equals to 0 </s>
funcom_train/20627573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { try { if( latestVerCheckStmt != null ){ latestVerCheckStmt.close(); } if( conChk != null ){ conChk.close(); } } catch( Exception ex ){ Categories.dataDb().warn("Problem closing statements in import verifier." + ex.getMessage()); } } COM: <s> closes database resources opened during this objects existence </s>
funcom_train/15924266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ConstructorCall_c reconstruct(Expr qualifier, Expr target, List<Expr> arguments) { if (qualifier != this.qualifier || target != this.target || ! CollectionUtil.allEqual(arguments, this.arguments)) { ConstructorCall_c n = (ConstructorCall_c) copy(); n.qualifier = qualifier; n.target = target; n.arguments = TypedList.copyAndCheck(arguments, Expr.class, true); return n; } return this; } COM: <s> reconstruct the constructor call </s>
funcom_train/34141610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { timeDown = System.currentTimeMillis(); if (ttsLoaded) { tts.stop(); } } else { super.onKeyDown(keyCode, event); } return false; } COM: <s> called when a key is pressed down </s>
funcom_train/11658787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TagLibrary loadClass(String uri, String className) { try { Class theClass = getClassLoader().loadClass(className); if ( theClass != null ) { return newInstance(uri, theClass); } } catch (ClassNotFoundException e) { log.error("Could not find the class: " + className + " when trying to resolve URI: " + uri, e); } return null; } COM: <s> instantiates the given class name </s>
funcom_train/31906975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireManagerSuspendedEvent() { Object[] dll = listeners.toArray(); if (dll.length > 0) { UpdateManagerEvent ev = new UpdateManagerEvent(this, null, null); for (int i = 0; i < dll.length; i++) { ((UpdateManagerListener)dll[i]).managerSuspended(ev); } } } COM: <s> fires a update manager event to notify that the manager was suspended </s>
funcom_train/6200990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drive() { // Iterate vector direction from 0 radians to 2PI radians. for (double rad=0D; rad < (2D * Math.PI); rad += .1D) { // Drive in vector of rad at speed of 1.0 servos.moveVector(rad, 1.0D); // Wait for 50 milliseconds waba.sys.Vm.sleep(50); } // Stop servos servos.stop(); } COM: <s> drive the pprk in a circle </s>
funcom_train/49328337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OpenRocketComponentDTO fromOpenRocketComponent(Reader is) throws JAXBException { /** The context is thread-safe, but unmarshallers are not. Create a local one. */ Unmarshaller unmarshaller = context.createUnmarshaller(); return (OpenRocketComponentDTO) unmarshaller.unmarshal(is); //new StreamSource(is)); } COM: <s> read from an open reader instance xml in </s>
funcom_train/47674230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getElementName(Class p_class) { if (p_class == null) { //for null values an empty string will be returned return ""; } for (List<Class<?>> classList : specialNames.keySet()) { if (classList.contains(p_class)) { return specialNames.get(classList); } } return getElementName(p_class.getName()); } COM: <s> executes naming based on a given class </s>
funcom_train/43425043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Page next() { switch(this) { case FEATURE : {return CANDIDATES;} case CANDIDATES : {return PICK;} case PICK : {return SCALE;} case SCALE : {return REFERENCE;} case REFERENCE : {return BREAKPOINT;} case BREAKPOINT : {return BARRIER;} //case UTILITY : {return SATURATION;} //case DIFFERENTIATION : {return BARRIER;} //case SATURATION : {return DIFFERENTIATION;} case BARRIER : {return TARGET;} case TARGET : {return DONE;} case DEPENDENCY : {return DONE;} } return NULLPAGE; } COM: <s> returns the next page </s>
funcom_train/9362684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPassword(final Account account, final String password) { if (account == null) { Log.e(TAG, "the account must not be null"); return; } try { mService.setPassword(account, password); } catch (RemoteException e) { // won't ever happen throw new RuntimeException(e); } } COM: <s> sets the password for the account </s>
funcom_train/36190440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getServiceURI() { logger.debug("OWL-S parser getServiceURI()"); String serviceURI = null; if (null == this.profileProperties) { this.getServiceProfileProps(); } for (Object key : this.profileProperties.keySet()) { if (((String) key).contains(SERVICE_URI)) { serviceURI = this.profileProperties.getProperty((String) key); } } return serviceURI; } COM: <s> get the uri reference to the services bundle jar file </s>
funcom_train/5380329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void beginTask(int max) { done(); this.totalWork = max; this.sumWorked = 0; determinateProgressBar.setMinimum(0); determinateProgressBar.setMaximum(PROGRESS_MAX); determinateProgressBar.setSelection(0); layout.topControl = determinateProgressBar; layout(); animated = false; } COM: <s> initialize the progress bar </s>
funcom_train/3291174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() throws SQLException { log.debug("Clearin prepared statememnt cache"); SQLException lastException = null; Enumeration enum = statements.keys(); while (enum.hasMoreElements()) { String sql = (String) enum.nextElement(); MultiPreparedStatement ps = (MultiPreparedStatement)statements.get(sql); try { ps.realClose(); } catch (SQLException e) { log.debug("En exception occured while clearing prepared statement cache" + e.getMessage()); lastException = e; } statements.remove(sql); } if (lastException != null) { throw lastException; } } COM: <s> clear the prepared statement cache </s>
funcom_train/9566608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyDocumentFields(PdfReader reader) throws DocumentException { if (!reader.isOpenedWithFullPermissions()) throw new IllegalArgumentException("PdfReader not opened with owner password"); if (readers2intrefs.containsKey(reader)) { reader = new PdfReader(reader); } else { if (reader.isTampered()) throw new DocumentException("The document was reused."); reader.consolidateNamedDestinations(); reader.setTampered(true); } reader.shuffleSubsetNames(); readers2intrefs.put(reader, new IntHashtable()); fields.add(reader.getAcroFields()); updateCalculationOrder(reader); } COM: <s> this method feeds in the source document </s>
funcom_train/10252520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dropIndex(int todrop) { indexList = (Index[]) ArrayUtil.toAdjustedArray(indexList, null, todrop, -1); for (int i = 0; i < indexList.length; i++) { indexList[i].setPosition(i); } setBestRowIdentifiers(); if (store != null) { store.resetAccessorKeys(indexList); } } COM: <s> performs table structure modification and changes to the index nodes </s>
funcom_train/4904531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renameFileSystem(String oldName, String newName) { BrowsableFileSystem target = fileSystems.get(oldName); removeFileSystem(oldName); target.setName(newName); addFileSystem(target); // notify the task manager that (potentially) a source filesystem has been renamed TaskManager.getTaskManager().renameSourceFileSystem(oldName, newName); } COM: <s> rename an existing filesystem </s>
funcom_train/39062125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addResourcePropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IMarkingResourceNode_resource_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IMarkingResourceNode_resource_feature", "_UI_IMarkingResourceNode_type"), MarkingPackage.eINSTANCE.getIMarkingResourceNode_Resource(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the resource feature </s>
funcom_train/17939932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parsePrivmsg(String chan, String msg) { conn.doPrivmsg(chan, msg); int index = indexOfTab(chan); if (index != -1) updateTab(index, "<"+ conn.getNick() +"> "+ msg, ownColor); else updateTab(getSelectedIndex(), "* Message: To "+ chan +": "+ msg, ownColor); } COM: <s> sends and prints a code privmsg code </s>
funcom_train/18432774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getStringWidth(String text, int start, int end) { FontMetrics fm = this.g2.getFontMetrics(); Rectangle2D bounds = TextUtilities.getTextBounds(text.substring(start, end), this.g2, fm); float result = (float) bounds.getWidth(); return result; } COM: <s> returns the string width </s>
funcom_train/5035688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void mutate(File file, String labelText) throws JDOMException, IOException { Element rootElement = getRootElemetForFile(file); Element task = rootElement.getChild("Task"); changeTaskLabel(task, labelText + new Date()); changeTaskPriceRecord(task); flipTaskActive(task); deleteTaskConstraintUuid(task); saveXML(task, file); } COM: <s> changes the label in the xml file to make it dirty </s>
funcom_train/14520736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Collection getAdminGroups() { ArrayList returnval = new ArrayList(); try { Iterator iter = admingrouphome.findAll().iterator(); while (iter.hasNext()) { returnval.add(((AdminGroupDataLocal) iter.next()).getAdminGroup()); } } catch (FinderException e) { } return returnval; } // getAdminGroups COM: <s> returns the total number of admingroups </s>
funcom_train/3583260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOpaque() { Color back = getBackground(); Component p = getParent(); if (p != null) { p = p.getParent(); } boolean colorMatch = (back != null) && (p != null) && back.equals(p.getBackground()) && p.isOpaque(); return !colorMatch && super.isOpaque(); } COM: <s> overridden for performance reasons </s>
funcom_train/11379214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int showConfig(String cmd, String argv[], int startindex) throws IOException { int exitCode = 0; int i = startindex; PolicyList[] all = raidnode.getAllPolicies(); for (PolicyList list: all) { for (PolicyInfo p : list.getAll()) { System.out.println(p); } } return exitCode; } COM: <s> apply operation specified by cmd on all parameters </s>
funcom_train/24928364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static final ErrorControl nullErrorControl = new ErrorControl() { public void unknownType(final String line, final int position, final Format formatter, final String part) {} public void exception(final String line, final int position, final Format formatter, final String part, final Exception exception) {} }; COM: <s> null object pattern to ignore problems parsing lines </s>
funcom_train/21219120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScreenSize(int scale) throws IllegalArgumentException { if (scale <= 0 || scale > 3) { throw new IllegalArgumentException("Invalid scale factor: " + scale); } getScreen().setPreferredSize(new Dimension( Setup.SMS_WIDTH * scale , Setup.SMS_HEIGHT * scale)); pack(); } COM: <s> changes the scale of the screen up to three times the normal size </s>
funcom_train/22427457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long toLong() { long tmpE = m_E; long tmpVal = m_Val; // while (tmpE != 0) { if (tmpE < 0) { tmpVal /= 10; tmpE++; } else { tmpVal *= 10; tmpE--; } } return tmpVal; } COM: <s> convert float object to long number </s>
funcom_train/325381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculateHorizonTilt() { if (horizonPoint1 == null ||horizonPoint2 == null) { return; } Point l, r; if (horizonPoint1.x < horizonPoint2.x) { l = horizonPoint1; r = horizonPoint2; } else { l = horizonPoint2; r = horizonPoint1; } double tilt = Math.atan2(-(r.y-l.y), r.x-l.x) * 180 / Math.PI; setHorizonTilt(tilt); vrTabPanelControl.imageAnglePanel.setTilt(tilt); } COM: <s> gets called when a second horizon point is added and then </s>
funcom_train/4521164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(ParametroCedulaTipoEleccion entity) { LogUtil.log("deleting ParametroCedulaTipoEleccion instance", Level.INFO, null); try { entity = entityManager.getReference( ParametroCedulaTipoEleccion.class, entity.getId()); entityManager.remove(entity); LogUtil.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent parametro cedula tipo eleccion entity </s>
funcom_train/20770363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAveragingSamples (final int averagingSamples){ if ( averagingSamples < 1 ){ return; } getPrefs().putInt("RepetitiousFilter.averagingSamples",averagingSamples); getSupport().firePropertyChange("averagingSamples",this.averagingSamples,averagingSamples); this.averagingSamples = averagingSamples; } COM: <s> sets the number of packets to smooth dt for a pixel over </s>
funcom_train/29954544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNPoints() { System.out.println("setNPoints"); int nPoints = 1000; SimuParamObject instance = new SimuParamObject(); instance.setNPoints(nPoints); int expResult = nPoints; int result = instance.getNPoints(); System.out.println(result); assertEquals(expResult, result); } COM: <s> test of set npoints method of class hbm </s>
funcom_train/45622798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSerializationAssemblyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SGenType_serializationAssembly_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SGenType_serializationAssembly_feature", "_UI_SGenType_type"), MSBPackage.eINSTANCE.getSGenType_SerializationAssembly(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the serialization assembly feature </s>
funcom_train/35607137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long getIncrementId(String tableName) { EntityManager em = emf.createEntityManager(); Query q = em.createQuery("Select r.id from " + tableName + " r order by r.id desc"); q.setMaxResults(1); Object currentID = q.getSingleResult(); em.close(); em = null; return (Long)currentID + 1; } COM: <s> get id number from reminder database </s>
funcom_train/5021769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IViewPart openMultipleView(String viewId, int mode) { try { return WorkbenchUtil.getActivePage().showView(viewId, nextViewId(viewId), mode); } catch (PartInitException e) { e.printStackTrace(); } return null; } COM: <s> allows the opening of multiple views of the same view </s>
funcom_train/17897388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void list(PrintStream out) { out.println("-- listing properties --"); Hashtable<Object, Object> h = new Hashtable<Object, Object>(); enumerate(h); for (Enumeration<?> e = h.keys(); e.hasMoreElements();) { String key = (String) e.nextElement(); String val = (String) h.get(key); if (val.length() > 40) { val = val.substring(0, 37) + "..."; } out.println(key + "=" + val); } } COM: <s> prints this property list out to the specified output stream </s>
funcom_train/12112595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTable getJTable() { if (jTable == null) { jTable = new JTable(model); jTable.setRowHeight(20); jTable.setBackground(SystemColor.controlHighlight); jTable.setGridColor(new Color(122, 138, 21)); jTable.setBounds(new Rectangle(0, 0, 400, 150)); jTable.setFont(new Font("Courier New", Font.BOLD, 16)); } return jTable; } COM: <s> this method initializes j table </s>
funcom_train/36666496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assert_count_lt(String fieldName, int counter) { if (fieldName == null || counter < 0) { throw new IllegalArgumentException("fieldName param must not be null and counter must not be negative."); } Assert.assertTrue(takeCount(fieldName) < counter); } COM: <s> checks if number of returned records less than given number </s>
funcom_train/41489552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toXML() { return "<login-history class='" + getClass().getName() + "' date='" + (date != null ? new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(getDate()) : "") + "' location='" + getLocation() + "' />"; } COM: <s> returns a xml representation of the object </s>
funcom_train/21345120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFrameBufferSize(int newWidth, int newHeight) { bufferWidth = newWidth; bufferHeight = newHeight; screenPosition.setLocation(0, 0); iBack = this.createImage(Math.max(gameWidth, newWidth), Math.max(gameHeight, newHeight)); gBack = iBack.getGraphics(); } COM: <s> defines the double buffer size </s>
funcom_train/1953358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEnginesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EngineClient_engines_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EngineClient_engines_feature", "_UI_EngineClient_type"), EnginePackage.Literals.ENGINE_CLIENT__ENGINES, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the engines feature </s>
funcom_train/9209532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void overrideDepend(int mealLink, int prodLink, int qty) { for (int idx = 0; idx < size(); idx++) { if (get(idx).getMealID() == mealLink && get(idx).getProductID() == prodLink) { get(idx).setQty(qty); } } } COM: <s> override depend int int int allows an already existing relationship </s>
funcom_train/50862521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Function getFunction(String functionName) { Function result = null; Iterator<Function> i = functions.iterator(); while (i.hasNext()) { Function function = i.next(); if (function.getName().equals(functionName)) result = function; } if (result != null) return result; else throw new IllegalStateException(name + " does not have " + functionName); } COM: <s> gets a function if the building has it </s>
funcom_train/39396392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(InputStream is) throws MessagingException { LineInputStream in = new LineInputStream(is); try { for (String line = in.readLine(); line != null; line = in.readLine()) { line = trim(line); if (line.length() == 0) { break; } addHeaderLine(line); } } catch (IOException e) { throw new MessagingException("I/O error",e); } } COM: <s> parses the specified rfc 822 message stream storing the headers in </s>
funcom_train/12804416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enterErrorState(StateMachineException aStateMachineException) { context.cleanup(); currentState = new ErrorState(entryTransition, aStateMachineException); try { currentState.entryAction(context); } catch(StateMachineException e) { // The ErrorState entry method is defined so that it should // never throw. throw new EnvironmentalException(e); } } COM: <s> handle system or development related error situations by scrubbing the </s>
funcom_train/16935027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isArrayType(String group, String key) { int type = getType(group, key); switch (type) { case Registry.TYPE_STRING_ARRAY: case Registry.TYPE_OBJECT_ARRAY: case Registry.TYPE_BYTE_ARRAY: case Registry.TYPE_CHAR_ARRAY: case Registry.TYPE_INT_ARRAY: return true; default: return false; } } COM: <s> tests if the property specified is an array type </s>
funcom_train/33772649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteQueue() throws SQSException { Map<String, String> params = new HashMap<String, String>(); GetMethod method = new GetMethod(); try { //DeleteQueueResponse response = makeRequestInt(method, "DeleteQueue", params, DeleteQueueResponse.class); } finally { method.releaseConnection(); } } COM: <s> deletes the message queue represented by this object </s>
funcom_train/42472558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseFile() { try { FileInputStream is = new FileInputStream(forecastNorway); DataInputStream in = new DataInputStream(is); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String tmp; while((tmp = br.readLine()) != null) { textLines.add(tmp); } } catch (IOException ex) { System.err.println("parsing error!"); } } COM: <s> this method gets the datafile we are using to get weather data </s>
funcom_train/29840608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(CategoryPlot subplot, int weight) { // store the plot and its weight subplot.setParent(this); subplot.setWeight(weight); subplot.setInsets(new Insets(0, 0, 0, 0)); subplot.setRangeAxis(null); subplot.setOrientation(getOrientation()); subplot.addChangeListener(this); this.subplots.add(subplot); this.totalWeight += weight; // configure the range axis... ValueAxis axis = getRangeAxis(); if (axis != null) { axis.configure(); } notifyListeners(new PlotChangeEvent(this)); } COM: <s> adds a subplot </s>
funcom_train/34097940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Exit getCurrentWaypoint() { if (onStairs()) { Logger.getLogger("FireEscapeLog").log(Level.FINE, "Should use getStaircase instead"); //System.out.println("Bot getCurrentWaypoint"); } return GeneticAI.getRoute(this.getBotRoute()).getNavPoint(this.currentRouteWaypoint); } COM: <s> returns the current exit in the route </s>
funcom_train/49404429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getStandardDeviationBinSize(final double mean) { double total = 0; for(final Bin bin : values()) { total += Math.pow(bin.getValue() - mean, 2); } return Math.sqrt(total / (Math.max(1,values().size()-1))); } COM: <s> calculates the standard deviation of the bin size </s>
funcom_train/8076474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateMonitor() { m_MonitorLabel.setText(" x "+m_ActiveTasks); if (m_ActiveTasks > 0 && !m_animating) { m_MonitorLabel.setIcon(m_iconAnimated); m_animating = true; } if (m_ActiveTasks == 0 && m_animating) { m_MonitorLabel.setIcon(m_iconStationary); m_animating = false; } } COM: <s> updates the number of running tasks an the status of the bird </s>
funcom_train/10865954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHyphenAtEnd() throws Exception { String input = "ecologi-\r\ncal devel-\r\n\r\nop compre-\u0009hensive-hands-on and ecology-"; // first test TokenStream ts = new MockTokenizer(new StringReader(input), MockTokenizer.WHITESPACE, false); ts = new HyphenatedWordsFilter(ts); assertTokenStreamContents(ts, new String[] { "ecological", "develop", "comprehensive-hands-on", "and", "ecology-" }); } COM: <s> test that hyphenated words filter behaves correctly with a final hyphen </s>
funcom_train/26206471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(final Object entry) { if (entry instanceof JobMapEntry) { final JobMapEntry e = (JobMapEntry) entry; final Object value = JobMap.this.get(e.key); if (value != null) { if (value.equals(e.value)) { return true; } } else if (e.value == null) { return true; } } return false; } COM: <s> returns code true code if this set contains the argument </s>
funcom_train/6202620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void registerPopupMenuConstructors(int priority, IPopupMenuConstructor constructor) { synchronized (popupConstructors) { popupConstructors.add(new PopupMenuConstructorInfo(priority, constructor)); Collections.sort(popupConstructors, new Comparator<PopupMenuConstructorInfo>() { public int compare(PopupMenuConstructorInfo o1, PopupMenuConstructorInfo o2) { return o1.priority - o2.priority; } }); } } COM: <s> add new constructor into list and sort full list by priority </s>
funcom_train/3771779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addResource(WebdavResource resource) { String displayName = resource.getDisplayName(); if (displayName == null || displayName.trim().equals("")) { displayName = resource.getHttpURL().getName(); } hrefTable.put(displayName, resource); } COM: <s> add the specified resource </s>
funcom_train/18749930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveStartGraph(AspectualGraphView startGraph, File location) throws IOException { if (startGraph != null) { // save start graph File startGraphLocation = new File(location, STATE_FILTER.addExtension(startGraph.getName())); getGraphMarshaller().marshalGraph(startGraph.getAspectGraph(), startGraphLocation); } } COM: <s> saves a graph as start graph using the default name in </s>
funcom_train/24942892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getStages() { int stages = 0; final Value shiftValue = getRightDataPort().getValue(); for (int bitPosition = 0; bitPosition < shiftValue.getSize(); bitPosition++) { Bit bit = shiftValue.getBit(bitPosition); // if (shiftValue.getBit(bitPosition) == Bit.CARE) if (!bit.isConstant() && bit.isCare()) { stages++; } } return stages; } COM: <s> gets the actual number of stages needed to compute the shift based upon </s>
funcom_train/42395941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTablero() { System.out.println("getTablero"); Partida instance = new Partida(); Tablero expResult = null; Tablero result = instance.getTablero(); 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 tablero method of class model </s>
funcom_train/32950609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateDoc() { try { ByteArrayOutputStream trimXML = new ByteArrayOutputStream(); xmlBean.marshalTRIM(getTrim(), trimXML); String kbeKeyAlgorithm = propertyBean .getProperty(DocumentSecretKey.DOC_KBE_KEY_ALGORITHM_PROP); int kbeKeyLength = Integer.parseInt(propertyBean .getProperty(DocumentSecretKey.DOC_KBE_KEY_LENGTH)); getApp().getDocument().setAsEncryptedContent(trimXML.toByteArray(), kbeKeyAlgorithm, kbeKeyLength); } catch (Exception e) { logger.info("Failed to update TRIM"); } } COM: <s> updates submitted document </s>
funcom_train/17419014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() throws Exception { final String[] names = configuration.getLibraryNames(); final String[] locations = configuration.getLibraryRoots(); // @todo add validation for (int i = 0; i < names.length; i++) { log.info(names[i] + " : adding collection from " + locations[i]); collectionManager.getLocalCollections().add(collectionManager.newLocalCollection(names[i], locations[i])); } } COM: <s> creates an instance of jukebox with multiple root location with a given </s>
funcom_train/11105799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void log(String message, Throwable throwable) { FacesContext context = getFacesContext(); ExternalContext econtext = null; if (context != null) { econtext = context.getExternalContext(); } if (econtext != null) { econtext.log(message, throwable); } else { System.out.println(message); throwable.printStackTrace(System.out); } } COM: <s> p log the specified message and exception to the servers log file </s>
funcom_train/48250836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJabberGoogle() { if (jabberGoogle == null) { jabberGoogle = new JCheckBox(); jabberGoogle.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { if ( jabberGoogle.isSelected() ) { jabberHost.setEnabled(false); jabberPort.setEnabled(false); jabberSSL.setEnabled(false); } else { jabberHost.setEnabled(true); jabberPort.setEnabled(true); jabberSSL.setEnabled(true); } } }); } return jabberGoogle; } COM: <s> this method initializes jabber google </s>
funcom_train/33137207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createButtons(Composite buttonBox) { addButton = createPushButton(buttonBox, "Add"); //$NON-NLS-1$ removeButton = createPushButton(buttonBox, "Remove"); //$NON-NLS-1$ updateButton = createPushButton(buttonBox, "Update"); //$NON-NLS-1$ upButton = createPushButton(buttonBox, "Page up"); //$NON-NLS-1$ downButton = createPushButton(buttonBox, "Page down"); //$NON-NLS-1$ } COM: <s> creates the add remove up and down button in the given button box </s>
funcom_train/22783942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initComponents() { // build up editor editor = new JPanel(); editor.setOpaque(false); editor.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); // add text JLabel constant = new JLabel("constant "); constant.setOpaque(false); editor.add(constant); // type chooser typeChooser = new JComboBox(new String[] { TRUE, FALSE }); typeChooser.addActionListener(new TypeListener()); editor.add(typeChooser); } COM: <s> build up editing component </s>
funcom_train/9641944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSeparatorLine(Shell dialog, Control control) { Label line = new Label(dialog, SWT.SEPARATOR | SWT.HORIZONTAL); FormData formData = new FormData(); formData.left = new FormAttachment(control, 5); formData.top = new FormAttachment(control, 0, SWT.CENTER); formData.right = new FormAttachment(100); line.setLayoutData(formData); } COM: <s> create a separator label which will be attached to the given </s>
funcom_train/26141327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkTextTag (String label, String tag) { boolean check = false; // label = label.toLowerCase(); // label = label.replace(" ", ""); if(tag.equals("")) { Point p = findCell(label, idfMap); createEvent("IDF date tag " + label + " is empty", 1015, "validation error", idfFileName, p.x, p.y + 2, "checkTextTag") ; } return check; } COM: <s> check text tag </s>
funcom_train/48607780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String diff_text1(LinkedList diffs) { StringBuilder txt = new StringBuilder(); for (Iterator it = diffs.iterator(); it.hasNext();) { Diff aDiff = (Diff) it.next(); if (aDiff.operation != INSERT) { txt.append(aDiff.text); } } return txt.toString(); } COM: <s> compute and return the source text all equalities and deletions </s>
funcom_train/2451078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test(T value) { if (value == null) { throw new IllegalArgumentException("value cannot be null."); //$NON-NLS-1$ } if (m_min == null) { m_min = value; m_max = value; } m_tester.test(value); } COM: <s> tests a new value </s>
funcom_train/3393589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PackageSymbol enterPackage(Name fullname) { PackageSymbol p = packages.get(fullname); if (p == null) { assert !fullname.isEmpty() : "rootPackage missing!"; p = new PackageSymbol( Convert.shortName(fullname), enterPackage(Convert.packagePart(fullname))); p.completer = this; packages.put(fullname, p); } return p; } COM: <s> make a package given its fully qualified name </s>
funcom_train/48909388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxfDescripcion() { if (txfDescripcion == null) { txfDescripcion = new JTextField(); txfDescripcion.setBounds(new Rectangle(101, 28, 319, 22)); txfDescripcion.addKeyListener(new KeyAdapter(){ public void keyPressed(KeyEvent e) { if(e.getKeyCode()==KeyEvent.VK_ENTER) comboProductos.grabFocus(); } }); } return txfDescripcion; } COM: <s> this method initializes txf descripcion </s>
funcom_train/33480354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand1() { if (exitCommand1 == null) {//GEN-END:|96-getter|0|96-preInit // write pre-init user code here exitCommand1 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|96-getter|1|96-postInit // write post-init user code here }//GEN-BEGIN:|96-getter|2| return exitCommand1; } COM: <s> returns an initiliazed instance of exit command1 component </s>
funcom_train/17455641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getCheckHttpsEnabled() { if (checkHttpsEnabled == null) { checkHttpsEnabled = new JCheckBox("Usar https"); checkHttpsEnabled.setName("checkHttpsEnabled"); checkHttpsEnabled.setEnabled(false); checkHttpsEnabled.setText("https"); checkHttpsEnabled.setBounds(new Rectangle(12, 11, 84, 24)); } return checkHttpsEnabled; } COM: <s> this method initializes check https enabled </s>
funcom_train/23940461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setWorldInformations() { this.setInformations(ConstantsKeys.WORLD_RADIUS, "Sphere radius", "world.radius", true); this.setInformations(ConstantsKeys.WORLD_VISCOSITY, "Friction viscosity", "world.viscosity", true); this.setInformations(ConstantsKeys.WORLD_BOUNDARY, "Friction boundary layer", "world.boundary", true); this.setInformations(ConstantsKeys.WORLD_PERMITTIVITY, "Electric field permittivity", "world.permittivity", true); } COM: <s> set informations relative to world constants </s>
funcom_train/27725251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConditions(String conditions) { StringTokenizer tokenizer = new StringTokenizer(conditions, ","); while (tokenizer.hasMoreTokens()) { String tmpName = tokenizer.nextToken().trim(); Condition tmpCondition = new Condition(tmpName); addCondition(tmpCondition); } } COM: <s> set the list of conditions </s>
funcom_train/646562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Token skipToEOL() { int start = nextToken; for (; nextToken < sql.length(); nextToken++) { char c = sql.charAt(nextToken); if (c == '\n') { lineNo++; charNo = 1; break; } } // Return the token return new Token(sql, TokenType.WORD, start, nextToken, lineNo, charNo); } COM: <s> generates a token which consists of everything from the current </s>
funcom_train/49326475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean createPPT(File dest, ArrayList grabs, WordDescriptor desc){ try{ /*HWPFWorkbook doc = null;//new HWPFDocument(); doc. FileOutputStream out = new FileOutputStream(dest); doc.write(out); out.close();*/ } catch(Exception e){ e.printStackTrace(); } return true; } COM: <s> creates a power point from a list of images </s>
funcom_train/11388843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void commonPreHead(Page.HTML<_> html) { set(ACCORDION_ID, "nav"); set(initID(ACCORDION, "nav"), "{autoHeight:false, active:0}"); set(THEMESWITCHER_ID, "themeswitcher"); } COM: <s> the prehead that should be common to all subclasses </s>
funcom_train/45771744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processNameDefinition(Node root, Enumeration eNameDefinitions) throws IOException { Debug.log(Debug.TRACE, "<NAMED-EXPRESSIONS>"); Element namedExpressionsElement = (Element) doc.createElement(TAG_NAMED_EXPRESSIONS); while(eNameDefinitions.hasMoreElements()) { NameDefinition tableEntry = (NameDefinition) eNameDefinitions.nextElement(); tableEntry.writeNode(doc, namedExpressionsElement); } root.appendChild(namedExpressionsElement); Debug.log(Debug.TRACE, "</NAMED-EXPRESSIONS>"); } COM: <s> this method process a name definition table and generates a portion </s>
funcom_train/26572907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void center(Window win) { Dimension dim = this.getSize(); // Center login dialog int w = win.getSize().width; int h = win.getSize().height; int x = (dim.width - w) / 2 + this.getLocationOnScreen().x; int y = (dim.height - h) / 2 + this.getLocationOnScreen().y; win.setLocation(x, y); } COM: <s> method center window </s>
funcom_train/20017326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateParam(Element e, String ns, ArrayList msgs) { Element parent = findParent(e, ns, "forward"); if (parent == null) { String id = e.getAttributeValue("id", jspNamespace); ValidationMessage vm = new ValidationMessage(id, e.getQualifiedName() + " must only be used with 'forward'"); msgs.add(vm); } } COM: <s> validates that a param element is only used within the body of </s>
funcom_train/19257823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSwingWTParent(swingwt.awt.Container parent) throws Exception { setLayoutImpl(getLayout()); if (comps.size() > 0) { Object[] obs = comps.toArray(); for (int i = 0; i < obs.length; i++) { Component c = (Component) obs[i]; doAdd(c); } } } COM: <s> called when this gets added </s>
funcom_train/2807468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void accept(String workEffortId, String partyId, String roleTypeId, Timestamp fromDate) throws WfException { WfAssignment assign = WfFactory.getWfAssignment(delegator, workEffortId, partyId, roleTypeId, fromDate); assign.accept(); } COM: <s> accept an activity assignment </s>
funcom_train/18748824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEmphasized(Set<JCell> jCellSet) { Set<JCell> changedEmphJCells = new HashSet<JCell>(emphJCells); changedEmphJCells.addAll(jCellSet); emphJCells.clear(); emphJCells.addAll(jCellSet); refresh(changedEmphJCells); } COM: <s> sets the set of emphasized jcells </s>
funcom_train/7356125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseMoved(MouseEvent e) { isMouseReleaseStartsEditing = false; // this is a dirty trick to reset the timer of the cell editor. if (tree.getCellEditor() != null) { tree.getCellEditor().isCellEditable(new EventObject(this) { }); } } COM: <s> invoked when the mouse button has been moved on a component </s>
funcom_train/36884042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void save() { File nodeListFile = new File( friendManager.getWorkingDirectory().getAbsolutePath() + File.separator + friendManager.getMe().getName() + ".nodelist"); try { ObjectOutputStream out = new ObjectOutputStream( new FileOutputStream(nodeListFile)); out.writeObject(nodes); out.flush(); out.close(); } catch (FileNotFoundException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } } COM: <s> save network manager informations </s>
funcom_train/5260715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addResourcePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BusinessProcess_resource_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BusinessProcess_resource_feature", "_UI_BusinessProcess_type"), BmmPackage.Literals.BUSINESS_PROCESS__RESOURCE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the resource feature </s>
funcom_train/34238749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void iterate() { this.counter = 0; while(true){ try{ //if editor not started, or only downloading smething - this doesnt counts. this.increaseLifetime(); this.module.getWorkingFile().getCurrentState().handle(); this.module.notifyListeners(); Thread.sleep(frequency); if(this.counter % this.period == 0) this.module.getWorkingFile().getCurrentState().getAction().updateText(this.getLifetime()); } catch(InterruptedException e){ Runtime.getRuntime().gc(); Runtime.getRuntime().runFinalization(); return; } } } COM: <s> iterate program actions every n milliseconds </s>
funcom_train/48405497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addShowContextMenuHandler(com.smartgwt.client.widgets.events.ShowContextMenuHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.ShowContextMenuEvent.getType()) == 0) setupShowContextMenuEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.ShowContextMenuEvent.getType()); } COM: <s> add a show context menu handler </s>
funcom_train/12652490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(TrialProximityGroup trialProximityGroup) { // Unavailable group is always greater than available one if (trialProximityGroup == null) return -1; // Compare types alphabetically first; if equal then compare larger number of trials int typeCompare = Trial.TRIALTYPE_COMPARATOR_ENGLISH.compare(trialType, trialProximityGroup.trialType); return (typeCompare != 0) ? typeCompare : (trialProximityGroup.size() - size()); } COM: <s> compare this groups type using english alphabetical ordering </s>
funcom_train/2602080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getCharacterBounds(int i) { AccessibleText at = getNoteLabelAccessibleText(); if (at != null && sameWindowAncestor(pane, noteLabel)) { // return rectangle in the option pane bounds Rectangle noteLabelRect = at.getCharacterBounds(i); if (noteLabelRect != null) { return SwingUtilities.convertRectangle(noteLabel, noteLabelRect, pane); } } return null; } COM: <s> determines the bounding box of the character at the given index into </s>
funcom_train/3431702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String queryCatalogClassName () { String className = System.getProperty(pClassname); if (className == null) { if (resources==null) readProperties(); if (resources==null) return null; try { return resources.getString("catalog-class-name"); } catch (MissingResourceException e) { return null; } } return className; } COM: <s> obtain the catalog class name setting from the properties </s>
funcom_train/34973795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void jsonRedirect(String redirectURL) throws IOException { final String resultJson = "{ \"redirect\": \"" + redirectURL + "\"}"; response.setContentType(RESP_CONTENT_TYPE); final PrintWriter pw = response.getWriter(); pw.append(resultJson); pw.close(); } COM: <s> return the special json instead of status code 302 </s>
funcom_train/17962163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setMeterValue(final double value) { try { double newValue = value; if (this.data.getValue() != null) { newValue += this.data.getValue().doubleValue(); } this.data.setValue(new Double(newValue)); } catch (Exception ex) { System.err.println(ex.getMessage()); } } COM: <s> sets the meter value </s>
funcom_train/31225295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMessage( SceneMessage message ) { message.setAgentReceiver(target); message.setAgentSender(source); Debug.assertTrue(!message.getAgentReceiver().getRole().equals("null")); logger.debug("Sending message " + message); logger.debug("convId = " + convId); institution.saySceneMessage(convId, message); } COM: <s> send a message to the target agent </s>
funcom_train/34505338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setKeyboardInDevice(MidiDevice keyInDevice) { if (this.keyInDevice !=null && this.keyInDevice.isOpen()) { this.keyInDevice.close(); } this.keyInDevice = keyInDevice; if (this.keyInDevice !=null && !this.keyInDevice.isOpen()) { try { this.keyInDevice.open(); this.keyInDevice.getTransmitter().setReceiver(this); } catch (Exception ex) { ex.printStackTrace(); } } } COM: <s> setter for property key in device </s>
funcom_train/12641433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CacheEntry get(String host) { if (policy == InetAddressCachePolicy.NEVER) { return null; } CacheEntry entry = (CacheEntry)cache.get(host); // check if entry has expired if (entry != null && policy != InetAddressCachePolicy.FOREVER) { if (entry.expiration >= 0 && entry.expiration < System.currentTimeMillis()) { cache.remove(host); entry = null; } } return entry; } COM: <s> query the cache for the specific host </s>
funcom_train/37831928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean onHungry() { /* * Will try to eat if one of... - Food already on the mind and not * moving (collision?) - Food not on the mind and hunger pains (every * 10) */ if ("food".equals(getIdea())) { if (!stopped()) { return true; } } else { /* * Only do something on occasional hunger pains */ if ((hunger % 10) != 0) { return false; } } return searchForFood(); } COM: <s> called when the sheep is hungry </s>
funcom_train/26666011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMetaData(MetaDataBean metaDataBean) { String contextPath = (String) metaDataBean.getValue("contextPath"); log.info("Found contextPath="+contextPath); try { if( contextPath!=null ) context = JAXBContext.newInstance(contextPath); } catch(JAXBException e) { log.error("Could not find context "+contextPath+" caught exception "+e); } } COM: <s> read the context path from the meta data </s>