__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/34982957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSex(String newVal) { if ((newVal != null && this.sex != null && (newVal.compareTo(this.sex) == 0)) || (newVal == null && this.sex == null && sex_is_initialized)) { return; } this.sex = newVal; sex_is_modified = true; sex_is_initialized = true; } COM: <s> setter method for sex </s>
funcom_train/36242860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResponseAPDU sendSelect(short fid) throws CardServiceException { byte[] data = { (byte) ((fid >> 8) & 0x000000FF), (byte) (fid & 0x000000FF) }; CommandAPDU capdu = new CommandAPDU(GSM1111.CLA_GSM, GSM1111.INS_SELECT, (byte) 0x00, (byte) 0x00, data, 0); return transmit(capdu); } COM: <s> sends a code select code instruction to the card </s>
funcom_train/28751253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOrdernum(Long newVal) { if ((newVal != null && this.ordernum != null && (newVal.compareTo(this.ordernum) == 0)) || (newVal == null && this.ordernum == null && ordernum_is_initialized)) { return; } this.ordernum = newVal; ordernum_is_modified = true; ordernum_is_initialized = true; } COM: <s> setter method for ordernum </s>
funcom_train/3902704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRequiredForSatisfiedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RollupConsiderationsType_requiredForSatisfied_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RollupConsiderationsType_requiredForSatisfied_feature", "_UI_RollupConsiderationsType_type"), AdlseqV1p3Package.Literals.ROLLUP_CONSIDERATIONS_TYPE__REQUIRED_FOR_SATISFIED, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the required for satisfied feature </s>
funcom_train/18254992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearCoordinates(java.util.Collection collection) { Iterator iter = collection.iterator(); while (iter.hasNext()) { Location a = (Location) iter.next(); if (getContext().isHome(a) && (a instanceof Node)) { ((Node) a).setCoordinate(null); } } } COM: <s> helper method to clear collections agents coordinates </s>
funcom_train/39535045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File getActionDirectory(File projectFile) { File actionsDirectory=null; if(projectFile!=null) { File[] children=projectFile.listFiles(); //getting the actions directory among the child files of the project directory for(File child : children) { if(child!=null && child.getName().equals( FileManager.ACTIONS_DIRECTORY_NAME)) { actionsDirectory=child; break; } } } return actionsDirectory; } COM: <s> returns the actions directory of the given project file </s>
funcom_train/36365657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File f) { if (f.isDirectory()) { return true; } String extension = jpiv2.FileHandling.getFileExtension(f); for(int n=0; n<validExtension.length; n++) { if (extension != null && extension.equalsIgnoreCase(validExtension[n])) { return true; } } return false; } COM: <s> decides whether file is accepted or not </s>
funcom_train/18350478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void pasteFile(File file) throws IOException { File newFile = new File(currentSelectedFile, file.getName()); while (fileNameExists(currentSelectedFile, newFile)) { newFile = autoRename(newFile); } newFile.createNewFile(); copyFile(file, newFile); insertFileIntoModel(currentSelectedNode, newFile); } COM: <s> pastes current file in clipboard into directory </s>
funcom_train/31680119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public L sort(Comparator<E> comparator) { final E[] a = (E[]) fList.toArray(); Arrays.sort(a, fStart, fEnd, comparator); for (int j = fStart; j < fEnd; j++) { fList.set(j, (E) a[j]); } return fList; } COM: <s> sorts the elements of the specified range in place i </s>
funcom_train/41016931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void photoHidden() { if (showPhoto) { photoImage = null; showPhoto = false; if (Settings.isNokiaTouch) setFullScreenMode(inWelcome); addCommands(); invalidate(INV_SHOW); Display.getDisplay(LDIRMidlet.instance).setCurrent(PlaceDetails.getInstance().getForm()); } } COM: <s> rebuild the canvas to show the map and not photos </s>
funcom_train/32111208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(ServletConfig config) throws ServletException { super.init(config); // load Spring framework Web context WebApplicationContext wac = WebApplicationContextUtils .getRequiredWebApplicationContext(config.getServletContext()); // set banking facade bank = (BankingFacade) wac.getBean("bankManager"); } // init COM: <s> initialise spring application context and facade </s>
funcom_train/14011782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void trimX() { if (gridYSize == 1) { Cell[] cellArray = getCellArray(0, false); for (int i = 0; i < gridXSize; ++i) { if (cellArray[i] == null) { gridXSize = i; } } } } COM: <s> special case trim excess null cells from grid x size if the </s>
funcom_train/12837197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putValue(SessionID sessionID, SessionKey key, Serializable value) throws SessionException { if (SessionID.SYSTEM_SESSION_ID.equals(sessionID)) { createSystemSession(); } // No need to check for a return value. If the sessionID is null or if the session // does not exist, a SessionException will be thrown. BaseSession session = getSession(sessionID); session.putValue(key, value); } COM: <s> a convenience method that looks up a session and inserts a key value </s>
funcom_train/39534096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reinitialize() { SVGCanvas canvas=svgHandle.getScrollPane().getSVGCanvas(); if(clips.size()>0) { canvas.removePaintListener(this, true); clips.clear(); } if(selectionItems.size()>0) { //adding all the new clips for(SelectionItem item : selectionItems) { clips.add(new Rectangle(item.getShapeBounds())); } canvas.addLayerPaintListener(SVGCanvas.DRAW_LAYER, this, true); } } COM: <s> reinitializes all the selection items </s>
funcom_train/36459264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int process(Buffer inputBuffer, boolean render) { this.inputBuffer = inputBuffer; /*if (this.inputBuffer.getFormat() == null) { this.inputBuffer.setFormat(inputFormats[0]); } */ try { int status = process(0, render); return status; } catch (Throwable t) { t.printStackTrace(); return PlugIn.BUFFER_PROCESSED_FAILED; } } COM: <s> processes an input buffer </s>
funcom_train/36994012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getSkill(IThing weapon) { if (weapon == null) { throw new NullPointerException("weapon must not be null"); } Class weaponClass = weapon.getClass(); Float skillValue = weaponSkills.get(weaponClass); return skillValue == null ? 0.0f : skillValue.floatValue(); } COM: <s> how good am i at using this type of weapon </s>
funcom_train/49044632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPropertyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ModifyObjectReaction_property_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ModifyObjectReaction_property_feature", "_UI_ModifyObjectReaction_type"), EventPackage.Literals.MODIFY_OBJECT_REACTION__PROPERTY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the property feature </s>
funcom_train/11010951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XWPFTable getTable(CTTbl ctTbl) { for (int i = 0; i < tables.size(); i++) { if (getTables().get(i).getCTTbl() == ctTbl) { return getTables().get(i); } } return null; } COM: <s> get a table by its cttbl object </s>
funcom_train/44898637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void causeNoExceptionLocal() { logger.info("causeNoException"); try { getExTestLocal().causeNoException(); } catch (Throwable t) { logger.error("Unexpected exception 0", t); throw new RuntimeException("Unexpected exception 0", t); } } COM: <s> calls cause no exception in the local bean </s>
funcom_train/1170034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CardList getUnblockedAttackers() { CardList list = new CardList(); Iterator<Card> it = map.keySet().iterator(); while (it.hasNext()) { Card attack = it.next(); CardList block = map.get(attack); if (block.size() == 0) list.add(attack); } return list; } COM: <s> p get unblocked attackers </s>
funcom_train/15565999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected long getNextCounter(){ try{ long counter = 0; File f = new File("ct.bin"); if(f.exists()){ ObjectInputStream is =new ObjectInputStream( new FileInputStream(f) ); counter = is.readLong() + 1; is.close(); } ObjectOutputStream os =new ObjectOutputStream( new FileOutputStream(f) ); os.writeLong(counter); os.close(); return counter; }catch(Exception e){ e.printStackTrace(); } return (int)(Math.random() * 1000000); } COM: <s> graph assigns auto generated ids to the each newly created nodes </s>
funcom_train/936032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getAssemblySitePanel() { if (assemblySitePanel == null) { assemblySitePanel = new JPanel(); assemblySitePanel.setLayout(new BorderLayout()); assemblySitePanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(4,0,4,0)); assemblySitePanel.add(getAssemblySiteLabel(), java.awt.BorderLayout.NORTH); } return assemblySitePanel; } COM: <s> this method initializes j panel5 </s>
funcom_train/44464956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public View create(Element elem) { Object o = elem.getAttributes().getAttribute(StyleConstants.NameAttribute); if (o instanceof Tag) { Tag kind = (Tag) o; if (kind == Tag.CONTENT) { return new MyHTMLContentView(elem); } } return super.create(elem); } COM: <s> return an instance of </s>
funcom_train/21473843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("Migratool".equals(portName)) { setMigratoolEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/50962676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Term evalAsFunctor(Struct g) throws Throwable { try { for (int i=0; i<primitive_args.length; i++) { primitive_args[i] = g.getTerm(i); } return ((Term)method.invoke(source,primitive_args)); } catch (Exception ex) { throw ex.getCause(); } } COM: <s> evaluates the primitive as a functor </s>
funcom_train/2289014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExportPath(String exportPath) { if (exportPath.equals(OpenCms.getSystemInfo().getWebApplicationRfsPath())) { // not allowed because a full static export would delete the opencms directory throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_INVALID_EXPORT_PATH_1, m_name)); } m_exportPath = exportPath; } COM: <s> sets the rfs export path after normalizing </s>
funcom_train/22796469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelFooter() { if (jPanelFooter == null) { jPanelFooter = new JPanel(); jPanelFooter.setLayout(new BorderLayout()); jPanelFooter.add(jLabelTitle, BorderLayout.SOUTH); jPanelFooter.add(getJPanelFooterButtons(), BorderLayout.CENTER); jPanelFooter.add(getJComboBoxMixers(), BorderLayout.EAST); } return jPanelFooter; } COM: <s> this method initializes j panel footer </s>
funcom_train/5669204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAppletInfo() { return "PlotLiveDemoApplet " + PlotBox.PTPLOT_RELEASE + " : Demo of PlotLive.\n" + "By: Edward A. Lee, eal@eecs.berkeley.edu\n" + " Christopher Hylands, cxh@eecs.berkeley.edu\n" + "($Id: PlotLiveDemoApplet.java,v 1.1.1.1 2001/06/21 22:27:29 reubgr Exp $)"; } COM: <s> return a string describing this applet </s>
funcom_train/32094404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAnzGivens() { Component generatorPanel = getParent().getParent(); if (generatorPanel instanceof ConfigGeneratorPanel) { int anz = 0; if (pattern != null) { for (int i = 0; i < pattern.length; i++) { if (pattern[i]) { anz++; } } } ((ConfigGeneratorPanel) generatorPanel).setAnzGivens(anz); } } COM: <s> updates the number of givens textfield in the </s>
funcom_train/8861563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void maybeFireStructureChange(TreePath path, ArrayList<TreePath> expand) { if (expand != null && !expand.isEmpty()) { Enumeration<TreePath> expanded = tree.getExpandedDescendants(path); fireTreeStructureChanged(path); if (expanded != null) while (expanded.hasMoreElements()) tree.expandPath(expanded.nextElement()); expandPaths(expand); } } COM: <s> helper method for tree nodes changed </s>
funcom_train/8326082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Member lookupMemberFromCache(String memberUniqueName) { // first look in defined members for (Member member : getDefinedMembers()) { if (Util.equalName(member.getUniqueName(), memberUniqueName) || Util.equalName( getUniqueNameWithoutAll(member), memberUniqueName) ) { return member; } } return null; } COM: <s> looks up a member whose unique name is code member unique name code </s>
funcom_train/7619087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char getChar(String key, char defaultValue) { unparcel(); Object o = mMap.get(key); if (o == null) { return defaultValue; } try { return (Character) o; } catch (ClassCastException e) { typeWarning(key, o, "Character", defaultValue, e); return defaultValue; } } COM: <s> returns the value associated with the given key or char 0 if </s>
funcom_train/18958681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPipedStreamsFlushImmediately() throws IOException { PipedOutputStream pipedOut = new PipedOutputStream(); PipedInputStream pipedIn = new PipedInputStream(pipedOut); assertEquals(0, pipedIn.available()); pipedOut.write(1); assertEquals(1, pipedIn.available()); pipedOut.write(2); assertEquals(2, pipedIn.available()); assertEquals(1, pipedIn.read()); pipedOut.close(); assertEquals(1, pipedIn.available()); assertEquals(2, pipedIn.read()); assertEquals(0, pipedIn.available()); assertEquals(-1, pipedIn.read()); } COM: <s> internal test this functionality is needed to test streaming </s>
funcom_train/8338846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WabitSwingSession evilDigUpSession() { WabitSwingSession session = null; WabitObject wo = query; while (wo.getParent() != null) { wo = wo.getParent(); } if (wo instanceof WabitWorkspace) { WabitSession owningSession = ((WabitWorkspace) wo).getSession(); if (owningSession instanceof WabitSwingSession) { session = (WabitSwingSession) owningSession; } } return session; } COM: <s> the following code is evil and intended to be temporary </s>
funcom_train/45243086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNumberFloatField getJNumberFloatFieldRelacaoKimura() { if (jNumberFloatFieldRelacaoKimura == null) { jNumberFloatFieldRelacaoKimura = new JNumberFloatField(); jNumberFloatFieldRelacaoKimura.setLocation(new Point(329, 107)); jNumberFloatFieldRelacaoKimura.setFont(new Font("Arial", Font.PLAIN, 12)); jNumberFloatFieldRelacaoKimura.setSize(new Dimension(65, 20)); } return jNumberFloatFieldRelacaoKimura; } COM: <s> this method initializes j number float field relacao kimura </s>
funcom_train/8098042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPrunedWordsToStoplist(SimpleTokenizer tokenizer, int minimumCount) { Alphabet currentAlphabet = getDataAlphabet(); for (int feature = 0; feature < currentAlphabet.size(); feature++) { if (counter.get(feature) < minimumCount) { tokenizer.stop((String) currentAlphabet.lookupObject(feature)); } } } COM: <s> add all pruned words to the internal stoplist of a simple tokenizer </s>
funcom_train/22307734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVerticalAlignment( final int alignment ) { Trace.println( traceChannel_, "setVerticalAlignment(" + alignment + ")" ); switch ( alignment ) { case TableLayout.TOP: case TableLayout.BOTTOM: case TableLayout.CENTER: verticalAlignment_ = alignment; break; default: throw new DetailedIllegalArgumentException( "alignment", new Integer(alignment) ); } } COM: <s> set the vertical alignment </s>
funcom_train/44161568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyTemplate(ActionEvent ae) { setRefreshData(); this.attributes = ReportStyleProps.getDefaultValues("tableext", this.template); Map sessionMap = FacesContext.getCurrentInstance() .getExternalContext().getSessionMap(); sessionMap.remove("/properties.jsp"); } COM: <s> apply template method to apply template </s>
funcom_train/50737069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String decryptString(byte[] b) { try { javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance(this.algorithm); cipher.init(javax.crypto.Cipher.DECRYPT_MODE, this.keySpec); return new String(cipher.doFinal(b)); } catch (Exception e) { log.error("Exception decrypting text: " + toHex(b), e); throw new SystemException("Exception decrypting text: " + toHex(b), e); } } COM: <s> decrypts the given array of bytes to a string </s>
funcom_train/45692399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPartListPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SampleInPatternInfo_partList_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SampleInPatternInfo_partList_feature", "_UI_SampleInPatternInfo_type"), EsxPackage.Literals.SAMPLE_IN_PATTERN_INFO__PART_LIST, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the part list feature </s>
funcom_train/8064956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int countCornersContained(int x, int y, int w, int h) { int cornersHit = 0; if (contains(x, y)) { cornersHit++; } if (contains(x + w, y)) { cornersHit++; } if (contains(x, y + h)) { cornersHit++; } if (contains(x + w, y + h)) { cornersHit++; } return cornersHit; } COM: <s> reply the number of corners of the given rectangle that are inside this </s>
funcom_train/10680768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTimeout() { if (timeout < 0) { timeout = DEFAULT_TIMEOUT; String buf = System.getProperty("jpda.settings.timeout"); if (buf != null) { try { timeout = Long.parseLong(buf); } catch (NumberFormatException e) { throw new TestErrorException(e); } } } return timeout; } COM: <s> returns timeout for jpda tests in milliseconds </s>
funcom_train/14661733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getUpdateValsButton() { if (updateValsButton == null) { updateValsButton = new JButton(); updateValsButton .setText("Update Sampling Configuration (*) after Edit"); updateValsButton.setEnabled(false); updateValsButton.setPreferredSize(new Dimension(310, 26)); updateValsButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { updateSyncedConfigObjects(); } }); } return updateValsButton; } COM: <s> this method initializes update vals button </s>
funcom_train/48936706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeToBZip(int b) throws IOException { //System.out.println("writeToBZip (int b) compressing"); if (bzipstream == null) { bzipstream = new CBZip2OutputStream(output); response.addHeader("Content-Encoding", "bzip"); } bzipstream.write(b); } COM: <s> write the specified byte to our compressed bzip output stream </s>
funcom_train/20889669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(TrafficGeneration tgn) { int result = Math.round((float) (this.delay - tgn.getDelay()) * 20); if (result != 0) { return result; } result = this.getSource().compareTo(tgn.getSource()); if (result != 0) { return result; } result = this.getRecipient().compareTo(tgn.getRecipient()); return result; } COM: <s> compares this object with code obj code in terms of their delay </s>
funcom_train/1310060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyCertified(MessageClient client) { MessageQueue certifiedMessages = client.getCertifiedMessageQueue(); while (!certifiedMessages.isEmpty()) { Message message = certifiedMessages.poll(); synchronized (client.getMessageListeners()) { for (MessageListener listener : client.getMessageListeners()) { sendToListener(message, listener, MessageListener.MESSAGE_EVENT.CERTIFIED); } } synchronized (messageListeners) { for (MessageListener listener : messageListeners) { sendToListener(message, listener, MessageListener.MESSAGE_EVENT.CERTIFIED); } } } } COM: <s> process certified messages to the listeners </s>
funcom_train/51011158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addAnswer() throws Exception { if (answer.equals("")) throw new IllegalDataException("survey.emptyanswer"); try { Connection con = connect(); try { con.setAutoCommit(false); int id = qdb.allocateAnswer(con, qid); adb.insert(con, qid, id, answer, order); con.commit(); return id; } catch (Exception e) { con.rollback(); throw e; } finally { con.close(); } } catch (Exception e) { Log.error(e); throw e; } } COM: <s> adds a answer to the current question </s>
funcom_train/7269839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private void addFileTransfer(FileTransfer transfer, List l, List lazy) { // File f = transfer.getFile(); // // if(f == null) { // if(transfer instanceof LazyFileTransfer) // lazy.add(((LazyFileTransfer)transfer).getFileTransfer()); // } else { // addFile(l, f); // } // } COM: <s> adds the specified file transfer to the lists </s>
funcom_train/531520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String serverUrl(String str) { int i = str.indexOf("//"); if (i< 0) return str; str = str.substring(i+2); i = str.indexOf("/"); if (i< 0) return str; return str.substring(i); } COM: <s> find the some file </s>
funcom_train/2557426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Value read(Type type, NodeMap node, Map map) throws Exception { Class actual = readValue(type, node); Class expect = type.getType(); if(expect.isArray()) { return readArray(actual, node); } if(expect != actual) { return new ObjectValue(actual); } return null; } COM: <s> this is used to resolve and load a class for the given element </s>
funcom_train/34851552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOnActivatedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TransitionBP_onActivated_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TransitionBP_onActivated_feature", "_UI_TransitionBP_type"), PetriPackage.Literals.TRANSITION_BP__ON_ACTIVATED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the on activated feature </s>
funcom_train/50335041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Section getSectionFromBlockAndSeq(jmri.Block b, int seq) { for (int i = 0; i<mTransitSectionList.size(); i++) { TransitSection ts = mTransitSectionList.get(i); if (ts.getSequenceNumber()==seq) { Section s = ts.getSection(); if (s.containsBlock(b)) return s; } } return null; } COM: <s> returns a section from one of its blocks and its sequence number </s>
funcom_train/22233291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDirection(float x, float y, float z) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_DIRECTION_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("ConeSound3")); ((ConeSoundRetained)this.retained).setDirection(x,y,z); } COM: <s> sets this sounds direction from the three values provided </s>
funcom_train/3582626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initializeLocations() { try { for (Iterator iter = baseGraph.getVertices().iterator(); iter.hasNext(); ) { Vertex v = (Vertex) iter.next(); Coordinates coord = (Coordinates) v.getUserDatum(getBaseKey()); if (coord == null) { coord = new Coordinates(); v.addUserDatum(getBaseKey(), coord, UserData.REMOVE); } if (!dontmove.contains(v)) initializeLocation(v, coord, currentSize); initialize_local_vertex(v); } } catch(ConcurrentModificationException cme) { initializeLocations(); } } COM: <s> this method calls tt initialize local vertex tt for each vertex </s>
funcom_train/19973322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updatePreferences() { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); shadowSd = false; try { shadowSd = prefs.getBoolean("shadowSd", false); } catch (Exception e) { Log.i(TAG, "Pref: bad shadowSd"); } Log.i(TAG, "Prefs: shadowSd " + shadowSd); } COM: <s> read our application preferences and configure ourself appropriately </s>
funcom_train/3391356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeConstructorHeader(ConstructorDoc constructor, boolean isFirst) { if (! isFirst) { writer.printMemberHeader(); } writer.println(); String erasureAnchor; if ((erasureAnchor = getErasureAnchor(constructor)) != null) { writer.anchor(erasureAnchor); } writer.anchor(constructor); writer.h3(); writer.print(constructor.name()); writer.h3End(); } COM: <s> write the constructor header for the given constructor </s>
funcom_train/24002965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void println(long x, final AsyncCallback<Boolean> callback) { synchronized (this) { print(x, new AsyncCallback<Boolean>() { public void onSuccess(Boolean b) { newLine(callback); } public void onFailure(Throwable t) { callback.onFailure(t); } } ); } } COM: <s> prints a long and then terminate the line </s>
funcom_train/18113711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private synchronized String getNextTag() { int nr = Integer.parseInt(tag.substring(1, tag.length() - 1)); nr++; tag = "" + nr; int nrzeros = 4 - tag.length(); for (int i = 0; i < nrzeros; i++) { tag = "0" + tag; } tag = "a" + tag + " "; return tag; } COM: <s> calculates a new tag </s>
funcom_train/15923098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node typeCheck(ContextVisitor tc) { TypeSystem ts = tc.typeSystem(); Type type = null; for (Expr e : elements) { if (type == null) { type = e.type(); } else { try { type = ts.leastCommonAncestor(type, e.type(), tc.context()); } catch (SemanticException e1) { // Leave type unchanged } } } if (type == null) { return type(ts.Null()); } else { return type(ts.arrayOf(type)); } } COM: <s> type check the initializer </s>
funcom_train/21014969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveSlider ( int x, int y ) { calcSlider ( ); if ( slideArea.contains ( x, y ) ) { if ( y < yOuter ) { yPointer = yOuter; } else if ( y > ( yOuter + hOuter ) ) { yPointer = yOuter + hOuter; } else { yPointer = y; } } calcValue ( ); } COM: <s> moves slider to the actual mouse position by dragging the mouse </s>
funcom_train/24595838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sync(int fps) { long timeNow; long gapTo; long savedTimeLate; gapTo = 1000 / fps + timeThen; timeNow = System.currentTimeMillis(); savedTimeLate = timeLate; try { while ( gapTo > timeNow + savedTimeLate ) { Thread.sleep(1); timeNow = System.currentTimeMillis(); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); } if ( gapTo < timeNow ) timeLate = timeNow - gapTo; else timeLate = 0; timeThen = timeNow; } COM: <s> best sync method that works reliably </s>
funcom_train/27975520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Response handleRequest(final Request request) { Class messageType = request.getClass(); Set<Module> handlers = getFramework().getModuleRegistry().getMessageHandlers( messageType ); if ( handlers.isEmpty() ) { return new Failure( "No handler for message type: " + messageType.getName() ); } MessageHandler handler = handlers.iterator().next(); return handler.handle( request ); } COM: <s> sends a code request code to an appropriate code message handler code </s>
funcom_train/50688018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { while (m_hWebSession.getServletWnd_top() != this) { m_hWebSession.getServletWnd_top().close(); } m_hWebSession.m_hServletWnd_top = m_hServletWnd_parent; m_bClosed = true; m_hServletWnd_parent = null; } COM: <s> this method will close this window and all windows on top of this </s>
funcom_train/4544297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int set(int pos) { while (pos >= capacity) { doubleCapacity(); } int windex = pos >> 5; int mask = 0x80000000 >>> (pos & 0x1F); int word = map[windex]; int result = (word & mask) == 0 ? 0 : 1; map[windex] = (word | mask); return result; } COM: <s> sets pos and returns old value </s>
funcom_train/2401733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRowOriginalPosition(int rowIndex) { Object row = getDataList().get(rowIndex); int position = -1; for (int i = 0; i < getOriginalPositions().size(); i++) { position = i; if (getOriginalPositions().get(i) == row) break; } return position; } COM: <s> get original position of the row in the data model </s>
funcom_train/13286587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPane2() { if (jScrollPane2 == null) { jScrollPane2 = new JScrollPane(); jScrollPane2.setBounds(new Rectangle(15, 194, 587, 169)); jScrollPane2.setViewportView(getBeschreibungTxt()); jScrollPane2.setPreferredSize(new Dimension(230, 18)); } return jScrollPane2; } COM: <s> this method initializes j scroll pane2 </s>
funcom_train/41096740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activateGameManager(){ // turn off GameMenu thread if( _gameManager == null ){ try{ _gameManager = new GameManager(); } catch( Exception e ){ e.printStackTrace(); } } if( _gameManager.hasRunningGame() ) _gameManager.resume(); _currentDisplay = _gameManager; activateDisplayable( _gameManager ); } COM: <s> either start the game or resume the game </s>
funcom_train/7620067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processNextLoader() { LoadListener loader = null; synchronized (mLoaderQueue) { loader = mLoaderQueue.peek(); } if (loader != null) { CallbackProxy proxy = loader.getFrame().getCallbackProxy(); String hostname = loader.proxyAuthenticate() ? mNetwork.getProxyHostname() : loader.host(); String realm = loader.realm(); proxy.onReceivedHttpAuthRequest(this, hostname, realm); } } COM: <s> process the next loader in the queue helper method </s>
funcom_train/5804304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceCurrentAssetRecord(OnmsNode scannedNode) { scannedNode.getAssetRecord().setId(this.getAssetRecord().getId()); scannedNode.setId(this.m_id); //just in case this.setAssetRecord(scannedNode.getAssetRecord()); } COM: <s> simply replaces the current asset record with the new record </s>
funcom_train/3512785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActionListener getFindInProjectAction() { if(this.findInProjectAction == null) { this.findInProjectAction = new ActionListener() { public void actionPerformed(ActionEvent evt) { TideBrowse.this.doSearch(view, jEdit.getFirstBuffer()); } }; } return this.findInProjectAction; } COM: <s> gets the find in project action attribute of the tide browse object </s>
funcom_train/22578479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void formatException(StringBuilder sb, LoggingEvent event) { String[] s = event.getThrowableStrRep(); if (s != null) { int len = s.length; for(int i = 0; i < len; i++) { sb.append(s[i]); sb.append(Layout.LINE_SEP); } } } COM: <s> format the logging event exception and append it to the buffer </s>
funcom_train/33751177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getValidationMessage(Errors errors, String fieldName) { String message = ""; FieldError fieldError = errors.getFieldError(fieldName); if (fieldError != null) { message = messageSource.getMessage(fieldError.getCode(), null, "This field is invalid", Locale.ENGLISH); } return message; } COM: <s> get the field error validation message from the underlying message source </s>
funcom_train/15582562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addExercise(Exercise ex) { if (ex.RecordIndex() == Exercise.RECORDINDEX_UNSET) { System.out.println("Add exercise with record index not set"); RecordStoreManager.WriteExercise(ex); } else { System.out.println("Add exercise with record index set"); } exercises.addElement(ex); } COM: <s> add an exercise to the list of exercise </s>
funcom_train/26467400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(MetaType type) { type = getBaseType(type); if (type.isPrimitive()) { return true; } String[] splitted = StringHelper.splitLast(type.getName(), '.'); if (!shouldCreateImport(splitted[0])) { return true; } Package px = (Package)packages.get(splitted[0]); if (px != null) { if (px.contains(splitted[1])) { return true; } } return false; } COM: <s> returns true if an imports statement will be or has been </s>
funcom_train/37144786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFlaggedDates(Date... flagged) { // Contract.asNotNull(flagged, "must not be null"); SortedSet<Date> oldFlagged = flaggedDates.getSelection(); if (flagged != null) { for (Date date : flagged) { flaggedDates.addSelectionInterval(date, date); } } firePropertyChange("flaggedDates", oldFlagged, flaggedDates.getSelection()); } COM: <s> adds the dates to the flags </s>
funcom_train/1387276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_RouteSearchBox_Num0() throws Throwable { MainPage mp = (MainPage) getActivity(); final EditText routeSearchBox = (EditText) mp.findViewById(com.busstopalarm.R.id.RouteSearchBox); runTestOnUiThread(new Runnable() { public void run() { routeSearchBox.performClick(); } }); assertEquals("Route Search Box starts not empty", "", routeSearchBox.getText().toString()); } COM: <s> tests if the route search box is initially empty </s>
funcom_train/17084423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBotOpciones() { if (botOpciones == null) {//GEN-END:|40-getter|0|40-preInit // write pre-init user code here botOpciones = new Command("Opciones", "Configuraciones del Juego", Command.ITEM, 0);//GEN-LINE:|40-getter|1|40-postInit // write post-init user code here }//GEN-BEGIN:|40-getter|2| return botOpciones; } COM: <s> returns an initiliazed instance of bot opciones component </s>
funcom_train/17894904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConfiguration(long probeId, Map<String, String> configuration) { log.info("setting configuration for probe: " + probeId); Probe probe = probes.get(probeId); probe.setConfiguration(configuration); if (measurementProvider != null) { measurementProvider.setConfiguration(probe, configuration); } } COM: <s> set the configuration for the given probe </s>
funcom_train/50865795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createResupplyMission() { // Create new resupply mission and dispose dialog. Settlement destination = (Settlement) destinationCB.getSelectedItem(); MarsClock arrivalDate = getArrivalDate(); Resupply newResupply = new Resupply(arrivalDate, destination); populateResupplyMission(newResupply); Simulation.instance().getResupplyManager().addNewResupplyMission(newResupply); dispose(); } COM: <s> create the new resupply mission </s>
funcom_train/18544075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String addSecondWeaponHead() { String text = ""; if (p_props.containsKey(PropertyNames.SECONDWEAPONHEAD)) { String swhBonus = (String) p_props.get(PropertyNames.SECONDWEAPONHEAD); if (swhBonus.equals("same") || (swhBonus.equals("less"))){ return text; } text = "(+" + swhBonus + ") "; } return text; } COM: <s> if the item has a second weapon head print its bonus </s>
funcom_train/37414223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initResources() throws ServletException { try { resources = MessageResources.getMessageResources(resourceName); } catch (MissingResourceException e) { sLog.error("Cannot load internal resources from '" + resourceName + "'", e); throw new UnavailableException ("Cannot load internal resources from '" + resourceName + "'"); } } COM: <s> initialize our internal message resources bundle </s>
funcom_train/22077102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean save(Variable variable) throws Exception { Application currentAppli = (Application) ExecutionContext.get().getSession().getAttribute( ConsoleCst.CURRENT_APPLICATION); boolean res = variableService.save(variable,currentAppli.getVariables()); ExecutionContext.get().getSession().setAttribute(ConsoleCst.IS_APPLICATION_MODIFIED,ConsoleCst.APPLICATION_MODIFIED); return res; } COM: <s> save a new variable </s>
funcom_train/5245110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newSentMessage(Message msg) { List<Message> msgl = getOutbox(); boolean done = false; int i = 0; while (i < msgl.size()) { if (msg.compareTo(msgl.get(i)) == 0) { done = true; break; } else if (msg.compareTo(msgl.get(i)) < 0) { msgl.add(i, msg); done = true; break; } i++; } if (! done) { msgl.add(i, msg); } setOutbox(msgl); } COM: <s> add a new sent message to the agents outbox </s>
funcom_train/49626682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkVariant(final Locale locale, final String var) { String variant = null; if ((var != null) && !var.equals("")) { variant = var; } if ((variant == null) && (locale.getVariant() == null)) { return true; } if (((variant != null) && (locale.getVariant() != null)) && variant.equalsIgnoreCase(locale.getVariant())) { return true; } return false; } COM: <s> checks if the variants match </s>
funcom_train/34528781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void importProject(ProjectDesigner designer, File archiveFile) throws Exception { InforamaContext ctx = InforamaContext.getInstance(); ProjectMgrConfiguration configuration = designer.getConfiguration(); ProjectMgr projectMgr = ctx.getProjectMgr(configuration); String projectName = designer.getProjectName(); ProjectCompiler.importProject(ctx, projectMgr, archiveFile, projectName); } COM: <s> imports a project to the location defined by </s>
funcom_train/36827154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { //1. system gets the airports to search from airports = coms.sQLGetAirports(); // 2. system creates the new Search Flights view SearchFlightsView gui = new SearchFlightsView(customer, airports); gui.go(); // 3. system opens the new Search Flights view view.dispose(); // 4. system exits the current view } COM: <s> use case to update the gui to display the search flights view </s>
funcom_train/31309331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPreferences(String compName, Vector pref, String status) { if(status.equals("0")||status.equals("1")) { setPreferences(compName, "0"); Enumeration e = pref.elements(); while(e.hasMoreElements()) { comps.put(compName+"_"+(String)e.nextElement(), status); } saveProperties(); } } COM: <s> sets the changes for one component preferences </s>
funcom_train/51193200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSecond(short second) throws OperationNotSupportedException { if (second > 60) { String err = "seconds " + second + " must be less than 60"; throw new IllegalArgumentException(err); } else if (second < 0) { String err = "seconds "+second+" cannot be negative."; throw new IllegalArgumentException(err); } _second = second; } COM: <s> sets the seconds field for this date time type not including the </s>
funcom_train/19036525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PostFolderCollection getAllPostFolders() { PostFolderCollection allPostFolders = new PostFolderCollection(); Iterator i = this.folders.values().iterator(); StoredPostFolder tempPostFolder; while(i.hasNext()) { tempPostFolder = (StoredPostFolder)i.next(); allPostFolders.addPostFolder(tempPostFolder.getFolder()); } return allPostFolders; } COM: <s> returns all the post folders </s>
funcom_train/31431309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setOperations(List<Operation> ops) { List<Operation> ops2 = new ArrayList<Operation>(ops.size()); for (Operation op : ops) { ops2.add(op); } //Collections.copy(ops2, ops); Collections.sort(ops2); this.operations = ops2; } COM: <s> this sorts the list of operations </s>
funcom_train/31929716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int readHexValFromBuffer(int start) throws IOException { int result = 0; for (int i = 0; i < 8; i++) { int hexVal = hexToInt(buffer[start + i]); if (hexVal == -1) break; result <<= 4; result |= hexVal; } return result; } COM: <s> read a hexadecimal value from the buffer </s>
funcom_train/2993859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSelectedSwatch(int index) { for (int i=0; i<Ns; i++) { lowerLeftLineColor[i] = Color.black; upperRightLineColor[i] = Color.white; } if (index >= 0) { lowerLeftLineColor[index] = Color.white; upperRightLineColor[index] = Color.black; } repaint(); } COM: <s> presses the swatch with the specified index which correspond </s>
funcom_train/12922922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VideoFormat getCodec() { VideoFormat value; switch (codec) { case Coder.BIT2 | Coder.BIT0: value = VideoFormat.VP6ALPHA; break; case Coder.BIT2: value = VideoFormat.VP6; break; case Coder.BIT1: value = VideoFormat.H263; break; case Coder.BIT0 | Coder.BIT1: value = VideoFormat.SCREEN; break; default: throw new IllegalStateException(); } return value; } COM: <s> get the format used to encode the video data </s>
funcom_train/38224184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNest() throws Exception { loadOntology( "/ontologies/nest.xml" ); runCategorisationTest( "/documents/apple.xml", new String[]{ "co=APPLE,sc=100,crel=100,drel=100,defrel=100,span=[1]", "co=VEG,sc=100,crel=100,drel=100,defrel=100,span=[1]", "co=FRUIT,sc=100,crel=100,drel=100,defrel=100,span=[1]"} ); } COM: <s> tests matching against nested rules </s>
funcom_train/5265191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public PrivateKey decodeRSAPrivateKey(byte[] ekey) { try { PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(ekey); KeyFactory factory = KeyFactory.getInstance("RSA", "BC"); return (RSAPrivateKey) factory.generatePrivate(spec); } catch (Throwable t) { Logger.getLogger("").log(Level.SEVERE, null, t); assert false; return null; } } COM: <s> convert a byte array to a rsa private key </s>
funcom_train/16630614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getButton_add_komplex() { if (button_add_komplex == null) { button_add_komplex = new JButton("add_Komplex"); button_add_komplex.setActionCommand("erstelle"); button_add_komplex.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("add_komplex geklickt"); map.add_komplex(); } }); } return button_add_komplex; } COM: <s> this method initializes button add komplex </s>
funcom_train/3169437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void subtractElements(int to, PrimArithmeticArray other, int count, int from) { int n = Math.min(other.count() - from, count() - to); if (count > n) { throw new IndexOutOfBoundsException(); } if (count >= 0) { n = count; } subtractData(to, other, from, n); } COM: <s> arithmetic subtraction of the respective elements of other </s>
funcom_train/32959989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClearVariablesInPushedContext() { te.setValue("#{var1}", "pie"); te.pushContext(); te.setValue("#{var2}", "zoom"); Object result1 = te.evaluate("#{var1}#{var2}"); // Pie and zoom should be available assertEquals(result1, "piezoom" ); // ClearVariables should only clear pie te.clearVariables(); // Only pie is available now Object result2 = te.evaluate("#{var1}#{var2}"); assertEquals(result2, "pie" ); } COM: <s> clear pushed variable test should only clear current context not pushed context </s>
funcom_train/39167208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension preferredLayoutSize(Container target) { int membersCnt = target.getComponentCount(); Dimension[] componentPrefSizes = new Dimension[membersCnt]; //store the sizes for(int i = 0; i < membersCnt; i++){ componentPrefSizes[i] = target.getComponent(i).getPreferredSize(); } return getCompositeSize(target, componentPrefSizes); } COM: <s> returns the preferred dimensions for this layout given the components </s>
funcom_train/20364070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getChildPoints(String childName) { if ( !children.contains(childName) ) { throw new IllegalArgumentException("Unknown child skill : "+childName+" in " + getName()); } else if ( childrenPoints.containsKey(childName) && getPoints()==6 ) { return childrenPoints.get( childName ) ; } else { return 0; } } COM: <s> returns the points of a specific child skill </s>