__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/4125918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Element getChildElement(Element element, String tagName) { NodeList n = element.getChildNodes(); for (int i = 0; i < n.getLength(); i++) { if (((Element) n.item(i)).getTagName().equals(tagName)) { return (Element) n.item(i); } } return null; } COM: <s> convenience method returns the first child element with the specified </s>
funcom_train/13275454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectAll() { if (this.focusedView == getFurnitureController().getView()) { getFurnitureController().selectAll(); } else if (this.focusedView == getPlanController().getView() || this.focusedView == getHomeController3D().getView()) { getPlanController().selectAll(); } } COM: <s> selects everything in the focused component </s>
funcom_train/39050724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp() throws Exception { System.err.println("Testcase: " + getName()); serverNode = new SgsTestNode("TestAbstractService", null, null); txnScheduler = serverNode.getSystemRegistry(). getComponent(TransactionScheduler.class); taskOwner = serverNode.getProxy().getCurrentOwner(); } COM: <s> prints the test case and sets the service field to a new instance </s>
funcom_train/36955888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSuperModules(List interfacesNames, boolean canBeModified) { ArrayList interfaces= new ArrayList(interfacesNames.size()); for (Iterator iter= interfacesNames.iterator(); iter.hasNext();) { interfaces.add(new InterfaceWrapper((String) iter.next())); } fSuperModulesDialogField.setElements(interfaces); fSuperModulesDialogField.setEnabled(canBeModified); } COM: <s> sets the super interfaces </s>
funcom_train/22342370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDistanceFromStart(GeocoderPosition targetPosition) { try { int first = service.findNearestFirstWaypointGivenLocation(targetPosition); return getDistanceToWaypoint(first) + service.distance(findWaypoint(first), targetPosition); } catch (Exception e) { logger.warning("internal error: "+e); e.printStackTrace(); } return 0.0; } COM: <s> calculates the distance from the beginning waypoint </s>
funcom_train/46787034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPrecedesMessagesPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Task_precedesMessages_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Task_precedesMessages_feature", "_UI_Task_type"), EZRealtimePackage.Literals.TASK__PRECEDES_MESSAGES, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the precedes messages feature </s>
funcom_train/36147633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String nextString() { String str = readString(); if (str == null || "".equals(str)) { return null; } char sep1 = StringUtils.nextCharacterSeparator(getBuffer().getDelimiter()); StringTokenizer stk = new StringTokenizer(str, sep1); stk.next(); String value = stk.next(); return (String) getObject(String.class.getName(), value, sep1); } COM: <s> gets the next string object </s>
funcom_train/7372180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExecutableManager createExecutableManager() throws ExecException { ExecutableManager executableManager = null; switch (execType) { case LOCAL: case MAPREDUCE: { executableManager = new HadoopExecutableManager(); } break; default: { int errCode = 2040; String msg = "Unkown exec type: " + execType; throw new ExecException(msg, errCode, PigException.BUG); } } return executableManager; } COM: <s> create a new </s>
funcom_train/20885174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAttributeWithFormat() { AttributeWithFormatTestDTO obj = new AttributeWithFormatTestDTO(); obj.attribute = getDateForFormat("28.02.2007:15:21:27"); assertTrue(JSefaTestUtil.serialize(XML, obj).indexOf("28.02.2007:15:21:27") >= 0); } COM: <s> tests the format configuration for an attribute </s>
funcom_train/43038443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder sb = new StringBuilder(200); sb.append(flapHdr).append("\n"); if (snacPacket != null) { sb.append(snacPacket).append("\n"); } if ((tlvList != null) && !tlvList.isEmpty()) { for (TLV tlv : tlvList) { sb.append(tlv.toString()); } } return sb.toString(); } COM: <s> return string representation of the command object </s>
funcom_train/3785687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getStateValue(String key, long def) { /* getStateValue */ String sVal= getStateValue(key, null); long val; if(sVal==null) return(def); try { Long valP= new Long(sVal); val= valP.longValue(); } catch(NumberFormatException e) { val= def;} return(val); } /* getStateValue */ COM: <s> get state value get float param and use default if not found </s>
funcom_train/42451277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getCsv() { if (csv == null) { csv = new JRadioButton(); csv.setText("Comma Separated Value [.csv]"); csv.setSelected(true); csv.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setType(Enums.FileType.CSV); } }); group.add(csv); } return csv; } COM: <s> this method initializes csv </s>
funcom_train/2904454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addFrameTags(XMLTag parent){ if((parent!=null) && (skins!=null) && (skins.size()>0)){ boolean any = false; Object[] sk = skins.toArray(); Vector v = (Vector)parent.value; for(int i=0; i<sk.length; i++){ if(sk[i] != null){ XMLTag.addTag(parent, "skin", sk[i]); any = true; } } return any; } return false; } COM: <s> add frame tags </s>
funcom_train/21019633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String readLine(int lineNumber) { String result = ""; IComposite line = _textArea.get(lineNumber).getComposite(); for (int i = 0; i < line.getElementCount(); i++) { IElement element = line.get(i); if (element instanceof Character) { Character character = (Character) element; result += character.getCharacter(); } else { result += element.toString(); } } return result; } COM: <s> reads the line with the given number of the </s>
funcom_train/14365990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean containsChanges(ChangeDescription changes_p) { boolean result = false; // Precondition. if (null != changes_p) { // Get all changes on the model element object. EMap<EObject, EList<FeatureChange>> objectChanges = changes_p.getObjectChanges(); result = !objectChanges.isEmpty(); } return result; } COM: <s> return whether or not specified change description contains changes </s>
funcom_train/42188542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonAdd() { if (jButtonAdd == null) { jButtonAdd = new JButton(); jButtonAdd.setText("Crear Nueva"); jButtonAdd.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { padre.crearMyHarvest(); } }); } return jButtonAdd; } COM: <s> this method initializes j button add </s>
funcom_train/3406002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText(String text, String charset) { if (charset == null) { if (MimeUtility.checkAscii(text) != MimeUtility.ALL_ASCII) charset = MimeUtility.getDefaultMIMECharset(); else charset = "us-ascii"; } setContent(text, "text/plain; charset=" + MimeUtility.quote(charset, HeaderTokenizer.MIME)); } COM: <s> convenience method that sets the given string as this parts </s>
funcom_train/31200526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int countAll() throws SystemException { Object[] finderArgs = new Object[0]; Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL, finderArgs, this); if (count == null) { Session session = null; try { session = openSession(); Query q = session.createQuery(_SQL_COUNT_TILELAYOUT); count = (Long)q.uniqueResult(); } catch (Exception e) { throw processException(e); } finally { if (count == null) { count = Long.valueOf(0); } FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL, finderArgs, count); closeSession(session); } } return count.intValue(); } COM: <s> counts all the tile layouts </s>
funcom_train/22338940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOkButton() { if (this.okButton == null) { this.okButton = new JButton(); this.okButton.setText("Save"); this.okButton.setPreferredSize(new Dimension(73, 26)); this.okButton.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { butSaveActionPerformed(e); } }); } return this.okButton; } COM: <s> this method initializes ok button </s>
funcom_train/31955956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getTrueSize() { if (dataArray != null && dataArray.length > 0) { return (ArrayFuncs.computeSize(dataArray[0][0]) + ArrayFuncs .computeSize(dataArray[0][1])) * dataArray.length; } else { return 0; } } COM: <s> get the size of the actual data element </s>
funcom_train/32213280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(BuilderClientMonitor monitor) throws IOException { while (true) { cc.p(cc.prompt()); String read = cc.readLine(); if (read == null) { return; } try { parse(read); }catch (EndOfFileException e){ return; } // notify the main thread that all components are populated in this communication thread if (read.equals("")) monitor.doNotify(); }//while }//method COM: <s> main command line processing loop </s>
funcom_train/32051852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBuildMetrics(String buildMetrics) { this.buildMetrics = new File(getProject().getBaseDir(), buildMetrics); if (!this.buildMetrics.exists()) throw new BuildException("The profiler source file '" + this.buildMetrics + "' does not exist."); } COM: <s> the mandatory profiler source file </s>
funcom_train/31702197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Line2D createLineDrawLine(int graphPos, double dX1, double dY1, double dX2, double dY2) { return new Line2D(new double[]{dX1, dX2}, new double[]{dY1, dY2}, Line2D.SOLID, 0.5f, Color.black, Point2D.NONE); } COM: <s> creates a line for user line drawing </s>
funcom_train/46060279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUpgradesHistory(UpgradeHistoryData upgradeHistoryData, String version) { this.upgradesHistories.put(version, upgradeHistoryData); File upgradesDir = new File(OLATContext.getUserdataRoot(), SYSTEM_DIR); upgradesDir.mkdirs(); // create if not exists File upgradesHistoriesFile = new File(upgradesDir, INSTALLED_UPGRADES_XML); XStreamHelper.writeObject(upgradesHistoriesFile, this.upgradesHistories); } COM: <s> persists the upgrade history data on the file system </s>
funcom_train/36770581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addEndThread(Thread thread) { if (thread == null) { throw new NullPointerException("thread == null"); } Integer threadId = threadIds.remove(thread); if (threadId == null) { throw new IllegalArgumentException("Unknown thread " + thread); } HprofData.ThreadEvent event = HprofData.ThreadEvent.end(threadId); hprofData.addThreadEvent(event); } COM: <s> record that a thread has disappeared </s>
funcom_train/31955399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeEntryByID(int id) throws KDbException { try { openDB(); dbStore.deleteRecord(id); } catch (Throwable t) { if (bDebug) { System.err.println("removeEntryByID failed: " ); t.printStackTrace(); } throw new KDbException(KDbException.RECOVERABLE, "Could not delete record: " + id); } }//removeEntryByID COM: <s> remove a db entry </s>
funcom_train/4231112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double computePageWidthScale(int border) { Dimension size = getViewport().getExtentSize(); Dimension p = getGraph().getMinimumSize(); if (p != null && (p.getWidth() != 0 || p.getHeight() != 0)) { size.width = size.width - border; return (double) size.getWidth() / (double) p.getWidth(); } return 0; } COM: <s> computes the scale for the pagewidth autoscale policy </s>
funcom_train/37821304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String initCodeText() { assert rel != null; assert left != null; assert right != null; String relation; switch (rel) { case EQ: relation = "=="; break; case NE: relation = "!="; break; case LT: relation = "<"; break; case GT: relation = ">"; break; case LE: relation = "<="; break; case GE: relation = ">="; break; default: throw new AssertionError(rel); // should not happen } return left.getCodeText() + " " + relation + " " + right.getCodeText(); } COM: <s> construct the c0 code representation for this object </s>
funcom_train/4194458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LocationService addUserContact(String user, NameAddress name_addresss, Date expire) { if (!hasUser(user)) addUser(user); UserBindingInfo ur=getUserBindingInfo(user); ur.addContact(name_addresss,expire); changed=true; return this; } COM: <s> adds a contact </s>
funcom_train/28887021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerContentProvider(ContentProviderFace contentProvider) { if (contentProvider != null) { // First remove all other instances of the supplied content provider // this is perfectly ok because a content provider instance does not // contain // instance variables. removeContentProvider(contentProvider.getContentProviderTypeID()); this.contentProviders.add(contentProvider); } else { log.warn("ContentProvider could not be inserted" + " because the supplied object was null"); } } COM: <s> this shows a possibility of adding a content provider via java code </s>
funcom_train/2624074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEquals() { System.out.println("equals"); Object obj = null; JFCXWindow instance = null; boolean expResult = false; boolean result = instance.equals(obj); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of equals method of class jfcxwindow </s>
funcom_train/6405246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean save(int width, int height, int depth, int freq, boolean fullscreen, String renderer) { prop.clear(); setWidth(width); setHeight(height); setDepth(depth); setFrequency(freq); setFullscreen(fullscreen); setRenderer(renderer); try { save(); } catch (IOException e) { logger.warning("Could not save properties: " + e); return false; } return true; } COM: <s> code save int int int int boolean string code </s>
funcom_train/12699066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addPoint(DBPoint point) throws WildDBException, SQLException { return addPoint(point.getLatitude(), point.getLongitude(), point.getType(), point.getLabel(), point.getTooltip(), point.getLakeID(), point.getNeighbors()); COM: <s> inserts a new point into the point table for the point data specified </s>
funcom_train/51093511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean parseKANJIDIC(){ L1CharacterMap = parseKanjiDicStyleDictionary( isr_dictionary ); if (L1CharacterMap == null) { System.out.println("What the hell, L1CharacterMap, the dict. is null!?" ); return false; } // end of if (L1CharacterMap == null) else { return this.j3.addDictionary( this, fileName, sKANJIDIC ); } } COM: <s> describe code parse kanjidic code method here </s>
funcom_train/13275305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void importFurniture() { // Always use selection mode after an import furniture operation getPlanController().setMode(PlanController.Mode.SELECTION); if (this.focusedView == getFurnitureCatalogController().getView()) { getFurnitureCatalogController().importFurniture(); } else { getFurnitureController().importFurniture(); } } COM: <s> imports furniture to the catalog or home depending on the focused view </s>
funcom_train/32220578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void adjustLomNode(Element elem) { if (elem.getName()=="entity") { String vcard = elem.getText().trim(); if (vcard.length() > 0) { vcard = vcard.replace("\r\n", "\n"); vcard = vcard.replace("\r", "\n"); vcard = vcard + "\n"; vcard = vcard.replace("\n","&#13;&#10;"); CDATA cdata = new DefaultCDATA(vcard); List<Object> list = new ArrayList<Object>(); list.add(cdata); elem.setContent(list); } } for (Object obj: elem.elements()) adjustLomNode((Element)obj); } COM: <s> do adjustments to make sure the lom will work with rim </s>
funcom_train/31092677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGenericPostRequest() throws Exception { WebConversation wc = new WebConversation(); String sourceData="This is an interesting test\nWith two lines"; WebRequest wr = makeRequest("ReportData",sourceData, "text/sample"); WebResponse response = wc.getResponse(wr); assertEquals("Body response", "\nPOST\n" + sourceData, response .getText()); assertEquals("Content-type", "text/sample", response.getContentType()); } COM: <s> test a generic post request </s>
funcom_train/31069637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeProperties(Properties properties) throws PropertyException { try { properties.setStringProperty(PK_COMPONENT_URL, url); properties.setStringProperty(PK_COMPONENT_METHOD, method); properties.setStringProperty(PK_COMPONENT_PARAMETER, parameter); if (object!=null) { object.writeProperties(properties); } } catch (Exception ex) { } } COM: <s> persisent method to write local </s>
funcom_train/47867364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getButtonCancel() { if (buttonCancel == null) { buttonCancel = new JButton(); buttonCancel.setText("Cancel"); buttonCancel.setMnemonic(KeyEvent.VK_C); buttonCancel.setName("buttonCancel"); buttonCancel.setMinimumSize(buttonMinimumSize); buttonCancel.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(java.awt.event.ActionEvent e) { close(); } }); } return buttonCancel; } COM: <s> this method initializes button cancel </s>
funcom_train/3071836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Comparator makeRegExprMatchingComparator(){ return new Comparator(){ public int compare(Object obj0, Object obj1) { if(obj0==null || obj1==null){ if(obj0==obj1){ return 0; }else if(obj0==null){ return 1; }else{ return -1; } }else{ Resource res=null; String url=null; if(obj0 instanceof Resource){ res=(Resource)obj0; url=(String)obj1; }else if(obj1 instanceof Resource){ res=(Resource)obj1; url=(String)obj0; }else{ return -1;//not equals } String resURL=res.getUrl(); System.out.println("\n*********Matching: "+resURL+"\t"+url+"\n"); if(Pattern.matches(resURL,url)){ return 0; }else{ return 1; } } } }; } COM: <s> construsts a comparator which performs an regular expresion based </s>
funcom_train/42612295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDouble(String key) throws JSONException { final Object o = get(key); try { return o instanceof Number ? ((Number)o).doubleValue() : Double.valueOf((String)o).doubleValue(); } catch (final Exception e) { throw new JSONException("JSONObject[" + quote(key) + "] is not a number."); } } COM: <s> get the double value associated with a key </s>
funcom_train/29715319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHighscore(String[] list, int difficulty) { switch(difficulty) { case EASY: System.arraycopy(list, 0, highscoreEasy, 0, list.length); break; case MEDIUM: System.arraycopy(list, 0, highscoreMedium, 0, list.length); break; case HARD: System.arraycopy(list, 0, highscoreHard, 0, list.length); break; default: System.err.println("Invalid difficulty level!"); } saveHighscore(); } COM: <s> updates a single highscore list and then saves the change </s>
funcom_train/50804993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getHouses(CampaignData data) { Set result = new HashSet(); Iterator it = influences.keySet().iterator(); while (it.hasNext()){ House house = data.getHouse(((Integer)it.next()).intValue()); result.add(house); } return result; } COM: <s> returns the present houses </s>
funcom_train/48932737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int create() { int result = Adapter_I.CONST_FAIL; RDFSNamedClass supTemp = kb.getRDFSNamedClass(getSuperClass() .getClassName()); RDFSNamedClass subTemp = kb.getRDFSNamedClass(getClassName()); // create the subclass, if necessary if (subTemp != null && supTemp != null) { // get all current superclasses subTemp.addSuperclass(supTemp); subTemp.removeSuperclass(kb.getOWLThingClass()); result = Adapter_I.CONST_OK; } return result; } COM: <s> sets a superclass relation from the class to its superclass </s>
funcom_train/8053286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendString(String string) { try { this.dMessages = string.getBytes(); this.dAddress = InetAddress.getByName(this.dHost); this.dPacket = new DatagramPacket(this.dMessages, this.dMessages.length, this.dAddress, this.dPort); this.dSocket = new DatagramSocket(); this.dSocket.send(this.dPacket); this.dSocket.close(); } catch (Exception e) { Logging.getInstance().stackTraceLogger(e); } } COM: <s> send a string </s>
funcom_train/36159064
/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 ("FlexiScale".equals(portName)) { setFlexiScaleEndpointAddress(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/44309307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireProgressReport(int currentPhase,int numberOfPhases,long currentStep,long numberOfSteps) { EventListener[] eventListeners=m_listenerList.getListeners(AlgorithmProgressListener.class); for (int i=0;i<eventListeners.length;i++) ((AlgorithmProgressListener)eventListeners[i]).progressReport(this,currentPhase,numberOfPhases,currentStep,numberOfSteps); } COM: <s> notifies listeners that the algorithm has finished </s>
funcom_train/7674139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LocalItem getLocalItemForReg(int ssaReg) { for(Map.Entry<LocalItem, ArrayList<RegisterSpec>> entry: localVariables.entrySet()) { for (RegisterSpec spec: entry.getValue()) { if (spec.getReg() == ssaReg) { return entry.getKey(); } } } return null; } COM: <s> gets a local item associated with an ssa register if one exists </s>
funcom_train/9278950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNameLengthMax128Chars() throws SQLException { try { getConnection() .setSavepoint( "MyName12345678901234567890123456789" + "01234567890123456789012345678901234567890123456789012345" + "678901234567890123456789012345678901234567890"); fail("FAIL 24 shouldn't be able to create a SQL savepoint with " + "name exceeding 128 characters"); } catch (SQLException se) { // Expected exception. assertSQLState("42622", se); } getConnection().rollback(); } COM: <s> test 24 savepoint name cant exceed 128 characters </s>
funcom_train/9489361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Ggb3DVector getPickFromScenePoint(Ggb3DVector p, int dx, int dy) { Ggb3DVector point = p.copyVector(); toScreenCoords3D(point); Ggb3DVector ret = new Ggb3DVector(new double[]{point.get(1) + dx, point.get(2) - dy, 0, 1.0}); return ret; } COM: <s> p scene coords dx dy 2 d mouse move 3 d physical coords </s>
funcom_train/14430915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TestDef getTest(String pMethodName) { Iterator i = tests.iterator(); while (i.hasNext()) { TestDef testDef = (TestDef)i.next(); if (testDef.getMethodName().equals(pMethodName)) { return testDef; } } return null; } COM: <s> gets the test by its method name </s>
funcom_train/37036739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); if (getParent() != null) { sb.append(getParent().toString()); sb.append("."); } sb.append("DefaultContext["); sb.append("]"); return (sb.toString()); } COM: <s> return a string representation of this component </s>
funcom_train/34311872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ReturnValue bareInvoke() throws Exception { for (Example producer: producers()) assert producer.wasSuccessful(); owner.runBeforeClassBefores(); InjectionValues injection = InjectionValues.make(this); Object newResult = method.invoke(injection.getReceiver(), injection.getArguments()); return new ReturnValue(newResult, injection.getReceiver()); } COM: <s> runs the example and returns its return value </s>
funcom_train/12655601
/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) { BorderLayout borderLayout = new BorderLayout(); borderLayout.setHgap(5); borderLayout.setVgap(5); jContentPane = new JPanel(); jContentPane.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); jContentPane.setLayout(borderLayout); jContentPane.add(getNavigation(), BorderLayout.NORTH); jContentPane.add(getPanContent(), BorderLayout.CENTER); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/43318468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHistoryItems(ItemsFilter itemsFilter) { if (this.selectionHistory != null) { Object[] items = this.selectionHistory.getHistoryItems(); for (int i = 0; i < items.length; i++) { Object item = items[i]; if (itemsFilter == filter) { if (itemsFilter != null) { if (itemsFilter.matchItem(item)) { if (itemsFilter.isConsistentItem(item)) { this.items.add(item); } else { this.selectionHistory.remove(item); } } } } } } } COM: <s> add all history items to code content provider code </s>
funcom_train/46628953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRequestWithoutLogin() { try { KeypointWebService service = getKeypointService(); KeypointListRequest request = new KeypointListRequest(); request.setKeypoint(new Keypoint()); service.list(request); fail("Shouldn't be able to request without loging in."); } catch (Exception e) { System.out.println("Test was successfull."); } } COM: <s> makes sure that the keypoint service requires a token to access it </s>
funcom_train/31936114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getImage(String symbolicName) { Image image = WorkbenchImages.getImage(symbolicName); if (image != null) return image; //if there is a descriptor for it, add the image to the registry. Image desc = WorkbenchImages.getImage(symbolicName); if (desc != null) { WorkbenchImages.getImageRegistry().put(symbolicName, desc); return desc; } return null; } COM: <s> retrieves the specified image from the workbench plugins image registry </s>
funcom_train/44852126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean search(String inQuery, Window inWindow) { try { ParameterObject lParameters = new ParameterObject(); lParameters.set(Constants.KEY_PARAMETER_SEARCH_TPYE, Constants.SearchType.QUICK); lParameters.set(Constants.KEY_PARAMETER_SEARCH_QUERY, inQuery); setParameters(lParameters); callShowListTask(inWindow); return true; } catch (VException exc) { LOG.error("Error encountered while preparing member search!", exc); //$NON-NLS-1$ } return false; } COM: <s> processing the quick search for members </s>
funcom_train/35249123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFieldName() { StringBuilder buffer = new StringBuilder(); if (from != null) { String alias = from.getAliasOnly(); if (alias != null && alias.length() > 0) { buffer.append(alias).append("."); } } buffer.append(name); return buffer.toString(); } COM: <s> field name only does not include function and alias part </s>
funcom_train/17201226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void heapifyDown(int index) { int current = index; int child1 = current * 2; while (child1 < nextIndex) { int child2 = current * 2 + 1; int larger = (child2 < nextIndex && counts[child2] > counts[child1]) ? child2 : child1; if (counts[current] >= counts[larger]) break; // done swap(current, larger); current = larger; child1 = current * 2; } } COM: <s> restore the heap property after decreasing a count array entrys value </s>
funcom_train/6418507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Extent getExtent(Class class1, boolean flag){ MessageLog.debug( this, "getExtent " + class1); try { Persistence domainObject = (Persistence)class1.newInstance(); return new ExtentImpl( this, domainObject ); } catch(Exception ex) { MessageLog.debug(this, "Failed to create extent!", ex); throw new RuntimeException("Failed to create extent!"); } } COM: <s> the persistence manager manages a collection of instances in the data </s>
funcom_train/46980118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object searchPackageInModel(String name) { if("".equals(getPackageName(name))) { return ModelFacade.lookupIn(model,name); } else { Object owner = searchPackageInModel(getPackageName(name)); return owner == null ? null : ModelFacade.lookupIn(owner,getRelativePackageName(name)); } } COM: <s> search recursivly for nested packages in the model </s>
funcom_train/42473973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsUpperCaseFalseSpace(){ logger.debug("TestStringUtil.java - testIsUpperCaseTrue"); try{ assertFalse(StringUtil.isUpperCase("UPPERCASE 7898734")); } catch (Exception e){ // If anything else is thrown then we have an error aswell. assertFalse(true); } } COM: <s> this method tests that a space as parameter will return false </s>
funcom_train/3363236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { switch(defaultCloseOperation) { case HIDE_ON_CLOSE: setVisible(false); break; case DISPOSE_ON_CLOSE: dispose(); break; case DO_NOTHING_ON_CLOSE: default: break; } } } COM: <s> handles window events depending on the state of the </s>
funcom_train/40622789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRowValue(int row, RowType rowValue) { if (onSetRowValue(row, rowValue)) { // Fire the listeners fireEvent(new RowValueChangeEvent<RowType>(row, rowValue)); // Update the row count int numRows = getRowCount(); if (numRows != UNKNOWN_ROW_COUNT && row >= numRows) { setRowCount(row + 1); } } } COM: <s> set a new row value </s>
funcom_train/802772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNameOfFilePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SourceFileType_nameOfFile_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SourceFileType_nameOfFile_feature", "_UI_SourceFileType_type"), MzdataPackage.Literals.SOURCE_FILE_TYPE__NAME_OF_FILE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the name of file feature </s>
funcom_train/46678903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getHeight(boolean includeSyncPoints){ double result=0; if (includeSyncPoints) result=getSyncPoints().getHeight(); for (int pos=0; pos<getNumberOfItLines();pos++){ result+=getItLineAt(pos).getHeight(); } return result; } COM: <s> returns the height of this bundle in pixels </s>
funcom_train/13531684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sameArrowPattern(AlgebraSymbolVector asv) { if (this.size() != asv.size()) return false; asv.reset(); for (this.reset();this.isNext();){ if (this.getNext().getArrowType() != asv.getNext().getArrowType()) return false; } return true; } COM: <s> test if this and asv have the same arrow pattern </s>
funcom_train/13514727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void lock_remove_waiter(LockableObject obj, Lock lock, int status) { boolean do_wakeup = (lock.status == Lock.LSTAT_WAITING); lock_mv_waiters_holders(obj, lock, true); lock.status = status; if (do_wakeup) { lock.unlock(); } } COM: <s> any lock on the waitlist has a process waiting for it </s>
funcom_train/3329854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String name) { if (name == null) throw new IllegalArgumentException("name must not be null"); //-- strip namespace prefix if necessary int idx = name.indexOf(':'); if (idx >= 0) this._name = name.substring(idx+1); else this._name = name; } //-- setName COM: <s> sets the name of this attribute group </s>
funcom_train/14628788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createJacobianMap() { jacobianMap = new HashMap<PFBus,Double>(); List<PFBus> buses = system.getActivePFBuses(); int busCount = buses.size(); for (int i = 0; i < busCount; i++) { if (jacobian.getNrow() == busCount) jacobianMap.put(buses.get(i), jacobian.getElement(i,i)); else jacobianMap.put(buses.get(i), jacobian.getElement(i + busCount,i + busCount)); } } COM: <s> this method creates a new jacobain map with an acpfbus as </s>
funcom_train/10018041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMemberSubstanceCountOfGroup(int group) { if (group < 0 || m_nodes[group] != GROUP_NODE) { throw new EXISchemaRuntimeException( EXISchemaRuntimeException.NOT_GROUP, new String[] { String.valueOf(group) }); } return _getMemberSubstanceCountOfGroup(group, m_nodes); } COM: <s> returns the number of member substance particles of a group </s>
funcom_train/35805051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int delete(int respuestapreguntapk)throws SQLException{ PreparedStatement ps = null; con = conexion.abrirConexion(); int resultado = 0; try { ps = con.prepareStatement("delete from RESPUESTAPREGUNTA where idRespuestaPregunta = ?"); ps.setInt(1, respuestapreguntapk); resultado = ps.executeUpdate(); }catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } finally{ conexion.cerrarConexionBaseDatos(con); if(ps != null) ps.close(); } return resultado; } COM: <s> method deletes a record from table respuestapregunta </s>
funcom_train/1148327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand7() { if (okCommand7 == null) {//GEN-END:|179-getter|0|179-preInit // write pre-init user code here okCommand7 = new Command("Ok", Command.OK, 0);//GEN-LINE:|179-getter|1|179-postInit // write post-init user code here }//GEN-BEGIN:|179-getter|2| return okCommand7; } COM: <s> returns an initiliazed instance of ok command7 component </s>
funcom_train/2861068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initNormalizer(IniFile ini, String section, Map indexInfo) { map = indexInfo; collapseChars = ini.getValue(section, "collapse", ".,;:<>{}=!()+%$\"@[]`|~/'^"); } COM: <s> the normalizer initialization method </s>
funcom_train/10655155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkPositions(final int[] pos) { Position p; final List<?> list = GapContentTest.getPositionList(content); for (int i = 0; i < pos.length; i++) { p = (Position) list.get(i); assertEquals(pos[i], GapContentTest.getIndex(p)); } } COM: <s> checks that position indexes are the same as expected </s>
funcom_train/44798401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWhenEmpty(final String whenEmptyBehaviour) { this.whenEmpty = whenEmptyBehaviour; if (whenEmpty.equals("fail")) this.whenEmptyCode = FAIL_WHEN_EMPTY; else if (whenEmpty.equals("useDefault")) this.whenEmptyCode = USE_DEFAULT_WHEN_EMPTY; else if (whenEmpty.equals("leaveEmpty")) this.whenEmptyCode = LEAVE_EMPTY_WHEN_EMPTY; else if (whenEmpty.equals("useFirst")) // for enum-base // ChoiceField/Spinnewr this.whenEmptyCode = USE_FIRST_WHEN_EMPTY; else this.whenEmptyCode = LEAVE_EMPTY_WHEN_EMPTY; } COM: <s> controls behavior when target text node is missing from the model </s>
funcom_train/3704847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean shouldIgnoreKey(String strKey) { return ( super.shouldIgnoreKey(strKey) || HttpConstants.RESPONSE_CODE.equalsIgnoreCase(strKey) || HttpConstants.RESPONSE_MSG.equalsIgnoreCase(strKey) || HttpConstants.RESPONSE_VERSION.equalsIgnoreCase(strKey) ); } // of method COM: <s> ignore bogus internal keys that we put in the headers </s>
funcom_train/18440872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String boxToString(Box box, String deep) { String string = deep + box.toString() + "\n"; if (box.hasChilds()) { string += boxToString(box.firstChild, deep + " "); } if (box.nextSibling != null) { string += boxToString(box.nextSibling, deep); } return string; } COM: <s> print the current boxworld to string </s>
funcom_train/17679600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getPKNameForTableName(String tableName, int i) { int maxlen = maxColumnNameLength - pkSuffix.length(); if (i < 2) { return shrinkName(tableName, maxlen) + pkSuffix; } else { return appendInt(tableName, i, maxlen) + pkSuffix; } } COM: <s> generate a primary key column name from a table name and an index </s>
funcom_train/809059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createChildren() { acceptedInputs=new ArrayList<Class<? extends IBioObject>>(); // initServiceTypes(); try { initServiceImpls(); initInputs(); } catch (CoreException e) { logger.debug("Error creating ServiceImplementations: " + e.getMessage()); // e.printStackTrace(); } } COM: <s> create children consisting of service implementations and other service types </s>
funcom_train/25936138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPhoto(HTMLDocument fragment, BNode recipe) throws ExtractionException { final HTMLDocument.TextField[] photos = fragment.getPluralUrlField("photo"); for(HTMLDocument.TextField photo : photos) { addURIProperty(recipe, vHRECIPE.photo, fragment.resolveURI(photo.value())); } } COM: <s> adds the code photo code triples </s>
funcom_train/37077558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SeqFeatureI getNextFeature(int p, Level level) { SeqFeatureI feature = null; int position = pixelPositionToTierPosition(p); if (orientation == Orientation.FIVE_TO_THREE) { feature = this.tier.getNextFeature(position, level); } else if (orientation == Orientation.THREE_TO_FIVE) { feature = this.tier.getPrevFeature(position, level); } return feature; } COM: <s> given a pixel position return the next feature on the tier </s>
funcom_train/17852717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(Program program) { Rating rating = TVRaterPlugin.getInstance().getRating(program); if (rating == null) { return false; } if (mBest && (rating.getOverallRating() >= mValue)) { return true; } else if (!mBest && (rating.getOverallRating() <= mValue)) { return true; } return false; } COM: <s> accept programs if rating fits </s>
funcom_train/19313560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean shouldCreateFOText() { if (this.textBuffer == null) { return false; } if (this.textBuffer.length() < 1) { return false; } if (! this.blockMustEnclosePCDATA()) { return true; } if (this.getContainingBlock(null) != null) { return true; } return false; } COM: <s> indicates whether an fotext item should be created from the buffer </s>
funcom_train/29619273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getColumnClass(int c) { Object value = null; for (int i=0; i<getRowCount(); i++) try { value = getValueAt(i, c); if (value != null) break; } catch (java.lang.ArrayIndexOutOfBoundsException e) { Tracer.debugln("MgisTable caught for column " + c); } return value == null ? super.getColumnClass(c) : value.getClass(); } COM: <s> necessary for the custom cell renderers to work </s>
funcom_train/41399555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readInt() throws IOException { int ch1 = this.read(); int ch2 = this.read(); int ch3 = this.read(); int ch4 = this.read(); return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0)); } COM: <s> reads four input bytes and returns an </s>
funcom_train/15662840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setClosedcount(Integer newVal) { if ((newVal != null && this.closedcount != null && (newVal.compareTo(this.closedcount) == 0)) || (newVal == null && this.closedcount == null && closedcount_is_initialized)) { return; } this.closedcount = newVal; closedcount_is_modified = true; closedcount_is_initialized = true; } COM: <s> setter method for closedcount </s>
funcom_train/15882961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertRow(int row, Map rowData) { dataVector.insertElementAt(rowData, row); justifyRows(row, row + 1); boolean newColumnAdded = false; for (Object column : rowData.keySet()) if (!columnIdentifiers.contains(column)) { columnIdentifiers.add(column); newColumnAdded = true; } if (newColumnAdded) fireTableStructureChanged(); fireTableRowsInserted(row, row); } COM: <s> inserts a row at code row code in the model </s>
funcom_train/40853359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand1() { if (exitCommand1 == null) {//GEN-END:|31-getter|0|31-preInit // write pre-init user code here exitCommand1 = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|31-getter|1|31-postInit // write post-init user code here }//GEN-BEGIN:|31-getter|2| return exitCommand1; } COM: <s> returns an initiliazed instance of exit command1 component </s>
funcom_train/29597371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setPacketReader(final PacketReader packetReader) { synchronized (mutex) { if (this.packetReader != null) { try { // the previous packet reader has to be reseted since it may be dreaming of the // arrival of a new packet. this.packetReader.reset(); } catch (final IOException e) { log.error(e, e); } } this.packetReader = packetReader; } } COM: <s> activates a new packet reader instance </s>
funcom_train/35492687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendAttackFleet(Player plr, String home, String destination, int size) throws FleetSizeException { Planet source = getPlanetNamed(home); Planet dest = getPlanetNamed(destination); plr.newAttack(source, dest, size, this.turnNumber); } COM: <s> creates and sends a new attack fleet </s>
funcom_train/7522542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Protocol findProtocol(String name) { Protocol tmp=top_prot; String prot_name; while(tmp != null) { prot_name=tmp.getName(); if(prot_name != null && prot_name.equals(name)) return tmp; tmp=tmp.getDownProtocol(); } return null; } COM: <s> returns a given protocol or null if not found </s>
funcom_train/7801480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OClass addBaseClasses(final OClass iBaseClass) { if (baseClasses == null) baseClasses = new ArrayList<OClass>(); baseClasses.add(iBaseClass); // ADD CLUSTER IDS OF BASE CLASS TO THIS CLASS AND ALL SUPER-CLASSES OClassImpl currentClass = this; while (currentClass != null) { currentClass.addPolymorphicClusterIds((OClassImpl) iBaseClass); currentClass = (OClassImpl) currentClass.getSuperClass(); } return this; } COM: <s> adds a base class to the current one </s>
funcom_train/50373590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateFilterServices() { synchronized(filteredServices) { filteredServices.clear(); Vector<ServiceProxy> services = isbManager.copyServices(); for(ServiceProxy sp : services) { if(passesFilter(sp)) { filteredServices.add(sp); } } notifyListeners(NotificationKind.Changed,null); } } COM: <s> when a filter option changes the filtered services are updated </s>
funcom_train/39067014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyFilters() { if (store.getBoolean(GildUIPlugin.DEBUG_FILTERS_TOGGLE_PREFERENCE)) { if (store.getBoolean(GildUIPlugin.DEBUG_FILTERS_JAVA_PREFERENCE)) applyAllFilters(); else applyLocalFilters(); //update the tooltip for the step int action. stepIntoAction.setToolTipText("Step into with filters"); } else { removeFilters(); stepIntoAction.setToolTipText("Step into"); } allowClassEditor = store.getBoolean(GildUIPlugin.DEBUG_FILTERS_CLASS_EDITOR_PREFERENCE); } COM: <s> applies the stepping filters set for this manager </s>
funcom_train/3761897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPreferredWidth(int lines) { int digits = String.valueOf(lines).length(); // Update sizes when number of digits in the line number changes if (digits != currentDigits && digits > 1) { currentDigits = digits; int width = fontMetrics.charWidth( '0' ) * digits; Dimension d = getPreferredSize(); d.setSize(2 * MARGIN + width, HEIGHT); setPreferredSize( d ); setSize( d ); } } COM: <s> calculate the width needed to display the maximum line number </s>
funcom_train/28128282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuBar createMenuBar() { JMenuBar menuBar = new JMenuBar(); menuBar.add(createFileMenu()); menuBar.add(createEditMenu()); menuBar.add(createCalendarMenu()); menuBar.add(createHelpMenu()); return menuBar; } COM: <s> creates and returns a menu bar for the frame </s>
funcom_train/34341823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getPresentacion() { if (Presentacion == null) {//GEN-END:|25-getter|0|25-preInit // write pre-init user code here Presentacion = new StringItem("Desarrollado por:", "Sanchez Cena, Felix Ramon");//GEN-LINE:|25-getter|1|25-postInit // write post-init user code here }//GEN-BEGIN:|25-getter|2| return Presentacion; } COM: <s> returns an initiliazed instance of presentacion component </s>
funcom_train/8343089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFilter(final String dbid, final String filter){ if(isFilterable()){ Filter<Object> filt = null; if(DataUtils.hasValue(filter)){ filt = new RegexFilter(filter);//new RegexFilter("^.*" + filter + "$"); } model.setFilter(dbid, filt); fireTableDataChanged(); } } COM: <s> apply the given string as a string filter for the attribute </s>