__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/46479149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGenNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GenNamed_GenName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GenNamed_GenName_feature", "_UI_GenNamed_type"), IS1Package.Literals.GEN_NAMED__GEN_NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the gen name feature </s>
funcom_train/496763
/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 ("TaskService".equals(portName)) { setTaskServiceEndpointAddress(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/10859255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkSortability() throws SolrException { if (! indexed() ) { throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "can not sort on unindexed field: " + getName()); } if ( multiValued() ) { throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "can not sort on multivalued field: " + getName()); } } COM: <s> sanity checks that the properties of this field type are plausible </s>
funcom_train/20627777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getColumnPosition(String columnName){ int index = headerVec.indexOf(columnName); if( index == -1 ) //try with uppercase now.. (likely case) index = headerVec.indexOf(columnName.toUpperCase()); if( index == -1 ) //try with lowercase now.. index = headerVec.indexOf(columnName.toLowerCase()); return index; } COM: <s> gets the column position in the data files </s>
funcom_train/47864629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testThat7MomentsAreDelivered() { byte[] data = new byte[]{0, 1}; Image image = new ByteImage(data, 1, 2); final double[] moments = (new HuMoments()).extract(image); assertEquals(8, moments.length); } COM: <s> shall return 7 moments </s>
funcom_train/25180706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DistanceMeasure getDistanceMeasure(MeasureType measureType) { switch(measureType) { case CosineDistanceMeasure: return new CosineDistanceMeasure(); case EuclideanDistanceMeasure: return new EuclideanDistanceMeasure(); case ManhattanDistanceMeasure: return new ManhattanDistanceMeasure(); case SquaredEuclideanDistanceMeasure: return new SquaredEuclideanDistanceMeasure(); case TanimotoDistanceMeasure: return new TanimotoDistanceMeasure(); case WeightedEuclideanDistanceMeasure: return new WeightedEuclideanDistanceMeasure(); case WeightedManhattanDistanceMeasure: return new WeightedManhattanDistanceMeasure(); } return null; } COM: <s> create an object that represents the measure type </s>
funcom_train/28125969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String sanitize(String text) { text = text.replaceAll("<","&lt;"); text = text.replaceAll(">","&gt;"); // search hyperlinks, start with something like :// text = text.replaceAll("[a-z]+://[\\p{Alnum}~_\\-&?%#+~:;.,/@]+","<a href=\"$0\">$0</a>"); return text; } COM: <s> task is to sanitize strings into feedable format and scan for certain stuff </s>
funcom_train/49628084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getParseableURIPart(final String uri) { StringBuilder parsableURI = new StringBuilder(); int start = uri.indexOf(this.config.getBaseUri()) + this.config.getBaseUri().length(); if ((start > 0) && (uri.length() > start)) { parsableURI.append(uri.substring(start)); int end = parsableURI.lastIndexOf("/"); if (end > -1) { parsableURI.setLength(end); } } return parsableURI.toString(); } COM: <s> retrieves the parseable part of the request uri </s>
funcom_train/16629707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getJdbcTypeName(int jdbcType) { // Get all field in java.sql.Types Field[] fields = java.sql.Types.class.getFields(); for (int i = 0; i < fields.length; i++) { try { Integer value = (Integer) fields[i].get(null); if (value.equals(jdbcType)) { return fields[i].getName(); } } catch (IllegalAccessException iae) { iae.printStackTrace(); } } return null; } COM: <s> returns the sql type associated to the integer given </s>
funcom_train/24082672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addNamedIndividual(OWLNamedIndividual indiv) { if (indiv == null) { throw new IllegalArgumentException("Null argument."); } boolean ret = false; if (!this.individualInvMap.containsKey(indiv)) { Integer id = this.entityManager.createNamedEntity( IntegerEntityType.INDIVIDUAL, indiv.toStringID(), false); this.individualMap.put(id, indiv); this.individualInvMap.put(indiv, id); ret = true; } return ret; } COM: <s> adds an named individual to the repository </s>
funcom_train/15954531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSize() { int lInt = 5; int lBaseIndex = 0; float[] lFloatList = {1.1f, 1.2f, 1.3f, 1.4f, 1.5f}; DataBlockFloat lDBFloat = new DataBlockFloat(lFloatList,lBaseIndex); assertEquals(lInt,lDBFloat.size()); } COM: <s> test of size method </s>
funcom_train/42110835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public V getIndex(Object key, int index) throws IllegalAccessException { if (collectionType_ == LIST_COLLECTION) { List<V> list = getList(key); if ((list != null) && (index < list.size())) { return list.get(index); } } throw new IllegalAccessError( "MultiMap is not of collection type List. collectionType_: " + collectionType_); } COM: <s> gets the element at a specified index in the multimap value </s>
funcom_train/42079544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void merge(MetadataManifest otherManifest) { List<String> otherFields = otherManifest.getMetadataFields(); Iterator<String> it = otherFields.iterator(); while(it.hasNext()) { String otherFieldName = it.next(); if(!this.hasMetadataField(otherFieldName)) this.addMetadata(otherFieldName, otherManifest.getMetadataValues(otherFieldName)); } } COM: <s> merge the metadata values with the ones of other metadata manifest </s>
funcom_train/3861970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateSummaryHeader(String configurationSource) { cSummaryPrintWriter.println("<html><head><title>Sperowider Report</title>"); cSummaryPrintWriter.println("<style>\n .row1 { background-color: #dddddd;}\n</style>"); cSummaryPrintWriter.println("</head><body>"); generateConfigurationSourceLine(configurationSource); } COM: <s> generates page header using the default bland header </s>
funcom_train/1147522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand() { if (backCommand == null) {//GEN-END:|135-getter|0|135-preInit // write pre-init user code here backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|135-getter|1|135-postInit // write post-init user code here }//GEN-BEGIN:|135-getter|2| return backCommand; } COM: <s> returns an initiliazed instance of back command component </s>
funcom_train/16743601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dumpASCNData(String outFilename, boolean substituteMissingData) { int basePairStart = getRowPosition(0); int basePairEnd = getRowPosition(getNumSNPs() - 1); dumpASCNData(basePairStart, basePairEnd, null, false, outFilename, substituteMissingData); } COM: <s> dumps the entire table to the specified file </s>
funcom_train/3302221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Class getClass(String className) throws InitException { Assert.notNull(className); try { return Class.forName(className); } catch(ClassNotFoundException cnfx) { throw classLoadingException(className, cnfx); } catch(NoClassDefFoundError ncdf) { throw classLoadingException(className, ncdf); } } COM: <s> get a class by name from the system class loader </s>
funcom_train/778204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String compareInReplyTo( ACLMessage msg1, ACLMessage msg2 ) { // delegate work to method refactoring out algorithm for similar slots return cmpCaseInsConsStrSlot( "in-reply-to", replyIdMap, msg1.getInReplyTo(), msg2.getInReplyTo() ); } COM: <s> compare just the in reply to slot of two messages </s>
funcom_train/50156623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Element getLabelFieldTable(Element label, Element field) { Element table = df.createElement("table") .addAttribute("class", "label-field"); Element row = table.addElement("tr") .addAttribute("class", "form-row"); Element labelCell = row.addElement("td") .addAttribute("class", "label-box") .addAttribute("nowrap", "1"); attachToolHelp(labelCell, xpath); labelCell.add(label); Element fieldCell = row.addElement("td") .addAttribute("class", "field-box"); fieldCell.add(field); return table; } COM: <s> creates a table element containing a label cell and an input field cell </s>
funcom_train/5376807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object obj) { int slcomp = getStartLevel() - ((AbstractBundle) obj).getStartLevel(); if (slcomp != 0) { return slcomp; } long idcomp = getBundleId() - ((AbstractBundle) obj).getBundleId(); return (idcomp < 0L) ? -1 : ((idcomp > 0L) ? 1 : 0); } COM: <s> answers an integer indicating the relative positions of the receiver and </s>
funcom_train/3395479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOrdinaryClass() { if (isEnum() || isInterface() || isAnnotationType()) { return false; } for (Type t = type; t.tag == TypeTags.CLASS; t = env.types.supertype(t)) { if (t.tsym == env.syms.errorType.tsym || t.tsym == env.syms.exceptionType.tsym) { return false; } } return true; } COM: <s> return true if this is a ordinary class </s>
funcom_train/43097466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAdd() { Model.getCollaborationsHelper().setBase(elem, baseEnd); Model.getPump().flushModelEvents(); assertEquals(1, model.getSize()); assertEquals(baseEnd, model.getElementAt(0)); } COM: <s> test setting the base </s>
funcom_train/9946634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean holdsGUID(GUID id) { try { // we must have the GUID Vector res = doSQLQuery("SELECT NAME,DATAKEY FROM "+helperTableName+ " WHERE GUID='"+id.toString()+"'"); if (res.size()<2) { return false; } return true; } catch (Exception e) { System.err.println("ERROR: CustomTableDataStore.holdsGUID: "+e); e.printStackTrace(System.err); } return false; } COM: <s> check if store is maintaining state for the given </s>
funcom_train/17773545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUserDefinedTextFrame(String description, String value) { try { updateFrameData(ID3v2Frames.USER_DEFINED_TEXT_INFO, encodePair(description, value, null, false)); } catch (CharacterCodingException e) { logger.warning("Error setting user defined text frame to " + value); logger.warning(e.toString()); } } COM: <s> sets the data contained in the user defined text frame txxx </s>
funcom_train/20035548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void selectStyleName(String styleName) { if (styleName == style.buttonDown()) { addStyleName(style.buttonDown()); removeStyleName(style.buttonOver()); removeStyleName(style.button()); } else if (styleName == style.buttonOver()) { removeStyleName(style.buttonDown()); addStyleName(style.buttonOver()); removeStyleName(style.button()); } else { addStyleName(style.button()); removeStyleName(style.buttonOver()); removeStyleName(style.buttonDown()); } } COM: <s> selects the current css class </s>
funcom_train/25132742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AffineTransform transformNoScale(double centerX, double centerY) { AffineTransform at = new AffineTransform(); at.translate(centerX, centerY); at.rotate(getRotation()); at.quadrantRotate(getQuadrantRotation()); at.shear(getShearX(), getShearY()); at.translate(this.getTranslateX(), this.getTranslateY()); at.translate(-centerX, -centerY); return at; } COM: <s> apply the prescribed transformations excluding the scale </s>
funcom_train/14093350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testProcessChildren() throws XMLException { Element element = m_fixture.newElement("property", new String[] { "name", "prop", "value", "success" }); m_xmlTestCase.processChildren(m_fixture.getTestElement()); Object o = m_xmlTestCase.getProperty("prop"); assertEquals("success", o); } COM: <s> test process children </s>
funcom_train/12272750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeConfiguration() { // Close the configuration sections if ( m_configSections != null) { Set<String> keys = m_configSections.keySet(); Iterator<String> keysIter = keys.iterator(); while ( keysIter.hasNext()) { String configName = keysIter.next(); ConfigSection configSection = m_configSections.get(configName); try { // Close the configuration section and remove configSection.closeConfig(); } catch ( Exception ex) { } } // Clear the config sections list m_configSections.clear(); } } COM: <s> close the configuration </s>
funcom_train/30226249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EditorHtml htmlEditar() { String s = getString(); s = s.equals(VAZIO) ? "" : s; TextArea editor = new TextArea(getNome(), Integer.toString(linhas), Integer.toString(colunas), wrap, s); return editor; } COM: <s> html editar method comment </s>
funcom_train/36671771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void stopTransmission() { transmitting = false; Object[] clientWorkers = workers.keySet().toArray(); for (int i = 0; i < clientWorkers.length; i++) { ((KSServerWorker)workers.get(clientWorkers[i])).stopTransmission(); } } COM: <s> stop transmission of simulator data to all clients </s>
funcom_train/43353957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFieldTitle(final String fieldName) { NakedObjectField field = fieldAccessorFor(fieldName); assertFieldVisible(field); if (getField(fieldName).getForNaked() == null) { throw new IllegalActionError("No object to get title from in field " + fieldName + " within " + getForNaked()); } return getField(fieldName).getTitle(); } COM: <s> returns the title of the object as a string </s>
funcom_train/12836821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMessage(final TransportMessage aMessage) throws TransportFailure { bindToRemoteLocator(aMessage.getReceiver()); try { new Thread(new RMIMessageDeliveryHelperThread(aMessage)).start(); } catch (RuntimeException re) { throw new TransportFailure ("Cannot access remote end-point.", re); } } COM: <s> this method will bind to the receiver from the message and send </s>
funcom_train/24536565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected List getSortedBottomEdges() { if (sortedBottomEdges == null) { sortedBottomEdges = new ArrayList(getChildrenXYBounds().size()); for (int i = 0; i < getChildrenXYBounds().size(); i++) { Rectangle rect = (Rectangle) getChildrenXYBounds().get(i); sortedBottomEdges.add(new Integer(rect.y + rect.height)); } Collections.sort(sortedBottomEdges); } return sortedBottomEdges; } COM: <s> return a sorted collection of ints representing the bottom edges of all components </s>
funcom_train/18192249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double calcSpeed() { double M = maxSpeed, d = distToNextObstacle(), b = brakingDistance, h = haltingDistance; if (d == -1) return maxSpeed; if (distToNextObstacle() > brakingDistance) return maxSpeed; if (distToNextObstacle() < haltingDistance) return 0; else return 0.8 * M / (b - h) * (d - h) + 0.2 * M; } COM: <s> calculates the speed the car should be traveling at </s>
funcom_train/20630803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printRole(XMLWriter xw, int indent) { xw.printStartTagLine("role", indent); xw.printEmptyElementTagLine(logicalModifier, ++indent); xw.printElementLine("name", name, indent); xw.printElementLine("value", value, indent); xw.printEndTagLine("role", --indent); } COM: <s> prints a role element </s>
funcom_train/20804089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getUnknownNode(char[] surface, int start, int length, int span) { Node unknownNode = new Node(); unknownNode.ctoken = this.unknownCToken; unknownNode.start = start; unknownNode.length = length; unknownNode.span = span; unknownNode.morpheme = new Morpheme(); unknownNode.morpheme.setBasicForm(new String(surface, start, length)); unknownNode.morpheme.setPartOfSpeech(this.unknownPartOfSpeechDescription); return unknownNode; } COM: <s> creates an unknown morpheme </s>
funcom_train/9978541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteResultType(Element pack) { pContext.getProject().fireChangeEvent(ProjectChangeListener.EventType.PluginSettingsWillChange, Struts2Tools.pluginID); pack.getParentNode().removeChild(pack); pContext.getProject().fireChangeEvent(ProjectChangeListener.EventType.PluginSettingsChanged, Struts2Tools.pluginID); } COM: <s> deletes a result type </s>
funcom_train/39309503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int doEndTag() throws JspException { Structure s = Structure.getStructure(this.getStructid()); try{ this.pageContext.getOut().write(s.getStandardHTML()); } catch (IOException e) { log.error("Error while writing to JSP out",e); throw new JspException("Error while writing to JSP out",e); } return EVAL_PAGE; } COM: <s> outputs the standard html representation of the structure to the calling jsp </s>
funcom_train/15407750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String trimSelectKeyword(String preWhereExprSql) { if (preWhereExprSql.length() < 7){ throw new RuntimeException("Expecting at least 7 chars in ["+preWhereExprSql+"]"); } String select = preWhereExprSql.substring(0, 7); if (!select.equalsIgnoreCase("select ")){ throw new RuntimeException("Expecting ["+preWhereExprSql+"] to start with \"select\""); } return preWhereExprSql.substring(7); } COM: <s> trim off the select keyword to support row number limit function </s>
funcom_train/29699531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInfantryLeft(int playerId) { Player player = this.getPlayer( playerId ); int remaining = 0; for (Enumeration<Entity> i = entities.elements(); i.hasMoreElements();) { final Entity entity = i.nextElement(); if ( player.equals(entity.getOwner()) && entity.isSelectableThisTurn() && entity instanceof Infantry ) { remaining++; } } return remaining; } COM: <s> returns the number of remaining selectable infantry owned by a player </s>
funcom_train/41575953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint() { if( g == null ) g = getGraphics(); g.setColor(paramRgbBack); g.fillRect(0, 0, getWidth(), getHeight()); if (tilemap != null) tilemap.paint(g); if (snakeTail != null) { SnakePiece piece; for (piece = snakeTail; piece != null; piece = piece.ahead) { piece.paint(g); } } repaint(); } COM: <s> repaints the screen </s>
funcom_train/35356953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(short X, short Y, short Theta) { this.msX = (byte) Math.min(Byte.MAX_VALUE, Math.max(Byte.MIN_VALUE, X)); this.msY = (byte) Math.min(Byte.MAX_VALUE, Math.max(Byte.MIN_VALUE, Y)); this.msTheta = Theta; } COM: <s> sets the x y theta values for the feature </s>
funcom_train/36737217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String multiLineComment(String input) { String[] lines = input.split("\\n"); StringBuffer query = new StringBuffer(); String postComment = null; for (int i = 0; i < lines.length; i++) { postComment = searchAndCutComments(lines[i]); query.append(postComment.replaceAll("\\s+", " ")); } return query.toString(); } COM: <s> runs some post processing information over the query line </s>
funcom_train/26141217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createEvent(String comment, int code, String eType, String fileName, int line, int column) { ErrorCode ec = ErrorCode.getErrorFromCode(code); String mesg = ec.getErrorMessage(); ErrorItem event = eif.generateErrorItem(mesg, code, this.getClass()); event.setComment(comment); event.setErrorType(eType); event.setLine(line); event.setCol(column); event.setParsedFile(fileName); fireErrorItemEvent(event); } COM: <s> create an event with row and column information </s>
funcom_train/31947744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEntriesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ESock_entries_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ESock_entries_feature", "_UI_ESock_type"), SailuserdataPackage.Literals.ESOCK__ENTRIES, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the entries feature </s>
funcom_train/44451387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean fitsTo(WangTile tmpTile, int x, int y) { // Test north if (y > 0) { if (tmpTile.getNorthColor() != getTileAt(x, y - 1).getSouthColor()) { return false; } } // Test west if (x > 0) { if (tmpTile.getWestColor() != getTileAt(x - 1, y).getEastColor()) { return false; } } return true; } COM: <s> checks if a tile fits to a position in this tiling </s>
funcom_train/32069074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeAccountingEntry(AccountingEntry accountingEntry) { boolean removedOK = getAccountingEntrys().remove(accountingEntry); if (removedOK) { accountingEntry.setAccountingMovement(null); } else { if (logger.isWarnEnabled()) { logger.warn("remove returned false"); } } return removedOK; } COM: <s> remove the passed accounting entry from the accounting movement collection and unset </s>
funcom_train/38464127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void clear() { ThreadMap map = (ThreadMap)mapsMap.get(Thread.currentThread()); if(map != null) { map.dataMap.clear(); map.objMap.clear(); // No more entries in thread's transient map. // No need to hold it. mapsMap.remove(Thread.currentThread()); } } COM: <s> clears the map </s>
funcom_train/941460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(final Object that) { if (this == that) { return true; } if (that == null) { return false; } if (this.getClass() != that.getClass()) { return false; } BoundingBox b = (BoundingBox) that; return (this.max.equals(b.max) && this.min.equals(b.min)); } COM: <s> use this to compare two bounding boxes </s>
funcom_train/11071450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMkdirDouble() throws Exception { assertFalse(TEST_DIR1.exists()); assertFalse(TEST_DIR_IN_DIR1.exists()); assertFalse(FTPReply.isPositiveCompletion(client.mkd(TEST_DIR1.getName() + '/' + TEST_DIR_IN_DIR1.getName()))); assertFalse(TEST_DIR1.exists()); assertFalse(TEST_DIR_IN_DIR1.exists()); } COM: <s> ftpserver 233 we should not recursively create directories </s>
funcom_train/48089014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getLatitudeField() { if (latitudeField == null) {//GEN-END:|21-getter|0|21-preInit // write pre-init user code here latitudeField = new TextField("Latitude", "0", 32, TextField.ANY);//GEN-LINE:|21-getter|1|21-postInit // write post-init user code here }//GEN-BEGIN:|21-getter|2| return latitudeField; } COM: <s> returns an initiliazed instance of latitude field component </s>
funcom_train/50237623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedImage(int index) { if( (index >= 0) && (index < images.size()) ) { InfoButton info = ((ImageInfo)images.elementAt(index)).getButton(); info.doClick(); if( info.isShowing() ) info.requestFocus(); } } COM: <s> called by classes that want to set a thumbnail selected </s>
funcom_train/26522327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vertex getVertex(int index) { Set s = vertices.keySet(); if (s == null || s.size() == 0) { return null; } Iterator i = s.iterator(); while (i.hasNext()) { Vertex v = (Vertex) i.next(); if (v.getIndex() == index) { return v; } } return null; } COM: <s> return vertex with given index </s>
funcom_train/35501041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getEditQuestion() { // question = questionBO.findById(Question.class, questionId); try { question = questionBO.getQuestionById(questionId); answers = questionBO.getAnswers(questionId); professionGroupId = question.getProfessionGroup().getId(); deleted = (question.getDeleted()) ? 1 : 0; } catch (Exception ex) { ex.printStackTrace(); } return INPUT; } COM: <s> get question info for editing </s>
funcom_train/42536078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o){ if(!(o instanceof GetReq))return false; if(o == this)return true; GetReq oo = (GetReq)o; return (((Object)url).equals(oo.url))&&(((Object)ver).equals(oo.ver)); } COM: <s> is the given object equal to this get req </s>
funcom_train/34793635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String stripChars(String string) { if (string == null) { return null; } for (int i = 0; i < string.length(); i++) { if (!Character.isDigit(string.charAt(i))) { string = string.substring(0, i) + string.substring(i + 1); i--; } } return string; } COM: <s> strips any non numeric character </s>
funcom_train/9564428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHasTitlePage() { if(this.mode == MODE_SINGLE) { this.mode = MODE_MULTIPLE; headerFirst = new RtfHeaderFooter(this.document, headerAll, RtfHeaderFooter.DISPLAY_FIRST_PAGE); headerFirst.setType(this.type); } } COM: <s> set that this rtf header footer group should have a title page </s>
funcom_train/50312920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrent(boolean current) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); try { lockToolkit(); if(current) { if (GLContext.current == this) return; Fox.FXGLContext_begin(handle, drawableHandle); GLContext.current = this; } else { if (GLContext.current != this) return; Fox.FXGLContext_end(handle); GLContext.current = null; } } finally { unlockToolkit(); } } COM: <s> p sets this context to be current </s>
funcom_train/3466739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scrollToOffset(int offset) { Integer line = (Integer)offsetToLine.get(new Integer(offset)); if (line == null) { return; } Rectangle target = new Rectangle(0, line.intValue() * lineHeight + MARGIN_Y + 1, 10, getParent().getHeight()); scrollRectToVisible(target); } COM: <s> scroll the view to a given bytecode offset </s>
funcom_train/23453153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInConditionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Result_inCondition_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Result_inCondition_feature", "_UI_Result_type"), ProcessPackage.Literals.RESULT__IN_CONDITION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the in condition feature </s>
funcom_train/7342535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMappedStatement(MappedStatement ms) { if (mappedStatements.containsKey(ms.getId())) { throw new SqlMapException("There is already a statement named " + ms.getId() + " in this SqlMap."); } ms.setBaseCacheKey(hashCode()); mappedStatements.put(ms.getId(), ms); } COM: <s> add a mapped statement </s>
funcom_train/51502518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBColor() { if (bColor == null) { bColor = new JButton(); bColor.setText("Textfarbe einstellen"); bColor.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { Color nc=JColorChooser.showDialog(Agenda.client,"W�hlen Sie eine Farbe aus",Color.BLACK); if(nc != null) { tInputField.setForeground(nc); } } }); } return bColor; } COM: <s> this method initializes b color </s>
funcom_train/46760406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OrderModel getOrder(final long orderId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return OrderData.getOrder(orderId, chain, call); }}; return (OrderModel) call(method, call); } COM: <s> same transaction return the single order model for the primary key </s>
funcom_train/17463757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet executeQuery(String sql) throws SQLException { Stopwatch sw = new Stopwatch(); sw.start(); ResultSet returnValue = null; SQLException mayBe = null; try { returnValue = statement.executeQuery(sql); } catch (SQLException error) { mayBe = error; } sw.stop(); Logger.getInstance().log(sql, sw.getElapsedTimeMillis(), mayBe); if (mayBe != null) throw mayBe; return returnValue; } COM: <s> calls execute query on underlying statement object messures execution time </s>
funcom_train/30198525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Package newPackage(String pkgName, Package parentPackage) { Package pkg = null; if (pkgName.equalsIgnoreCase(ROOT) && parentPackage == null) { pkg = new Package(pkgName); } else { pkgName=pkgName.intern(); pkg = new Package(pkgName, parentPackage); parentPackage.set(pkgName, pkg); } pkgMap.put(pkgName, pkg); return pkg; } COM: <s> creates a new package named p pkg name </s>
funcom_train/36956228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void synchronizeOutlinePage(ISourceReference element, boolean checkIfOutlinePageActive) { if (fOutlinePage != null && element != null && !(checkIfOutlinePageActive && isRubyOutlinePageActive())) { fOutlineSelectionChangedListener.uninstall(fOutlinePage); fOutlinePage.select(element); fOutlineSelectionChangedListener.install(fOutlinePage); } } COM: <s> synchronizes the outliner selection with the given element position in </s>
funcom_train/50373780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AddResponseDocument add(AddRequestDocument request) { logger.info("add() "+request); int toAdd = request.getAddRequest().getInteger(); int newValue=sum.addAndGet(toAdd); setDirty(); //the response contains the current total sum AddResponseDocument res=AddResponseDocument.Factory.newInstance(); res.addNewAddResponse().setNewSum(newValue); return res; } COM: <s> implementation of the add web service method </s>
funcom_train/10598772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void pop() { Object[] consumer = (Object[]) this.consumers.pop(); if (consumer[0] != null) { setConsumer((XMLConsumer) consumer[0]); } else { setContentHandler((ContentHandler) consumer[1]); setLexicalHandler((LexicalHandler) consumer[2]); } } COM: <s> pop consumer from the stack replace current one </s>
funcom_train/45596871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reCreateData(Vector<LBrick> legoBricks){ String[][] data = createDataTable(legoBricks); listTable = new JTable(data,colNames); listTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); listTable.doLayout(); listTable.setEnabled(false); scrollPane.setViewportView(listTable); } COM: <s> this function is used to update the bricks table when a different </s>
funcom_train/26024054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canImport(JComponent comp, DataFlavor[] flavors) { if (flavors != null) { if (DataFlavor.selectBestTextFlavor(flavors) != null) return true; for (int i = 0; i < flavors.length; i++) if (flavors[i].equals(DataFlavor.javaFileListFlavor)) return true; } return super.canImport(comp, flavors); } COM: <s> extends the parent implementation to accept text and </s>
funcom_train/3593700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double pollForMaxTime() { double maxtime=net.sourceforge.nite.gui.textviewer.NTextElement.UNTIMED; Iterator it = timeHandlers.iterator(); while (it.hasNext()) { TimeHandler th = (TimeHandler) it.next(); if (!(th instanceof PlayingTimeHandler)) { // these register maxtimes double mt = th.getMaxTime(); if (mt>maxtime) { maxtime=mt; } } } return maxtime; } COM: <s> called by registered displays to allow the slider to be set correctly </s>
funcom_train/37434993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addColumnGroupTable3() { final DefaultTableModel model = (DefaultTableModel) table3.getModel(); final TableColumnModel columnModel = table3.getColumnModel(); final int numColumns = columnModel.getColumnCount(); model.addColumn("P"); columnModel.addColumn(createColumn(numColumns, SCROLL_BLOCK_WIDTH, "P")); } COM: <s> adds a new saison to the tgird table </s>
funcom_train/41165155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(StoredOpenResponse entity) { EntityManagerHelper.log("saving StoredOpenResponse instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved stored open response </s>
funcom_train/47855644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openBayesianNetworkIndirect(String filename) { CursorWait.singleton.addOneWait(); try { logger.debug("sending command : "+SamiamWrapperServer.COMMAND_OPEN+" "+filename); //$NON-NLS-1$ //$NON-NLS-2$ ps.print(SamiamWrapperServer.COMMAND_OPEN); ps.print(" "); //$NON-NLS-1$ ps.println(filename); ps.flush(); lastNameBNOpen = filename; } finally { CursorWait.singleton.removeOneWait(); } } COM: <s> request the opening of an attribute network </s>
funcom_train/1057304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { boolean loaded = false; boolean connected = false; stop = false; try { loaded = true; connect(); if (stop) { throw new IOException(); } connected = true; uploadMessage(message); } catch (IOException e) { if (DEBUG) { e.printStackTrace(); } if (!stop) { if (connected) { gui.stopMessage(); } else if (loaded) { gui.notReadyMessage(); } else { gui.errorMessage(); } closeAll(); return; } } catch (Throwable e) { e.printStackTrace(); } closeAll(); gui.show(); } COM: <s> used to send an image </s>
funcom_train/21346022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void annotateReaction(Reaction reaction, List<BrendaEnzyme> enzymes) { Document document = XMLUtils.getInstance().createDocument(); Node root = document.createElementNS(BrendaInformation.NAMESPACE, BrendaInformation.BRENDA_TAG); for (BrendaEnzyme enzyme : enzymes) { Node enzymeNode = enzyme.toXML(document); root.appendChild(enzymeNode); } try { String xml = XMLUtils.getInstance().writeXMLtoString(root, false); reaction.appendAnnotation(xml); } catch (TransformerException e) { e.printStackTrace(); } } COM: <s> annotates one reaction with a list of brenda enzymes </s>
funcom_train/5338846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyActionListeners(int track, int sector, int type) { if (actionListener != null) { StringBuffer sb = new StringBuffer(); sb.append(track); sb.append(' '); sb.append(sector); actionListener.actionPerformed(new ActionEvent(this, type, new String(sb))); } } COM: <s> notify interested action listeners </s>
funcom_train/38513653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BaseAction getActionByName(String pName) { if (!name2action.containsKey(pName)) { //Util.warn("Action with name " + pName + " does not exist. Actions are " + name2action.keySet()); } return (BaseAction)name2action.get(pName); } COM: <s> returns the action with the given name or null if action not exist </s>
funcom_train/13512835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void last(Component parent) { if (actualPanel != panelList.size() - 1) { panelList.get(actualPanel).component.setVisible(false); actualPanel = panelList.size() - 1; panelList.get(actualPanel).component.setVisible(true); } parent.validate(); } COM: <s> flips to the last card </s>
funcom_train/51419967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isServiceUrlInMap(Map map, JMXServiceURL url) { boolean result = false; String[] aliases = ((String)runningConnectors.get(CONFIGKEY_CONNECTORALIASES)).split(","); for (int i = 0; i < aliases.length; i++) { JMXServiceURL aUrl = null; try { aUrl = getServiceURLFromMap(aliases[i], map); } catch (Exception e) { } if (null == aUrl) { result = true; break; } } return result; } COM: <s> check if a service url is in map </s>
funcom_train/32871338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAllLocationShort() { MeasurementExtension me = new MeasurementExtension(testAspect.alNormalShort,RUNS); ((MeasurementExtension.MyMethodCut)me.c1).setSpecializer((Executions.before()) .AND (Within.subType(CrosscutMeasurement.class)) .AND (Within.method("voidMethod"))); ProseSystem.getAspectManager().insert(me); voidMethod(); ProseSystem.getAspectManager().withdraw(me); } COM: <s> test the time needed to simulate the dispatching of a </s>
funcom_train/38552854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialize() { this.loadStandardSubSystems(); mThread = new MaintainenceThread(MAINTAINENCE_INTERVAL); //Register to know when new resources have entered the system try { Loader.registerResourceChangeListener(this); Logger.info(SSCSystemCodes.SSC_STARTED, new Object[]{new MachineID()}); } catch (Cube42Exception e) { e.log(LogSeverity.FATAL); } } COM: <s> initializes the ssc </s>
funcom_train/14462046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BiffRec getSheetRec(short opc) { BiffRec rec = null; int size = SheetRecs.size(); int foundIndex =-1; for(int i=0;i<size && foundIndex==-1;i++){ rec = (BiffRec)SheetRecs.get(i); if (rec.getOpcode()==opc) return rec; } return null; } COM: <s> return the desired record from the sheetrecs or null if doesnt exist </s>
funcom_train/2329387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printPattern(int[] row, int[] column, int offset) { int size = row.length; if (size != column.length) throw new IllegalArgumentException("All arrays must be of the same size"); for (int i = 0; i < size; ++i) format("%10d %10d\n", row[i] + offset, column[i] + offset); } COM: <s> prints the coordinates to the underlying stream </s>
funcom_train/457670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void afterPropertiesSet() throws Exception { if(localConfig == null) { log.error("Need a: " + LocalConfig.class); throw new ExceptionInInitializerError("Need a: " + LocalConfig.class); } if(ldapTemplate == null) { log.error("Need a: " + LdapTemplate.class); throw new ExceptionInInitializerError("Need a: " + LdapTemplate.class); } } COM: <s> verifies spring bean injection </s>
funcom_train/27944205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testQuote_bothQuotesAndSlashes() { quoteTester( "The rain in \"Spain\" is mainly on the \'Plane\' slash: \\ 2 slashes: \\\\.", '\'', false, "The rain in \"Spain\" is mainly on the \\\'Plane\\\' slash: \\\\ 2 slashes: \\\\\\\\." ); } COM: <s> mixed double single quotes and slashes in input string </s>
funcom_train/29798691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LemoniteMap put(String key, TestDataCollection testDataCollection) { LemoniteMap collectionLemoniteMap = new LemoniteMap(1); LemoniteMap collectionDataLemoniteMap = new LemoniteMap(); // Filling the collectionDataMap from the TestDataCollection collectionDataLemoniteMap.fillMap(testDataCollection); // adding collectionDataMap to collectionMap collectionLemoniteMap.put(KEY_COLLECTION, collectionDataLemoniteMap); // adding collectionDataMap to collectionMap super.put(key, collectionLemoniteMap); return collectionDataLemoniteMap; } COM: <s> adding a test data collection to this map </s>
funcom_train/19090008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String dateToString(int[] date) { StringBuffer message = new StringBuffer(6); message.append('-'); message.append('-'); message.append('-'); append(message, date[D], 2); append(message, (char)date[utc], 0); return message.toString(); } COM: <s> converts g day object representation to string </s>
funcom_train/43646206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getExpression(YorkBrowser browser, DynamicModelNode dNode){ propsDialog = new IndividualPanelDialog(browser, new TextFieldPanel(dNode.getExpression(), 27, "Define the expression", dNode.getIdString() + " = ", "expression"), "Define expression", new Dimension(390, 150)); propsDialog.showDialog(); if(propsDialog.getWasCancelled()){ return null; } else{ return (String) propsDialog.getResultsMap().get("expression"); } } COM: <s> gets the expression as defined by the user </s>
funcom_train/2713119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doGenerate(InputParams in, OutputParams out) { String menuId = (String) in.get("MENU_ID"); ProvidedTool tool = getContext().getConfiguration().getMenuConfig(). getProvidedTools().getProvidedToolById(menuId); Function compile = new GenerateJavadocPackage(tool); compile.process(in, out); } COM: <s> generates javadoc for package of current document </s>
funcom_train/2948610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JCheckBoxMenuItem add(ToggleCommand c) { //create MenuItem JCheckBoxMenuItem mi = new JCheckBoxMenuItem((String) c.getValue(Action.NAME)); mi.setHorizontalTextPosition(JButton.RIGHT); mi.setVerticalTextPosition(JButton.CENTER); mi.setEnabled(c.isEnabled()); mi.setSelected(c.isSelected()); //add Command as acrion Listener mi.addActionListener(c); add(mi); //register listener to command's properties mi.addMouseListener(mouseOverList); return mi; } COM: <s> creates a new menuitem attached to the specified command object and </s>
funcom_train/3362888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JRootPane createRootPane() { JRootPane rp = new JRootPane(); // NOTE: this uses setOpaque vs LookAndFeel.installProperty as there // is NO reason for the RootPane not to be opaque. For painting to // work the contentPane must be opaque, therefor the RootPane can // also be opaque. rp.setOpaque(true); return rp; } COM: <s> called by the constructor methods to create the default </s>
funcom_train/9115055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(byte[] b, int off, int len) throws IOException { if (chunkCount == 0) { startChunk(); if (chunkCount == 0) { return -1; } } int toRead = Math.min(chunkCount, len); int r = in.read(b, off, toRead); if (r != -1) { chunkCount -= r; } return r; } COM: <s> reads into an array of bytes </s>
funcom_train/42400891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected NewConcreteType createBeanFactory(final String newTypeName, final Type implementsInterface) { this.getGeneratorContext().info("Creating BeanFactory with a name of \"" + newTypeName + "\"."); final NewConcreteType beanFactory = this.getGeneratorContext().newConcreteType(newTypeName); beanFactory.setAbstract(false); beanFactory.setFinal(true); beanFactory.setSuperType(this.getBeanFactoryImpl()); beanFactory.setVisibility(Visibility.PUBLIC); beanFactory.addInterface(implementsInterface); return beanFactory; } COM: <s> factory method which creates a new bean factory read to accept methods and </s>
funcom_train/18827371
/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(this.getClass().getName()) .append(": ").append(super.toString()); if (_exception != null) { sb.append("; caused by: ").append(_exception.toString()); } return sb.toString(); } COM: <s> returns the string representation of this exception </s>
funcom_train/35167917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void execSegmentation() { for (String l : allStr) { Segmentator s; try { s = new Segmentator(pngFolder + l + ".png"); s.cleanLetters(); //s.printLetters("rec/" + l, false); //s.resize(); //s.proportionalResize(); s.proportionalResizeWithCentring(); s.sampling(); s.writeFile(txtFolder + l + ".txt"); } catch (IOException e) { e.printStackTrace(); } } System.out.println("Dectection Succesfully Completed!"); } COM: <s> execute the real segmentation of the letters previously produced </s>
funcom_train/24000731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBoundName() { ExternalVariableDeclarationAst instance = new ExternalVariableDeclarationAst("test", OclTypeRegistry.OclBooleanType); assertEquals("test",instance.getBoundName()); instance.setExternalName("t2"); assertEquals("t2",instance.getBoundName()); } COM: <s> test of get bound name method of class external variable declaration ast </s>
funcom_train/3272245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static private void addMessage(TestSuite suite, String message, String suiteName) { try { FailMessageTest fmt = (FailMessageTest) addTestObject(suite, Class.forName("org.jmx4odp.junitDiagnosticWorkers.FailMessageTest"), suiteName).firstElement(); fmt.setMessage(message); } catch (Exception e) { if (VERBOSE) e.printStackTrace(); } } COM: <s> add a fail message test test to the suite </s>
funcom_train/18948875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PropertySet merge() { PropertySet merge = new PropertySet(); PropertySet propset = null; int numPropSets = iOrderedPSN.size(); for( int propI = 0; propI < numPropSets; propI++ ) { propset = get( String.valueOf( iOrderedPSN.get(propI) ) ); merge.overrideWith( propset ); } return merge; } COM: <s> merge ordered property sets earlier entries overwritten by later entries </s>
funcom_train/29023678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int print(Graphics g, PageFormat pf, int pageIndex) { if (pageIndex != 0) { return NO_SUCH_PAGE; } Graphics2D g2 = (Graphics2D) g; double x = pf.getImageableX(); double y = pf.getImageableY(); double w = pf.getImageableWidth(); double h = pf.getImageableHeight(); BufferedImage img = getBufferedImage(); g2.drawImage(img, (int) x, (int) y, (int) w, (int) h, null); return PAGE_EXISTS; } COM: <s> prints the chart on a single page </s>