__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3748792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTreeModelListener(final TreeModelListener l) { if (logger.isDebugEnabled()) { logger.debug("addTreeModelListener(TreeModelListener l = " + l + ") - start"); } if (logger.isDebugEnabled()) { logger.debug("addTreeModelListener(TreeModelListener) - end"); } throw new UnsupportedOperationException( "Method addTreeModelListener() not implemented."); } COM: <s> p this method is not implemented for this class </s>
funcom_train/28774755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Gauge getGauge11() { if (gauge11 == null) {//GEN-END:|140-getter|0|140-preInit // write pre-init user code here gauge11 = new Gauge("Savings Account", false, 100, 50);//GEN-LINE:|140-getter|1|140-postInit // write post-init user code here }//GEN-BEGIN:|140-getter|2| return gauge11; } COM: <s> returns an initiliazed instance of gauge11 component </s>
funcom_train/2761443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDeclaredField(MetaField metaField) { // add to array MetaField[] declaredFields = _declaredFields[INC_ALL]; MetaField[] newArray = new MetaField[declaredFields.length + 1]; System.arraycopy(declaredFields, 0, newArray, 0, declaredFields.length); newArray[declaredFields.length] = metaField; metaField.setMetaClass(this); _declaredFields[INC_ALL] = newArray; } COM: <s> adds a field with the supplied name </s>
funcom_train/25418325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Sections getExclusiveSiblings(Schema schema) { Sections exclusive = new Sections(); Sections siblings = schema.getSections(); if (getParent() != null) { siblings = getParent().getSections(); } for (Section sibling: siblings.values()) { if (sibling.getObligation().equalsIgnoreCase(Section.OBLIGATION_EXCLUSIVE)) { exclusive.add(sibling); } } return exclusive; } COM: <s> gets the mutually exclusive siblings associated with this section </s>
funcom_train/6472706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMessageHandler(MessageHandler handler) { String performative = handler.getPerformative().toUpperCase(); List<MessageHandler> list = handlerMap.get(performative); if (list == null) { list = new LinkedList<MessageHandler>(); handlerMap.put(performative, list); } list.add(handler); } COM: <s> adds a new message handler to the handler map </s>
funcom_train/3888219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMatchPersonsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StaffType_matchPersons_feature"), getString("_UI_PropertyDescriptor_description", "_UI_StaffType_matchPersons_feature", "_UI_StaffType_type"), ImsldV1p0Package.Literals.STAFF_TYPE__MATCH_PERSONS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the match persons feature </s>
funcom_train/43440879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean get(String remoteFile, String localFile) throws Exception { FileOutputStream out = null; boolean rc = false; try { out = new FileOutputStream( localFile ); rc = retrieveFile( remoteFile, out ); return rc; } catch (IOException e) { throw e; } finally { try { if ( out != null) out.close(); } catch (Exception e) {} } } // get COM: <s> retrieves a named file from the ftp server </s>
funcom_train/15520458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addResultAt(String rName, int pos) { if (results == null) results = new Vector<Object>(); if (pos >= results.size()) { results.setSize(pos + 1); results.ensureCapacity(pos + 1); } results.setElementAt(rName, pos); } COM: <s> add a result name to the query at a defined position </s>
funcom_train/3111438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update2() { //currentDirectionHeaded = (Vector3d) directionHeaded.clone(); directionHeaded.y = 0.0; if ((directionHeaded.x + directionHeaded.z) > 0.01) { directionHeaded.normalize(); } tg.getTransform(t3D); t3D.get(temp); temp.add(directionHeaded); t3D.setTranslation(temp); tg.setTransform(t3D); } COM: <s> updates this dynamic object </s>
funcom_train/31079270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDeclarer(String type) { if (type == null) setDeclarerIndex(0); else { type = getProject().getNameCache().getInternalForm(type, false); setDeclarerIndex(getPool().findClassEntry(type, true)); } } COM: <s> set the type of this declaring class </s>
funcom_train/4970995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Source locateSource(Map model) throws Exception { if (this.sourceKey != null) { return convertSource(model.get(this.sourceKey)); } Object source = CollectionUtils.findValueOfType(model.values(), getSourceTypes()); return (source != null ? convertSource(source) : null); } COM: <s> p locate the </s>
funcom_train/19895307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStopTime(Date stop_time) throws Exception { //Theoretically submitting a job before 01 jan 2008 is impossible. //Note: MR Grid has not been tested at speeds of 88 mph or above. if(stop_time.getTime() > 1199163600) this.stop_time = stop_time; else throw new Exception("stop_time must be a Date greater than midnight on 01 jan 2008"); } COM: <s> sets the date time the job was finished by the grid </s>
funcom_train/46589778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getBoundary() { String b = getValue("boundary"); //$NON-NLS-1$ final StringTokenizer st = new StringTokenizer(b, " \"\t\r\n"); //$NON-NLS-1$ if (st.hasMoreTokens()) b = st.nextToken(); else b = ""; //$NON-NLS-1$ if (b.length() > 0) b = "--" + b; //$NON-NLS-1$ return b; } COM: <s> get the current section boundary </s>
funcom_train/557288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showClassesWizard(String serverName) { allPanels = new Vector(); try { DeviceProxy admin = new DeviceProxy("dserver/"+serverName); addPanel(new ClassPanel(this,serverName,admin)); displayWizard(); } catch (DevFailed e) { JiveUtils.showTangoError(e); } } COM: <s> shows the classes wizard </s>
funcom_train/28500485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshSelectedUser() throws JC_Exception { JC_UserNode userN = (JC_UserNode)mUsersList.getSelectedValue(); mNameID.setText( userN.getName() ); mNewPassword.setText( "" ); mSetPasswordMessage.setText( "" ); return; } COM: <s> refresh selected user </s>
funcom_train/1662741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showPage(PageType pageType) { wizard.setPreviousEnabled(pageType.ordinal() > 0); wizard.setNextEnabled(pageType.ordinal() < (pages.size() - 1)); wizard.setPage(pages.get(pageType)); wizard.setTitle(pages.get(pageType).getHeading() + " - jSite"); } COM: <s> shows the page with the given type </s>
funcom_train/3463135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EntityInterface getEntity(String id,EntityInterface.Params params,EntityInterface parent) throws ObjectManagerException,BuildException { try { ObjectFactory of = getObjectFactory(id); if (of==null) throw new ObjectManagerException(null,"ObjectManager: No ObjectFactory defined for "+id); return ((EntityObjectFactory)of).getObject(params,parent); } catch (ClassCastException e) {throw new ObjectManagerException(e,"No BiomasEntityObjectFactory found for "+id);} } COM: <s> throws object manager exception if the class you request doesnt implement entity interface </s>
funcom_train/22520103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setButtonLayoutData(CustomButton button) { GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH); Point minSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); data.widthHint = Math.max(widthHint, minSize.x); button.setLayoutData(data); } COM: <s> sets the button layout data </s>
funcom_train/5395358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNumberElementIDBytes() { System.out.println("getNumberElementIDBytes"); TableManager instance = new TableManager(); short expResult = 0; short result = instance.getNumberElementIDBytes(); 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 number element idbytes method of class org </s>
funcom_train/13596301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxtPhonemeToReplace() { if (txtPhonemeToReplace == null) { txtPhonemeToReplace = new JTextField(); txtPhonemeToReplace.setName("OldName"); //$NON-NLS-1$ txtPhonemeToReplace.setPreferredSize(new Dimension(200, 20)); // Generated txtPhonemeToReplace.setText(getPhonemeA().getName()); txtPhonemeToReplace.setEditable(false); txtPhonemeToReplace.setEditable(false); } return txtPhonemeToReplace; } COM: <s> this method initializes txt phoneme to replace </s>
funcom_train/32778280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchOn(Class<?> messageType) { if (messageType == null) return; // no good parameter MLink tmp = linkOf(messageType); // buffer the link to the msgType if (tmp == null) return; // type not registered, return tmp.isOn = true; // well, go on and distribute } COM: <s> enables messages of the given type to be sent to the registered </s>
funcom_train/24468814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeTag(Tag tag) throws IOException { int type = NBTUtils.getTypeCode(tag.getClass()); String name = tag.getName(); byte[] nameBytes = name.getBytes(NBTConstants.CHARSET); os.writeByte(type); os.writeShort(nameBytes.length); os.write(nameBytes); if(type == NBTConstants.TYPE_END) { throw new IOException("Named TAG_End not permitted."); } writeTagPayload(tag); } COM: <s> writes a tag </s>
funcom_train/42012707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getJCBTipoDescuento() { if (jCBTipoDescuento == null) { jCBTipoDescuento = new JComboBox(); jCBTipoDescuento.setMaximumRowCount(3); jCBTipoDescuento.setSize(new Dimension(241, 20)); jCBTipoDescuento.setLocation(new Point(132, 272)); jCBTipoDescuento.addItem("NINGUNO"); jCBTipoDescuento.addItem("PORCENTUAL"); jCBTipoDescuento.addItem("ABSOLUTO"); } return jCBTipoDescuento; } COM: <s> this method initializes j cbtipo descuento </s>
funcom_train/42570811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLabelFeaturePropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_LabelDesc_labelFeature_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_LabelDesc_labelFeature_feature", "_UI_LabelDesc_type"), DescPackage.Literals.LABEL_DESC__LABEL_FEATURE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the label feature feature </s>
funcom_train/2970078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getSkillLevels() throws Exception { List levels = null; String query = "from skill_level in class inklings.jgatms.skill.SkillLevelInfo"; if (sessionFactory == null) throw new Exception("No session factory."); try { levels = DataUtils.getItems(sessionFactory, query); } catch (Exception e) { throw new Exception("Error getting skills list.", e); } return levels; } COM: <s> returns a list of skilllevel info objects </s>
funcom_train/3751012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupFrame() { this.getContentPane().setLayout(new BorderLayout()); this.setJMenuBar(getMenu()); // this.getContentPane().add(getToolBar(), BorderLayout.NORTH); jTabbedPane = MainTabbedPane.getMainTabbedPane(); this.add(jTabbedPane, BorderLayout.CENTER); jTabbedPane.setVisible(true); this.validate(); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setVisible(true); this.getContentPane().setVisible(true); } COM: <s> add and setup gui objects for the main frame </s>
funcom_train/34238787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean progressMode(String label, int value){ if(progress.getString() != label) progress.setString(label); if(progress.getValue() != value) progress.setValue(value); if(buttonMode){ Container contentPane = controller.getModule().getContentPane(); ActionListener l[] = button.getActionListeners(); if(l.length > 0) button.removeActionListener(l[0]); contentPane.add(progress, BorderLayout.CENTER); buttonMode = false; contentPane.repaint(); progress.repaint(); button.repaint(); contentPane.validate(); return true; } return false; } COM: <s> changes view to progress bar mode </s>
funcom_train/35357058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWarp(double[][] warp) throws jjil.core.Error { if (warp.length != 2 || warp[0].length != 3 || warp[1].length != 3) { throw new Error( Error.PACKAGE.ALGORITHM, jjil.algorithm.ErrorCodes.PARAMETER_WRONG_SIZE, warp.toString(), null, null); } this.rdWarp = warp; calculateInverse(); } COM: <s> sets the warp in use and decomposes it into two stages determining </s>
funcom_train/26024102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { JGraphpadBusinessObject clone; try { clone = (JGraphpadBusinessObject) super.clone(); } catch (CloneNotSupportedException e) { clone = new JGraphpadBusinessObject(); } clone.setProperties(new Hashtable(getProperties())); if (isComponent()) { Object value = getValue(); if (value instanceof JGraphpadHeavyweightRenderer) { clone.setValue(((JGraphpadHeavyweightRenderer) value).clone()); } } return clone; } COM: <s> returns a clone of the object </s>
funcom_train/2877146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void appendLines() throws SmartFrogDeploymentException { try { if (!getFile().exists()) { buildNewFile(); } else { appendExistingFile(); } } catch (IOException e) { throw new SmartFrogDeploymentException("When writing to " + getFile(), e, this); } } COM: <s> do the work </s>
funcom_train/1660130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream outputStream) throws IOException { writeLine(outputStream, name); for (Entry<String, String> fieldEntry: fields.entrySet()) { writeLine(outputStream, fieldEntry.getKey() + "=" + fieldEntry.getValue()); } writeLine(outputStream, "EndMessage"); outputStream.flush(); if (payloadInputStream != null) { FcpUtils.copy(payloadInputStream, outputStream); outputStream.flush(); } } COM: <s> writes this message to the given output stream </s>
funcom_train/3729733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IPump getPumpNamed(int id) { IPump pump = this.findPumpWithID(id); if (pump == null) { pump = new PumpProxy(); ((PumpProxy) pump).setOID(0); ((PumpProxy) pump).setState(NewState.getInstance()); pump.setId(id); getPumps().addElement(pump); Cache.getInstance().addObject((PumpProxy) pump); } return pump; } COM: <s> returns an instance of pump with id b name b </s>
funcom_train/46682063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateNetworkWeights(){ //System.out.println("- Update weights..."); Iterator<Concept> it = map.getConcepts().values().iterator(); while(it.hasNext()){ Concept c = it.next(); if(c instanceof LearningConcept){ LearningConcept lc = (LearningConcept) c; Set<FcmConnection> out = lc.getOutConnections(); Iterator<FcmConnection> it1 = out.iterator(); while(it1.hasNext()){ FcmConnection conn = it1.next(); LearningWeightedConnection wconn = null; if(conn instanceof LearningWeightedConnection){ wconn = (LearningWeightedConnection) conn; /* * Update learning connection */ lc.getTrainingFunction().update(wconn); } } } } } COM: <s> update weights of the connections </s>
funcom_train/25597635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Scene () { super (null); defaultFont = Font.decode (null); resolveBounds (new Point (), new Rectangle ()); setOpaque(true); setFont (defaultFont); setBackground (lookFeel.getBackground ()); setForeground (lookFeel.getForeground ()); sceneAnimator = new SceneAnimator (this); } COM: <s> creates a scene </s>
funcom_train/12243370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseMoved(MouseEvent arg0) { this.setSelectionPath(this.getClosestPathForLocation(arg0.getX(),arg0.getY())); if(parentWindow.getActiveConstruction()!=null) parentWindow.getActiveConstruction().highlightObjectByName((this.getSelectionPath().getLastPathComponent()).toString()); parentWindow.refresh(); } COM: <s> this method is called whenever the mouse is moved over the tree </s>
funcom_train/28872889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPreOrder(List<DTNode> list, Set<Integer> seen) { if ( seen.contains(this) ) return; seen.add(number); list.add(this); for ( DTNode n : children.values() ) n.addTopologicalOrder(list, seen); } COM: <s> the code add pre order code method recursively adds this node and its </s>
funcom_train/35021510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBooleanValue(Object o) throws EvaluationException { if (o instanceof Boolean) { return ((Boolean) o).booleanValue(); } else if (o instanceof BooleanValue) { return ((BooleanValue) o).value(); } else { throw new EvaluationException( NbBundle.getMessage(getClass(), "error.oper.bool"), getToken(), o); } } COM: <s> returns the boolean value from the given object </s>
funcom_train/13680305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void putError(int offset, List<Word> list, int from, int to, String message){ putError(offset+list.get(from).getBegin(), list.get(to).getEnd()-list.get(from).getBegin()+1, message); } COM: <s> puts error market to file </s>
funcom_train/8311996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String translateNamespacePrefixToUri(String prefix, Object element) { Enumeration it = getNamespaceAxisIterator(element); while (it.hasMoreElements()) { NamespaceNode ns = ((NamespaceNode) (it.nextElement())); if (prefix.equals(ns.getNodeName())) return ns.getNodeValue(); } return null; } COM: <s> translate a namespace prefix to a uri </s>
funcom_train/18971370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String dump(InputStream is) { StringBuffer result = new StringBuffer(); try { log.debug("Getting the InputStreamReader."); InputStreamReader isr = new InputStreamReader(is); log.debug("Getting the BufferedReader."); BufferedReader br = new BufferedReader(isr); log.debug("Reading in the first line."); String line = br.readLine(); while (line != null) { result.append(line); line = br.readLine(); } } catch (IOException ioe) { ioe.printStackTrace(); } return result.toString(); } COM: <s> dump input stream to string that can be passed in an exception </s>
funcom_train/2496871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean authenticate() throws LoginException { try { DAOFactory factory = (DAOFactory) DAOFactory.getFactory(); AccountDAO userDAO = (AccountDAO) factory.getAccountDAO(); return userDAO.authenticate(entity); } catch(DataAccessException dae) { FacesMessages.instance().add(dae.getMessage()); log.error(dae); throw new LoginException(dae.getMessage()); } } COM: <s> authenticate the entity </s>
funcom_train/14399186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isInCache(String pSequenceContext, long pSequenceNumber) { if (this.iCache.isEmpty()) return false; Iterator<CacheEntry> iterator = this.iCache.iterator(); while (iterator.hasNext()) { CacheEntry entry = iterator.next(); if ((entry.getSequenceContext().compareTo(pSequenceContext) == 0) && (entry.getSequenceNumber() == pSequenceNumber)) return true; } return false; } COM: <s> determines if the sequence identifier context and number is in the </s>
funcom_train/43245094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetServiceBranchOptions() throws Exception { System.out.println("getServiceBranchOptions"); String securitytoken = secToken; org.vistaoutreach.voe.refdata.ws.RefDataServicesImpl instance = new org.vistaoutreach.voe.refdata.ws.RefDataServicesImpl(); String[] expResult = null; String[] result = instance.getServiceBranchOptions(securitytoken); assertTrue(result.length>0); } COM: <s> test of get service branch options method of class org </s>
funcom_train/45916008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assignTechnologyToPlayers() { for (GamePlayer player : players) { for (ResearchTech rt : research.values()) { if (rt.techIDs.contains(player.race.techId) && rt.level <= level) { player.knownTechnology.add(rt); // set only the level0 technology as available, the rest is just known if (rt.level == 0) { player.availableTechnology.add(rt); } } } } } COM: <s> assign the technologies to the players based on the current global technology level </s>
funcom_train/35873166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print() throws PrinterException { PrinterJob job = PrinterJob.getPrinterJob(); //PageFormat pf = job.defaultPage(); //pf.setOrientation(orientation.get()); job.setPrintService(ps.get()); job.setPrintable(this); job.setJobName(jobName.get()); job.print(); } COM: <s> can be called directly </s>
funcom_train/26630671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer internalByteCodes = new StringBuffer(); //Loop through , adding internal Instructions for (int a=0; a<this.currentInstructionPosition; a++) { internalByteCodes.append(this.internalInstructions.get(String.valueOf(a))); } return internalByteCodes.toString(); } COM: <s> get the document containing the opcode counters </s>
funcom_train/22238452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void EchoSize(Object[] echoSize) { if (! (echoSize.length == 1 && echoSize[0] instanceof Double)) throw new IllegalArgumentException ("\nEchoSize must be a Double") ; setEchoSize(((Double)echoSize[0]).doubleValue()) ; } COM: <s> property which sets the size of the 6 dof sensor echo in physical </s>
funcom_train/18034865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BigDecimal enforce(final BigDecimal aNmbr) { final BigDecimal tmpEnforced = aNmbr.plus(this.getMathContext()).setScale(myScale, myRoundingMode).stripTrailingZeros(); if (tmpEnforced.signum() == 0) { return BigMath.ZERO; } else { return tmpEnforced; } } COM: <s> will first enforce the precision and then the scale </s>
funcom_train/28757770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModeid(Long newVal) { if ((newVal != null && this.modeid != null && (newVal.compareTo(this.modeid) == 0)) || (newVal == null && this.modeid == null && modeid_is_initialized)) { return; } this.modeid = newVal; modeid_is_modified = true; modeid_is_initialized = true; } COM: <s> setter method for modeid </s>
funcom_train/8005449
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void recuperaObservaciones() throws DataStoreException, SQLException { InstanciasAprobacionModel instancia = new InstanciasAprobacionModel( "inventario", "inventario"); instancia.retrieve( "nombre_objeto = 'solicitudes_compra' AND " + "objeto_id = " + getSolicitudesCompraSolicitudCompraId() + " AND mensaje IS NOT NULL order by fecha_entrada desc"); if (instancia.gotoFirst()) setObservaciones(instancia.getInstanciasAprobacionMensaje()); } COM: <s> recupera observaciones hechas a la sm sc actual en el bucket observaciones </s>
funcom_train/41283191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeBranch(TreeNode node) { int ist, iend; ist = items.indexOf(node)+1; iend = items.size()-1; for(int i = ist; i< iend; i++) { if(((TreeNode)items.elementAt(ist)).level > node.level) { remove((TreeNode)items.elementAt(ist)); } else break; } remove(node); // hscroll hierarchyChanged = true; } COM: <s> removes the specified node and its children </s>
funcom_train/35073245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addRefId(BasicXmlDocument document) { if(refId != null) { Element ref_id_el = document.createElement(AuthNetField.ELEMENT_REFID.getFieldName()); ref_id_el.appendChild(document.getDocument().createTextNode(refId)); document.getDocumentElement().appendChild(ref_id_el); } } COM: <s> add the ref id to the request </s>
funcom_train/1145021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setBounds(new Rectangle(0, 0, 800, 220)); background = new JLabel(); background.setDoubleBuffered(true); background.setPreferredSize(new Dimension(800, 220)); String imgName = "/gui/images/brega.gif"; background.setIcon(new ImageIcon(getClass().getResource(imgName))); this.add(background); } COM: <s> this method initializes this </s>
funcom_train/38957782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIstAbzweigPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Gleis_istAbzweig_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Gleis_istAbzweig_feature", "_UI_Gleis_type"), ModelrailwayPackage.Literals.GLEIS__IST_ABZWEIG, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the ist abzweig feature </s>
funcom_train/46222905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONObject put(String key, Object value) throws JSONException { if (key == null) { throw new JSONException("Null key."); } if (value != null) { testValidity(value); this.map.put(key, value); } else { this.map.put(key, ""); // remove(key); } return this; } COM: <s> put a key value pair in the jsonobject </s>
funcom_train/39179367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private QueryNode toTermQuery(TermQuery query, String space) { if(debug) System.out.println(space + "Term="+query.index+":"+query.term); return new gate.mimir.search.query.TermQuery(query.index, query.term); } COM: <s> conversion of the term query </s>
funcom_train/14655295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Attribute getAttributeAt(int index) throws IndexOutOfBoundsException { Object[] array = attributeMap.values().toArray(); if (index > array.length) throw new IndexOutOfBoundsException("index out of bount. index='" + index + "' array.length='" + array.length + "'"); return (Attribute) array[index]; } COM: <s> returns an attribute with the specified position </s>
funcom_train/21612085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected T renderize(JsonBase base) { //TODO: fix this. if(base instanceof JsonValue) { base = ((JsonValue) base).getNativeValue(); } if( base.isSimple() ) { renderize( (JsonSimple ) base ); } else { renderize( (JsonComplex) base ); } return uiBuilder.result(); } COM: <s> renderizes a generic type </s>
funcom_train/3360942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Rdn)) { return false; } Rdn that = (Rdn) obj; if (entries.size() != that.size()) { return false; } for (int i = 0; i < entries.size(); i++) { if (!entries.get(i).equals(that.entries.get(i))) { return false; } } return true; } COM: <s> compares the specified object with this rdn for equality </s>
funcom_train/26530547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getElapsedPercent(Date when) { if (when == null) return 0; long periodBegin = getBeginDate().getTime(); long periodElapsed = when.getTime() - periodBegin; if (periodElapsed <= 0) return 0; long periodLength = endDate.getTime() - periodBegin; if (periodElapsed >= periodLength) return 1; return (double) periodElapsed / (double) periodLength; } COM: <s> return the percentage of time in this period that has elapsed </s>
funcom_train/46470724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Intersection intersectAt(Ray ray) { ray.transform(this.getTransform(true).getInverse()); double b = ray.oDotd(); double c = ray.oDoto(); double g = ray.dDotd(); double discriminant = (b * b) - (g) * (c - 1); double discriminantSqrt = Math.sqrt(discriminant); double t[] = new double[2]; t[0] = (-b + discriminantSqrt) / (g); t[1] = (-b - discriminantSqrt) / (g); return new Intersection(ray, this, t); } COM: <s> returns an intersection object representing the points along the ray represented </s>
funcom_train/14396212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void convertToAssociation() { EList ownedEnds = associationClass.getOwnedEnds(); Property prop1 = (Property) ownedEnds.get(0); Property prop2 = (Property) ownedEnds.get(1); prop1.setAggregation(AggregationKind.NONE_LITERAL); prop2.setAggregation(AggregationKind.NONE_LITERAL); } COM: <s> makes this association non composing and non aggregating </s>
funcom_train/22167999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String docToString(Document doc) throws BadReferenceException, IOException { // Get the encoding String encoding = (String) InTime.initConfig.getParameter("encoding"); if (encoding == null) encoding = "UTF-8"; // Return the string with the xml document return XMLUtils.toString(doc, encoding); } COM: <s> convert a xml document to text </s>
funcom_train/28749723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRefcbtnumber(Long newVal) { if ((newVal != null && this.refcbtnumber != null && (newVal.compareTo(this.refcbtnumber) == 0)) || (newVal == null && this.refcbtnumber == null && refcbtnumber_is_initialized)) { return; } this.refcbtnumber = newVal; refcbtnumber_is_modified = true; refcbtnumber_is_initialized = true; } COM: <s> setter method for refcbtnumber </s>
funcom_train/22167754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean parserArguments(List list) throws ProcessException { // Convert the list to string array String[] args = new String[list.size()]; Iterator it = list.iterator(); for(int i = 0; it.hasNext(); i++) args[i] = (String)it.next(); // Call to the parser method return parserArguments(args); } COM: <s> analyze the application arguments and check them from a list of arguments </s>
funcom_train/2870922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeTest(TestContextContainer testContext) { boolean result = getTagInfo().getAttributes().isEmpty(); if (result) { testContext.setStatus(TestContext.PASS); } else { testContext.setStatus(TestContext.FAIL); testContext.setMessage("Tag handler has one or more attributes."); } } COM: <s> runs the tests that are part of this test package </s>
funcom_train/8022979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stylizeBoolVal(int r, int g, int b, boolean bold, boolean italic) { setStyleConstants(styles.getStyleForScanValue(Token.BOOL_VAL .getScanValue()), new Color(r, g, b), bold, italic); } COM: <s> set text attributes for scheme bool values </s>
funcom_train/45209905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { JMenuItem source = (JMenuItem)(e.getSource()); String text = source.getText(); if (text == "Quit") exit (); if (text == "About") { about (); return; } System.out.println("Action Event"); JOptionPane.showMessageDialog (this, // TODO unfunky major league text, "Action Event", JOptionPane.INFORMATION_MESSAGE ); } COM: <s> implementation of action performed for interface action listener </s>
funcom_train/15488511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readFile(SourceFile f) { try { f.source= new InputStreamReader(new BufferedInputStream( new FileInputStream(f.file)), enc); } catch(FileNotFoundException e) { f.errors.add((Token) null, CompileError.FILE_NOT_FOUND, f.file.toString()); } catch(UnsupportedEncodingException e) { f.errors.add((Token) null, CompileError.UNSUPPORTED_ENCODING, enc); } } COM: <s> creates a reader for a file </s>
funcom_train/7285641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNullWrappedPrimitiveMemberSerialization() { Gson gson = gsonBuilder.serializeNulls().create(); ClassWithNullWrappedPrimitive target = new ClassWithNullWrappedPrimitive(); String json = gson.toJson(target); assertTrue(json.contains("\"value\":null")); } COM: <s> added to verify http code </s>
funcom_train/7757388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContentLengthHeader(long length) { byte [] lengthAsBytes = new byte [8]; long lengthAsLong = length; for(int eachByte = 0; eachByte < 8; eachByte ++) lengthAsBytes[eachByte] = (byte) (lengthAsLong >> ((7 - eachByte) * 8L)); replaceHeader("content-length", lengthAsBytes); } COM: <s> convenience method for content length header </s>
funcom_train/15585399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GridBagConstraints getConstraintsFor(Component c) { if (container == null) throw new NullPointerException ("Container not set."); GridBagConstraints rval = null; try { GridBagLayout layout = (GridBagLayout)container.getLayout(); rval = layout.getConstraints(c); } catch (ClassCastException e) { throw new IllegalArgumentException("Container must have a GridBagLayout."); } if (rval == null) throw new IllegalArgumentException("Component not added to container."); return rval; } COM: <s> returns the constraints for the given component </s>
funcom_train/19700185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showMovies(List<Movie> movies) { // There are no new movies: do nothing if (movies.equals(allMovies)) return; allMovies = movies; pnlFilter.reset(); pnlMovies.clear(); // no movies in the collection if (movies.isEmpty()) { Label noMovies = new Label("There are currently no movies in your personal collection."); noMovies.addStyleName("boldStyle"); pnlMovies.add(noMovies); } // the movie collection changed else { moviesView.setMovies(movies, 0); pnlMovies.add(moviesView); } } COM: <s> shows the given movies in the currently active movies view </s>
funcom_train/50865875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IntPoint getUnitDrawLocation(IntPoint unitPosition, Icon unitIcon) { int unitX = unitPosition.getiX(); int unitY = unitPosition.getiY(); int iconHeight = unitIcon.getIconHeight(); int iconWidth = unitIcon.getIconWidth(); return new IntPoint(unitX - (iconWidth / 2), unitY - (iconHeight / 2)); } COM: <s> gets the unit image draw position on the map image </s>
funcom_train/46426558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String buildIterableVariableName(PropertyInfo property) { String prefix="item"; String sufix=property.getPropertyName(); sufix=sufix. substring(0, 1).toUpperCase() + sufix.substring(1, sufix.length()); //Remove sufix s from property name if(sufix.endsWith("s")){ sufix=sufix.substring(0, sufix.length()-1); } return String.format("%s%s",prefix, sufix); } COM: <s> create variable name to be used for loops foreach etc </s>
funcom_train/46457150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { if(griddata==null) { return; } if(autoscaleZ) { double[] minmax = griddata.getZRange(ampIndex); colorMap.setScale(minmax[0], minmax[1]); } recolorImage(); colorMap.updateLegend(null); } COM: <s> updates this objects state using new data values </s>
funcom_train/51144718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMainStarColor(String color) throws IllegalArgumentException { if( color == null ) { this.colorMain = null; return; } if( DeepSkyFindingDS.COLOR_BLUE.equals(color) || DeepSkyFindingDS.COLOR_GREEN.equals(color) || DeepSkyFindingDS.COLOR_ORANGE.equals(color) || DeepSkyFindingDS.COLOR_RED.equals(color) || DeepSkyFindingDS.COLOR_WHITE.equals(color) || DeepSkyFindingDS.COLOR_YELLOW.equals(color) ) { this.colorMain = color; } else { throw new IllegalArgumentException("Main star color value is not valid.\n"); } } COM: <s> sets the color of the main star of this deep sky finding ds </s>
funcom_train/23071202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getDetailsMap(Date reference) { //we need to convert the current set //to a map. this is do Map map = new HashMap(); for (Iterator iter = details.iterator(); iter.hasNext();) { PersonDetail element = (PersonDetail) iter.next(); if (element.isActive(reference)) { map.put(element.getType(), element); } } return Collections.unmodifiableMap(map); } COM: <s> returns a map with keys of person detail type </s>
funcom_train/44849773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component render(String inAuthorLbl, String inReviewerLbl, String inDate) { String lAuthorRevierDate = String.format("%s [%s]", renderAuthorReviewer(inAuthorLbl, inReviewerLbl), inDate); //$NON-NLS-1$ return new Label(String.format(TMPL_TITLE, STYLE_CLASS, lAuthorRevierDate), Label.CONTENT_XHTML); //$NON-NLS-1$ } COM: <s> renders the author reviewer information </s>
funcom_train/31289682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetView() { Display.getDefault().syncExec(new Runnable() { public void run() { if (logTable != null) { logTable.removeAll(); } if (dialogTable != null) { dialogTable.removeAll(); } if (log != null) { log.dispose(); log = null; } if (dialog != null) { dialog.dispose(); dialog = null; } } }); } COM: <s> convenience function to clear the log table on the display thread </s>
funcom_train/48153951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(RandomVariable rv){ super.init(); sampleScroll.getSlider().addChangeListener(this); //Toolbars toolBar.setLayout(new FlowLayout(FlowLayout.LEFT)); toolBar.add(sampleScroll); addToolBar(toolBar); //Random variable randomVariable = rv; //Random variable graph rvGraph = new RandomVariableGraph(randomVariable); rvGraph.setMomentType(0); rvGraph.setMinimumSize(new Dimension(100, 100)); addComponent(rvGraph, 0, 0, 2, 1); reset(); } COM: <s> this method initializes the experiment including the toolbar with the sample </s>
funcom_train/49317354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JMenu createGoMenu(JMenu menu) { if (menu == null) menu = new JMenu("Go"); menu.add(htmlViewer.getBackAction()); menu.add(htmlViewer.getForwAction()); menu.addSeparator(); htmlViewer.addHistoryMenuItems(menu); menu.addSeparator(); menu.add(createGoClearHistoryMenuItem()); return menu; } COM: <s> create the go menu </s>
funcom_train/10271522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reopen(RaciInput input) throws SQLException{ Activity activity = ActivityTable.selectActivity(input.sensorId, input.sensorRecordKey); if (activity != null) { RaciDataTable.updateByActivity(input.sqlWriter, "Inbox", input.user.dn, input.currentTime, activity.getId()); this.updateActivityRecord(input, activity, "Reopened."); } } COM: <s> reopens the record </s>
funcom_train/9551154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File copyFile(File copiedfile) throws IOException { File myfile = new File(absolutelocation + copiedfile.getName()); // System.out.println("myfile locates "+contentlocation ); FileOutputStream outputStream = new FileOutputStream(myfile); FileInputStream fileIn = new FileInputStream(copiedfile); byte[] buffer = new byte[1024]; int len = 0; while ((len = fileIn.read(buffer)) > 0) { outputStream.write(buffer, 0, len); outputStream.flush(); } fileIn.close(); outputStream.close(); return myfile; } COM: <s> copy the file to another place </s>
funcom_train/45692240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPatternSetParametersPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GlobalParameters_patternSetParameters_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GlobalParameters_patternSetParameters_feature", "_UI_GlobalParameters_type"), EsxPackage.Literals.GLOBAL_PARAMETERS__PATTERN_SET_PARAMETERS, true, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the pattern set parameters feature </s>
funcom_train/33724440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BnTextField getBnTextField3() { if (bnTextField3 == null) { bnTextField3 = new BnTextField(); bnTextField3.setPath(new Path("this.street")); bnTextField3.setModelProvider(getMyDataSource()); } return bnTextField3; } COM: <s> this method initializes bn text field3 </s>
funcom_train/3105357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTimeToZero() throws IloaException { if (!isNull()) { Timestamp ts = this.getValue(); Calendar calend = Calendar.getInstance(); calend.setTime(ts); calend.set(Calendar.HOUR_OF_DAY, 0); calend.set(Calendar.MINUTE, 0); calend.set(Calendar.SECOND, 0); calend.set(Calendar.MILLISECOND, 0); ts.setTime(calend.getTimeInMillis()); } } COM: <s> set the time to zero 00 00 00 000 </s>
funcom_train/18598766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getChartFromRecord(List resultSet, String[] columns, byte graphType, String fileName) { switch (graphType) { case ChartFactory.TIMESERIES : //return getTimeseriesFromRecord(resultSet, fileName); break; case ChartFactory.PIECHART : //return getPiechartFromRecord(resultSet, fileName); break; default: return false; } return true; } COM: <s> returns the name of the png image generated to represent the given record </s>
funcom_train/40727918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TableColumn createTableColumn(POJOBasedObjectMapping mapping, String propName, String colName, String dataType, Class columnDataLoaderCls){ return ObjectMappingUtil.createTableColumn(guzzContext, mapping, propName, colName, dataType, columnDataLoaderCls == null ? null : columnDataLoaderCls.getName()) ; } COM: <s> helper method to create a table column </s>
funcom_train/12837152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkin(SessionKey key, Object value) throws SessionException { touch(); if (checkoutTable.contains(key.toString())) { checkoutTable.remove(key.toString()); sessionDataHashtable.put(key.toString(), value); } else { throw new SessionException(key + " was not checked out first.", SessionException.NOT_CHECKEDOUT); } } COM: <s> checks a previously checked out object back in </s>
funcom_train/20845507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteOldEntrys(int maxLifetimeSeconds) { while (!this.isEmpty() && ((Long) this.firstKey()).longValue() + (new Integer(maxLifetimeSeconds * 1000).longValue()) < System.currentTimeMillis()) { this.remove(this.firstKey()); } } COM: <s> deletes all entries that are older than </s>
funcom_train/46761414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ViewPatientModel getPatientForAppointment(final long appointmentId, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return SchedulingData.getPatientForAppointment(appointmentId, call); }}; return (ViewPatientModel) call(method, call); } COM: <s> get the patient with the appointment id </s>
funcom_train/37712835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addBsProposal(String proposal, String displayString, String additionalInfo) { if (fIsEscape) { fPriorityProposals.add(new CompletionProposal(proposal.substring(1), fDocumentOffset, 0, proposal.length() - 1, null, displayString, null, additionalInfo)); } else { addProposal(proposal, displayString, additionalInfo); } } COM: <s> adds a proposal that starts with a backslash </s>
funcom_train/29779512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(String xmlFilename) { InputStream inputStream = getClass().getClassLoader() .getResourceAsStream(xmlFilename); if (inputStream == null) { throw new IllegalArgumentException("File not found: " + xmlFilename); } try { parse(inputStream); } catch (Exception e) { throw new ConfigurationException("Failed to parse " + xmlFilename, e); } } COM: <s> parses the given xml file </s>
funcom_train/41332686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Shape decodeMarkInterior(int width, int height) { double left = width / 2.0 - 4; double top = height / 2.0 - 4; path.reset(); path.moveTo(left + 1, top + 1); path.lineTo(left + 8, top + 1); path.lineTo(left + 4, top + 6); path.closePath(); return path; } COM: <s> create the mark interior shape </s>
funcom_train/7979988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isInScope(CandidateURI caUri) { boolean result = false; if (getController().getScope().accepts(caUri)) { result = true; if (LOGGER.isLoggable(Level.FINER)) { LOGGER.finer("Accepted: " + caUri); } } else { outOfScope(caUri); } return result; } COM: <s> schedule the given </s>
funcom_train/37464976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stats( File inFile ) { Map<String, Double> info = readFile( inFile ); Double max = getMax( info ); System.out.println( "max: " + max ); Double min = getMin( info ); System.out.println( "min: " + min ); } COM: <s> method for statistics for the medconf score files </s>
funcom_train/43917104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (!(obj instanceof XmlRequestReader)) { return false; } XmlRequestReader other = (XmlRequestReader) obj; return new EqualsBuilder().append(element, other.element).append(version, other.version) .append(serviceId, other.serviceId).isEquals(); } COM: <s> two xml readers considered equal if namespace element and version properties </s>
funcom_train/49410919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IndexItem getIndexItem(String identifier) throws IndexException { IndexItem c; for (Iterator i = indexItemSet.iterator(); i.hasNext(); ) { c = (IndexItem) i.next(); if (c.getIdentifier().equals(identifier)) return c; } throw new IndexException("Index Item for specified identifier " + identifier + " was not found."); } COM: <s> get a index item using the index item id </s>
funcom_train/39566625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop(){ synchronized (stateGuard) { while (true) { if (state == STARTED) { state = STOPPING; break; } else if (state == STOPPED) { throw new IllegalStateException("Tried to stop message store twice!"); } try { stateGuard.wait(); } catch (InterruptedException ie) { } } } myStop(); synchronized (stateGuard) { state = STOPPED; stateGuard.notify(); } } COM: <s> stop the thread </s>