__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/28550132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private S extractSentenceBody(IParsedSentence aSentence) { if (aSentence != null // && aSentence instanceof BaseParsedSentence // && getSentenceType().equals(aSentence.getSentenceType())) return (S) aSentence.getSentenceBody(); else throw new RuntimeException("Wrong sentence implementation " + aSentence // + " for this class " + this); } COM: <s> correctly sets the sentence body based on a sentence </s>
funcom_train/40736275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SecurityPrivilege addSecurityPrivilege(SecurityPrivilege pojoToSet, SecurityProfileGrant pojo) { SecurityProfileGrantManager manager = SecurityProfileGrantManager.getInstance(); return manager.addSecurityPrivilege(this.createSecurityProfileGrantBean(pojoToSet), this.createSecurityProfileGrantBean(pojo)); } COM: <s> associates the security profile grant object to the security privilege object </s>
funcom_train/18951234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String _getProperty( String rName ) { String result = ""; if( ! writer__iPropertiesInitialised ) { writer__initProperties(); } if( writer__iProperties.containsKey( rName ) ) { result = (String) writer__iProperties.get( rName ); } return result; } COM: <s> get compile time property </s>
funcom_train/37125359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void afterVisible() { if(m_children != null) { // ask recursively on all the children java.util.Iterator it = m_children.values().iterator() ; while(it.hasNext()) { Object elt = it.next() ; if(elt instanceof Component) { ((Component) elt).afterVisible() ; } } } } COM: <s> to be overriden if post processing is required after that the window </s>
funcom_train/12310083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Object listener) { Assert.isNotNull(listener); if (size == 0) { listeners = new Object[capacity]; } else { // check for duplicates using identity for (int i = 0; i < size; ++i) { if (listeners[i] == listener) { return; } } // grow array if necessary if (size == listeners.length) { System.arraycopy(listeners, 0, listeners = new Object[size * 2 + 1], 0, size); } } listeners[size++] = listener; } COM: <s> adds the given listener to this list </s>
funcom_train/50919232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private CDXNode getCDXNodeById(String id) { // CDXNode node = null; // List l = getCDXElementsById(id); // if (l != null) { // for (int i = 0; i < l.size(); i++) { // Object obj = l.get(i); // if (obj instanceof CDXNode) { // node = (CDXNode) obj; // break; // } // } // } // return node; // } COM: <s> cdx does not provide unique ids </s>
funcom_train/45623235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addInputUrlPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FormatUrlType_inputUrl_feature"), getString("_UI_PropertyDescriptor_description", "_UI_FormatUrlType_inputUrl_feature", "_UI_FormatUrlType_type"), MSBPackage.eINSTANCE.getFormatUrlType_InputUrl(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the input url feature </s>
funcom_train/44714226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component createComponent() { Password password = new Password(getParameterName()); copyValuesToWidget(password); if (getComponentAttribute("maxlength") != null) { password.setMaxLength(getMaxLength()); } if (getComponentAttribute("size") != null) { password.setSize(getSize()); } return password; } COM: <s> create the password whose persistence is managed </s>
funcom_train/2582278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFaroutCoefficient(double faroutCoefficient) { if (faroutCoefficient > getOutlierCoefficient()) { this.faroutCoefficient = faroutCoefficient; } else { throw new IllegalArgumentException("Farout value must be greater " + "than the outlier value, which is currently set at: (" + getOutlierCoefficient() + ")"); } } COM: <s> sets the value used as the farouts coefficient </s>
funcom_train/43908181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testVendor() { CRSAuthorityFactory factory; Citation vendor; factory = new OrderedAxisAuthorityFactory("EPSG", null, null); vendor = factory.getVendor(); assertNotNull(vendor); assertEquals("Geotools", vendor.getTitle().toString(Locale.US)); assertFalse(vendor.getIdentifiers().contains("EPSG")); } COM: <s> tests the vendor name </s>
funcom_train/48389324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addFacetMovedHandler(com.smartgwt.client.widgets.cube.events.FacetMovedHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.cube.events.FacetMovedEvent.getType()) == 0) setupFacetMovedEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.cube.events.FacetMovedEvent.getType()); } COM: <s> add a facet moved handler </s>
funcom_train/46759900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LoincModel getLoinc(final long loincId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return ClinicalData.getLoinc(loincId, chain, call); }}; return (LoincModel) call(method, call); } COM: <s> same transaction return the single loinc model for the primary key </s>
funcom_train/42775496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadFromXML(String xmlStr){ try{ Document xmlDoc = Util.getXMLDocument(xmlStr); int newXPos = Util.getIntParameter("x", xmlDoc); int newYPos = Util.getIntParameter("y", xmlDoc); setPosition(newXPos, newYPos); } catch(Exception ex){ System.out.println(xmlStr); ex.printStackTrace(); MsgHandler.error(ex.getMessage()); } } COM: <s> loads parameters from the supplied xml string </s>
funcom_train/30075611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ModelAndView onSubmit(Object command) throws ServletException { // the edited object Architecture architecture = (Architecture) command; // delegate the update to the Business layer getGpir().storeArchitecture(architecture); return new ModelAndView(getSuccessView(), "architectureId", Integer.toString(architecture.getId())); } COM: <s> method updates an existing code architecture code when the form is committed </s>
funcom_train/3720929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void extendDataValuesList(int index) { if (index >= this.dataValues.length) { DataValue[] newCopy = new DataValue[index + 1]; System.arraycopy(this.dataValues, 0, newCopy, 0, this.dataValues.length); this.dataValues = newCopy; } } COM: <s> makes data value list long enough to accommodate setter </s>
funcom_train/13850518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteService(SvcReg reg, long now) { Item item = reg.item; generateEvents(item, null, now); serviceByID.remove(item.serviceID); serviceByTime.remove(reg); deleteServiceFromTypes(item.serviceType, reg); EntryRep[] entries = item.attributeSets; for (int i = entries.length; --i >= 0; ) { deleteAttrs(reg, entries[i], false); } computeMaxLeases(); } COM: <s> delete given service generating events as necessary </s>
funcom_train/2558267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputNode node, Object source) throws Exception { Map map = (Map) source; for(Object index : map.keySet()) { String root = entry.getEntry(); String name = style.getElement(root); OutputNode next = node.getChild(name); Object item = map.get(index); key.write(next, index); value.write(next, item); } } COM: <s> this code write code method will write the key value pairs </s>
funcom_train/41213707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshModLists() { if(iGUICreated) { DefaultListModel dlm = (DefaultListModel)lstFixedMods.getModel(); dlm.clear(); populateListModel(dlm, modifications.getModifications()); dlm = (DefaultListModel)lstVarMods.getModel(); dlm.clear(); populateListModel(dlm, modifications.getModifications()); } } COM: <s> this method will refresh the modification lists </s>
funcom_train/28977709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkExistLocal(final String query) throws Exception { logger.info(query); final ByteArrayOutputStream out = new ByteArrayOutputStream(); SSHUtil.executeCommand(getSession(), "if [ -e /tmp/" + query + " ] ; then echo \"1\"; fi", out); if (new String(out.toByteArray()).trim().equals("1")) { return true; } return false; } COM: <s> checks that a file exist in the defined temp directory </s>
funcom_train/35079014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringFormat getStringFormat(int index) { Assert.checkRange(index, glyphs); Iterator it = stringFormats.iterator(); while(it.hasNext()) { StringFormat sf = (StringFormat)it.next(); if(sf.contains(index)) return sf; } // should not reach here: throw new RuntimeException("StringFormats in this paragraph is invalid."); } COM: <s> get the string format of the glyph specified by the index </s>
funcom_train/25889651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void convertBuffer() { int b = 0; for (int i = 0; i < _buffer.length; i++) { b = _buffer[i]; // peek processing if (b < -32000) { b = -32000; } else if (b > 32000) { b = 32000; } _audioBuffer[i << 1] = (byte)(b >> 8); _audioBuffer[(i << 1) + 1] = (byte)(b & 0xff); } } COM: <s> converts the simple reaper buffer to the actual audio output buffer </s>
funcom_train/21346084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double median(List<Double> values) { double value = 0; if (values != null && values.size() > 0) { Double[] sorted = new Double[values.size()]; values.toArray(sorted); Arrays.sort(sorted); int size = sorted.length; value = (size % 2 == 0) ? ((sorted[size / 2 - 1] + sorted[size / 2]) / 2.0) : sorted[size / 2]; } return value; } COM: <s> calculates the median of a list of values </s>
funcom_train/8950614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveVisibilityState() { //store visible columns String colData = ""; for (boolean col : visibleColumns) { colData += col + ","; } colData = colData.substring(0, colData.lastIndexOf(",")); GlobalOptions.addProperty(getPropertyBaseID() + ".visible.cols", colData); } COM: <s> save the property holding the array of visible cols </s>
funcom_train/32057917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetGraphModelProvider() { System.out.println("testGetGraphModelProvider"); GPGraphpad pad = new GPGraphpad(); GPGraph graph = new GPGraph(); GraphUndoManager undo = new GraphUndoManager(); GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo); assertEquals("getGraphModelProvider failed", newDoc .getGraphModelProvider() == null, true); } COM: <s> test of get graph model provider method of class gpdocument </s>
funcom_train/318714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadProperty() { Object list = thinlet.find("keyList"); Object item = thinlet.getSelectedItem(list); String selectedKey = thinlet.getString(item, "text"); Object textArea = thinlet.find("valueBox"); // Fill the text area: thinlet .setString(textArea, "text", properties .getProperty(selectedKey)); } COM: <s> loads and sets the text area with the value of the selected key </s>
funcom_train/22783690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateSelectedImages() { List<Image> selectedImages = new LinkedList<Image>(); if (onlySelection.isSelected()) { // copy the selected images for (Image img : client.getViewControl().getSelectedImages()) { selectedImages.add(img); } } else { // take a snapshot selectedImages = client.getViewControl().getLibraryView().getSnapshot(); } renamePanel.setSelectedImages(selectedImages); } COM: <s> update the selected images </s>
funcom_train/9369258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CharSequence loadLabel(PackageManager pm) { if (mNonLocalizedLabel != null) { return mNonLocalizedLabel; } if (mLabelRes != 0 && mSourcePackage != null) { CharSequence label = pm.getText(mSourcePackage, mLabelRes, null); if (label != null) { return label; } } return null; } COM: <s> retrieve the label associated with this object </s>
funcom_train/42061329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSensor(SensorID sid) throws NotFoundException{ synchronized(sensorConfig){ for(Iterator<SMLDescription>i = sensorConfig.iterator(); i.hasNext();){ if(i.next().getID().equals(sid.getName())) { i.remove(); scChanged.set(true); logger.debug("removed configuration for sensor '"+sid.getName()+"'"); return; } } } throw new NotFoundException("Sensor configuration for ID '"+sid.getName()+"'not found"); } COM: <s> this method removes the sml description from the sensor config file </s>
funcom_train/24438317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setEvaluatorClass(Class c) throws IllegalArgumentException { if (!AspectEvaluator.class.isAssignableFrom(c) || AspectEvaluator.class == c) throw new IllegalArgumentException( "Illegal AspectEvaluator class: " + c.getName()); try { c.getConstructor(new Class[0]); } catch (NoSuchMethodException ex) { throw new IllegalArgumentException( "Illegal AspectEvaluator class: " + c.getName()); } evaluatorClass = c; } COM: <s> sets the class to use to create aspect evaluators </s>
funcom_train/51271058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkEndExpr(int startPosition, int endPosition) throws MXQueryException { assignVars(startVars, startVarsHolder, startPosition); assignVars(endVars, endVarsHolder, endPosition); boolean value=false; TokenInterface endTok = endExpr.next(); if(endTok.getEventType() == Type.BOOLEAN){ value = endTok.getBoolean(); }else{ throw new RuntimeException("This should never happen because the condition is always a boolean expression."); } endExpr.reset(); return value; } COM: <s> checks the end expressen for a given start and end position </s>
funcom_train/7442694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Reference addSegment(String value) { final String path = getPath(); if (value != null) { if (path == null) { setPath("/" + value); } else { if (path.endsWith("/")) { setPath(path + encode(value)); } else { setPath(path + "/" + encode(value)); } } } return this; } COM: <s> adds a segment at the end of the path </s>
funcom_train/37598694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getNorthCenterPanel() { if (northCenterPanel == null) { northCenterPanel = new javax.swing.JPanel(); northCenterPanel.setLayout(new java.awt.BorderLayout()); northCenterPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,5,0,5)); northCenterPanel.setOpaque(false); northCenterPanel.add(getMonthLabel(), java.awt.BorderLayout.CENTER); northCenterPanel.add(getYearSpinner(), java.awt.BorderLayout.EAST); } return northCenterPanel; } COM: <s> this method initializes north center panel </s>
funcom_train/47104261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(String image){ BufferedImage img; try { if(src.Constants.SCENARIO_DEBUG || src.Constants.EDITOR) img = ImageIO.read(new File(image)); else img = ImageIO.read(ScenarioFile.getInstance().getStream(image)); map.put(image, img); } catch (IOException e) { System.err.println("Image: " + image + " not found."); } catch (Exception ex){ //ex.printStackTrace(); System.err.println("Problem reading image: " + image + "."); } } COM: <s> creates a buffered image from the file at the given location </s>
funcom_train/23713245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValied() { // TODO: Check if modification is acceptable, geir, 04.04.05 if ((getActorID() != null /* && (!getActorID().equals("")) */) && ((getActorType() != null) && !getActorType().equals(""))) { return true; } return false; } COM: <s> check if the actor address is valid </s>
funcom_train/46640587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createColumn(Table table, String name, int size) { // create our new column TableColumn c = new TableColumn(table, SWT.LEFT); c.setText(name); // if we don't have a width specified then default to the column size if (size == -1) { c.setWidth(name.length() * kFactor); } // otherwise use the size provided else { c.setWidth(size); } } COM: <s> creates a new column in our table </s>
funcom_train/22715815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testSessionContainerUIDFound(String testSessionContainerUID) { if (this.foundTestSessionContainerUID == null) { this.foundTestSessionContainerUID = testSessionContainerUID; } else if (!this.foundTestSessionContainerUID.equals(testSessionContainerUID)) { throw new IllegalStateException("Different testSessionUIDs found"); } } COM: <s> checks if the </s>
funcom_train/50043874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(IGVFeature feature) { if (feature == null || !this.getChr().equals(feature.getChr())) { return false; } if ((feature.getStart() >= this.getStart()) && (feature.getEnd() <= this.getEnd())) { return true; } else { return false; } } COM: <s> return true if the feature is completely contained within the bounds of this </s>
funcom_train/3429014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDecimalFormat(String name, DecimalFormatSymbols symbols) { // Instanciate hashtable for formatting symbols if needed if (_formatSymbols == null) _formatSymbols = new Hashtable(); // The name cannot be null - use empty string instead if (name == null) name = EMPTYSTRING; // Construct a DecimalFormat object containing the symbols we got final DecimalFormat df = new DecimalFormat(); if (symbols != null) { df.setDecimalFormatSymbols(symbols); } _formatSymbols.put(name, df); } COM: <s> adds a decimal format object to the format symbols hashtable </s>
funcom_train/19703339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonParse() { if (jButtonParse == null) { jButtonParse = new JButton(); jButtonParse.setText("Parse"); jButtonParse.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("Before parsing ============"); SketchContainer.get().open().print(); SketchContainer.get().parse(); SketchContainer.get().open().print(); System.out.println("After parsing =============\n\n"); } }); } return jButtonParse; } COM: <s> this method initializes j button parse </s>
funcom_train/42850274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String printTransitions() { StringBuffer res = new StringBuffer(5000); for (SymbolString key : transitions.keySet()) { LinkedList<Transition> trans = transitions.get(key); for (Transition t : trans) { res.append(t.getFinalState().getName() + ", "); } } return res.toString(); } COM: <s> prints all transitions </s>
funcom_train/43404519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseDenotatorDefinition(Element denotatorNode) { Denotator denotator = parseDenotator(denotatorNode); if (denotator != null && !(denotator instanceof DenotatorReference)) { String name = denotator.getNameString(); if (name.length() != 0) { denotators.put(name, denotator); } } } COM: <s> parses toplevel denotator definition </s>
funcom_train/28367768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getInstantSatisfaction() { // if (getDurationInTick() < (mCommitment / 2)) { // return (int)mPreferenceShortTerm + mCurrentExternalReward; // } return (-0.5 * (getDurationInTick())) + mPreferenceShortTerm + mInstantReward + (mCommitment / 4d); } COM: <s> gets the instant satisfaction </s>
funcom_train/46320293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BackupFileSummary getBackupFileSummary() { BackupFileSummary summary = null; cursor.moveToFirst(); summary = new BackupFileSummary(new Date(cursor.getLong(BackupSummaryCursor.INDEX_ID)), cursor.getInt(BackupSummaryCursor.INDEX_NUMBER_OF_CONTEXTS), cursor.getInt(BackupSummaryCursor.INDEX_NUMBER_OF_TASKS)); return summary; } COM: <s> get the first backup file summary </s>
funcom_train/10190935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHeaders(Vector<Header> headers, boolean bTop) { StringBuffer stringBuffer = new StringBuffer(); for (int nIndex = 0; nIndex < headers.size(); ++nIndex) { stringBuffer.append(headers.elementAt(nIndex).toString()); } addHeaders(stringBuffer.toString(), bTop); } COM: <s> adds a vector of headers at the top bottom </s>
funcom_train/15453248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSystemLanguages(Set languagesId) { ConfigurationEntity configuration = getConfigurationEntity(); Iterator itIds = languagesId.iterator(); //Repeat for all elements while (itIds.hasNext()){ int key = ((Integer)itIds.next()).intValue(); SystemLanguage language = this.getSystemLanguage(key); configuration.removeSystemLanguage(language); } this.session.saveOrUpdate(configuration); } COM: <s> removes a set of languages from the system </s>
funcom_train/28507125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetObjects(){ Set<String> l_set=m_map.keySet(); Iterator<String> l_it=l_set.iterator(); while ( l_it.hasNext() ){ final String l_key=l_it.next(); m_map.get( l_key ).reset(); } } COM: <s> resets the objects managed by this factory </s>
funcom_train/13953544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String urlEncode(String input) { String output = null; if (input != null) { try { output = URLEncoder.encode(input, "UTF-8"); } catch (UnsupportedEncodingException uee) { NSLog.err.appendln("Could not URL encode input string. Error: " + uee.getMessage()); } } return output; } COM: <s> url encodes the input string </s>
funcom_train/10617274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCertPathBuilderException06() { CertPathBuilderException tE = new CertPathBuilderException(null, null); assertNull("getMessage() must return null", tE.getMessage()); assertNull("getCause() must return null", tE.getCause()); } COM: <s> test for code cert path builder exception string throwable code </s>
funcom_train/31558364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadMeta() throws IOException { if (dead) throw (IOException) error; // new IOException("dead"); // this only gets set here, so meta must have been loaded already if (details != null) { return; } // load sample, and grab reference to fields (data gets GC'd) try { Sample s = load(); details = s.meta; range = s.range; lastModified = new File(filename).lastModified(); } catch (IOException ioe) { dead = true; error = ioe; throw ioe; } } COM: <s> load the metadata fields for this element </s>
funcom_train/7981227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean getBit(long bitIndex) { int intIndex = (int) (bitIndex >>> ADDRESS_BITS_PER_UNIT); return ((bits[intIndex / ONE_MB_INTS][intIndex % ONE_MB_INTS] & (1 << (bitIndex & BIT_INDEX_MASK))) != 0); } COM: <s> returns from the local bitvector the value of the bit with </s>
funcom_train/21616497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void orderGetOne(int orderId) { try { Order order = Order.getOrder(orderId); if (order.getUserId() != user.getID()) printError("This is not your order", 3); else printLine(order.toString()); } catch (SQLException e) { printError("Could not get order info", 3); e.printStackTrace(); } } COM: <s> print the information for one order </s>
funcom_train/35678423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void check() throws CodeGenMakeException { if (getClassName() == null || getClassName().length() == 0) { throw new CodeGenMakeException( "Missing target POJO implementation class name"); } if (getMethodName() == null || getMethodName().length() == 0) { throw new CodeGenMakeException( "Missing target POJO method name"); } } COM: <s> when target is a pojo check that corresponding parameters are set </s>
funcom_train/12640151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildCharCategories(Vector tempRuleList) { super.buildCharCategories(tempRuleList); categoryFlags = new boolean[categories.size()]; for (int i = 0; i < categories.size(); i++) { CharSet cs = (CharSet)categories.elementAt(i); if (!(cs.intersection(dictionaryChars).empty())) { categoryFlags[i] = true; } } } COM: <s> the other half of the logic to handle the dictionary characters happens here </s>
funcom_train/8093878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWeight(int w) { if (!getUseMEstimates()) { System.out.println( "Weight is only used in conjunction with m-estimate - ignored!"); } else { if (w > 0) m_Weight = w; else System.out.println("Weight must be greater than 0!"); } } COM: <s> sets the weight for m estimate </s>
funcom_train/15627139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setModifiers(final int modifiers) { final boolean lightVisible = (modifiers & (InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK)) == (InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK); if (this.lightVisible != lightVisible) { this.lightVisible = lightVisible; updateRenderer(); } } COM: <s> updates the active modifiers for the current map view </s>
funcom_train/20897544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object obj) { ClusterMember member = (ClusterMember) obj; // If the length of the two cluster members is same then // use the protein ID, otherwise use length if (length == member.getLength()) { return (int) (member.getProtID() - protID); } else { return member.getLength() - length; } } COM: <s> the code compare to code method compares two cluster members based on length </s>
funcom_train/21885502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLabelPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ASTNode_label_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ASTNode_label_feature", "_UI_ASTNode_type"), AstviewerPackage.Literals.AST_NODE__LABEL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the label feature </s>
funcom_train/7692298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(LocalExercicio entity) { EntityManagerHelper.log("saving LocalExercicio 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 local exercicio entity </s>
funcom_train/50926195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MappedAtomPair getAtomPair(int ii, List<MappedAtomPair> atomPairList) { String atomId1 = (bond1 == null) ? null : bond1.getAtomId(ii); String atomId2 = (bond2 == null) ? null : bond2.getAtomId(ii); MappedAtomPair atomPair = MappedAtomPair.getAtomPair(atomId1, atomId2, atomPairList); return atomPair; } COM: <s> gets the atompair from the ith atoms </s>
funcom_train/10628810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTestBitNegative1() { byte aBytes[] = {-1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; int number = 7; BigInteger aNumber = new BigInteger(aSign, aBytes); assertTrue(aNumber.testBit(number)); } COM: <s> test bit int n of a negative number </s>
funcom_train/1386061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnEliminaBanca() { if (btnEliminaBanca == null) { btnEliminaBanca = new JButton(); btnEliminaBanca.setText("Elimina Banca"); btnEliminaBanca.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { eliminaBanca(); } }); } return btnEliminaBanca; } COM: <s> this method initializes btn elimina banca </s>
funcom_train/22034549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearWidgetFrame() { Util.invoke(false, DEBUG, new Runnable() { public void run() { WidgetFrame.setVisible(false); JPanel pane = new JPanel(); pane.add(new JLabel("No controls"), "CENTER"); WidgetFrame.setContentPane(pane); } }); } COM: <s> removes all widgets for altering controls and hide widget frame </s>
funcom_train/39123973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onLoad() { super.onLoad(); ftw.setMidiChannel(midiChannel); if (midiDeviceIndex != null) { try { ftw.setMidiDevice(project.getSequencer().listMidiOutDevices().get(midiDeviceIndex)); } catch (Exception e) { System.out.println("WARNING: Was unable to connect to external midi device"); } } setUpKeys(); } COM: <s> this will set the correct midi device when the project is reloaded </s>
funcom_train/37608811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUTM( double xxx, double yyy, double zzz ) { if (JavaDriver.getCity().getIntrsCount() <= 1) pt3.setReal3(xxx, yyy, zzz); pt3.setUTM(xxx, yyy, zzz); } // end setMapCoord3() COM: <s> sets the tt ointersection tt x y and z utm coordinates </s>
funcom_train/19054075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parse(InputStream is) { TheResolver resolver = new TheResolver(); resolver.setAbsolutePath(path.getAbsolutePath()+"/../resources/dtd/"); try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setValidating(true); DocumentBuilder db = dbf.newDocumentBuilder(); db.setErrorHandler(new TheErrorHandler()); db.setEntityResolver(resolver); doc = db.parse(is); } catch(Exception e) { System.out.println("Pluginfile error: "+name); System.out.println(e); System.exit(1); } } COM: <s> creates a document from an input stream </s>
funcom_train/37518842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Annotation get(int param, String name) { ArrayList annots = annotations[param]; for (int i = 0; i < annots.size(); i++) { Annotation annot = (Annotation) annots.get(i); if (annot.getName().equals("L" + name.replace('.', '/') + ";")) return annot; } return null; } COM: <s> return the annotation of a given type for the specified parameter given </s>
funcom_train/23720448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateModel_NameRequired(Model model, DiagnosticChain diagnostics, Map<Object, Object> context) { if (model.getModelName() == null) { diagnoseError(diagnostics, model, "_UI_Model_NameRequired"); return false; } return true; } COM: <s> validates the name required constraint of em model em </s>
funcom_train/2286823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CmsLock getParentLock(String resourcename) { CmsLock parentFolderLock = getParentFolderLock(resourcename); if (!parentFolderLock.isNullLock()) { return new CmsLock( resourcename, parentFolderLock.getUserId(), parentFolderLock.getProject(), CmsLockType.INHERITED); } return CmsLock.getNullLock(); } COM: <s> returns the inherited lock of a resource </s>
funcom_train/3883224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateDifficultyType_Max(BigInteger difficultyType, DiagnosticChain diagnostics, Map context) { boolean result = difficultyType.compareTo(DIFFICULTY_TYPE__MAX__VALUE) <= 0; if (!result && diagnostics != null) reportMaxViolation(ImsMdRootv1p1Package.Literals.DIFFICULTY_TYPE, difficultyType, DIFFICULTY_TYPE__MAX__VALUE, true, diagnostics, context); return result; } COM: <s> validates the max constraint of em difficulty type em </s>
funcom_train/38864364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int updateInventory() { int rows = 0; NstnDelete=0; NstnInsert=0; NursiDelete=0; NursiInsert=0; NinvDelete=0; NinvInsert=0; accumStats=true; rows = updateInventory("",0,0); accumStats=false; return rows; } COM: <s> create the inventory for the entire database </s>
funcom_train/17905682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCreateSQLText() { StringBuffer sb = new StringBuffer(); sb.append("ALTER TABLE "); sb.append(getTableName()); sb.append(" ADD "); sb.append(getConstraintSQLText()); sb.append(";"); return sb.toString(); } COM: <s> returns the alter table statement to create this constraint </s>
funcom_train/13297919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addConstrainedByPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Offer_constrainedBy_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Offer_constrainedBy_feature", "_UI_Offer_type"), NegotiationPackage.Literals.OFFER__CONSTRAINED_BY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the constrained by feature </s>
funcom_train/21995186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void schedule() throws RpcException { try { authorize(Scanner.SCHEDULE); getBus().schedule(); } catch (JRecSecurityException e) { throw new RpcException("security-problem scheduling scanner", e); } catch (BusException e) { throw new RpcException("bus-problem scheduling scanner", e); } } COM: <s> tell the scanner to refresh its schedule </s>
funcom_train/17922651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeletFile() { System.out.println("deletFile"); String file = "d:/A/armin2.txt"; boolean expResult = true; boolean result = FileHandling.deletFile(file); System.out.println("Source: " + file); System.out.println("Deleted: " + result); assertEquals(expResult, result); } COM: <s> test of delet file method of class eu </s>
funcom_train/37833911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void confiscate(final HousePortal portal) { notifyIfNeeded(portal.getOwner(), "You have neglected to pay your house taxes for too long. " + "Your house has been repossessed to cover the debt to the state."); logger.info("repossessed " + portal.getDoorId() + ", which used to belong to " + portal.getOwner()); portal.changeLock(); portal.setOwner(""); } COM: <s> confiscate a house and notify the owner </s>
funcom_train/41400362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getContentLength() { try { if (JCRSourceFactory.hasBinaryContent(node)) { return node.getNode(JCRConstants.JCR_CONTENT).getProperty(JCRConstants.JCR_DATA).getLength(); } } catch (Exception e) { return -1; } return -1; } COM: <s> content length can only be given for nodes containing binary data not </s>
funcom_train/5437127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxDuration(int maxDuration) throws ParfumBallException { if(maxDuration < 0) { throw new IllegalArgumentException("MaxDuration [" + maxDuration + "] must be greater than or equal to 0."); } if(started) { throw new ParfumBallException("Session already started."); } this.maxDuration = maxDuration; } COM: <s> set the maximum duration in seconds of this packet capture session </s>
funcom_train/3597206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NOMElement getNextSibling() { if (real_parent==null) { return null; } List kids = real_parent.getChildren(); Iterator kit = kids.iterator(); while (kit.hasNext()) { NOMElement current = (NOMElement)kit.next(); if (current==this) { if (kit.hasNext()) { return (NOMElement)kit.next(); } else { return null; } } } return null; } COM: <s> returns this elements following sibling of the same colour </s>
funcom_train/40443685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return ("(" + ((int) this.x & 0xff) + ", " + ((int) this.y & 0xff) + ", " + ((int) this.z & 0xff) + ", " + ((int) this.w & 0xff) + ")"); } COM: <s> returns a string that contains the values of this tuple4b </s>
funcom_train/41165683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoCourse entity) { EntityManagerHelper.log("saving CoCourse 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 co course entity </s>
funcom_train/45803280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCondition() { TopicMapIF tm = topic.getTopicMap(); ParsedQueryIF conditionQuery = MenuUtils.optimisticParse( "select $CONDITION from menu:condition(%topic%, $CONDITION)?", tm); return (String)MenuUtils.getFirstValue(topic, conditionQuery); } COM: <s> get the condition occurrence value as a string </s>
funcom_train/49263135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String computeName() { if (txName.getText() == null) { return null; } else if (!txName.getText().matches(".*\\.[a-zA-Z0-9]+")) { //$NON-NLS-1$ return txName.getText() + ".sql"; //$NON-NLS-1$ } else { return txName.getText(); } } COM: <s> gets name computed from input </s>
funcom_train/32202984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testUrl() { System.out.println("==== Test URL ===="); System.out.println("Opening a browser window to http://www.lwjgl.org"); Sys.openURL("http://www.lwjgl.org"); System.out.println("---- Test URL ----\n"); } COM: <s> tests the open url </s>
funcom_train/38519978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel buildNamePanel(String preName) { JPanel p = new JPanel(); input = new JTextField(30); input.setText(preName); p.add(new JLabel("Name: ")); p.add(input); p.setBorder( BorderFactory.createCompoundBorder( BorderFactory.createEmptyBorder(5, 5, 5, 5), BorderFactory.createTitledBorder("Name") ) ); return p; } COM: <s> creates the name panel </s>
funcom_train/28446071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrintWriter openOutputFile(String f) throws IOException { if( outputDir != "." ) { File out_dir = new File(outputDir); if( ! out_dir.exists() ) out_dir.mkdirs(); } return new PrintWriter(new PreservingFileWriter(outputDir + x.java.lang.System.getProperty("file.separator") + f)); } COM: <s> this method is used by all code generators to create new output </s>
funcom_train/7978932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object removeElement(String key) throws AttributeNotFoundException { MBeanAttributeInfo element = getAttributeInfo(key); if (element == null) { throw new AttributeNotFoundException(key); } attributes.remove(element); attributeNames.remove(element.getName()); return super.remove(element.getName()); } COM: <s> remove an attribute from the data container </s>
funcom_train/1006991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return ("AffineTransform[[" + _matround(m00) + ", " + _matround(m01) + ", " + _matround(m02) + "], [" + _matround(m10) + ", " + _matround(m11) + ", " + _matround(m12) + "]]"); } COM: <s> returns a code string code that represents the value of this </s>
funcom_train/19454754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buttonText(java.awt.Graphics g) { FontMetrics fm = g.getFontMetrics(); String s = getTitle().trim(); if (s.length() > 0) { int x = (getSize().width - fm.stringWidth(s)) / 2; int y = getSize().height - (fm.getHeight() / 2); if (getIsSelected()) { x += 2; y += 2; } g.drawString(s, x, y); } return; } COM: <s> draws the button text given a graphics context </s>
funcom_train/16831338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean crosses(Constituent c) { return (start() < c.start() && c.start() < end() && end() < c.end()) || (c.start() < start() && start() < c.end() && c.end() < end()); } COM: <s> detects whether this constituent overlaps a constituent without </s>
funcom_train/4178966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void openFile(final Operation<?> operation) { Validate.notNull(operation, "The operation cannot be null."); File output = new File(outputDir, buildFileName(operation)); try { output.createNewFile(); fileOut = new FileOutputStream(output); } catch (IOException ex) { throw new RuntimeException("Cannot create the report file.", ex); } } COM: <s> creates a new report file for the specified operation </s>
funcom_train/40002240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void mapGameAction(int code, boolean isMouseMap) { if (inputManager.getMaps(action).size() >= 3) { inputManager.clearMap(action); } if (isMouseMap) { inputManager.mapToMouse(action, code); } else { inputManager.mapToKey(action, code); } resetInputs(); screen.getFullScreenWindow().requestFocus(); } COM: <s> maps the game action for this input component to the </s>
funcom_train/17978824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCalendar(String tokens) { Calendar c = Calendar.getInstance(); String[] params = tokens.split(","); int year = Integer.parseInt(params[0]); int month = Integer.parseInt(params[1]); int date = Integer.parseInt(params[2]); if (params.length > 3){ int hourOfDay = Integer.parseInt(params[3]); int minute = Integer.parseInt(params[4]); int second = Integer.parseInt(params[5]); c.set(year, month, date, hourOfDay, minute, second); } else { c.set(year, month, date); } this.calendar = c; } COM: <s> convenience setter for calendar from string tokens </s>
funcom_train/26481102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getDropAction(DropTargetEvent dte) { JComponent component = (JComponent)dte.getDropTargetContext().getComponent(); if (component == PopulationView.currentDragSource) { if (LOG.isLoggable(Level.FINER)) LOG.finer("Move within PopulationView"); return DnDConstants.ACTION_MOVE; } else { return DnDConstants.ACTION_COPY; } } COM: <s> drags within a population view are move else copy </s>
funcom_train/19239661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flush() { if (count == 0) { return; } // don't print out blank lines; flushing from PrintStream puts out these if (count == 1 && ((char) buf[0]) == '\n') { reset(); return; } final byte[] theBytes = new byte[count]; System.arraycopy(buf, 0, theBytes, 0, count); logger.log(level, new String(theBytes)); reset(); } COM: <s> flushes this output stream and forces any buffered output bytes to be </s>
funcom_train/8221354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTable(JTable table) { TableColumnModel tcm = table.getColumnModel(); for (int i = 0; i < tcm.getColumnCount(); i++) { TableColumn tc = tcm.getColumn(i); tc.removePropertyChangeListener(this); } tcm.removeColumnModelListener(this); _tracked.remove(tcm); } COM: <s> removes the table </s>
funcom_train/8096488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CheckOptionHandler getOptionTester() { CheckOptionHandler result; result = new CheckOptionHandler(); if (getAssociator() instanceof OptionHandler) result.setOptionHandler((OptionHandler) getAssociator()); else result.setOptionHandler(null); result.setUserOptions(new String[0]); result.setSilent(true); return result; } COM: <s> configures the check option handler used for testing the optionhandling </s>
funcom_train/4264069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processObservation(CommandObservation observation) { try { if (observation instanceof ObservationAction) { processActionObservation((ObservationAction) observation); } else if (observation instanceof ObservationAgent) { processAgentObservation((ObservationAgent) observation); } else if (observation instanceof ObservationCondition) { processConditionObservation((ObservationCondition) observation); } observationsStr.add(observation.GetText()); } catch (IllegalArgumentException e) { throw new WrongStatementException("wrong observation: " + e.getMessage(), e); } } COM: <s> processes an observation updating collection of observations stored in system model </s>
funcom_train/31431274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isIdempotent() { final int n = getSetSize(); final int arity = arity(); int[] arg = new int[arity]; for (int i = 0; i < n; i++) { for (int j = 0; j < arity; j++) { arg[j] = i; } if (intValueAt(arg) != i) return false; } return true; } COM: <s> is this operation idempotent in the sense f x x </s>
funcom_train/43938937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateSets() { for (String left:this.getLefts()) { this.firstSets.put(left, this.firstSet(left).toString()); this.nextSets.put(left, this.nextSet(left).toString()); } } COM: <s> generates all the first and next sets for the grammar </s>
funcom_train/19748582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putLayoutSequenceInCache(SequenceData data, String layoutDefinition, String pageUri, String identifier) { putInCache(data, pageUri + "_" + identifier, DUMMY_LANGUAGE, PAGE_SEQUENCE_SUFFIX, new String[]{pageUri + PAGE_SEQUENCE_GROUP_SUFFIX, layoutDefinition + LAYOUT_SEQUENCE_GROUP_SUFFIX, SEQUENCE_GROUP}, PageContext.APPLICATION_SCOPE); } COM: <s> puts sequence into cache into application scope for layout </s>