__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/18241175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteElements(int pStart, int pCount) { if ((pStart < 0) || (pStart >= this.getSize()) || (pStart + pCount > this.getSize())) { throw new IndexOutOfBoundsException(); } this.replaceElements(pStart, pCount, null); } COM: <s> delete the elements in the specified range </s>
funcom_train/35297689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTilingMode(int mode) { if (canWriteTiles() == false) { throw new UnsupportedOperationException("Tiling not supported!"); } if (mode < MODE_DISABLED || mode > MAX_MODE) { throw new IllegalArgumentException("Illegal value for mode!"); } this.tilingMode = mode; if (mode == MODE_EXPLICIT) { unsetTiling(); } } COM: <s> determines whether the image will be tiled in the output </s>
funcom_train/3852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String replaceQuotes(String str) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < str.length(); i++) { if (str.charAt(i) == QUOTE) buf.append(QUOTE_ENTITY); else buf.append(str.charAt(i)); } return buf.toString(); } COM: <s> replace quotation marks with quote </s>
funcom_train/7630480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void release() { stayAwake(false); updateSurfaceScreenOn(); mOnPreparedListener = null; mOnBufferingUpdateListener = null; mOnCompletionListener = null; mOnSeekCompleteListener = null; mOnErrorListener = null; mOnInfoListener = null; mOnVideoSizeChangedListener = null; _release(); } COM: <s> releases resources associated with this media player object </s>
funcom_train/31294492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SortedSet getFilesForIssue(String issueKey) { SortedSet files = new TreeSet(); Iterator revisions = tagControlManager.getContent().getRevisions().iterator(); while (revisions.hasNext()) { CvsRevision revision = (CvsRevision)revisions.next(); if (JiraKeyUtils.isKeyInString(issueKey, revision.getComment())) files.add(revision.getFile()); } return files; } COM: <s> retrieve all the cvs files commited for the specified issue key </s>
funcom_train/34339566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCliente1() { if (cliente1 == null) {//GEN-END:|37-getter|0|37-preInit // write pre-init user code here cliente1 = new TextField("Cliente", null, 32, TextField.ANY);//GEN-LINE:|37-getter|1|37-postInit // write post-init user code here }//GEN-BEGIN:|37-getter|2| return cliente1; } COM: <s> returns an initiliazed instance of cliente1 component </s>
funcom_train/32084063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWordWrap(boolean wrap) { checkWidget(); if ((getStyle() & SWT.SINGLE) != 0) return; if (wordWrap == wrap) return; if (wordWrap && blockSelection) setBlockSelection(false); wordWrap = wrap; setVariableLineHeight(); resetCache(0, content.getLineCount()); horizontalScrollOffset = 0; ScrollBar horizontalBar = getHorizontalBar(); if (horizontalBar != null) { horizontalBar.setVisible(!wordWrap); } setScrollBars(true); setCaretLocation(); super.redraw(); } COM: <s> sets whether the widget wraps lines </s>
funcom_train/22285136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean repaint(int newValue, int newMin, int newMax) { boolean result = false; if (newMax < newMin) { newMax = newMin; } if (newValue < newMin) { newValue = newMin; } else if (newValue > newMax) { newValue = newMax; } if (repaintFor(newValue, newMin, newMax)) { result = true; } return result; } COM: <s> checks whether the given value and range would require a repaint </s>
funcom_train/4209585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getProviderKey(String elementName, String namespace) { StringBuilder buf = new StringBuilder(); buf.append("<").append(elementName).append("/><").append(namespace).append("/>"); return buf.toString(); } COM: <s> returns a string key for a given element name and namespace </s>
funcom_train/3496257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hideBar(final int barIndex) { Runnable doHideBar = new Runnable() { public void run() { if (barIndex==1) { statusBar1.setVisible(false); } else if (barIndex==2) { statusBar2.setVisible(false); } else { statusBar3.setVisible(false); } } }; SwingUtilities.invokeLater(doHideBar); } // end hideBar() COM: <s> hides the specified progress bar </s>
funcom_train/51273974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createMsg() { StringBuffer msg = new StringBuffer(); msg.append("<SOAP-ENV:Envelope").append("\n"); msg.append( "xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"") .append("\n"); msg.append("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"") .append("\n"); msg.append("xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">").append( "\n"); msg.append("<SOAP-ENV:Body>").append("\n"); msg.append(this.soapEnv).append("\n"); msg.append("</SOAP-ENV:Body>").append("\n"); msg.append("</SOAP-ENV:Envelope>").append("\n"); return msg.toString(); } COM: <s> creates content of the http request </s>
funcom_train/43592427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String buildKeyDoor(String p_mapName, ChainingPoint p_ch) { String map2=p_ch.getMapname(); String key=p_mapName.compareTo(map2) < 0 ? p_mapName+map2 : map2+p_mapName; key+=p_ch.getOrderX()+p_ch.getOrderY(); return key; } COM: <s> build a quests keyname about a chaining point between 2 maps </s>
funcom_train/16711601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int sweepEntityCount() { log.debug("~sweepEntityCount() : relationships [" + relationships + "]"); // TODO : Better understanding of null/empty string for embedded properties. if ("".equals(relationships) || "null".equals(relationships)) return 0; return relationships.split(",").length; } COM: <s> retrieve the count of the number of method parameters being swept over </s>
funcom_train/20440064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addArrayPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ESMFField_array_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ESMFField_array_feature", "_UI_ESMFField_type"), ESMFPackage.Literals.ESMF_FIELD__ARRAY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the array feature </s>
funcom_train/18751615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCoanchorImage(Element[] image) { int coanchorSize = getCoanchorSize(); if (image.length > coanchorSize) { // just copy the prefix Element[] copy = new Element[coanchorSize]; System.arraycopy(image, 0, copy, 0, coanchorSize); setDeltaArray(copy); } else { assert image.length == coanchorSize; setDeltaArray(image); } } COM: <s> sets the coanchor image for this state </s>
funcom_train/44149875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element send(UDDIElement el, URL url) throws TransportException { Element base = null; try { DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); base = docBuilder.newDocument().createElement("tmp"); } catch (Exception e) { e.printStackTrace(); } el.saveToXML(base); return send((Element) base.getFirstChild(), url); } COM: <s> sends a uddielement to url </s>
funcom_train/9277020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTwiceRollbacked() throws SQLException { rollback(); insertIntoTestTable(1001, 999); rollback(); assertShutdownOK(); Statement st = createStatement(); JDBC.assertSingleValueResultSet(st.executeQuery("select " + "count(*) " + "from " + "TEST_TABLE "), "0"); st.close(); } COM: <s> tests shutdown with the transaction was rollbacked and next transaction was rollbacked </s>
funcom_train/34636356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Query createQueryFromXMLNodes(List<Node> nodeList, String codeFileName, String attribute) { Document qdoc = createQueryDocument(codeFileName); Element root = (Element)qdoc.getChildNodes().item(0); for (Node node : nodeList) { Element codeQ = qdoc.createElement("codequery"); codeQ.setAttribute("target", getXPathExpression(node,attribute)); root.appendChild(codeQ); } return new Query(qdoc); } COM: <s> method to create a code query from an xml node list </s>
funcom_train/15919293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LocalDecl createLocalDecl(Position pos, Flags flags, Name name, Type type, Expr init) { LocalDef def = ts.localDef(pos, flags, Types.ref(type), name); return createLocalDecl(pos, def, init); } COM: <s> create a declaration for a local variable from scratch </s>
funcom_train/16364817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initFromFloatSampleBuffer(FloatSampleBuffer source) { init(source.getChannelCount(), source.getSampleCount(), source.getSampleRate()); for (int ch=0; ch<getChannelCount(); ch++) { System.arraycopy(source.getChannel(ch), 0, getChannel(ch), 0, sampleCount); } } COM: <s> resets this sample buffer with the data in code source code </s>
funcom_train/32371585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initNewScenario(Scenario scenario) { if(scenario == null) return; this.scenario = scenario; timer = new LWJGLTimer(); DisplaySystem display = DisplaySystem.getDisplaySystem(); cam = display.getRenderer().createCamera(display.getWidth(), display.getHeight()); cam.setLocation(scenario.getRandomCamSpawn()); display.getRenderer().setCamera(cam); setupCam(); initScene(); initialized = true; } COM: <s> initializes the given </s>
funcom_train/3860982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectRow(int row, boolean select) { boolean oldSelected = ((Row)rows.get(row)).selected; if (oldSelected != select) { System.out.println("Row "+row+": "+select); ((Row)rows.get(row)).selected = select; invalidateRowHeightCache(row, row); fireRowSelectedEvent(row, select); } } COM: <s> select or deselect a row </s>
funcom_train/42643626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensureChildrenLoaded() { if (!loadedChildren) { loadedChildren = true; int count = item.getSubItemCount(); for (int i = 0; i < count; i++) { OutlineItem child = item.getSubItem(i); OutlineItemTreeNode childTreeNode = new OutlineItemTreeNode(child); add(childTreeNode); } } } COM: <s> only load children as needed so dont have to load </s>
funcom_train/33333871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(final String key, final String value) { if (key == null) { return; } if (p.containsKey(key)) { LOG.info("replacing " + key + "=" + p.get(key) + " with " + value); } p.put(key, value); } COM: <s> adds a key value pair to this set of properties </s>
funcom_train/48365921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValidateDetailsIPAlreadyPresent() throws Exception { Host h = goodBaseHost(td); h.setIpAddress(td.getTestHost().getIpAddress()); AlterHostCmd cmd = new AlterHostCmd(); cmd.setNewHost(h); cmd.setSpecifyIp(true); Errors e = new BeanPropertyBindingResult(cmd, "editHostCmd"); ValidationUtils.invokeValidator(alterHostCmdValidator, cmd, e); assertTrue(e.hasErrors()); assertEquals(1, e.getFieldErrors("newHost.ipAddress").size()); } COM: <s> validator should fail when a host with the same ip is present </s>
funcom_train/4013587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ExecuteAction(FormDef formDef,boolean conditionTrue){ Vector<Integer> qtns = this.getActionTargets(); for(int i=0; i<qtns.size(); i++) ExecuteAction(formDef.getQuestion(Integer.parseInt(qtns.elementAt(i).toString())),conditionTrue); } COM: <s> executes the action of a rule for its condititions true or false value </s>
funcom_train/39168087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(List<Parameter> c) { boolean status = false; Iterator<Parameter> iter = c.iterator(); while(iter.hasNext()) { List<Parameter> disj = new ArrayList<Parameter>(); Parameter param = iter.next(); disj.add(param); status = add(disj); } return status; } // addAll(Collection) COM: <s> add all the members of a parameter list as individual disjunctions </s>
funcom_train/41150861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isRedundant(Instance instance) { Iterator it = new EnumerationIterator(m_baseMin.enumerateInstances()); while(it.hasNext()) { Instance r = (Instance) it.next(); if (instance.classValue() == r.classValue() && InstancesUtil.smallerOrEqual(r, instance) ) { return true; } } return false; } COM: <s> is code instance code redundant wrt the </s>
funcom_train/26336336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getLoveHate( GameCharacter character ) { // have it listed? Double specific = null; if( (specific = (Double) this.abtChars.get( (Object) character )) != null ) { return specific.doubleValue(); } // racial CharacterRace myRace = this.who.getCharacterRace(); CharacterRace itsRace = character.getCharacterRace(); return myRace.getLoveHate( itsRace ); } COM: <s> is the character friend or foe negative is enemy 1 </s>
funcom_train/18903279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void closeGivens(ConstraintExpression c) throws TuplesException { if (c instanceof Given) { ((Given)c).getTuples().close(); return; } if (c instanceof ConstraintOperation) { Iterator i = ((ConstraintOperation)c).getElements().iterator(); while (i.hasNext()) { closeGivens((ConstraintExpression)i.next()); } } } COM: <s> internal method to clean up given constraints </s>
funcom_train/2903080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendP2PData(JXUser usr, String data, byte[] signed){ JXRequest[] req = new JXRequest[1]; JunkTask jt = (JunkTask)JunkSupportedTask.getTaskDescription(JunkSupportedTask.SEND_P2P_DATA); Vector v = new Vector(3); v.add(usr.getHostName()); v.add(new Integer(usr.getPort())); v.add(data); v.add(signed); jt.setParam(v); req[0] = new JXRequest(JunkSupportedTask.JUNK_ID, jt); makeRequest(req); } COM: <s> send data to another peer machine </s>
funcom_train/3043940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(int typecode, int capacity, String value) { TreeMap map = (TreeMap)weighted.get( new Integer(typecode) ); if (map == null) // add new ordered map weighted.put( new Integer(typecode), map = new TreeMap() ); map.put(new Integer(capacity), value); } COM: <s> set a type name for specified type key and capacity </s>
funcom_train/5552026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double probability(int x) { double ret; int n = getPopulationSize(); int m = getNumberOfSuccesses(); int k = getSampleSize(); int[] domain = getDomain(n, m, k); if(x < domain[0] || x > domain[1]){ ret = 0.0; } else { ret = probability(n, m, k, x); } return ret; } COM: <s> for this disbution x this method returns p x x </s>
funcom_train/31414628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String fixClassName(String entryName) { String className = entryName; int i = className.lastIndexOf('/'); i = className.indexOf('.', i); className = className.substring(0, i); className = className.replace('/','.'); return className; } COM: <s> just turns the entry name into a class name </s>
funcom_train/3986193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public XMLElement getFirstChildNamed(String name) { // Enumeration enum = this.children.elements(); // while (enum.hasMoreElements()) { // XMLElement child = (XMLElement) enum.nextElement(); // String childName = child.getFullName(); // if ((childName != null) && childName.equals(name)) { // return child; // } // } // return null; // } COM: <s> searches a child element </s>
funcom_train/41390129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean vote(final int surveyDataID){ Boolean b=(Boolean)this.getHibernateTemplate().execute(new HibernateCallback(){ @Override public Object doInHibernate(Session session) throws HibernateException, SQLException { SurveyData updateOne=(SurveyData)session.load(SurveyData.class,surveyDataID); updateOne.setBallot(updateOne.getBallot()+1); session.update(updateOne); return true; } }); return b; } COM: <s> the method is that someone has voted on survey </s>
funcom_train/13996500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecute03() throws Exception { this.command.execute(this.parameters); for (int i = 0; i < MockEnhancedCommand.INPUT_PARAMETERS.length; i++) { String key = MockEnhancedCommand.INPUT_PARAMETERS[i].getName(); assertEquals( key.equals(ALL) ? this.parameters : this.parameters.get(PREFIX + key), this.command.lastInput.get(key)); } } COM: <s> tests that execute is called correctly with the expected parameters </s>
funcom_train/99503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public ijResult XA_RecoverStatement() throws ParseException, SQLException { int flag = 0; jj_consume_token(XA_RECOVER); flag = xatmflag(); {if (true) return xahelper.RecoverStatement(this, flag);} throw new Error("Missing return statement in function"); } COM: <s> xa recover statement is xa recover flag </s>
funcom_train/5864358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getStartScript() { final String start = _desktop.getWebApp().getConfiguration() .getPreference("CometServerPush.start", null); if (start != null) return start; final String dtid = _desktop.getId(); return "zk.invoke('zkmax.ui.cmsp',function(){zkCmsp.start('" + dtid + "');},'" + dtid + "');"; } COM: <s> returns the java script codes to enable aka </s>
funcom_train/44797941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Form getParentForm(final ActionEvent evt) { if (evt.getSource() != null && evt.getSource() instanceof Form) return (Form)evt.getSource(); return (Form)getAncestorOfClass(Form.class, (Component) evt.getSource()); } COM: <s> get the parent form where this abstract button is part of </s>
funcom_train/1377160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void findById() { List<CategoryType> ctList = categoryTypeDAO.findAll(); if (ctList == null || ctList.size() < 1) { assertTrue(false); } CategoryType categoryType = categoryTypeDAO.findById(ctList.get(0).getId()); assertNotNull(categoryType); } COM: <s> test if a code category type code can be found by its id </s>
funcom_train/5028361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFridayValue(int minutes) { IElementWrapper iew = this.getParentWrapper(); if (iew instanceof PersonWrapper) { PersonWrapper personWrapper = (PersonWrapper) iew; getAvailabilityRecord().setFridayValue(minutes); persisting(personWrapper); } if (iew instanceof OrganizationWrapper) { OrganizationWrapper organizationWrapper = (OrganizationWrapper) iew; getAvailabilityRecord().setFridayValue(minutes); persisting(organizationWrapper); } } COM: <s> set the availability in minutes on friday </s>
funcom_train/48502278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public M asSingle() throws PreparedQuery.TooManyResultsException { List<M> list = asList(); if (list.size() == 0) { return null; } if (list.size() > 1) { throw new PreparedQuery.TooManyResultsException(); } return list.get(0); } COM: <s> returns the single result or null if no entities match </s>
funcom_train/29724734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void genClass(File dest, String tablename, String packageName) throws SQLException, IOException { if (!dest.exists()) dest.mkdirs(); if (!dest.isDirectory()) throw new RuntimeException(dest.getAbsolutePath() + " must be a directory."); String classContent = genClass(tablename, packageName); FileWriter fw = new FileWriter(new File(dest, tablename + ".java")); fw.append(classContent); fw.close(); } COM: <s> generate a class from a database table </s>
funcom_train/22900184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean unwarnIp(String ip, int amount, String user) { Iterator i = ipList.iterator(); while (i.hasNext()) { LoggedIP lip = (LoggedIP)i.next(); if (lip.getIp().equals(ip)) { lip.unwarn(amount, user); return true; } } return false; } COM: <s> unwarns a person by amount </s>
funcom_train/3785057
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean mouseHandler(int x, int y) { /* mouseHandler */ activeBin= -1; for(int i=0;i<=255;i++) if(x==xPainted[i]) { /* find closest point */ activeBin= i; return(true); } return(false); } /* mouseHandler */ COM: <s> mouse handler search for the active bin if any </s>
funcom_train/21345135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScreenPosition(int x, int y) { screenPosition.setLocation(Math.max(0, Math.min(x, bufferWidth - gameWidth)), Math.max(0, Math.min(y, bufferHeight - gameHeight))); } COM: <s> defines the position of the screen within the double buffer space </s>
funcom_train/44715183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ACSObject getObject() { OID objOID = getObjectOID(); if (objOID == null) { return null; } else { try { return (ACSObject) DomainObjectFactory. newInstance(getObjectOID()); } catch (DataObjectNotFoundException de) { throw new UncheckedWrapperException("Could not load object with OID " + getObjectOID(), de); } } } COM: <s> get the acsobject this workflow is associated with </s>
funcom_train/13274043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createPluginActions(List<Plugin> plugins) { this.pluginActions = new ArrayList<Action>(); if (plugins != null) { for (Plugin plugin : plugins) { for (final PluginAction pluginAction : plugin.getActions()) { // Create a Swing action adapter to plug-in action this.pluginActions.add(new ActionAdapter(pluginAction)); } } } } COM: <s> creates the swing actions matching each actions available in code plugins code </s>
funcom_train/14091419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object arg0) { if (arg0 == null) { return false; } if (!(arg0 instanceof NamedEntityObjectIdentity)) { return false; } NamedEntityObjectIdentity other = (NamedEntityObjectIdentity) arg0; if (this.getId().equals(other.getId()) && this.getClassname().equals(other.getClassname())) { return true; } return false; } COM: <s> important so caching operates properly </s>
funcom_train/37739077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setString(int n, String string) throws SQLException { if (delegee != null) { if (dbProps.fixPointBaseSetString()) { delegee.setCharacterStream (n, new StringReader (string), string.length()); } else { delegee.setString(n, string); } if (deferDelegee) { maybeSave (n, SET_STRING, string); } return; } throw new UnsupportedOperationException (); } COM: <s> calls the code set string code method on the delegee prepared </s>
funcom_train/19976531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteAll() { boolean success = false; for (int i = 0; i < this.size(); i++) { if (success) { success = this.get(i).delete(); } else {//save state this.get(i).delete(); } } return success; } COM: <s> invokes the delete method on every entry in the list </s>
funcom_train/51724688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Point2D project2Dplus(double x, double y) { final Point2D p = project2D(x, y); if (p != null) { return new Point2D.Double(depx + p.getX() * (zoomx), -depy - p.getY() * (zoomy)); } return null; } COM: <s> provide a graphic point in pixels matching with a real position x y </s>
funcom_train/37229138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDateTime( String sDateTime ) { HL7Element e = new SimpleElement( iLevel + 1, this ); e.setType( "ST" ); e.setName( "TS.1" ); e.setValue( sDateTime ); try { setComponent( e, 1 ); } catch( MalformedFieldException mfe ) { mfe.printStackTrace(); } } COM: <s> set the actual iso formatted datetime string </s>
funcom_train/20847044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(AbstractAction action2) { boolean isEqual = false; UniformResourceIdentifier endpointLocation1 = service.getEndpointLocation(); UniformResourceIdentifier endpointLocation2 = action2.getService().getEndpointLocation(); if (endpointLocation1.equals(endpointLocation2)) { String actionName1 = this.getName(); String actionName2 = action2.getName(); if (actionName1.equalsIgnoreCase(actionName2)) { if (qnPortType.equals(action2.getPortType())) { isEqual = true; } } } return isEqual; } COM: <s> this method compares two actions if they are equal or not </s>
funcom_train/17847595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isComplete() { int size = mProgramList.size(); if (size == 0) { return false; } else { Program lastProgram = mProgramList.get(size - 1); int endTime = lastProgram.getHours() * 60 + lastProgram.getMinutes() + lastProgram.getLength(); return endTime >= (23 * 60); } } COM: <s> returns whether this channel day program is complete </s>
funcom_train/16671979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matchPreferences(ReasonerAPI reasoner) throws Exception { List<String> localNFP = new ArrayList<String>(); List<String> globalNFP = new ArrayList<String>(); for (SemanticAnnotation req: LPMLProxy.getPreferences(this.getDesignStructure())){ globalNFP.add (req.getReferenceURI()); } for (SemanticAnnotation assignment: assignmentSet.getAssignments()){ localNFP.add(assignment.getReferenceURI()); } HashMap<String, List<String>> incompatibilities = reasoner.checkNFPIncompatibility (localNFP, globalNFP); return incompatibilities.isEmpty(); } COM: <s> detects incompatible global preferences in the assignment set </s>
funcom_train/18566338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JRadioButton getLoadedRadioButton() { if (loadedRadioButton == null) { loadedRadioButton = new JRadioButton(); loadedRadioButton.setText("loaded"); loadedRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ilPool.activateView(); } }); } return loadedRadioButton; } COM: <s> this method initializes loaded radio button </s>
funcom_train/9086731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Forms entity) { EntityManagerHelper.log("deleting Forms instance", Level.INFO, null); try { entity = getEntityManager().getReference(Forms.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent forms entity </s>
funcom_train/37521943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processTree(CompilerPassEnterable tree) { long lastTime = System.currentTimeMillis(); try { tree.checkInterface(); } catch (PositionedError e) { reportTrouble(e); } if (verboseMode()) { inform( MjcMessages.FILE_INTERFACE_CHECKED, tree.getTokenReference().file(), new Long(System.currentTimeMillis() - lastTime)); } } COM: <s> checks the basic interfaces to make sure things generally </s>
funcom_train/48558317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand5() { if (backCommand5 == null) {//GEN-END:|167-getter|0|167-preInit backCommand5 = new Command("\u041D\u0430\u0437\u0430\u0434", Command.BACK, 0);//GEN-LINE:|167-getter|1|167-postInit }//GEN-BEGIN:|167-getter|2| return backCommand5; } COM: <s> returns an initiliazed instance of back command5 component </s>
funcom_train/39363326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Fixture loadFixtureFromClasspath(String resourceName) { try { Element element = cache.get(resourceName); Object entry = element.getObjectValue(); if (entry != null && entry != NULL_FIXTURE) { // If it existed, it can be cast Fixture fixture = (Fixture) entry; return fixture; } // No fixture, return null return null; } catch (CacheException e) { throw new DDStepsException("Could not get Fixture for " + resourceName, e); } } COM: <s> loads fixture from classpath using the resource name </s>
funcom_train/19139939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void swap(TLinkable from, TLinkable to) { TLinkable p = from.getPrevious(); TLinkable n = from.getNext(); if (null != p) { to.setPrevious(p); p.setNext(to); } if (null != n) { to.setNext(n); n.setPrevious(to); } from.setNext(null); from.setPrevious(null); } COM: <s> replace from with to in the list </s>
funcom_train/33814704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getIncideParaIRPFCheckBox() { if (incideParaIRPFCheckBox == null) { incideParaIRPFCheckBox = new JCheckBox(); incideParaIRPFCheckBox.setBounds(new Rectangle(15, 254, 145, 22)); incideParaIRPFCheckBox.setText("Incide para IRPF?"); } return incideParaIRPFCheckBox; } COM: <s> this method initializes incide para irpfcheck box </s>
funcom_train/2302201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initTransitionListener() { minDfa.addTransitionListener(new AutomataTransitionListener() { public void automataTransitionChange (AutomataTransitionEvent e) { if (!e.isAdd()) return; Transition transition = e.getTransition(); if (!remainingTransitions.contains(transition)) { JOptionPane.showMessageDialog (view, "That transition is not correct!"); minDfa.removeTransition(transition); } else { remainingTransitions.remove(transition); } } }); } COM: <s> sets up the listener of transitions that will monitor the </s>
funcom_train/37835930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showDescription(final String category, final String item, final String description, final String information, final List<String> details) { SwingUtilities.invokeLater(new Runnable() { public void run() { getProgressLog().setPageContent(category, item, description, information, details); showWindow(); } }); } COM: <s> show the description of an item in a category </s>
funcom_train/35450727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void append(Reader reader) throws IOException { char[] buf = new char[max_text_length/2]; while (text.length() < max_text_length && reader.ready()) { int length = reader.read(buf); append(new String(buf, 0, length)); } } COM: <s> append the target text for language detection </s>
funcom_train/40852479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void transform() throws InkMLComplianceException{ if(points == null){ points = new double[size][getTargetFormat().getChannelCount()]; } getCanvasTransform().transform(sourcePoints, points,getSourceFormat(), getTargetFormat()); notifyObserver(ON_CHANGE); } COM: <s> transforms the source points to the target points with the </s>
funcom_train/26525550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(DreamComponent newChild) { boolean answer = false; if(model.isInsertable(newChild, true)) { answer = true; super.add(newChild); newChild.isInserted = true; newChild.setModel(((DreamComponent)getRoot()).getModel()); model.reload(this); newChild.callOnInsert(); } return answer; } COM: <s> adds a new child to this dream component </s>
funcom_train/28314200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ErrorHandler getDefaultErrorHandler() { return new ErrorHandler() { public void error(SAXParseException ex) throws SAXException { if (context.isEmpty()) { logger.error("Missing DOCTYPE."); } throw ex; } public void fatalError(SAXParseException ex) throws SAXException { throw ex; } public void warning(SAXParseException ex) throws SAXException { // ignore } }; } COM: <s> creates default error handler used by this parser </s>
funcom_train/41509083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SVNInfo doInfo(File path, SVNRevision revision) throws SVNException { final SVNInfo[] result = new SVNInfo[1]; doInfo(path, revision, false, new ISVNInfoHandler() { public void handleInfo(SVNInfo info) { if (result[0] == null) { result[0] = info; } } }); return result[0]; } COM: <s> collects and returns information on a single working copy item </s>
funcom_train/48713913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInitialText(String text) { initialText = text; if (useNewLook) { filterText.setMessage(text); if (filterText.isFocusControl()) { setFilterText(initialText); textChanged(); } else { getDisplay().asyncExec(new Runnable() { public void run() { if (!filterText.isDisposed() && filterText.isFocusControl()) { setFilterText(initialText); textChanged(); } } }); } } else { setFilterText(initialText); textChanged(); } } COM: <s> set the text that will be shown until the first focus </s>
funcom_train/7525158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(Message msg) throws ChannelNotConnectedException, ChannelClosedException { checkClosedOrNotConnected(); if(msg == null) throw new NullPointerException("msg is null"); if(stats) { sent_msgs++; sent_bytes+=msg.getLength(); } down(new Event(Event.MSG, msg)); } COM: <s> sends a message through the protocol stack </s>
funcom_train/25039774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setArgument(String argument, String value) { if (getArgumentIsDefined(argument)) { int index = 0; boolean found = false; while (index < arguments.size() && !found) { if (arguments.elementAt(index).equalsIgnoreCase(argument)) found = true; else index++; } arguments.set(index, argument); values.set(index, value); } else { arguments.add(argument); values.add(value); argumentQueried.add(Boolean.FALSE); } } COM: <s> set the value of an argument </s>
funcom_train/20923704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createRequest(OpendfDebugTarget target) throws CoreException { try { JSONObject request = new JSONObject(); request.put(DDPConstants.REQUEST, DDPConstants.REQ_SET); request.put(DDPConstants.ATTR_LINE, getLineNumber() - 1); target.sendRequest(request); } catch (JSONException e) { IStatus status = new Status(IStatus.ERROR, ID_PLUGIN, "json error", e); throw new CoreException(status); } } COM: <s> create the breakpoint specific request in the target </s>
funcom_train/8047001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireActionPerformed(TapEvent ce) { ActionListener[] listeners = this.getActionListeners(); synchronized(listeners) { for (int i = 0; i < listeners.length; i++) { ActionListener listener = (ActionListener)listeners[i]; listener.actionPerformed(new ActionEvent(this, ce.getTapID(), "action performed on tangible button")); } } } COM: <s> fires an action event with a click event id as its id </s>
funcom_train/3693306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSealed(String name, Manifest man) { String path = name.replace('.', '/').concat("/"); Attributes attr = man.getAttributes(path); String sealed = null; if (attr != null) { sealed = attr.getValue(Name.SEALED); } if (sealed == null) { if ((attr = man.getMainAttributes()) != null) { sealed = attr.getValue(Name.SEALED); } } return "true".equalsIgnoreCase(sealed); } COM: <s> internal implementation for the define class method </s>
funcom_train/43396630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initTrack(int tracknr) { keys = new Key[NR_CHANNELS][NR_KEYS]; controls = new Key[NR_CHANNELS][NR_CONTROLS]; notes = new LinkedList<Key>(); pedals = new LinkedList<Key>(); currentProgram = 0; currentTick = 0; // currentTrackNr = tracknr; } COM: <s> initializes various data structures before a track is processed </s>
funcom_train/21883962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getOsname(final String type, final String name) { final StringBuffer sb = new StringBuffer(); sb.append("node.").append(type + ".").append(name + ".").append(Constants.PROPERTY_NODE_OSNAME_FIELD); return getProject().getProperty(sb.toString()); } COM: <s> returns the os name </s>
funcom_train/21343209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initCacheLocked() { logger.info("Feed Cache path set to " + cachePath); File f = new File(cachePath); if (f.exists() && !f.isDirectory()) { throw new RuntimeException("Configured cache directory already exists as a file: " + cachePath); } if (!f.exists() && !f.mkdirs()) { throw new RuntimeException("Could not create directory " + cachePath); } } COM: <s> must be called only when lock </s>
funcom_train/41490105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSearchPattern() { String pattern = "%"; if (StringUtils.hasText(searchString)) { String search = new String(searchString); pattern = "%" + search.toLowerCase().replace('*', '%') + "%"; } if (logger.isDebugEnabled()) {logger.debug("SearchCriteria.pattern=" + pattern);} return pattern; } COM: <s> returns the search pattern to be used by the database for the specified </s>
funcom_train/2572894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(byte[] b) { try { if (localecho) emulation.putString(new String(b)); telnet.transpose(b); //out.write(b); } catch (IOException e) { System.err.println("jta: error sending data: " + e); } } COM: <s> before sending data transform it using telnet which is sending it </s>
funcom_train/22215774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startTest(Test t) { testStarts.put(t, new Long(System.currentTimeMillis())); Element currentTest = doc.createElement(XMLConstants.TESTCASE); currentTest.setAttribute(XMLConstants.ATTR_NAME, JUnitVersionHelper.getTestCaseName(t)); rootElement.appendChild(currentTest); testElements.put(t, currentTest); } COM: <s> interface test listener </s>
funcom_train/2447054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyTo(JTable table) { switch (this) { case BOTH: table.setShowGrid(true); break; case HORIZONTAL: table.setShowHorizontalLines(true); table.setShowVerticalLines(false); break; case VERTICAL: table.setShowHorizontalLines(false); table.setShowVerticalLines(true); break; case NONE: table.setShowGrid(false); } } COM: <s> applies this grid mode to a table </s>
funcom_train/47314417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void firePortal(float angle){ //if we are succesful in firing our portal, then we move onto the next one. if(Portal.getPortal(m_portal).shootPortal(angle, m_player.getfaceingDir(), m_player.getCurrentPosition(), m_cm)) m_portal = (m_portal + 1)%Portal.NUM_OF_PORTALS; } COM: <s> this method will fire a portal in the given direction from </s>
funcom_train/12567833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User loadUser(String userName, Map roles) { Connection conn = null; User user = null; PreparedStatement stat = null; ResultSet res = null; try { conn = this.getConnection(); stat = conn.prepareStatement(LOAD_USER_FROM_USERNAME); stat.setString(1, userName); res = stat.executeQuery(); user = this.createUserFromRecord(res, roles); } catch (Throwable t) { processDaoException(t, "Error in downloading user", "loadUser"); } finally { closeDaoResources(res, stat, conn); } return user; } COM: <s> uploads the user corresponding to the given user name </s>
funcom_train/39895313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UserRoleInProject getDefaultUserRole(User user, Project project) { UserRoleInProject userRoleInProject = new UserRoleInProject(); userRoleInProject.setUser(user); userRoleInProject.setProject(project); userRoleInProject.setRole(getDefaultRole()); return userRoleInProject; } COM: <s> returns default role for user whenshe added to new project </s>
funcom_train/29376649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activateCustomize() { int numCustomizations = postCreateCustomizations.size(); for ( int i = 0; i < numCustomizations; i++ ) { PostActivateCustomization pac = (PostActivateCustomization)postCreateCustomizations.get( i ); XmlElement customization = (XmlElement)customizations.get( pac.propertySet ); applyCustomizations( pac.comp, customization, PRE_ACTIVATE_TIME ); } postCreateCustomizations.clear(); } COM: <s> apply a named set of customizations to a component </s>
funcom_train/49790233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAuthenticateThenRestartSession() throws Exception { // authenticate as normal IFile sitemap = doTestAccessWithoutIDThenProvideIt(); // restart session restartSession(sitemap, "Home"); // try and view the same page again; we have to reauthenticate gotoSitemapThenPage(sitemap, "See Your OpenID", "Provide Current OpenID"); assertNoProblem(); // our OpenID is not a label anywhere assertLabelTextNotPresent(openid); } COM: <s> we authenticate but then reset the session we have to reauthenticate </s>
funcom_train/45109205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int unmapScenario(int scenarioIdx, boolean rootOnly) throws Exception { Vector<Object> v = new Vector<Object>(); v.addElement(scenarioIdx); v.addElement(true);// isScenario == true v.addElement(rootOnly); return (Integer) handleXmlCommand("unmapTest: test index-" + scenarioIdx, "jsystem.unmapTest", v); } COM: <s> will unmap a scenario at index scenario idx </s>
funcom_train/25966284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLocaleDisplayPattern() { if (bundle == null) { bundle = (ICUResourceBundle)UResourceBundle.getBundleInstance( ICUResourceBundle.ICU_BASE_NAME, ULocale.getDefault()); } ICUResourceBundle locDispBundle = (ICUResourceBundle) bundle.get(LOCALE_DISPLAY_PATTERN); String localeDisplayPattern = locDispBundle.getStringWithFallback(PATTERN); return localeDisplayPattern; } COM: <s> returns locale display pattern for this locale e </s>
funcom_train/3467238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File registerOldFile(java.lang.String p_name, java.lang.String p_id) { // @BEGINPROTECT _3CBAABCD01DD TransactionFile file = this.findOrCreateFile(p_name); TransactionFileGroup group = this.findOrCreateFileGroup(p_id); file.setOldFileGroup(group); return file; // @ENDPROTECT } COM: <s> used by the file list mechanism </s>
funcom_train/5855429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String addTail(String basis, String extension, int value) { String tail = "~" + value; int allowed = 8 - tail.length(); basis = (basis.length() > allowed) ? basis.substring(0, allowed) : basis; return (extension.equals("")) ? basis + tail : basis + tail + "." + extension; } COM: <s> add the given numeric table to the short name supplied </s>
funcom_train/46729304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IControlNode getFirstSelectedParentControl() throws ISTreeNodeNotSelectedException{ for (ISTreeNode node : getSelectedNodes()) { if (node.getParent() != null) { ISTreeNode parentNode = (ISTreeNode) node.getParent(); if (parentNode.getUserObject() instanceof IControlNode) { return (IControlNode) parentNode.getUserObject(); } } } throw new ISTreeNodeNotSelectedException(); } COM: <s> get the first selected nodes parent if a control </s>
funcom_train/4305352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Slider createVerticalScrollBar(int height) { loadGlyphImages(); int w = SCROLLBAR_WIDTH; int h = height; Slider slider = new Slider( createVerticalBarImage(GLYPHS1, COLOR1, h), createVerticalBarImage(GLYPHS2, COLOR2, Math.max(w, h/5)), 0, 0); slider.setOrientation(Slider.VERTICAL); return slider; } COM: <s> creates a vertical scroll bar with the default appearance </s>
funcom_train/15717994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String t = "?"; switch (type) { case Semantic: t = "S"; break; case Keyword: t = "K"; break; case Fulltext: t = "F"; break; } return t+"["+docId+", "+score+" ("+(matchingConcepts != null ? Arrays.asList(matchingConcepts) : "null")+", "+(rankedConcepts != null ? Arrays.asList(rankedConcepts) : "null")+")]"; } COM: <s> return text representation of search result </s>
funcom_train/42475189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isOperator(String word) { assert word != null; if (word.trim().toUpperCase().equals("AND") || word.toUpperCase().equals("OR") || word.toUpperCase().equals("NOT") || word.toUpperCase().equals("WITHIN")) return true; return false; } COM: <s> checks if the given string is a supported operator </s>
funcom_train/33242136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString () { return ("Name:\t\t" + this.name + "\n" + "Description:\t\t" + this.description + "\n" + "Expected Results:\t" + this.expectedResults + "\n" + "Actual Results:\t\t" + this.actualResults + "\n" + "Reset Data:\t\t" + this.resetData + "\n" + "Status:\t\t" + this.status ); } COM: <s> dump out contents of test results object in a formatted string </s>
funcom_train/37422400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Site findSiteByName(String pName) throws ClassNotFoundException, SQLException { Vector tVect = findSiteByQuery("select * from site where name = " + Utility.isNull(pName)); if (tVect.size() > 0) return (Site) tVect.firstElement(); else return null; } COM: <s> finds a site in the database using its name </s>
funcom_train/24536473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getGridBagConstraintsFillPreference(IJavaObjectInstance component) { BeanDecorator bd = (BeanDecorator) ClassDecoratorFeatureAccess.getDecoratorWithKeyedFeature( component.getJavaType(), BeanDecorator.class, GRIDBAG_FILL_PREFERENCE_KEY); if (bd != null) { return ((EEnumLiteral) bd.getKeyedValues().get(GRIDBAG_FILL_PREFERENCE_KEY)).getValue(); } return GridBagConstraint.NONE; // default for Component and all others } COM: <s> get the fill preference for a specific component type </s>