__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/7641778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IAndroidTarget getSelected() { if (mTable == null || mTable.isDisposed()) { return null; } for (TableItem i : mTable.getItems()) { if (i.getChecked()) { return (IAndroidTarget) i.getData(); } } return null; } COM: <s> returns the selected item </s>
funcom_train/35751565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelCell() { if (jPanelCell == null) { jPanelCell = new JPanel(); jPanelCell.setLayout(new BorderLayout()); jPanelCell.setSize(new Dimension(300, 33)); jPanelCell.setPreferredSize(new Dimension(300, 25)); jPanelCell.add(getJPanelLeft(), BorderLayout.WEST); jPanelCell.add(getJPanelContent(), BorderLayout.CENTER); opacify(jPanelCell); } return jPanelCell; } COM: <s> this method initializes j panel cell </s>
funcom_train/8559555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Expire getExpire() { try { if ( this.expire == null ) { this.expire = (FileWatchExpire)ExpireFactory .getExpire( this, ExpireFactory.FILE_WATCH_EXPIRE ); this.expire.setURL( this.getPortletConfig().getURL() ); } return this.expire; } catch ( JetspeedException e ) { logger.error("Exception", e); return null; } } COM: <s> expire this portlet if its url changes on disk </s>
funcom_train/46113903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addContent (Element elem) { if ( phOnly ) { tf.append(TagType.PLACEHOLDER, "code", buildStartTag(elem)); IDMLFilter.processContent(elem, tf); tf.append(TagType.PLACEHOLDER, "code", buildEndTag(elem)); } else { tf.append(TagType.OPENING, "code", buildStartTag(elem)); IDMLFilter.processContent(elem, tf); tf.append(TagType.CLOSING, "code", buildEndTag(elem)); } status++; // contentNode = elem; } COM: <s> adds a content element to the text unit </s>
funcom_train/11658836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setContextURLs(JellyContext context) throws JellyTagException { if ((context.getCurrentURL() == null || context.getRootURL() == null) && scriptURL != null) { if (context.getRootURL() == null) context.setRootURL(scriptURL); if (context.getCurrentURL() == null) context.setCurrentURL(scriptURL); } } COM: <s> set the contexts root and current url if not present </s>
funcom_train/3990030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUzasadnieniePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SkierowaniePoradniaSpec_uzasadnienie_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SkierowaniePoradniaSpec_uzasadnienie_feature", "_UI_SkierowaniePoradniaSpec_type"), PrzychodniaPackage.Literals.SKIEROWANIE_PORADNIA_SPEC__UZASADNIENIE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the uzasadnienie feature </s>
funcom_train/17849897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColumnName(int column) { if (column == 0) { return mLocalizer.msg("No", "No"); } else if (column == 1) { return mLocalizer.msg("Description", "Description"); } else { return mLocalizer.msg("Value", "Value"); } } COM: <s> return the column names </s>
funcom_train/45740672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItemCertSubject () { if (stringItemCertSubject == null) {//GEN-END:|40-getter|0|40-preInit // write pre-init user code here stringItemCertSubject = new StringItem ("Subject:", null);//GEN-LINE:|40-getter|1|40-postInit // write post-init user code here }//GEN-BEGIN:|40-getter|2| return stringItemCertSubject; } COM: <s> returns an initiliazed instance of string item cert subject component </s>
funcom_train/11744170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void receive(Message message) { try { CayenneEvent event = messageObjectToEvent((Serializable) message.getObject()); if (event != null) { onExternalEvent(event); } } catch (Exception ex) { // TODO: Andrus, 2/8/2006 logging... Log4J was removed to make this usable on // the client } } COM: <s> implementation of org </s>
funcom_train/10874050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getAndSet(int index) { assert index >= 0 && index < numBits; int wordNum = index >> 6; // div 64 int bit = index & 0x3f; // mod 64 long bitmask = 1L << bit; boolean val = (bits[wordNum] & bitmask) != 0; bits[wordNum] |= bitmask; return val; } COM: <s> sets a bit and returns the previous value </s>
funcom_train/29986523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ClassDoc getClassDoc(final ClassDoc originalDoc) { if (originalDoc == null) { return null; } Object found = get(originalDoc); if (found == null) { found = this.factory.createClassDoc(originalDoc); put(originalDoc, found); } return (ClassDoc) found; } COM: <s> returns a wrapped instance of the supplied class doc object </s>
funcom_train/35314879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedIndices(int[] indices) { ListSelectionModel sm = getSelectionModel(); sm.clearSelection(); int size = getModel().getSize(); for (int i : indices) { if (i < size) { sm.addSelectionInterval(i, i); } } } COM: <s> changes the selection to be the set of indices specified by the given </s>
funcom_train/17848881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void storeData(ObjectOutputStream out) throws IOException { out.writeInt(1); //write version out.writeObject(getId()); out.writeObject(getName()); out.writeObject(getTitleValue()); out.writeObject(getContentValue()); out.writeObject(getEncodingValue()); } COM: <s> saves this configuration in an object output stream </s>
funcom_train/35838699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setNodePosition(PCSession session, String sViewID, String sNodeID, Point p) throws SQLException { // // DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()) ; // // boolean updated = DBViewNode.setNodePosition(dbcon, sViewID, sNodeID, p, session.getUserID()); // // getDatabaseManager().releaseConnection(session.getModelName(),dbcon); return true; } COM: <s> sets the position of the node with the given id in this view </s>
funcom_train/44324186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printLine() { TestUtil.info(""); TestUtil .info("-------------------------------------------------------"); } COM: <s> method print line </s>
funcom_train/27905047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void cekTypeAssignment(Node ex){ //System.out.println("cek type "+ /*ex.getValue()+*/" for assignment"); SymbolTable table = getSymbolTable(); String idSymb = symStack.top(); if (table.getSymbol(idSymb).getType() != typeStack.top()) typeError(ex, "type mismatched in assignment statement"); } COM: <s> method to check expression for assignment need </s>
funcom_train/6268996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String formatToString(Format format) { Dimension tempDim; String returnStr; tempDim = ((VideoFormat)format).getSize(); returnStr = (int)tempDim.getWidth() + "x" + (int)tempDim.getHeight() + " (" + format.getEncoding() + ")"; //System.out.println(returnStr); return returnStr; } COM: <s> gives a string representation of the given video format </s>
funcom_train/29699543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getProtomechsLeft(int playerId) { Player player = this.getPlayer( playerId ); int remaining = 0; for (Enumeration<Entity> i = entities.elements(); i.hasMoreElements();) { final Entity entity = i.nextElement(); if ( player.equals(entity.getOwner()) && entity.isSelectableThisTurn() && entity instanceof Protomech ) { remaining++; } } return remaining; } COM: <s> returns the number of remaining selectable protomechs owned by a player </s>
funcom_train/34822991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getHierarchicalPath(V vertex, String currentPath){ for(Object v : vertexSet()){ V castV = (V)v; String newPath = currentPath + castV.getName(); if(castV == vertex) return newPath; newPath += "/"; if(vertex.getGraphDescription() != null){ newPath = vertex.getGraphDescription().getHierarchicalPath(vertex, newPath); if(newPath != null) return newPath; } } return null; } COM: <s> gives the path of a given vertex </s>
funcom_train/24243138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean compareTo(String s, ArrayList al) { boolean compareTo = false; for (int i = 0; i < al.size(); i++) { if (al.get(i).toString().trim().equalsIgnoreCase(s.trim())) { al.remove(i); compareTo = true; } } return compareTo; } COM: <s> compare value of a string with an array list </s>
funcom_train/1406486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMarker(final Marker marker, final int dataSetIndex, final int startIndex, final int endIndex, final int n) { getParameter(ChartMarkersParameter.class).addMarker(marker, dataSetIndex, startIndex, endIndex, n); } COM: <s> add a marker s to the plot </s>
funcom_train/22549701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rank(Collection<? extends IpPort> hosts) { if(needsPongRanking()) { pinger.rank( hosts, // cancel when connected -- don't send out any more pings new Cancellable() { public boolean isCancelled() { return !needsPongRanking(); } } ); } } COM: <s> rank the collection of hosts </s>
funcom_train/17806104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMaxBandwidth_mbPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PhysicalConnection_MaxBandwidth_mb_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PhysicalConnection_MaxBandwidth_mb_feature", "_UI_PhysicalConnection_type"), CtbPackage.Literals.PHYSICAL_CONNECTION__MAX_BANDWIDTH_MB, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the max bandwidth mb feature </s>
funcom_train/46009188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSchema(HttpServletRequest request) { String schema = (String) request.getParameter("schema"); sioSet = false; if (USIP_OSP_Util.stringFieldHasValue(schema)) { try { SchemaInformationObject sio = SchemaInformationObject .lookUpSIOByName(schema); if (sio != null) { this.schema = schema; this.schemaDisplayName = sio.getSchema_organization(); this.sioSet = true; } } catch (Exception e) { errorMsg += "Invalid Database Selected.<br/>"; OSPErrors.storeWebErrors(e, request); } } } COM: <s> sets the schema selected to be the one that was passed in </s>
funcom_train/29041260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected EObject getMatchedEObject(EObject from) { EObject matchedEObject = null; final Match2Elements matchElem = eObjectToMatch.get(from); if (matchElem != null && from.equals(matchElem.getRightElement())) matchedEObject = matchElem.getLeftElement(); else if (matchElem != null) matchedEObject = matchElem.getRightElement(); return matchedEObject; } COM: <s> return the left or right matched eobject from the one given </s>
funcom_train/1574157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initOutputManager(final boolean showDisplayOutputs) { if ( outputManager == null ) { outputManager = new OutputManager(this, showDisplayOutputs); // TODO No need to call dispose here, as it is now called when the // outputManager needs to rebuild the views // Mais cela pose un probolème... (cf. PerspectiveManager) } } COM: <s> inits the output manager </s>
funcom_train/28224888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ControlPanel createControlPanel() { GridLayout glCPanel = new GridLayout(); glCPanel.marginHeight = 0; ControlPanel newControlPanel = new ControlPanel(shell, SWT.NORMAL, control); newControlPanel.setLayout(glCPanel); GridData gdCPanel = new GridData(GridData.FILL_BOTH); gdCPanel.minimumWidth = CONTROL_PANEL_MIN_WIDTH; newControlPanel.setLayoutData(gdCPanel); return newControlPanel; } COM: <s> creates the control panel that is everything right of the canvas </s>
funcom_train/25331984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testVarType() { VariationType varType = new VariationType(); DAVariation instance = new DAVariation(); assertNull(instance.getType()); instance.setVarType(varType); assertNotNull(instance.getType()); assertSame(instance.getType(), varType); } COM: <s> test of set var type method of class davariation </s>
funcom_train/8901230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calculateOutputValue(float[] inputValues){ float net = weights[0]; //bias value for(int i=0; i<inputValues.length; i++){ net = net + (inputValues[i] * weights[i + 1]); } outputValue = (float)activationFunction.functionValue(net); } COM: <s> method that calculate the output value of the neuron using the input values </s>
funcom_train/45737046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializePluginStack() throws OdbgenException { //Initialize the main generator. this._mainGenerator.initializeMainGenerator(this, this._xmlSchema, this._pluginStack); //Initialize all plugins for(Plugin plugin : this._pluginStack){ plugin.initialize(this._mainGenerator); } } COM: <s> initializes all plugins currently in the stack </s>
funcom_train/8079398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (m_Committee == null) { return "Crate: No model built yet."; } StringBuffer text = new StringBuffer(); text.append("Crate base classifiers: \n\n"); for (int i = 0; i < m_Committee.size(); i++) text.append(((Classifier) m_Committee.get(i)).toString() + "\n\n"); text.append("Number of classifier in the ensemble: "+m_Committee.size()+"\n"); return text.toString(); } COM: <s> returns description of the crate classifier </s>
funcom_train/12155005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void messageRecieved(int to, NodeAnnouncePkt message) { if (!discoveryComplete) { NodeAnnounce msg = NodeAnnounce.parseNodeAnnouncePkt((NodeAnnouncePkt) message); int nodeId = msg.getHeader().getSourceID(); nodes.put(nodeId, new Node(msg.getType(), nodeId)); } } COM: <s> process an incoming service advertisement pkt </s>
funcom_train/44487586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String exportConnectionDropList(){ StringBuffer returnData = new StringBuffer("Getting connection data"); String fileName = getHtmlConnectionListHref(); returnData.append("\nExporting data for " + nvl(fileName)); String dropList = getHtmlConnectionList(); // export the connection radio buttons writeDataToDisk(nvl(dropList), fileName); returnData.append("\nExporting connection drop list complete"); return returnData.toString(); } COM: <s> exports the connection drop list to a file </s>
funcom_train/9146830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double singularValue(int order) { if (order >= mOrder) { String msg = "Maximum order=" + (mOrder-1) + " found order=" + order; throw new IllegalArgumentException(msg); } return columnLength(mRowVectors,order) * columnLength(mColumnVectors,order); } COM: <s> returns the singular value for the specified order </s>
funcom_train/9184242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void replicateAndPush(String tsName, LimeServerID host) { DracoTS dts = DracoTS.get(tsName); RPTuple rpt = (RPTuple)dts.rdp(RPTuple.RP2_LOCAL_TEMPLATE); //replicate it and push it Location target = new Location(host); RPTuple newrpt = (RPTuple) rpt.replicate(target); dts.pushReplica(new ShareTuple[]{newrpt}, target); } COM: <s> replicate the replication policys replication policy and </s>
funcom_train/19179852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reorderQueries() { java.util.List queries; queries = new ArrayList(); for (int loop = 0; loop < querySelection.getItemCount(); ++loop) { queries.add(querySelection.getItemAt(loop)); } ReorderDialog setOrder = new ReorderDialog(this, queries); if (setOrder.isReordered()) { rebuildSQLListing(setOrder.getAsOrdered()); } } COM: <s> allow the user to place the queries into a particluar order </s>
funcom_train/10244136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void select (int index) { checkWidget(); if (index == -1) { table.deselectAll (); text.setText (""); //$NON-NLS-1$ return; } if (0 <= index && index < table.getItemCount()) { if (index != getSelectionIndex()) { text.setText (table.getItem (index).getText()); text.setImage(table.getItem (index).getImage()); //text.selectAll (); table.select (index); table.showSelection (); } } } COM: <s> selects the item at the given zero relative index in the receivers </s>
funcom_train/7796410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected StructuredDocumentEvent regionCheck(IStructuredDocumentRegion oldNode, IStructuredDocumentRegion newNode) { final StructuredDocumentEvent event = super.regionCheck(oldNode, newNode); if (event instanceof RegionChangedEvent) { RegionChangedEvent changedEvent = (RegionChangedEvent) event; if (changedEvent.getRegion().getType() == PHPRegionContext.PHP_CONTENT) { oldNode.setRegions(newNode.getRegions()); } } return event; } COM: <s> change php script regions nodes </s>
funcom_train/13128191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet submitQuery(String sql_string) { ResultSet result = null; if (!is_connected) { System.err.println("Must start the Database connection before submitting updates."); return null; } try { statement = connection.createStatement(); result = statement.executeQuery(sql_string); } catch (SQLException ex) { ex.printStackTrace(); return null; } return result; } COM: <s> execute single select query </s>
funcom_train/13196653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(double x, double y, double w, double h) { /* an area is in the Image if it's in any part of the image */ for (int i = 0; i < l.size(); i++) { GeneralPath gp = get(i); if (gp.contains(x, y, w, h)) { return true; } } return false; } COM: <s> tests if the interior of the image2 d contains the interior of a </s>
funcom_train/33430390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null || !(obj instanceof WgsPoint)) { return false; } final WgsPoint p = (WgsPoint) obj; return lat == p.getLat() && lon == p.getLon(); } COM: <s> check if two wgs point objects refer to the same coordinates </s>
funcom_train/3157925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object waitForReturnValue() { while (true) { Thread thread = _threadVar.getThread(); if (thread == null) { return getReturnValue(); } try { thread.join(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); // propagate return null; } } } COM: <s> return the value created by the code run code method </s>
funcom_train/22279620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ColorChooser colorChooser() { if (colorChooser == null) { InternalWindow window = new InternalWindow(0, 0, 10, 10); window.setRootView(this); colorChooser = new ColorChooser(); colorChooser.setWindow(window); window.center(); } return colorChooser; } COM: <s> returns a reference to the shared color chooser </s>
funcom_train/50982736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructor_MessageAndException() { final String message = "foobar"; final Throwable t = new NullPointerException(); final TestInitializationFailedException e = new TestInitializationFailedException( message, t ); assertEquals( message, e.getMessage() ); assertEquals( t, e.getEnclosedException() ); } COM: <s> test that the parameters get set to message and enclosed exception </s>
funcom_train/21954189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBusy(boolean newValue) { super.setBusy(newValue); final boolean fNewValue = newValue; Runnable runMe = new Runnable() { public void run() { setEnabled(! fNewValue); } }; if (SwingUtilities.isEventDispatchThread()) { runMe.run(); } else { SwingUtilities.invokeLater(runMe); } } COM: <s> sets this as busy or not busy </s>
funcom_train/2802487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addNewSubject() { String subject = mTxtNewSubject.getText().trim(); if (subject.length() != 0) { DefaultListModel listModel = (DefaultListModel) mListAvailableSubjects.getModel(); listModel.addElement(subject); } else { mMainGui.getLogger().info("Please specify a none empty string as subject.".intern()); } } COM: <s> adds a new available subject </s>
funcom_train/40873574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getWhen(Boolean onInsert, Boolean onUpdate, Boolean onDelete) { // counter to control if "OR" is necessary int cpt = 0; String result = ""; // Construct the string if (onInsert) { result += "INSERT"; cpt++; } if (onUpdate) result += (cpt++ > 0 ? " OR " : "") + "UPDATE"; if (onDelete) result += (cpt++ > 0 ? " OR " : "") + "DELETE"; return result; } COM: <s> construct the string who informs the trigger when it must be activated </s>
funcom_train/43768561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet fetch(Connection conn, String sql, Object... params) throws SQLException { ResultSet rs = null; try { PreparedStatement stmt = prepareStatement(conn, sql); fillStatement(stmt, params); verboseQuery(sql, params); rs = stmt.executeQuery(); } catch (SQLException e) { rethrow(e, sql, params); } return wrap(rs); } COM: <s> execute an sql select query with replacement parameters </s>
funcom_train/4360055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkSenderDomain(SessionMessage msg,Member sender) { boolean sameDomain= true; if (!sameDomain && log.isWarnEnabled()) { log.warn(sm.getString("deltaManager.receiveMessage.fromWrongDomain", new Object[] {getName(), msg.getEventTypeString(), sender, "", "" })); } return sameDomain ; } COM: <s> test that sender and local domain is the same </s>
funcom_train/1805328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCellEditable(int screenRow, int screenCol) { CellEntry cell = getCell(screenRow + 1, screenCol + 1); if (cell == null) { // Although this can be wrong, assume editable unless told otherwise. return true; } else { return cell.getEditLink() != null; } } COM: <s> tells swing whether the cell is editable </s>
funcom_train/23779102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { ISelection selection = getSelection(); if (selection == null) return; if (selection instanceof IStructuredSelection) { run((IStructuredSelection)selection); } else if (selection instanceof ITextSelection) { run((ITextSelection)selection); } else { run(selection); } } COM: <s> method declared on iaction </s>
funcom_train/48256733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void AddMicroPair( Interval1d f, Interval1d g ) { if( (parameters & Parameters.SUPERCOMPOSITION) != 0 && microPairs.size() > 0 ) { for( Tuple2<Interval1d,Interval1d> p : this.microPairs ) { if( p.fst.ProperlyIntersects( f ) && p.snd.ProperlyIntersects( g ) ) return; } } this.microPairs.addLast( new Tuple2<Interval1d,Interval1d>( f, g ) ); } COM: <s> adds pair to micro pair list </s>
funcom_train/18806878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Range getDataRange(ValueAxis axis) { if (this.dataset == null) { return null; } Range result = null; if (axis == getDomainAxis()) { result = DatasetUtilities.findDomainExtent(this.dataset); } else if (axis == getRangeAxis()) { result = DatasetUtilities.findRangeExtent(this.dataset); } return result; } COM: <s> returns the range for an axis </s>
funcom_train/27943619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean profileUpdate( long nProfileId, String strProfileName ) { if( strProfileName.trim().equals( "" ) ) return false; if( database.execUpdate( "UPDATE profile set profile_desc='" + strProfileName.toLowerCase() + "' WHERE profile_id=" + nProfileId ) <= 0 ) return false; return true; } COM: <s> add a new profile entry into system database </s>
funcom_train/44480888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getURI(HttpServletRequest httpRequest) { String contextPath = httpRequest.getContextPath(); String uri = httpRequest.getRequestURI().substring(contextPath.length()); if (httpRequest.getQueryString() != null) { uri += "?" + httpRequest.getQueryString(); } return uri; } COM: <s> will build a uri but including the query string </s>
funcom_train/20042240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _TextRotation() { testProperty("TextRotation", new PropertyTester() { protected Object getNewValue(String propName, Object oldValue) { Object ValueToSet = ValueChanger.changePValue(oldValue); int ro = ((Integer) ValueToSet).intValue() * 100; return new Integer( ro ); } } ); } COM: <s> tests property text rotation </s>
funcom_train/43188741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean initializeTracks(Format[] trackFormats) { if( source.getStreams() != null) throw new java.lang.Error("initializeTracks has been called previously. "); source.initialize(trackFormats); streams = (RawBufferSourceStream[])source.getStreams(); // we support any input format, so always return true return true; } COM: <s> initialize the tracks in the multiplexer with formats given in an </s>
funcom_train/18345164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateInputs() throws IllegalArgumentException { if (aWidth < 0) aWidth *= -1; if (aHeight < 0) aHeight *= -1; if (aWidth == 0) aWidth = 1; if (aHeight == 0) aHeight = 1; if (even(aWidth) || even(aHeight)) throw new IllegalArgumentException("width & height must be odd"); } COM: <s> method that validates the users input for the analysis window size </s>
funcom_train/15911622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { if (isStarted()) stop(); // Clear machines for (ReactiveMachineListener l : rmlisteners) { for (ReactiveMachine machine : machines) { machine.removeListener(l); } } machines.clear(); // Closes devices Device[] devices = getDevices(); for (int i = 0; i < devices.length; i++) devices[i].close(); // System.out.println("All devices have been closed."); reOpen = true; } COM: <s> closes all the devices </s>
funcom_train/10977682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAction() { if (this.action != null) { return (this.action); } ValueBinding vb = getValueBinding("action"); if (vb != null) { return ((String) vb.getValue(getFacesContext())); } else { return (null); } } COM: <s> p return the struts action path to which this form should be submitted </s>
funcom_train/20272093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateType(StringBuilder builder, JSType defType) { if (defType == null) { builder.append(" (type: null) "); } else if (defType.isUnknownType()) { builder.append(" (type: unknown) "); } else { builder.append(" (type: " + defType.toString() + ") "); } } COM: <s> dump a type in a nice readable way </s>
funcom_train/50941058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dateEditorChange(PropertyChangeEvent evt) { synchronized(source) { Date oldValue = source.getCreationDate(); Date newValue = (Date)dateEditor.getValue(); source.setCreationDate(newValue); support.firePropertyChange("creationdate",oldValue,newValue); } } COM: <s> should be called each time the property on creation date changes </s>
funcom_train/15907562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set_isIdlTruncatableInheritance(boolean y) throws RuntimeException { UmlCom.send_cmd(identifier_(), OnInstanceCmd.setIsIdlTruncatableCmd, (y) ? (byte) 1 : (byte) 0); UmlCom.check(); _idl_truncatable = y; } COM: <s> to set if the inheritance is truncatable </s>
funcom_train/47019425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand1() { if (exitCommand1 == null) {//GEN-END:|15-getter|0|15-preInit // write pre-init user code here exitCommand1 = new Command(getLocalizedString("Exit"), Command.EXIT, 1);//GEN-LINE:|15-getter|1|15-postInit // write post-init user code here }//GEN-BEGIN:|15-getter|2| return exitCommand1; } COM: <s> returns an initiliazed instance of exit command1 component </s>
funcom_train/46979924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isStereotypeInh(Object object, String name, String base) { if (object == null || !(object instanceof MStereotype)) return false; if (isStereotype(object, name, base)) return true; Iterator it = CoreHelper.getHelper().getSupertypes(object).iterator(); while (it.hasNext()) { if (isStereotypeInh(it.next(), name, base)) return true; } return false; } COM: <s> tests if a stereotype is or inherits from a stereotype with some </s>
funcom_train/3667981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() throws BlockException { if (connection != null) { for (Iterator i = connection.values().iterator(); i.hasNext();) { LinkableConnection conn = (LinkableConnection) i.next(); if (conn.getLink() != null) { try { conn.getLink().reset(); } catch (GraphException e) { throw new BlockException("Error reseting link ID: " + conn.getLink().getId(), e); } } } } } COM: <s> reset block to its default state </s>
funcom_train/17673736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean firePreStore(Object o) { if (preStoreList == null) { return false; } LifecycleEvent ev = new LifecycleEvent(o, LifecycleEvent.PRESTORE); for (PreStoreNode i = preStoreList; i != null; i = i.next) { i.listener.preStore(ev); } return true; } COM: <s> fire a pre store event returning true if there were any listeners </s>
funcom_train/3470376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispatchEvent(AWTEvent event) { // The event must be dispatched by the event queue. It must not // be dispatched directly to the component, because when a modal // dialog has popped up, events on components which are not child // components of that modal dialog will block the whole replay // process. systemEventQueue.postEvent(event); //((Component) event.getSource()).dispatchEvent (event); } COM: <s> this method dispatches an event </s>
funcom_train/9918485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void render() { if (isInitialized()) { renderer.started = true; if (useOwnFrameRate) { // Remove from GLGraphics control and pass on to // the FPSAnimator override = true; animator = new FPSAnimator(canvas, (int)frameRateTarget); animator.start(); return; } canvas.display(); } } COM: <s> draws the window if the renderer has been initialized </s>
funcom_train/44846767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setXMLFile(File xmlFile) { this.fileXMLSource = xmlFile; txtXMLSource.setText(xmlFile.getAbsolutePath()); app.setProperty("XML.File", xmlFile.getAbsolutePath()); try { app.store(); } catch (IOException ex2) { ex2.printStackTrace(); } } COM: <s> sets the source xml file </s>
funcom_train/11719803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object next() throws NoSuchElementException, RemoteRuntimeException { try { advance(); if (buffer == null) { throw new NoSuchElementException("End of iterator reached"); } else { return getObject(buffer[positionInBuffer++]); } } catch (RemoteException e) { throw new RemoteRuntimeException(e); } } COM: <s> returns the next element in this iteration </s>
funcom_train/24493045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteReview(String reviewId) throws NoReviewSourceFolderException { PluginLogger.log(this.getClass().toString(), "deleteReview", "Delete review: " + reviewId); IFile delFile = ReviewAccess.createReviewFile(reviewId); // Delete review from Model this.rModel.removeReview(reviewId, true); this.rFileModel.removeXmlDocument(delFile); } COM: <s> deletes a review and all comments specified by this review </s>
funcom_train/16791718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doStop() { if (this.intf == null) { this.result.setText("Interface not running"); return; } this.intf.removePropertyChangeListener(this); this.intf.stop(); this.intf = null; this.result.setText("Interface stopped"); } COM: <s> stop the interface </s>
funcom_train/8692851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Namespace findDefaultNamespace() { for (int i = namespaceStack.size() - 1; i >= 0; i--) { Namespace namespace = (Namespace) namespaceStack.get(i); if (namespace != null) { String prefix = namespace.getPrefix(); if ((prefix == null) || (namespace.getPrefix().length() == 0)) { return namespace; } } } return null; } COM: <s> attempts to find the current default namespace on the stack right now or </s>
funcom_train/25324383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void deserializeMeta(String data) throws UnsupportedEncodingException { String[] dataArr = data.substring(2).split("\\|"); id = Integer.parseInt(dataArr[0]); name = dataArr[1]; lastModified = Long.parseLong(dataArr[2]); valueCount = Integer.parseInt(dataArr[3]); parent = Integer.parseInt(dataArr[4]); } COM: <s> deserializes the metadata for the folder </s>
funcom_train/28152032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void componentMoved(ComponentEvent e) { if (frame!=null) { VizWidth.set(frame.getWidth()); VizHeight.set(frame.getHeight()); VizX.set(frame.getX()); VizY.set(frame.getY()); } } COM: <s> invoked when the visualizationwindow is moved </s>
funcom_train/17004201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SequenceFaultDocument getSequenceRefused(String identifier) { SequenceFaultDocument sequenceFaultDocument = SequenceFaultDocument.Factory.newInstance(); SequenceFaultType faultType = sequenceFaultDocument.addNewSequenceFault(); faultType.setFaultCode(sequenceRefused); addIdentifierToSequenceFault(identifier, sequenceFaultDocument); return sequenceFaultDocument; } COM: <s> this fault is sent by an rm destination to indicate that it cannot </s>
funcom_train/3378750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBMPString() throws IOException { if (tag != tag_BMPString) throw new IOException( "DerValue.getBMPString, not BMP " + tag); // BMPString is the same as Unicode in big endian, unmarked // format. return new String(getDataBytes(), "UnicodeBigUnmarked"); } COM: <s> returns the asn </s>
funcom_train/20270790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void referenceAliases() { for (Map.Entry<String, AliasSet> entry : aliases.entrySet()) { JsName name = getName(entry.getKey(), false); if (name.hasWrittenDescendants || name.hasInstanceOfReference) { for (String alias : entry.getValue().names) { recordReference(alias, entry.getKey(), RefType.REGULAR); } } } } COM: <s> the name analyzer algorithm works best when all objects have a canonical </s>
funcom_train/40293562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean extIsAllowed(String fileType, String ext) { return true; /*ext=ext.toLowerCase(); ArrayList allowList=(ArrayList)allowedExtensions.get(fileType); ArrayList denyList=(ArrayList)deniedExtensions.get(fileType); if(allowList.size()==0) if(denyList.contains(ext)) return false; else return true; if(denyList.size()==0) if(allowList.contains(ext)) return true; else return false; return false;*/ } COM: <s> helper function to verify if a file extension is allowed or not allowed </s>
funcom_train/16795149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPublishedPath(String projectVariantGuid, String rfcLanguageId, String folderSeparator) throws RQLException { PublicationPackage publicationPackage = getPublicationPackage(); PublicationSetting setting = publicationPackage.findSettingByProjectVarianGuidAndRfcLanguageId(projectVariantGuid, rfcLanguageId); PublicationFolder publicationFolder = setting.getPublishedPages(); return publicationFolder.getPublishingPathFromPublishingRoot(folderSeparator) + folderSeparator + getPublishedFilename(projectVariantGuid); } COM: <s> returns the published path incl </s>
funcom_train/3179119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getOverflowHandlerClass() { try { if (Configurator.getProperty(DGP_OVERFLOW_HANDLER) != null) return Class.forName(Configurator.getProperty(DGP_OVERFLOW_HANDLER)); else return null; } catch(ClassNotFoundException e) { throw new IllegalArgumentException(e.getMessage()); } } COM: <s> or an alternative class name of an implementation of ioverflow handler </s>
funcom_train/13598016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { log.debug("closing jbpmContext " + toString()); try { if (services!=null) { try { autoSave(); } finally { services.close(); } } } finally { if (jbpmConfiguration!=null) { jbpmConfiguration.jbpmContextClosed(this); } } } COM: <s> make sure you close your jbpm context in a finally block </s>
funcom_train/18203614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processWindowEvent( WindowEvent e ) { super.processWindowEvent( e ); if( e.getID() == WindowEvent.WINDOW_CLOSING ) { // fake File->Exit ActionEvent dummy = new ActionEvent( this, ActionEvent.ACTION_PERFORMED, "exit" ); fileExitMenu.getAction().actionPerformed( dummy ); } } COM: <s> overridden so we can exit when window is closed </s>
funcom_train/1939717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVisibleRowCount(int value) { if (value < -1) { throw new IllegalArgumentException( "visible row count must a positive number or -1"); } if (visibleRowCount != value) { int oldValue = visibleRowCount; visibleRowCount = value; firePropertyChange("visibleRowCount", oldValue, visibleRowCount); // reset viewport size cache cachedPreferredScrollableViewportSize = null; } } COM: <s> sets the visible row count </s>
funcom_train/29290011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeResponeDetail(ResponeDetailCMPData data) throws EJBException { try { ResponeDetailCMPLocal responeDetailLocal = getResponeDetailCMPLocalHome() .findByPrimaryKey(data.getRespone_detail_id()); responeDetailLocal.remove(); } catch (FinderException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (RemoveException e) { // TODO Auto-generated catch block e.printStackTrace(); } } COM: <s> remove respone detail busines method </s>
funcom_train/3820504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetProfileQueryWithEmptyNameValuePair() { WSProfileQuery wsProfileQuery=new WSProfileQuery(); NameValuePair[] httpHeaders=new NameValuePair[]{}; wsProfileQuery.setHttpHeaders(httpHeaders); ProfileQuery profileQuery=WSProfileQuery.getProfileQuery(wsProfileQuery); assertTrue("profileQuery does not contain the anticipated values.",profileQuery.getHTTPHeaders().size()==0); } COM: <s> test the method wsprofile query </s>
funcom_train/3411754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText(String text) { boolean testvalid = false; synchronized (this) { if (text != this.text && (this.text == null || !this.text.equals(text))) { this.text = text; LabelPeer peer = (LabelPeer)this.peer; if (peer != null) { peer.setText(text); } testvalid = true; } } // This could change the preferred size of the Component. if (testvalid && valid) { invalidate(); } } COM: <s> sets the text for this label to the specified text </s>
funcom_train/106594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkCancel(IProgressMonitor monitor) { if (monitor == null) return; if (monitor.isCanceled()) { forgetLastBuiltState();//not always necessary throw new OperationCanceledException("User canceled OCL4JavaBuilder"); } if (isInterrupted()) { forgetLastBuiltState();//not always necessary throw new OperationCanceledException("User interrupted OCL4JavaBuilder"); } } COM: <s> check if the user canceled the build </s>
funcom_train/37834575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeAllRats() { final int sz=rats.size(); int i=0; while(rats.size()!=0) { try { final Creature rat = rats.get(0); rat.stopAttack(); rat.clearDropItemList(); rat.getZone().remove(rat); rats.remove(0); i++; } catch (IndexOutOfBoundsException ioobe) { // index is greater then size??? logger.error("removeAllRats IndexOutOfBoundException at "+ Integer.toString(i)+" position. Total "+ Integer.toString(sz)+" elements.", ioobe); } } } COM: <s> removing rats from the world </s>
funcom_train/17904891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireTabRestored(DockedTabEvent e) { if (tabListeners == null || tabListeners.isEmpty()) { return; } for (int i = 0, k = tabListeners.size(); i < k; i++) { tabListeners.get(i).tabRestored(e); } } COM: <s> notifies all registered listeners of a tab restored event </s>
funcom_train/45916524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setParams(int surface, int tile, int width, int height) { Tile t = surfaceImages.get(surface).get(tile); t.width = width; t.height = height; // tile size doesnt change, so create the strips a priory // if (width + height - 1 > 1) { // t.strips = new BufferedImage[width + height - 1]; // } t.createImage(1.0f); } COM: <s> set geimetrical parameters on a specific surface type and tile index </s>
funcom_train/25647895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean confirmExit() { JFrame parent = MainApplication.getMainWindow(); String title = KendoResources.getString("dialog.confirmExit.title"); String message = KendoResources.getString("dialog.confirmExit.message"); int result = JOptionPane.showConfirmDialog( parent, message, title, JOptionPane.YES_NO_OPTION); return (result == JOptionPane.YES_OPTION); } COM: <s> displays a confirmation dialog for application exit </s>
funcom_train/22783765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleSysPrintDialog() { // show the dialog PrinterJob job = PrinterJob.getPrinterJob(); pageFormat = job.pageDialog(pageFormat); // get the new pageFormat int width = (int) pageFormat.getImageableWidth(); int height = (int) pageFormat.getImageableHeight(); document.setPageDimension(new Dimension(width, height)); updateSizeOfPreviewPanel(); preview.update(); updateDocument(); } COM: <s> show the system printer dialog and read the data that it returns </s>
funcom_train/16630878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getScrollpane_baumKlassen() { if (scrollpane_baumKlassen == null) { scrollpane_baumKlassen = new JScrollPane(); scrollpane_baumKlassen.setLocation(new Point(10, 46)); scrollpane_baumKlassen.setSize(new Dimension(360, 300)); scrollpane_baumKlassen.setViewportView(getBaum_klassen()); } return scrollpane_baumKlassen; } COM: <s> this method initializes scrollpane baum klassen </s>
funcom_train/644441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchToOptionBackground(DialogOptions dialogOptions) { this.dialogOptions = dialogOptions; CardLayout cl = (CardLayout) (dialogOptions.getPanelOptions().getLayout()); cl.show(dialogOptions.getPanelOptions(), PersistenceManager.Values.CARD_BACKGROUND.name()); dialogOptions.setSelectedOption(PersistenceManager.Values.CARD_BACKGROUND.name()); } COM: <s> switches to the background category in the option dialog </s>
funcom_train/48267931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseV8CodeDeleteEntry(JsArrayString logEntries) { assert logEntries.length() == 2; double address = parseAddress(logEntries.get(1), ADDRESS_TAG_CODE); V8Symbol symbol = symbolTable.lookup(address); if (symbol != null) { symbolTable.remove(symbol); } else { // update debugging stats debugStats.removeMisses++; } } COM: <s> process a code delete entry in the log </s>
funcom_train/4015053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getLowestWidgetYPos(){ int lowestYPos = 0; for(int index = 0; index < selectedPanel.getWidgetCount(); index++){ Widget widget = selectedPanel.getWidget(index); int y = widget.getAbsoluteTop() + widget.getOffsetHeight(); if(y > lowestYPos) lowestYPos = y; } if(lowestYPos > 0) lowestYPos -= selectedPanel.getAbsoluteTop(); return lowestYPos; } COM: <s> gets the y coordinate of the lowest widget on the currently selected page </s>
funcom_train/1222828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void boundaries() { p3d.fill(128, 128, 255, 50); p3d.stroke(128, 128, 255); p3d.pushMatrix(); p3d.translate((float)boundCentre.x,(float)boundCentre.y,(float)boundCentre.z); p3d.box((float)bound.x, (float)bound.y, (float)bound.z); p3d.popMatrix(); p3d.noStroke(); } COM: <s> draw the default cuboid boundary of the simulation as a partially transparent box </s>
funcom_train/32634294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StructuredBlock findCase(FlowBlock destination) { for (int i=0; i < caseBlocks.length; i++) { if (caseBlocks[i].subBlock != null && caseBlocks[i].subBlock instanceof EmptyBlock && caseBlocks[i].subBlock.jump != null && caseBlocks[i].subBlock.jump.destination == destination) return caseBlocks[i].subBlock; } return null; } COM: <s> find the case that jumps directly to destination </s>