__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/12183838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testErrorOnConnect() throws Exception { TestURLRegistry.register(); URL url = new URL( "testurl:errorOnConnect" ); try { url.openStream(); fail( "Should have thrown exception" ); } catch( IOException ioex ) { assertTrue( ioex.getMessage().indexOf( "Simulated" ) > -1 ); } } COM: <s> test that an exception is thrown if an error url is created and </s>
funcom_train/16476130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireElementSavedStateChanged(BenchmarkElement e) { // System.out.println("Fire ElementSavedStateChanged: " + e.toString()); // DEBUG final BenchmarkElementEvent event = new BenchmarkElementEvent (e); fireEvent( new EventHandler<BenchmarkElementEvent>(event) { @Override protected void dispatch(ElementEventListener listener, BenchmarkElementEvent event) { listener.elementSavedStateChanged(event); } }); } COM: <s> fire an event to note that the given element was changed or saved </s>
funcom_train/13320436
/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 ("IMessagingWSHttpPort".equals(portName)) { setIMessagingWSHttpPortEndpointAddress(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/13758289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDOCMFiles() { XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("45690.docm"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc); assertTrue(extractor.getText().contains("2004")); assertTrue(extractor.getText().contains("2008")); assertTrue(extractor.getText().contains("(120 ")); } COM: <s> test that we can open and process </s>
funcom_train/39283719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNodesFlag() { int result = NONE; for (Iterator iter = attributeNodes.iterator(); iter.hasNext() && result != ALL;) { ValueNode node = (ValueNode) iter.next(); result = result | ((node.isHard()) ? HARD : SOFT); } return result; } COM: <s> gets a int flag for the type of the value nodes </s>
funcom_train/44136248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String saveSlideTitle(OSMSlide slide) { String str = OSMFile.getTag1(OSMFile.OSM_SLIDE_TITLE) + "\n"; str += saveProperties(slide.getTitleProperties()); str += OSMFile.getTag2(OSMFile.OSM_SLIDE_TITLE); return str; } COM: <s> it saves the title of the slide </s>
funcom_train/22889509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL findResource(String name) { if (debug >= 3) log(" findResource(" + name + ")"); URL url = super.findResource(name); if (debug >= 3) { if (url != null) log(" --> Returning '" + url.toString() + "'"); else log(" --> Resource not found, returning null"); } return (url); } COM: <s> find the specified resource in our local repository and return a </s>
funcom_train/13720142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLRAdjust(Adjustment value) throws InterruptedException, IOException { isActive(true); try{ // Establish baseline int val = MathUtilities.hex2int(getSetting(Adjustment.COMMANDCODE)); logger.finest("Old setting: " + val); setSetting(Adjustment.COMMANDCODE, (val & ~Adjustment.MASK) | value.getCode()); }catch(InterruptedException e){ logger.log(Level.SEVERE, "Unable to setLRAdjust", e); throw e; }catch(IOException e){ logger.log(Level.SEVERE, "Unable to setLRAdjust", e); throw e; } } COM: <s> this command allows the changing of the left right adjust setting on the </s>
funcom_train/8904386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { DatagramPacket packet; byte[] buffer; try { while (_listening){ buffer = new byte[5000]; packet = new DatagramPacket(buffer, buffer.length); _datagramSocket.receive(packet); handlePacket(packet); } } catch (Exception e) { e.printStackTrace(); } } COM: <s> listens for incomming frames on local port </s>
funcom_train/21625539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeNode(Object element) { GraphNode node = (GraphNode) nodesMap.get(element); if (node != null) { // remove the node from the layout algorithm and all the connections if (getLayoutAlgorithm() != null) { getLayoutAlgorithm().removeEntity(node.getLayoutEntity()); getLayoutAlgorithm().removeRelationships(node.getSourceConnections()); getLayoutAlgorithm().removeRelationships(node.getTargetConnections()); } // remove the node and it's connections from the model node.dispose(); } } COM: <s> removes the given element from the layout algorithm and the model </s>
funcom_train/42068311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNumberOfSampleLoopsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ChunkSampler_numberOfSampleLoops_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ChunkSampler_numberOfSampleLoops_feature", "_UI_ChunkSampler_type"), WavPackage.Literals.CHUNK_SAMPLER__NUMBER_OF_SAMPLE_LOOPS, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the number of sample loops feature </s>
funcom_train/35149878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildInitialLayout(PageLayoutBuilder pageLayout) { log.debug("Building initial layout"); for (Iterator iter = _viewDescriptors.iterator(); iter.hasNext();) { String viewDescriptorId = (String) iter.next(); pageLayout.addView(viewDescriptorId); if (log.isDebugEnabled()) { log.debug("Added " + viewDescriptorId + " to page layout"); } } } COM: <s> builds the initial page layout by iterating the collection of view </s>
funcom_train/39935046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInterval(String id, int interval) throws IOException, InitializationException { if (initialized) { connection.send(RobotConstants.Communication.FirstToken.SET + "," + RobotConstants.Communication.SecondToken.INTERVAL + "," + id + "," + String.valueOf(interval)); } else { throw new InitializationException(); } } COM: <s> requests a set of an sensor interval </s>
funcom_train/51342080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void validateSplits(final IIndex src, final Split[] splits) { if (src == null) throw new IllegalArgumentException(); if (splits == null) throw new IllegalArgumentException(); final LocalPartitionMetadata pmd = src.getIndexMetadata() .getPartitionMetadata(); if (pmd == null) throw new IllegalArgumentException(); validateSplits(pmd, splits, true/* checkFromToIndex */); } COM: <s> validate splits including that the separator keys are strictly </s>
funcom_train/3562514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void linkDataToAuthor(Long dataID, Integer authorID) throws DbException { LinkedList parmList; parmList = new LinkedList(); addIfNotNull(parmList, "dataID", dataID); addIfNotNull(parmList, "authorID", authorID); simpleRequest(LINK_DATA_TO_AUTHOR_PAGE, "Cannot link data to author", parmList); } COM: <s> assigns a data to an author </s>
funcom_train/40560206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createInsertUnknowns() { String sql = "("; for (int i = 0; i < dbColumns.size(); i++) { sql += " ?"; // if we're not in the last section, add a comma if (i != dbColumns.size() - 1) { sql += ","; } } sql += " )"; return sql; } COM: <s> returns the sql segment in an insert statement which maps to the field </s>
funcom_train/18525538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse() throws IOException, SAXException { if (panel != null) { InputSource is = LanguageFileLoader.getReference().getLanguageInputStream(LanguageFileLoader.TEXTPREVIEWPANEL_XML_FILE); if (is != null) { getParser().setContentHandler(this); getParser().setErrorHandler(this); getParser().parse(is); } } } COM: <s> parse the textpreview </s>
funcom_train/46694952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBuildQuery() { System.out.println("buildQuery"); String propertyID = "Property"; boolean not = false; GraphQuery graphQuery = new AllGraphs(); PropertyQuery query = new NullPropertyQuery(); GraphByProperty instance = new GraphByProperty(); instance.buildQuery(propertyID, not, graphQuery, query); } COM: <s> test of build query method of class graph by property </s>
funcom_train/18786625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPopupMenu createPopupMenu() { JPopupMenu popupMenu = new JPopupMenu(); JMenuItem menuItemClear = new JMenuItem("Clear"); menuItemClear.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { ValidationPanel.this.clear(); } }); popupMenu.add(menuItemClear); return popupMenu; } COM: <s> creates a new jpopup menu with one single entry clear </s>
funcom_train/14010628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() throws PluginException { _ignoreParams = new HashMap(); _ignoreParams.put("username", "username"); _ignoreParams.put("password", "password"); _ignoreParams.put("submit", "submit"); _ignoreParams.put("reset", "reset"); } COM: <s> initialize the plugin </s>
funcom_train/130652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void queryState () { try { sendHeader (PLAYER_MSGTYPE_REQ, PLAYER_LOG_REQ_GET_STATE, 0); os.flush (); } catch (IOException e) { throw new PlayerException ("[Log] : Couldn't request PLAYER_LOG_REQ_GET_STATE: " + e.toString(), e); } } COM: <s> request reply get state </s>
funcom_train/32316227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDatarangePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DataComplementOf_datarange_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DataComplementOf_datarange_feature", "_UI_DataComplementOf_type"), OdmPackage.Literals.DATA_COMPLEMENT_OF__DATARANGE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the datarange feature </s>
funcom_train/7518124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Modulo entity) { EntityManagerHelper.log("saving Modulo instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved modulo entity </s>
funcom_train/28167438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lineTo(Object x1, Object y1) { if (size() == 0 || get(size() - 1).type == SegType.CLOSE) { throw new IllegalPathStateException("lineTo is only allowed when a path segment is open"); } add(new Segment(SegType.LINETO, x1, y1)); } COM: <s> adds a line to the current path segment </s>
funcom_train/18644219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessageText(Message mesg, MessageDefinition defn) { String type=null; if (defn == null) { type = (mesg.isRequest()?REQUEST_RPC_MESSAGE_TYPE:RESPONSE_RPC_MESSAGE_TYPE); if (mesg.isRPCStyle() == false) { type = MESSAGE_STYLE_MESSAGE_TYPE; } } else { type = (defn.getClassification()==MessageClassification.REQUEST? REQUEST_RPC_MESSAGE_TYPE:RESPONSE_RPC_MESSAGE_TYPE); } if (NamesUtil.isSet(mesg.getFaultName())) { type = FAULT_RPC_MESSAGE_TYPE; } return(getMessageTextForType(mesg, type)); } COM: <s> this method returns the xml text associated with the </s>
funcom_train/33508769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // Get our instance of Session... Session s = Session.getInstance(); // Try to login. Don't worry about displaying the exception. try { // Success case s.login(mUsername, mPassword); Message msg = new Message(); msg.arg1 = BMR.MESSAGE_LEGAL; mHandler.sendMessage(msg); } catch (BMRException e) { // Failure case Message msg = new Message(); msg.arg1 = BMR.MESSAGE_EXCEPTION; msg.arg2 = e.getResourceId(); mHandler.sendMessage(msg); } } COM: <s> this thread just attempts to log in using m username and m password </s>
funcom_train/42715138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ErrCode removeBuddy(String address) { String buddy_name = buddylist.removeBuddy(address); if (!buddy_name.equals("")) { sendNewBuddyMessage(buddy_name, "", 1); } updateBuddyList(buddylist.getBuddys()); return new ErrCode(Constants.ERR_SUCCESS); } COM: <s> removes a buddy based on its unique address and notifies gui </s>
funcom_train/51181474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readStyleFile() throws Exception { if (useDefaultStyle) { URL defPath = JabRef.class.getResource(defaultJStylePath); Reader r = new InputStreamReader(defPath.openStream()); style = new OOBibStyle(r); } else { style = new OOBibStyle(new File(styleFile)); } } COM: <s> read the style file </s>
funcom_train/11710214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FeatureDescription getFeatureFromTypeDescription(String name, TypeDescription td) { FeatureDescription[] fds = td.getFeatures(); if (fds == null) return null; for (int i = 0; i < fds.length; i++) { if (name.equals(fds[i].getName())) return fds[i]; } return null; } COM: <s> returns null if no feature by this name </s>
funcom_train/16951255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MembershipFunction fclTreeFuzzifyTermTriangular(Tree tree) { if( debug ) Gpr.debug("Tree: " + tree.toStringTree()); double min = Gpr.parseDouble(tree.getChild(0)); double mid = Gpr.parseDouble(tree.getChild(1)); double max = Gpr.parseDouble(tree.getChild(2)); MembershipFunction membershipFunction = new MembershipFunctionTriangular(min, mid, max); return membershipFunction; } COM: <s> parse a tree for triangular membership function </s>
funcom_train/11348554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Event waitForEvent() { Event event = null; synchronized (m_events) { while (event == null) { if (m_events.isEmpty()) { try { m_events.wait(); } catch (InterruptedException e) { // Thanks Checkstyle to forbid empty catch statements // ;-( } } else { event = (Event) m_events.remove(0); } } } return event; } COM: <s> get the first event if available or wait for an incoming event </s>
funcom_train/26143469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRefid(Reference reference) { super.setRefid(reference); ArtifactType art = (ArtifactType) reference.getReferencedObject(getProject()); proxy.setGroup(art.getGroup()); proxy.setName(art.getName()); proxy.setProjectname(art.getProjectname()); proxy.setType(art.getType()); proxy.setVersion(art.getVersion()); } COM: <s> copy everything from the reference into this object rather than delegate </s>
funcom_train/37444874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void findElementByUnknownSymbol() { System.out.println("Finding an Element with unknown symbol..."); try { final Element unknownSymbol = periodicTable.findBySymbol("ABC"); System.out.println(unknownSymbol); } catch (final EJBException exception) { System.out.println(exception); } } COM: <s> finds an element with a symbol that does not exist </s>
funcom_train/1711687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void commandRD(Object field, FormObject formObject) { StringTokenizer tok = new StringTokenizer(Strip.removeArrayDeleminators((String)field)); float left = Float.parseFloat(tok.nextToken()); float top = Float.parseFloat(tok.nextToken()); float right = Float.parseFloat(tok.nextToken()); float bottom = Float.parseFloat(tok.nextToken()); formObject.setInternalBounds(left,top,right,bottom); } COM: <s> rectangle differences left top right bottom order as recieved </s>
funcom_train/38477928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContextClassLoader(ClassLoader cl) { if (cl == ClassLoader.DUMMY) { // we're being called by Thread.<clinit> to force this method to be JIT compiled return; } SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new RuntimePermission("setContextClassLoader")); } contextClassLoader = cl; } COM: <s> sets the context class loader for this thread </s>
funcom_train/24150789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearRequest(ActionFormEvent event) { log.debug("Entering clearRequest"); PortletRequest req = event.getActionRequest(); PortletSession session = req.getPortletSession(); session.removeAttribute("attrs"); session.removeAttribute(ACCOUNT_TYPE); setNextState(req, NEW_REQUEST_PAGE); log.debug("Exit clearRequest"); } COM: <s> clear the contents of the account request form in response </s>
funcom_train/13923925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBounds(int x, int y, int width, int height) { if ( pannerImage != null ) { pannerWidth = pannerImage.getWidth(); pannerHeight = pannerImage.getHeight(); super.setBounds(x, y, pannerWidth, pannerHeight); } else { super.setBounds(x, y, pannerWidth, pannerHeight); } } COM: <s> force a fixed size </s>
funcom_train/612362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String readIdentifier(boolean addErrorIfNoneFound) throws IOException { try { return readIdentifierOrThrow(); } catch (NotAnIdentifierException e) { if (addErrorIfNoneFound) { addError(reader.getNextLocation(), NOT_AN_IDENTIFIER_ERROR); } return ""; } } COM: <s> read in a java identifier </s>
funcom_train/47731485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFileContents(String strFile) { try { BufferedReader brInputFile = new BufferedReader(new FileReader(strFile)); String strFileContent = "", temp = ""; while ((temp = brInputFile.readLine()) != null) strFileContent += temp + "\n"; brInputFile.close(); return "(" + strFileContent + ")"; } catch (Exception e) { throw new RuntimeException(e); } } COM: <s> read the contents of a text file </s>
funcom_train/2552180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Project findByID(Integer expID) { String query = "from Project as project where project.projectId = ?"; Project project = null; Object[] parameters = { expID }; List list = this.getHibernateTemplate().find(query, parameters); if (list.size() > 0) { project = (Project) list.get(0); } return project; } COM: <s> finds an instance of project in the database by the project id </s>
funcom_train/3762339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(ListSelectionEvent e) { //Ignore extra messages. if (e.getValueIsAdjusting()) {return;} ListSelectionModel lsm = (ListSelectionModel)e.getSource(); if (lsm.isSelectionEmpty()) { // no rows are selected } else { // this is the last selected row in the last selected table m_actualRow = lsm.getMinSelectionIndex(); } } COM: <s> handles the list selection events generated by the appropriate table </s>
funcom_train/10350416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void openConnection() throws QueryExecutionException { try { DatasourceConnectionManager manager = DatasourceConnectionManager .createDatasourceManager( "sun.jdbc.odbc.JdbcOdbcDriver", dbUri, user, password); connection = manager.acquireConnection(); } catch (SQLException e) { throw new QueryExecutionException( "Encountered a problem with the SQL connection", e); } } COM: <s> open a connection to a oracle database </s>
funcom_train/42402452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void applyAspects() { final GeneratorContext context = this.getGeneratorContext(); context.branch(); context.info("Checking for beans with one or more aspects."); final Set<Bean> beans = this.filterBeansRequiringInterceptors(); final Iterator<Bean> advisedIterator = beans.iterator(); while (advisedIterator.hasNext()) { final Bean bean = advisedIterator.next(); this.buildProxyFactoryBean(bean); this.registerProxiedBean(bean); } context.unbranch(); } COM: <s> creates a factory bean for each bean that will be proxied </s>
funcom_train/36022099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDescriptors(CustomDescriptor[] descriptors) { if (descriptors == null) { throw new IllegalArgumentException( "Requires a non-null WizardPanelDescriptor classes array."); } for (int i = 0, n = descriptors.length; i < n; i++) { addDescriptor(descriptors[i]); } } COM: <s> a convenient method for registering a couple of wizard panel descriptors </s>
funcom_train/16431253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onOK() { boolean shouldDiscard = true; try { iMailServer = getServerFromFields(); } catch (SSMailServerException exc) { shouldDiscard = queryShouldDiscard( SSBundle.getBundle().getString(exc.getResourceName())); } // Close the dialog, else leave dialog open and let user // fix the data if (shouldDiscard) { closeDialog(JOptionPane.OK_OPTION); } } COM: <s> called when the ok button is clicked </s>
funcom_train/2639881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compact() { // need at least one free spot for open addressing rehash(PrimeFinder.nextPrime((int)Math.ceil(size()/_loadFactor) + 1)); computeMaxSize(capacity()); // If auto-compaction is enabled, re-determine the compaction interval if ( _autoCompactionFactor != 0 ) { computeNextAutoCompactionAmount(size()); } } COM: <s> compresses the hashtable to the minimum prime size as defined </s>
funcom_train/37401502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void inorderWalk(TreeNode x, TreeWalk handler, Object misc) { if(x != NIL) { inorderWalk(((BinaryTreeNode)x).left, handler, misc); handler.node(x, misc); inorderWalk(((BinaryTreeNode)x).right, handler, misc); } } COM: <s> walks the tree in order </s>
funcom_train/34029184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getString() { if(st.sizeOfRArray() == 0) { return st.getT(); } StringBuffer buf = new StringBuffer(); for(CTRElt r : st.getRArray()){ buf.append(r.getT()); } return buf.toString(); } COM: <s> returns the plain string representation </s>
funcom_train/44285659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeRow(int row) { if (row < 0 || row >= values.size()) throw new IndexOutOfBoundsException("illegal row number: " + row); SingleField p = (SingleField) values.remove(row); map.remove(p.getName()); fireChange(new TableModelEvent (this, row, row, TableModelEvent.ALL_COLUMNS, TableModelEvent.DELETE)); } COM: <s> first remove the row then fire the event </s>
funcom_train/49659103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Book getFeatured() { if (featured == null) { try { featured = (Book) dbao() .getBooks() .get(5); } catch (BooksNotFoundException e) { // Real apps would deal with error conditions better than this throw new FacesException("Could not get book details " + e); } } return (featured); } COM: <s> p return the code book code for the featured book </s>
funcom_train/12245577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getUniqKeysAsString() { Vector<String> contained = new Vector<String>(); if (_keyValues == null) return "null"; String ret = ""; for (int i = 0; i < _keyValues.length; i++) { String val = _keyValues[i].getKey(); if (!StringUtil.isStringInVector(val, contained)) { ret += val + " "; } contained.add(val); } return ret.trim(); } COM: <s> return unique list ignoring doublettes of keys as blank separated </s>
funcom_train/13725011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEqualLiteralsDependency() throws Exception { final String prog = "a(?X) :- a(?X).\n" + "?- a(1)."; final LeftToRightSip sip = parseProgram(prog); final ILiteral ax = createLiteral("a", "X"); assertEquals(ax + " depends on itself.", Collections.singleton(ax), sip.getDepends(ax)); } COM: <s> checks whether the dependency retrieval of a literal depending on </s>
funcom_train/49993025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String downloadDatafile(String sessionId, Long datafileId) throws SessionException, NoSuchObjectFoundException, NoSuchUserException, InsufficientPrivilegesException { //for user bean get userId String userId = user.getUserIdFromSessionId(sessionId); return DownloadManager.downloadDatafile(userId, sessionId, datafileId, manager); } COM: <s> generates the download url for the download of a single file </s>
funcom_train/29079859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeDateTimeTag(String name, long dateInMillis, boolean includeDate, boolean includeTime, boolean includeSeconds) { Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(dateInMillis); writeDateTimeTag(name, calendar, includeDate, includeTime, includeSeconds); } COM: <s> write out a date and time xml tag </s>
funcom_train/28533576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public final static String[] WEATHER_DESCS= { "CLEAR","CLOUDY","WINDY","RAIN","THUNDERSTORM","SNOW","HAIL","HEAT","SLEET","BLIZZARD","DUST","DROUGHT","COLD"}; COM: <s> descriptive strings for the climate </s>
funcom_train/32978640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showData(String data, Color fgColor, Color bgColor) { /* showData */ dataColor= (fgColor==null) ? Color.black : fgColor; dataBkgrd= (bgColor==null) ? Color.white : bgColor; dataTF.setForeground(dataColor); dataTF.setBackground(dataBkgrd); dataTF.setText(data); repaint(); } /* showData */ COM: <s> show data draw data in text field 2 </s>
funcom_train/1026259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LValue luaV_call_newindex(LFunction function, LValue table, LValue key, LValue value) { int oldtop = top; try { if ( cc >= 0 ) top = base + this.calls[cc].closure.p.maxstacksize; pushlvalue(function); pushlvalue(table); pushlvalue(key); pushlvalue(value); call(3,1); return poplvalue(); } finally { top = oldtop; } } COM: <s> call a newindex function with three arguments and one return value </s>
funcom_train/19671718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addUser(LoginPacket loginPack,String name) throws Exception { if (!m_DomainHandler.userExists(loginPack.getUserName())){ m_DomainHandler.addUser(loginPack.getUserName(), loginPack.generatePassHash(),name); m_Logger.Log("user "+name+" added succesfuly",Logger.LOG_INFO); return true; }else{ m_Logger.Log("user "+name+" was NOT added",Logger.LOG_ERROR); return false; } } COM: <s> adds a new user to the system </s>
funcom_train/43221729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer getId(String Element) { Iterator<Integer> i = this.Elements.keySet().iterator(); int counter = 0; while(i.hasNext()) { counter = (Integer)i.next(); if(this.Elements.get(counter).getName().equals(Element)) return counter; } return -1; } COM: <s> returns 1 if element not found </s>
funcom_train/41174446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String replaceSpecialChars(String toCheck) { toCheck = toCheck.replace("<br />", "\n"); toCheck = toCheck.replace("&quot;", "\""); toCheck = toCheck.replace("&#39;", "'"); toCheck = toCheck.replace("&amp;", "&"); return toCheck; } COM: <s> replaces some special chars because of some slacky html code in there </s>
funcom_train/33006487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printSupportedCodecs() { log.debug("List of supported audio codecs: "); Iterator it = audioCodecSupportedList.iterator(); while (it.hasNext()) { log.debug(((Format) it.next()).toString()); } log.debug("List of supported video codecs: "); it = videoCodecSupportedList.iterator(); while (it.hasNext()) { log.debug(((Format) it.next()).toString()); } } COM: <s> utility method to print the supported codecs </s>
funcom_train/125662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTS(TS[] newTimeSeries) { if (newTimeSeries == null) throw new IllegalArgumentException("Argument was null."); synchronized (this) { removeAllTS(); for (int i = 0; i < newTimeSeries.length; i++) { addTS(newTimeSeries[i]); } } } COM: <s> clears all currently stored time series and adds the series contained in </s>
funcom_train/3812882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TokenStats getStats(Token t) { TokenStats stats = stateMap.get(t.getSearchState() .getLexState()); if (stats == null) { stats = new TokenStats(); stateMap.put(t.getSearchState().getLexState(), stats); } return stats; } COM: <s> gets the statistics for a particular token </s>
funcom_train/19622017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int countMaxPlayers(int[][] field) { int counter = 0; int dim = field.length; for (int i = 0; i < dim; i++) { for (int j = 0; j < dim; j++) { int square = field[i][j]; if ((square > 0) && (square < Constants.MAX_PLAYERS)) { ++counter; field[i][j] = counter; } } } return counter; } COM: <s> returns max players num of this field </s>
funcom_train/49335028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reverse() { mPlayingBackwards = !mPlayingBackwards; if (mPlayingState == RUNNING) { long currentTime = AnimationUtils.currentAnimationTimeMillis(); long currentPlayTime = currentTime - mStartTime; long timeLeft = mDuration - currentPlayTime; mStartTime = currentTime - timeLeft; } else { start(true); } } COM: <s> plays the value animator in reverse </s>
funcom_train/48977099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String update(){ //TODO implement //updating group if necessary if (!userSelectedForEdit.getGroup().getName().equals(groupSelected)){ userSelectedForEdit.setGroup(adminService.findByName(groupSelected).get(0)); } adminService.updateUser(userSelectedForEdit); return "userList"; } COM: <s> activated when user clicks on update users button </s>
funcom_train/12904184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (!(o instanceof IavaMethod)) return false; IavaMethod m=(IavaMethod)o; if (!m.name.equals(name)) return false; if (formalParams.size()!=m.formalParams.size()) return false; for (int i=0;i<formalParams.size();i++) { Symbol s1=(Symbol)formalParams.get(i); Symbol s2=(Symbol)m.formalParams.get(i); if (!s1.type().equals(s2.type())) return false; } return true; } COM: <s> returns true if the passed object is an instance of </s>
funcom_train/2951990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void expandBorder(LexicalUnit value, boolean important) { this.expandBorder(value, CSS.BORDER_BOTTOM, important); this.expandBorder(value, CSS.BORDER_LEFT, important); this.expandBorder(value, CSS.BORDER_RIGHT, important); this.expandBorder(value, CSS.BORDER_TOP, important); } COM: <s> expand the border shorthand property </s>
funcom_train/25061866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateOrganismsTable(List organismList) { RowIndex rowIndex = new RowIndex(1); for (Iterator iterator = organismList.iterator(); iterator.hasNext();) { MooreOrganism organism = (MooreOrganism) iterator.next(); addTableRow(organism, rowIndex); } organismsTable.sort(); } COM: <s> populates the preconstructed organism table with data retrieved from mf150 database </s>
funcom_train/25419877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getUuidsAsString(String[] uuids) { StringBuilder sb = new StringBuilder(); for (String uuid : uuids) { if (UuidUtil.isUuid(uuid)) { if (sb.length() > 0) { sb.append(","); } sb.append("'" + uuid + "'"); } } return sb.toString(); } COM: <s> gets uuids as string with all uuids separated by coma </s>
funcom_train/17592488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int numPrecedenceConstraints() { int n = 0; int result = 0; for (Iterator i = list.iterator(); i.hasNext(); ) { Object o = i.next(); int k; if (o instanceof Collection) { k = ((Collection) o).size(); } else { k = 1; } result += n*k; n += k; } return result; } COM: <s> get the number of precedence constraints in this order </s>
funcom_train/50170373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIncludeSimpleSearch(boolean includeSimpleSearch) { includeServiceAspects.setIncludeSimpleSearch(includeSimpleSearch); if ( includeSimpleSearch == false) { SimpleSearchModel simpleSearchModel = new SimpleSearchModel(); simpleSearchViewPanel.setSimpleSearchModel(simpleSearchModel); browserConfigurationModel.setSimpleSearchModel(simpleSearchModel); } //end if () updateVisibleTabs(); } COM: <s> set the value of include simple search </s>
funcom_train/10383352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Server getServer() { if (server != null) { return server; } initBaseDir(); System.setProperty("catalina.useNaming", "false"); server = new StandardServer(); server.setPort( -1 ); service = new StandardService(); service.setName("Tomcat"); server.addService( service ); return server; } COM: <s> get the server object </s>
funcom_train/3903963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBeginTimeLimitPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LimitConditionsType_beginTimeLimit_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LimitConditionsType_beginTimeLimit_feature", "_UI_LimitConditionsType_type"), ImsssPackage.Literals.LIMIT_CONDITIONS_TYPE__BEGIN_TIME_LIMIT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the begin time limit feature </s>
funcom_train/9679271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(final SourcesModificationOperation op) { try { iWorkspace.run(new IWorkspaceRunnable() { public void run(IProgressMonitor monitor) { log.debug("executing sources modification operation"); op.run(); } }, iWorkspace.getRoot(), IWorkspace.AVOID_UPDATE, null); } catch (CoreException e) { log.error(e); throw new SystemException(ErrorCodes.ECLIPSE_INTERNAL_ERROR, e); } } COM: <s> todo currently locks entire workspace for writing </s>
funcom_train/4877651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkLevelSeriesSize(final Map<String, LevelsSeries> levelSeries, final String logMessage) { assert levelSeries != null : "levelSeries is null"; assert logMessage != null : "logMessage is null"; boolean ok = true; if (getContribSeries().size() <= 0) { LOGGER.severe(logMessage); ok = false; } return ok; } COM: <s> this method checks the size of the level series </s>
funcom_train/37829662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void list(final Class< ? > clazz) { Field[] fields = clazz.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); String name = field.getName(); String type = field.getType().toString(); String value = getValue(field); fieldsTypesValues.put(name, new Pair<String, String>(type, value)); } } COM: <s> lists all direct fields for this class and the </s>
funcom_train/42642895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCreationDatePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IElement_creationDate_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IElement_creationDate_feature", "_UI_IElement_type"), DigitalHPSPackage.Literals.IELEMENT__CREATION_DATE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the creation date feature </s>
funcom_train/23870884
/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 ("ActiveBpelAdminPort".equals(portName)) { setActiveBpelAdminPortEndpointAddress(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/31156997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startSearch() { List path = findPath(); PathEvent event = new PathEvent(this, path); for (Iterator i = listeners.iterator(); i.hasNext(); ) { PathListener listener = (PathListener)i.next(); listener.done(event); } } COM: <s> execute the path finding algorithm </s>
funcom_train/19437053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setExercise() { int exerciseNumber = exerciseNumberChoice.getInt(); Exercise exerciseToSend = generateExerciseToSend(); if (showSendMessage(exerciseToSend.toString()) == 1) { dataModel.setExercise(exerciseNumber, exerciseToSend); dataModel.sendExcerise(exerciseNumber); } } COM: <s> if set exercise button was pressed </s>
funcom_train/7674024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStarts(int index, RegisterSpecSet specs) { throwIfImmutable(); if (specs == null) { throw new NullPointerException("specs == null"); } try { blockStarts[index] = specs; } catch (ArrayIndexOutOfBoundsException ex) { // Translate the exception. throw new IllegalArgumentException("bogus index"); } } COM: <s> sets the register set associated with the start of the block with </s>
funcom_train/15555685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getMyToolBar(), java.awt.BorderLayout.NORTH); jContentPane.add(getHorizontalSplitPane(), java.awt.BorderLayout.CENTER); jContentPane.add(getStatusPanel(), java.awt.BorderLayout.SOUTH); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/44136251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getChipLevel(Node node) { int level = -1; NamedNodeMap map = node.getAttributes(); if(map.getLength() > 0) { Node n = map.getNamedItem(OSMFile.OSMTHM_MODEL_CHIPLEVELNUMBER); if(n != null) level = parseInt(n.getNodeValue()); } return level; } COM: <s> it gets the chip level </s>
funcom_train/46730094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openApplicationViewForm(BaseAction action) throws Exception { IBaseModel baseModel = action.hasBaseModel() ? action.getBaseModel() : getAppView(action); openBaseSaveFormBuilder(action, baseModel, ViewReference.APPLICATIONVIEWFORMVIEW, new IStoreModel(){ public Long store(IBaseModel model) throws Exception { return SecurityService.store((ApplicationViewModel) model); } }); } COM: <s> add or edit the application view </s>
funcom_train/39275691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configure(final Object bean, final URL url) throws Exception { if (LOG.isDebugEnabled()) { LOG.debug("Configuring ehcache from URL: " + url); } final SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); final BeanHandler handler = new BeanHandler(bean); parser.parse(url.toExternalForm(), handler); } COM: <s> configures a bean from an xml file available as an url </s>
funcom_train/11733183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected InternalVersion getInternalVersion() throws RepositoryException { SessionImpl session = sessionContext.getSessionImpl(); InternalVersion version = session.getInternalVersionManager().getVersion((NodeId) id); if (version == null) { throw new InvalidItemStateException(id + ": the item does not exist anymore"); } return version; } COM: <s> returns the internal version </s>
funcom_train/450503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makePredator (Creature creature) { //Creature should chase objects. Behavior approachBehavior = new Behavior(); approachBehavior.addAction(new ApproachAction()); creature.addBehavior(approachBehavior); //Creature should eat (destroy) nearby objects. Behavior destroyBehavior = new Behavior(); destroyBehavior.addAction(new DestroyAction()); destroyBehavior.addCondition(new ProximityCondition(standardProximity * 0.01)); creature.addBehavior(destroyBehavior); //Label the creature a predator, so others can run from it. creature.addTag(new Tag("predator")); } COM: <s> make a creature eat others </s>
funcom_train/39787853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testContext() { HelloWorldApp app = new HelloWorldApp(); assertNull(app.getContextProperty("alpha")); app.setContextProperty("alpha", "bravo"); assertEquals("bravo", app.getContextProperty("alpha")); app.setContextProperty("alpha", null); assertNull(app.getContextProperty("alpha")); } COM: <s> test setting and retrieving contextual information </s>
funcom_train/20042517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _loadDefaultCollator() { oObj.loadDefaultCollator(loc, 0); boolean res = oObj.compareString("A", "a") != 0; oObj.loadDefaultCollator(loc, CollatorOptions.CollatorOptions_IGNORE_CASE); res &= oObj.compareString("a", "A") == 0; tRes.tested("loadDefaultCollator()", res) ; } COM: <s> calls the method with no options and with options ignore case </s>
funcom_train/24194425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getMainTabbedPane() { if (mainTabbedPane == null) { mainTabbedPane = new JTabbedPane(); mainTabbedPane.setTabPlacement(SwingConstants.LEFT); mainTabbedPane.addTab("Application", null, getApplicationTabPanel(), null); mainTabbedPane.addTab("Chat Server", null, getChatServerTabPanel(), null); } return mainTabbedPane; } COM: <s> this method initializes main tabbed pane </s>
funcom_train/43383114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireSearchAction(final ISearchActionListener sal) { final Vector<DandiObject> tmp = getSelectedObjects(); Runnable run = new Runnable() { public void run() { sal.searchSelection(tmp, SearchResultList.this); } }; Thread thread = new Thread(run); synchronized (thread) { thread.start(); try { thread.wait(); } catch (InterruptedException e) { } } } COM: <s> fires the required action within the context of a new thread </s>
funcom_train/29917828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeReports(List<GeneratedReportDataVO> reports){ for(GeneratedReportDataVO report : reports){ List<GeneratedReportDataVO> list = currentLists.get(report.getOrgId()); GeneratedReportDataVO toRemove = null; if(list != null){ for(GeneratedReportDataVO next : list){ if(report.getId() == next.getId() ){ toRemove = next; break; } } if(toRemove != null){ list.remove(toRemove); } this.setChanged(); notifyObservers(currentLists); } } } COM: <s> remove the given report data from the model </s>
funcom_train/10589819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateWidgetLabel(String widgetId, ContentHandler contentHandler) throws SAXException { WidgetDefinition widgetDefinition = definition.getWidgetDefinition(widgetId); if (widgetDefinition == null) { throw new SAXException("Repeater '" + getRequestParameterName() + "' at " + getLocation() + " contains no widget with id '" + widgetId + "'."); } widgetDefinition.generateLabel(contentHandler); } COM: <s> generates the label of a certain widget in this repeater </s>
funcom_train/8231840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getHelpCommand() { if (helpCommand == null) {//GEN-END:|67-getter|0|67-preInit // write pre-init user code here helpCommand = new Command("Help", Command.HELP, 0);//GEN-LINE:|67-getter|1|67-postInit // write post-init user code here }//GEN-BEGIN:|67-getter|2| return helpCommand; } COM: <s> returns an initiliazed instance of help command component </s>
funcom_train/4041349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IEditorPart openNewEditor() throws Exception { IEditorDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor( "a.txt"); return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor( new FileEditorInput(getFileForTesting()), desc.getId(), true); } COM: <s> opens a new editor </s>
funcom_train/21100729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void keyTyped(KeyEvent e) { int key=e.getKeyChar(); if(key == 10){ doAction(); } if((key<47 || key>58)&& key!=8){ e.setKeyChar((char)KeyEvent.VK_CLEAR); } } COM: <s> used to limit the input to the textfield to </s>
funcom_train/50054050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateFish() { if (caughtFish != null) { CollidableParticle entity = getEntity(); tempVector.set(0, 0, -1); rotMatrix.set(entity.getRotation()); rotMatrix.transform(tempVector); caughtFish.getPosition().scaleAdd(1, tempVector, entity.getPosition()); caughtFish.getRotation().set(entity.getRotation()); caughtFish.getObject().updateWorldTransform(); } } COM: <s> updates the caught fish position </s>
funcom_train/4209980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireInvitationRejectionListeners(String invitee, String reason) { InvitationRejectionListener[] listeners; synchronized (invitationRejectionListeners) { listeners = new InvitationRejectionListener[invitationRejectionListeners.size()]; invitationRejectionListeners.toArray(listeners); } for (InvitationRejectionListener listener : listeners) { listener.invitationDeclined(invitee, reason); } } COM: <s> fires invitation rejection listeners </s>
funcom_train/16421875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel1() { if (jPanel1 == null) { GridLayout gridLayout = new GridLayout(); gridLayout.setRows(2); gridLayout.setColumns(1); jPanel1 = new JPanel(); jPanel1.setLayout(gridLayout); jPanel1.add(getJbtnOnePlayer(), null); jPanel1.add(getJbtnTwoPlayer(), null); ButtonGroup group = new ButtonGroup(); group.add(getJbtnOnePlayer()); group.add(getJbtnTwoPlayer()); } return jPanel1; } COM: <s> this method initializes j panel1 </s>