__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/17529638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyOriginalGraph() { if (this.graph == null) return; this.removeEdges(this.getEdges()); this.removeVertices(this.getDisconnectedVertices()); this.addVertices(this.graph.getDisconnectedVertices()); Iterator<E> i = this.graph.getEdges().iterator(); while (i.hasNext()) { E e = i.next(); this.addEdge(e.getV1(), e.getV2()); } } COM: <s> copy fragment from the original graph </s>
funcom_train/7980442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeFrontierReport(String reportName, PrintWriter writer) { if (this.controller == null || this.controller.getFrontier() == null) { writer.println("Crawler not running."); return; } this.controller.getFrontier().reportTo(reportName,writer); } COM: <s> write the requested frontier report to the given print writer </s>
funcom_train/49995257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isTheStreamGood(List<Double> stream, double thresholdValue) { int goodValueCount = 0; for (Double value : stream) { if (value >= thresholdValue) { goodValueCount++; } } if (goodValueCount >= this.frequencyPercentage / 100 * stream.size() ) { return true; } return false; } COM: <s> check if the stream contains more than </s>
funcom_train/41825110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HudsonJob xml2HudsonJob(Element jobXml) { HudsonJob job = new HudsonJob(); job.setName(jobXml.getChildTextNormalize("name")); job.setUrl(jobXml.getChildTextNormalize("url")); job.setColor(jobXml.getChildTextNormalize("color")); return job; } COM: <s> xml2 hudson job </s>
funcom_train/20440034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMonthPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ESMFTime_month_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ESMFTime_month_feature", "_UI_ESMFTime_type"), ESMFPackage.Literals.ESMF_TIME__MONTH, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the month feature </s>
funcom_train/25669322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueFrom(Object rootObject) throws MissingPropertyException { if (rootObject == null) { throw new IllegalArgumentException("Source object shouldn't be null"); } ParOrdenado<Object, Attribute> lastChainLink = getLastPropertyLinkFrom(rootObject); Object currentObject = lastChainLink.getPrimero(); Attribute attribute = lastChainLink.getSegundo(); Object lastValue = attribute.getValueFrom(currentObject); return lastValue; } COM: <s> obtains the value on las property of this chain from the passed object </s>
funcom_train/33725370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BeanMapping getTestBeanMapping() { BeanMapping beanMapping = new BeanMapping(); List<Mapping> mappings = new ArrayList<Mapping>(); mappings.add(new Mapping("id", "java.lang.Integer")); beanMapping.setMappings(mappings); beanMapping.setTablename("Person"); beanMapping.setName("person"); return beanMapping; } COM: <s> gets the test bean mapping </s>
funcom_train/2844616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSubTokenSpan(Span span) { Annotation parent = getContainingNode(span); if (parent == null) { return false; } else { if (AnnotationTypes.isToken(parent.getType()) && !parent.getSpan().equals(span)) { return true; } else { return false; } } } COM: <s> returns whether the specified span would be inserted inside an existing token </s>
funcom_train/19294929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void defaultsButton_ActionEvents() { int sel = JOptionPane .showConfirmDialog( this, "Set back first stage estimation settings to default values?\nThe default is to estimate all coint relations unrestricted by Johansen.", "Default Settings?", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (sel != JOptionPane.YES_OPTION) return; setDefaults(); } COM: <s> sets the default values </s>
funcom_train/1572496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object callInContext(final Object _object, final IGoContext _ctx) { if (_ctx == null) return null; WOContext wctx = (WOContext)_ctx; return this.handleRequest (wctx.request(), wctx, wctx.hasSession() ? wctx.session() : null); } COM: <s> act as a go method </s>
funcom_train/17897459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toDowMMDDYY() { if (ordinal == NULL_ORDINAL) { return ""; } return shortDayName[getDayOfWeek()] + " " + MString.toLZ(mm, 2) + "/" + MString.toLZ(dd, 2) + "/" + MString.toLZ(yyyy % 100, 2); } // end toDowMMDDYY COM: <s> convert date to a human readable string wed mm dd yy </s>
funcom_train/42722159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(ActionCommand testAction) { if (testAction.getAction().equals("HAS_TEXT")) { new GuiLabelTest(testAction.getId(), new ContainerManager(testAction).setContainer()).hasText(testAction.getArgs()[0]); } else { throw new UnsupportedOperationException("Action command " + testAction.getAction() + " not supported!"); } } COM: <s> executes the specified action command keyword </s>
funcom_train/5668579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void store() { String header = "NeonZip properties file"; try { FileOutputStream outStream = new FileOutputStream(fPropFile); super.store(outStream, header); } catch(FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } COM: <s> save the current state of propertes in file named properties </s>
funcom_train/22020727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeConnection(ConnectionElement conn) { if (conn == null) { throw new IllegalArgumentException(); } if (conn.getSource() == this) { sourceConnections.remove(conn); firePropertyChange(SOURCE_CONNECTIONS_PROP, null, conn); } else if (conn.getEndPoint() == this) { targetConnections.remove(conn); firePropertyChange(TARGET_CONNECTIONS_PROP, null, conn); } } COM: <s> remove an incoming or outgoing connection from this shape </s>
funcom_train/20061886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCellStyle(int index, String style) { if (cellStyles == null) cellStyles = new String[values.length]; cellStyles[index] = style; if (isRendered()) { treeTable.getView().setCellStyle(this, index, style); } } COM: <s> sets the style for a table cell </s>
funcom_train/20989379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadGenreVector(){ //fill the genre vector only, if we need the genres if (mainGui.showGenres()) { //add a new Vector for the genre genreVector = new Vector<String>(0,1); //add all genres from a stream to the genrevector for(int i=0;i < streamVector.capacity();i++) { addToGenreVector(streamVector.get(i).genre); } } } COM: <s> fill the genre vector with all genres from all </s>
funcom_train/22233758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHiResCoordY(int[] Y) { this.y[0] = Y[0]; this.y[1] = Y[1]; this.y[2] = Y[2]; this.y[3] = Y[3]; this.y[4] = Y[4]; this.y[5] = Y[5]; this.y[6] = Y[6]; this.y[7] = Y[7]; } COM: <s> sets this hi res coords y value to that specified by the argument </s>
funcom_train/48143870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object obj) throws IllegalArgumentException { if(obj!=null && (obj instanceof MathDouble)) { if(Math.abs(x-((MathDouble)obj).value())<=GlobalSettings.ZERO_TOL) return 0; else return (int)(x-((MathDouble)obj).value()); } else throw new IllegalArgumentException("Invalid object."); } COM: <s> compares two double numbers </s>
funcom_train/47242881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* public void testProjectMapped_simpleFields() { assertClassMapping(Project.class, "Project"); // TODO - we could make assertions about specific fields assertAllFieldsMappedExcept(SetUtil.make("operationHistory", "artifacts", "type", "status", "initialStatus", "idMap")); } COM: <s> this test verifies that the simple fields of project are mapped </s>
funcom_train/14282980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String invoke() throws JerbilException { String s = condition.invoke(); if (s.equals(BOOLEAN_TRUE)) { return then.invoke(); } else { if (els == null) { return Utils.defaultForType(then.getReturnType()); } else { return els.invoke(); } } } COM: <s> if the condition function is true returns the then function invokation </s>
funcom_train/22278833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void computeInteriorRect(Rect rect, Rect interiorRect) { int left, top; left = leftMargin(); top = topMargin(); interiorRect.setBounds(rect.x + left, rect.y + top, rect.width - left - rightMargin(), rect.height - top - bottomMargin()); } COM: <s> computes the borders interior rect using the primitive margin </s>
funcom_train/46757460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean areRecommendedFieldsEmpty() throws Exception { for (ISFormControl formCntrl : formControls) { if (formCntrl.getControl().isRecommended()) { if (formCntrl.getComponent() instanceof IComponent) { IComponent comp = (IComponent) formCntrl.getComponent(); if (comp.getValue() == null || Converter.isEmpty(comp.getValue().toString())) { return true; } } } } return false; } COM: <s> check all recommended </s>
funcom_train/50342830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTextEditor() { String newLabel = JOptionPane.showInputDialog(this, rb.getString("PromptNewLabel")); if (newLabel==null) return; // canceled PositionableLabel l = addLabel(newLabel); // always allow new items to be moved l.setPositionable(true); } COM: <s> add a label to the target </s>
funcom_train/36915459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Flight getFlight(int flightID) { if (!ActiveUser.hasPermission("View Flights")) return null; try { getFlight.setInt(1, flightID); ResultSet result = getFlight.executeQuery(); if (result.next()) { return buildFlight(result); } } catch (SQLException e) { e.printStackTrace(); } return null; } COM: <s> gets a flight from the database </s>
funcom_train/26017416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLocalTag(String mytag) { if (sipStack.isLoggingEnabled()) { sipStack.getStackLogger().logDebug("set Local tag " + mytag + " " + this.dialogId); sipStack.getStackLogger().logStackTrace(); } this.myTag = mytag; } COM: <s> set local tag for the transaction </s>
funcom_train/5543637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enactQuery( String query) { try { println(""); printFormat( cyc.converseObject( "(cyc-query '" +cyc.toCycList(query) + " #$InferencePSC)")); println(""); } catch( Exception e ) { println( ""+ e); } } COM: <s> process a query command </s>
funcom_train/1123421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAppender(String name) { String root = properties.getProperty("log4j.rootLogger"); if (root == null) { root = ""; } String[] split = root.split(","); root = ""; for (int i = 0; i < split.length; i++) { if (split[i].indexOf(name) == -1) { if (i > 0) { root += ", "; } root += split[i]; } } properties.setProperty("log4j.rootLogger", root); PropertyConfigurator.configure(properties); } COM: <s> removes appender of given name from the configuration </s>
funcom_train/32057106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetEdgePoint() { System.out.println("testGetEdgePoint"); Object obj = new Object(); JGraph jgraph = new JGraph(); CellMapper cellmapper = null; EdgeView eView = new EdgeView(obj, jgraph, cellmapper); PortView pView = new PortView(obj, jgraph, cellmapper); int i = 1; pView.getEdgePoint(eView, i); } COM: <s> this function tests get edge point function of port view class </s>
funcom_train/1193775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSaveCmd() { if (saveCmd == null) {//GEN-END:|203-getter|0|203-preInit // write pre-init user code here saveCmd = new Command(LocalizationSupport.getMessage("SAVECOMMAND1"), Command.ITEM, 0);//GEN-LINE:|203-getter|1|203-postInit // write post-init user code here }//GEN-BEGIN:|203-getter|2| return saveCmd; } COM: <s> returns an initiliazed instance of save cmd component </s>
funcom_train/6355391
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static enum SensorState { /** * Sensor has no valid pick. The returned pick is Pick.Null. */ IDLE, /** * Sensor has started on a new pick. The returned pick is not Pick.Null. */ STARTED, /** * Sensor is continuing on an old pick. The returned pick peer is the * same as for STARTED; the pick geometry is updated. */ CONTINUING, /** * Sensor is canceling on an old pick. The returned pick is the same as * before. */ CANCELING, /** * Sensor is stopping on an old pick. The returned pick is the same as * before. */ STOPPING, } COM: <s> the state of the pick sensor as regards its current pick </s>
funcom_train/28993927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String validateName(final String n) { StringBuffer sb = new StringBuffer(); Vector v = parentNode.getChildren(); int i = 0; for (; i < v.size(); i++) { sb.append(((ContentNode) v.elementAt(i)).getDescription()); } i = 1; String r = n, s = sb.toString(); while (s.indexOf(r) > -1) { sb.setLength(0); sb.append("Zip_Upload_"); sb.append(i++); sb.append("_of_"); sb.append(n); r = sb.toString(); } return r; } COM: <s> makes sure the name description of a content node is unique within a </s>
funcom_train/33404217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void executeGetProviderForService (String serviceDescription, Integer id){ Vector<Object> obj = new Vector<Object>(); obj.add(action_type.FIND_SPECIAL); if (this.serviceToProviderList.get(serviceDescription) == null){ obj.add(new Vector<BluetoothDeviceAddress>()); } else { Vector<BluetoothDeviceAddress> providerL = new Vector<BluetoothDeviceAddress>(); for (String prov : serviceToProviderList.get(serviceDescription)){ providerL.add(providerList.get(prov)); } obj.add(providerL); } Vector<Object> result = new Vector<Object>(); result.add(id); result.add(obj); this.informObserver(result); } COM: <s> corresponding execute to get provider for service </s>
funcom_train/45452017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void exportQuestion(final Element element, final Question question) { Element questionElement = element.addElement(ELEMENT_QUESTION); questionElement.addAttribute(ATTR_QUESTION_TYPE, question.getQuestionType().getName()); questionElement.addCDATA(question.getValue()); } COM: <s> exports a question to a detail or summary element </s>
funcom_train/44828716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setup(Composite composite, String label, Color color) { _text = label; _edgesIn = new Vector(); _edgesOut = new Vector(); _level = -1; _position = -1; _composite = composite; _length = 0; _selfEdge = 0; setForegroundColor(color); addMouseMotionListener(new NodeMouseMotionListener()); setupFigure(); } COM: <s> sets up this node </s>
funcom_train/31690048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllowedMethods() { Date dt = new Date(); if(this.m_dtAllowedMethodsTimeStamp==null || dt.getTime()-this.m_dtAllowedMethodsTimeStamp.getTime()>60000*5/*5 mins*/) { this.m_allowedMethods.clear(); this.m_vfs.fullyPopulateFileAllowedMethods(this); this.m_dtAllowedMethodsTimeStamp = dt; } return (List) this.m_allowedMethods.clone(); } COM: <s> provides a list of the methods which might work for this virtual file </s>
funcom_train/39070048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeDOMtoFile(Document doc, File file) { try { // A file output stream is an output stream for writing data to a File // OutputStream outputStream = new FileOutputStream(file); writeDOMtoStream(doc, outputStream); outputStream.flush(); outputStream.close(); } catch (Exception fnfe) { MylarPlugin.log(fnfe, "Tasklist could not be found"); } } COM: <s> writes an xml file from a dom </s>
funcom_train/3904706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSchemaModel_BogusFileName() throws Exception { File schemaFile = new File("bogus.xsd"); try { new SchemaModel(schemaFile, "manifest"); fail("SchemaException ahould have been thrown"); } catch(IOException ex) { assertTrue(true); } } COM: <s> test exception thrown if we provide a wrong file name </s>
funcom_train/40682741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void trashObject(String resourceId, boolean delete) throws IOException, MalformedURLException, ServiceException, DocumentListException { if (resourceId == null) { throw new DocumentListException("null resourceId"); } String feedUrl = URL_DEFAULT + URL_DOCLIST_FEED + "/" + resourceId; if (delete) { feedUrl += "?delete=true"; } service.delete(buildUrl(feedUrl), getDocsListEntry(resourceId).getEtag()); } COM: <s> trash an object </s>
funcom_train/19100086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadDataFromFile() { if ( file != null && file.exists() ) try { ObjectInputStream i = new ObjectInputStream( new FileInputStream( file ) ); tapes = (Map) i.readObject(); i.close(); fireStatusTextEvent( "Loaded " + tapes.size() + " records from file" ); displayData(); } catch ( IOException e ) { eh.handleException( e ); } catch ( ClassNotFoundException e ) { eh.handleException( e ); } } COM: <s> loads data from the file into internal data structures </s>
funcom_train/3579520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(String data){ if(this.toFile && !this.silent && this.verbose){ try{ this.fw.write(count + "," + "\"" + data + "\"" + "\n"); } catch(IOException e){ e.printStackTrace(); } } else if(!this.toFile && !this.silent && this.verbose){ System.out.println(this.testName + ":" + count + ":" + data); } } COM: <s> for the header footer of each file </s>
funcom_train/49045316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getJRadioButtonAlcian_blue_H() { if (buttAlcian_blue_H == null) { buttAlcian_blue_H = new JRadioButtonMenuItem(); buttAlcian_blue_H.setText("Alcian blue H"); buttAlcian_blue_H.setToolTipText("Alcian blue H"); buttAlcian_blue_H.addActionListener(this); buttAlcian_blue_H.setActionCommand("parameter"); buttAlcian_blue_H.setEnabled(true); } return buttAlcian_blue_H; } COM: <s> this method initializes the option alcian blue h </s>
funcom_train/5711647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean getNextBufferEntry(){ current = null; if (buffer == null){ return false; } synchronized(buffer){ if (buffer != null && !buffer.isEmpty() && currentPos != -1){ currentPos = 0; current = (byte[]) buffer.remove(); if (current != null){ return true; } } } return false; } COM: <s> getting the next entry from the buffer and reset the current pos </s>
funcom_train/7580168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object findUniqueByNamedQuery(String arg0,HashMap<?, ?> parameterMap) { Query query=createNamedQuery(arg0); if(parameterMap!=null) for (int i = 0; i < parameterMap.size(); i++) { Object object=parameterMap.get(i+1); query.setParameter(i+1, object); } return query.uniqueResult(); } COM: <s> find unique by named query </s>
funcom_train/9818041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer str = new StringBuffer("["); // Build the string on this. for (int i = elementCount - 1; i >= 0; i--) str.append("\n").append(elementData[i]); return str.append("]").toString(); } COM: <s> prints out a representation of the contents of this list </s>
funcom_train/9860476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object put(final String pKey, final Object pValue) throws InvalidValueException { if (!getType().getContentType().isValid(pValue)) { throw new InvalidValueException(Messages.getString("_invalid_type")); //$NON-NLS-1$ } final Object o = aHash.put(pKey, pValue); fireArrayChangeListenerArrayChange(); return o; } COM: <s> put the value with the specified key into the hashtable </s>
funcom_train/28742305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer createSampleInfo(CactSampleInfo info) throws SimsException { errMsg = clsName + ".createNewSample(): "; Integer id; try { //Create CactSample and return local object. local = this.createNewSampleLocal(info); id = local.getId(); } catch (RuntimeException e) { ctx.setRollbackOnly(); //Propagate the Exception. throw e; } return id; } COM: <s> this method create a new cact sample object </s>
funcom_train/28425995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean canBeRemoved() { // no data - nothing to be removed if( (entries == null) || (entries.size() == 0) ) { return false; } // no row selection - nothing to be removed int selRow = table.getSelectedRow(); return (selRow >= 0); } COM: <s> can a row be removed </s>
funcom_train/34679035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AssessmentLine addDiscount(String id, String reason, Reference relatesTo, String contributesTo, CurrencyAmount currencyAmount, int priority) { return addLine(new SumBehaviour(generateLineId(), reason, relatesTo, contributesTo, BehaviourType.DISCOUNT, currencyAmount, priority)); } COM: <s> add a fixed sum based discount entry to the sheet </s>
funcom_train/19380699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean gameExists(String[] romDir, String gameName) { boolean existing = false; File f = null; for (int i = 0; i < romDir.length; i++) { f = new File(romDir[i] + gameName + ".zip"); if (f.exists()) { existing = true; break; } } return existing; } COM: <s> this method returns true if the given game exists false otherwise </s>
funcom_train/45622660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOutputVersionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FormatVersionType_outputVersion_feature"), getString("_UI_PropertyDescriptor_description", "_UI_FormatVersionType_outputVersion_feature", "_UI_FormatVersionType_type"), MSBPackage.eINSTANCE.getFormatVersionType_OutputVersion(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the output version feature </s>
funcom_train/23777577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void marshalToForm(AircraftBO oCraft) { this.setRegistration(oCraft.getRegistrationNumber()); this.setAircraftType(this.getDelegate().getAircraftType(oCraft.getTypeId())); this.aircraftTypeLabel.setText(this.getAircraftType().getManufacturer() + " " + this.getAircraftType().getModel()); } COM: <s> marshalls the aircraft object to the form </s>
funcom_train/25705135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void searchFinished(final Component tabComponent) { // add all chached items to model for( final FrostSearchItem fsi : searchItems ) { searchModel.addSearchItem(fsi); } searchItems.clear(); final int myIx = tabPane.indexOfComponent(tabComponent); final String newTitle = searchText + " ("+searchModel.getItemCount()+")"; tabPane.setTitleAt(myIx, newTitle); } COM: <s> called if the searchthread finished </s>
funcom_train/31096385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeID(IDReferences idReferences) { int numChildren = this.children.size(); for (int i = 0; i < numChildren; i++) { FONode child = (FONode)children.get(i); if ((child instanceof FObj)) { ((FObj)child).removeID(idReferences); } } } COM: <s> removes property id from idreferences </s>
funcom_train/27753340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName(int index) throws NWNObjectException { if ((index < 0) || (index >= nameCount)) { throw new NWNObjectException(ResConst.NAME_INDEX_ERROR, index); } bb.position(nameOffset + index * ObjDataConst.PROP_NAME_SIZE); return Buffers.readString(bb, ObjDataConst.PROP_NAME_SIZE).trim(); } COM: <s> returns the property name at the specified position </s>
funcom_train/43474581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void routeData(String appId, NodeHandle to, NodeHandle nextHop, Message msg) { RouteMessage data = buildMessage(GenericFactory.generateKey(),nodeHandle,to,nextHop,DATA,REQUEST,appId,msg); if (data!=null) { Results.incTraffic(); this.dispatchDataMessage(data,REQUEST,REFRESH); } } COM: <s> routes an application level message to the destination node </s>
funcom_train/35349466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setSaturationAndBrightness(float s, float b, boolean update) { setHSB(hue, s, b); if (update) { settingColor = true; saturationSpinner.setValue(Integer.valueOf((int)(s * 255))); valueSpinner.setValue(Integer.valueOf((int)(b * 255))); settingColor = false; } } COM: <s> sets the saturation and brightness and updates the display if </s>
funcom_train/14323648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkPoolHierarchyForLoops(OpResource pool, OpResource superPool) { if (superPool == null) { return false; } if (pool.getId() == superPool.getId()) { return true; } return checkPoolHierarchyForLoops(pool, superPool.getResourcePool()); } COM: <s> checks the group assignments for loops including the new super groups </s>
funcom_train/50612178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notify(EntityEvent ev) { if (!bNotify) return; if (DEBUG) { System.err.print("notifying entity event: src=" + this +" id=" + ev.getId()); if (ev.getData() != null) System.err.println(" data=" + ev.getData()); else System.err.println(""); } _observers.clear(); _observers.addAll(observers); for (Iterator i = _observers.iterator(); i.hasNext();) ((EntityObserver) i.next()).update(ev); _observers.clear(); } COM: <s> notifies all observers about an event </s>
funcom_train/22140860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void tagConcept(ConceptTO concept, ConceptTO tag) { String query = "INSERT INTO tags (cmn_id_master, cmn_id_child) " + "VALUES (?,?)"; Object[] args = new Object[] {tag.getCommonId(), concept.getCommonId()}; // insert record into table getJdbcTemplate().update(query, args); } COM: <s> will add a record into the tags table </s>
funcom_train/24242647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer delete(Integer id) throws DBException { //boolean clearUser = false; LabelDB label = new LabelDB(conn); Integer res = -1; try { res = label.delete(id); return res; } catch (Exception e) { logger.error(e.getMessage(), e); throw new DBException(e); } finally { label.release(); label = null; } } COM: <s> manage the delete transaction of a user with its users and roles associated </s>
funcom_train/35195126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ShortArray with(final short newShort) { final short[] newShorts = new short[shorts.length + 1]; System.arraycopy(shorts, 0, newShorts, 0, shorts.length); newShorts[shorts.length] = newShort; return new ShortArray(newShorts); } COM: <s> creates a code short array code with an appended code short code </s>
funcom_train/12385493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { final int resolution = this.reso; int r, g, b; for( r = 0; r < resolution; r++ ) { for( g = 0; g < resolution; g++ ) { for( b = 0; b < resolution; b++ ) { this.colorCube[r][g][b] = 0; this.alphaCube[r][g][b] = 0; } } } } COM: <s> reset the object </s>
funcom_train/22345366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int fetchFirstBusy ( ) { int sub = 0; // When the first entry in the table is busy, return the value, // free the entry and compress the array. if (details[0] != 0) { // get the first entry sub = details[0]; // free the entry details[0] = 0; // compress the table compress(); } // endif return sub; } // end-method COM: <s> find first in use </s>
funcom_train/17141087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void normalize() { if (isZeroVector()) return; switch (DOMINANT_MODE) { case CARTESIAN: normalizeCartesian(); return; case POLAR_DENSE: toDensePolar(); return; case POLAR_SPARSE: throw new IllegalArgumentException("POLAR_SPARSE is not allowed as DOMINANT_MODE."); default: return; } } COM: <s> normalizes vector based on </s>
funcom_train/18808090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RegularTimePeriod previous() { Second result = null; if (this.second != FIRST_SECOND_IN_MINUTE) { result = new Second(this.second - 1, this.minute); } else { final Minute previous = (Minute) this.minute.previous(); if (previous != null) { result = new Second(LAST_SECOND_IN_MINUTE, previous); } } return result; } COM: <s> returns the second preceding this one </s>
funcom_train/5430281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assert() { for ( int i=_first; i<_keys.length-1; i++ ) { if ( compare( _keys[ i ], _keys[ i+1 ] ) >= 0 ) { dump( 0 ); throw new Error( "BPage not ordered" ); } } } COM: <s> assert the ordering of the keys on the bpage </s>
funcom_train/32757276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void publishParameters() throws Exception { final Connection connection = PERSISTENT_STORE.newConnection( DOCUMENT.getMainWindow() ); if ( connection != null ) { PERSISTENT_STORE.publishTargetBeamParameters( DOCUMENT.getMainWindow(), PARAMETERS, connection ); } else { JOptionPane.showMessageDialog( getDialog(), "Could not get a database connection to publish parameters.", "Publish Failed", JOptionPane.WARNING_MESSAGE ); } } COM: <s> publish the parameters to the database </s>
funcom_train/14353506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel1() { if (this.getEndpoint().equals("") || this.state.equals("endpointselected")) { return new ReportEndpoint(this); } if (this.state.equals("uploadselected")) { return new ReportUploader(this.getEndpoint(), this); } if (this.state.equals("selectorselected")) { return new ReportSelector(this.getEndpoint(), this); } if (this.state.equals("downloadsaveselected")) { return new ReportDownloader(this); } return null; } COM: <s> this method initializes j panel1 </s>
funcom_train/51575028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Tick createNewTicker() { final MuSocket muck = CHandler.getInstance().getActiveMUHandle(); if (DEBUG) { System.err.println("Ticker.startTicker creating new ticker."); } // We do not have a ticker for this connect yet. Set one up. final Tick tempTick = new Tick(); tempTick.setMU(muck); ticks.addElement(tempTick); return tempTick; } COM: <s> create a new tick </s>
funcom_train/25609336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void importTypes(CComponentTypeCreator creator){ List<CComponentType> addThese = creator.createTypes(); List<CComponentType> actuallyAdded = new LinkedList<CComponentType>(); if(addThese==null) return; for(CComponentType type: addThese){ boolean added = types.add(type); if(!added) { }else{ actuallyAdded.add(type); } } if(!actuallyAdded.isEmpty()) fireStateChanged(); } COM: <s> import components from the type creator and return a list of types that </s>
funcom_train/30034105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processRTIMessage( Object message, String federationName ) { // Type cast DefaultCreateFederationMessage msg = ( DefaultCreateFederationMessage )message; // If model is valid if( modelUpdate != null ) { // Update model modelUpdate.CreateFederationRepresentation( msg.getLRCState(), msg.getCreateFederationMessage().getFederationName() ); } } COM: <s> processes the federation creation message for the model part of the system </s>
funcom_train/36676180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValidPage(int mapPage) { boolean overLastPage = mapPage > filteredMaps.size() / NUM_VISIBLE_ITEMS || (mapPage == filteredMaps.size() / NUM_VISIBLE_ITEMS && filteredMaps.size() % NUM_VISIBLE_ITEMS == 0); return mapPage >= 0 && !overLastPage; } COM: <s> checks page for bounds conditions </s>
funcom_train/36259760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadSortProfile() throws DBValueException, SQLException { if (sortProfile == null || sortOrder != sortProfile.getId()) { sortProfile = database.getSortingProfileById(sortOrder); } // If sorting is invalid, invalidate it actively. if (sortingVersion != 0 && sortingVersion != sortProfile.getVersionNumber()) { setSortingVersion(0); } } COM: <s> load the sort profile for the category </s>
funcom_train/114218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processStateSync(ServerObjectStateMap stateMap) { try { setServerStates(stateMap); synchronized(msgBuffer) { msgBuffer.clear(); // no partial state-sync } } catch (Exception ex) { // keep the buffer if (log.isErrorEnabled()) log.error("SetStateEvent failed", ex); } } COM: <s> invoked from process message </s>
funcom_train/51655693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setUrl(String url) { checkWidget(); if (url == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); byte[] buffer = Converter.wcsToMbcs(null, url, true); int ptr = OS.malloc(buffer.length); OS.memmove(ptr, buffer, buffer.length); OS.PtSetResource(webHandle, OS.Pt_ARG_WEB_GET_URL, ptr, OS.Pt_WEB_ACTION_DISPLAY); OS.free(ptr); return true; } COM: <s> loads a url </s>
funcom_train/50310669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getNextKey() { // Return null if map is empty if (isEmpty()) return (null); // Jump back to first element when at end of list if (++position >= size()) position = 0; Object o = super.getKey(position); Logger.log(Logger.DEBUG, "Cluster: Round robin position [" + o + "] in " + keySet(), this); return (o); } COM: <s> gets the next key in the map </s>
funcom_train/212825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLabel() { try { int index = Integer.parseInt(indexValueForm.get(0)); String value = indexValueForm.get(1); formPanel.setLabel(index,value); } catch (FormInputPanelException ex) { errorOutput(ex.toString()); } catch (NumberFormatException ex) { errorOutput(ex.toString()); } } COM: <s> shows how to set the label of a field </s>
funcom_train/26416073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructor() throws Throwable { NarcGenerator gen = new NarcGenerator(com.atomicobject.haste.util.narcgen.NarcTarget.class); assertNotNull("imports is null", gen.imports); assertSame("wrong class", com.atomicobject.haste.util.narcgen.NarcTarget.class, gen.sourceClass); assertEquals("wrong name", "NarcTargetNarc", gen.narcName); } COM: <s> see that the constructor sets all ivars correctly </s>
funcom_train/25638123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildPackageHeader(XMLNode node, Content summariesTree) { String parsedPackageName = parsePackageName(currentPackage.name()); if (! printedPackageHeaders.contains(parsedPackageName)) { writer.addPackageName(currentPackage, parsePackageName(currentPackage.name()), summariesTree); printedPackageHeaders.add(parsedPackageName); } } COM: <s> build the header for the given package </s>
funcom_train/8090808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String globalInfo() { return "Fuzzy Lattice Reasoning Classifier (FLR) v5.0\n\n" + "The Fuzzy Lattice Reasoning Classifier uses the notion of Fuzzy " + "Lattices for creating a Reasoning Environment.\n" + "The current version can be used for classification using numeric predictors.\n\n" + "For more information see:\n\n" + getTechnicalInformation().toString(); } COM: <s> returns a description of the classifier suitable for </s>
funcom_train/659239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initSpecialTag() { specialTag.put(new String("quot"),new Character('"')); specialTag.put(new String("amp"),new Character('&')); specialTag.put(new String("lt"),new Character('<')); specialTag.put(new String("gt"),new Character('>')); specialTag.put(new String("nbsp"),new Character(' ')); } COM: <s> initialize all the special tag </s>
funcom_train/26276835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _setUserInteractionEnabled(boolean i_shouldBeEnabled) { this.textEditorTextArea.setEnabled(i_shouldBeEnabled); this.textEditorTextArea.setEditable(i_shouldBeEnabled); this.saveButton.setEnabled(i_shouldBeEnabled); this.reloadButton.setEnabled(i_shouldBeEnabled); } COM: <s> enables or disables the gui components </s>
funcom_train/7760100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendResponse(Message message, Node nodeFrom) { if (message.getType() == TypeMessage.TypeMessageSuper) { this.mySuperNodeManager.handleMessageInterSN(message.getData()); } else if (message.getType() == TypeMessage.TypeMessageNormal) { this.mySuperNodeManager.handleRequest(message.getData()); } } COM: <s> response send by bt to p2 p </s>
funcom_train/23841074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String indentText(String text,boolean useDate) { int ind = getIndent(); String dateStr = SYSDATE()+" "; if (useDate==false) dateStr = ""; if (ind==0) return(dateStr+text); return(dateStr+spaces.substring(0, ind*tabOut)+ text.replaceAll("\n", "\n"+dateStr+spaces.substring(0, ind*tabOut))); } COM: <s> indent text after every new line </s>
funcom_train/50509782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttributes(Attribute[] attributes) { if (attributes != null) { for (int index = 0; index < attributes.length; ++index) { Attribute attr = attributes[index]; if (attr != null) { String name = attr.getName(); String value = attr.getValue(); if (value != null && ! hasAttribute(name)) { setAttribute(name, value); } } } } } COM: <s> adding attributes if they dont exist </s>
funcom_train/16909933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isNote(int y) { return (y < 6 && model.currentMode == MelodizerModel.eMelodizerMode.KEYBOARD) || model.currentMode == MelodizerModel.eMelodizerMode.NONE || model.currentMode == MelodizerModel.eMelodizerMode.CLIP || (y < 7 && model.currentMode == MelodizerModel.eMelodizerMode.POSITION); } COM: <s> determines if the row represents a note row or not </s>
funcom_train/21612047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkBeginningMatches() { for(LocationPathEntry lpe : locationPaths) { // Skips matches aready active. if(lpe.active) { continue; } if( lpe.locationPath.matches(this) ) { lpe.locationPathListener.matchBegins( this, lpe.locationPath ); lpe.active = true; } } } COM: <s> checks all available location paths beginning </s>
funcom_train/50976086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreeNode getChildAt(int childIndex) { //Returns the child TreeNode at index childIndex. TreeNode requestedChild; //Make sure that requested childIndex is not out of scope. if ((childIndex < 0) || (childIndex >= childNObs.size())) { requestedChild = null; } else { requestedChild = (TreeNode) childNObs.get(childIndex); } return requestedChild; } COM: <s> gets the child at attribute of the webdav nob object </s>
funcom_train/3415541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaximumPoolSize(int maximumPoolSize) { if (maximumPoolSize <= 0 || maximumPoolSize < corePoolSize) throw new IllegalArgumentException(); this.maximumPoolSize = maximumPoolSize; if (workerCountOf(ctl.get()) > maximumPoolSize) interruptIdleWorkers(); } COM: <s> sets the maximum allowed number of threads </s>
funcom_train/13558715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CVCPrincipal getAuthorityReference() throws CertificateException { try { ReferenceField rf = cvCertificate.getCertificateBody().getAuthorityReference(); final String countryCode = rf.getCountry().toUpperCase(); Country country = Country.getInstance(countryCode); return new CVCPrincipal(country, rf.getMnemonic(), rf.getSequence()); } catch (NoSuchFieldException nsfe) { throw new CertificateException(nsfe.getMessage()); } } COM: <s> gets the authority reference </s>
funcom_train/27897493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertNoMatchInTable(String tableSummaryNameOrId, String regexp) { assertTablePresent(tableSummaryNameOrId); assertTrue("Found regexp: [" + regexp + "] in table [" + tableSummaryNameOrId + "]", !getTestingEngine().getTable( tableSummaryNameOrId).hasMatch(regexp)); } COM: <s> assert that supplied regexp is not present in a specific table </s>
funcom_train/18525140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { openChooser = new OpenTestCaseChooser(); saveChooser = new SaveTestCaseChooser(); htmlChooser = new SaveHtmlReportFileChooser(); pngChooser = new SavePngReportFileChooser(); txtChooser = new SaveTxtReportFileChooser(); newTestClassChooser = new SaveNewTestClassChooser(); } COM: <s> create new instance of all choosers </s>
funcom_train/4521159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VistaProcesoElectoralCols update(VistaProcesoElectoralCols entity) { LogUtil.log("updating VistaProcesoElectoralCols instance", Level.INFO, null); try { VistaProcesoElectoralCols result = entityManager.merge(entity); LogUtil.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { LogUtil.log("update failed", Level.SEVERE, re); throw re; } } COM: <s> persist a previously saved vista proceso electoral cols entity and return it </s>
funcom_train/39380370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll(Collection options) { if (options == null) { String msg = "options parameter cannot be null"; throw new IllegalArgumentException(msg); } for (Iterator i = options.iterator(); i.hasNext();) { Radio radio = (Radio) i.next(); add(radio); } } COM: <s> add the given collection radio item options to the radio group </s>
funcom_train/19411724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleError(Throwable ex) { if (handler == null) { throw new RuntimeException("Cannot handle error: no error handler set",ex); //$NON-NLS-1$ } if (handler.respondToError(ex.toString(), ex)) abort(); } COM: <s> handle errors by passing them to the error handler </s>
funcom_train/7625989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setEnabledStateOnViews(View v, boolean enabled) { v.setEnabled(enabled); if (v instanceof ViewGroup) { final ViewGroup vg = (ViewGroup) v; for (int i = vg.getChildCount() - 1; i >= 0; i--) { setEnabledStateOnViews(vg.getChildAt(i), enabled); } } } COM: <s> makes sure the view and any children get the enabled state changed </s>
funcom_train/46261797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endOfTime(String s){ // remove listeners and set worldExists to false if(mytime != null){ mytime.cancel(); } this.worldExists = false; System.out.println("The world stopped: " + s); // draw the final scene of the world with the end of time message this.theCanvas.clear(this.background); if(!this.dead){ this.draw(); } this.theCanvas.drawString(new Posn(10, theCanvas.getHeight() * 9 / 10),s, new Black()); this.theCanvas.repaint(); this.dead = true; } COM: <s> stop the timer disable event processing leave the canvas open </s>
funcom_train/20140960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fileTransfertInit(File newFile, String fileNickSrc) { try{ IsReceivingFile = true; this.newFile = newFile; this.fileNickSrc = fileNickSrc; fileOut = new FileOutputStream(newFile); System.out.println(this.getName()+": File tranfert initialized."); } catch (Exception e){ System.out.println("Error while initializing file transfert."); IsReceivingFile = false; this.newFile = null; this.fileOut = null; } }//end fileTransfertInit COM: <s> initialize the file transfert by setting all attributes needed </s>
funcom_train/9480919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void log(Level logLevel, String msg, Object param) { if (!internalIsLoggable(logLevel)) { return; } LogRecord record = new LogRecord(logLevel, msg); record.setLoggerName(this.name); record.setParameters(new Object[] { param }); setResourceBundle(record); log(record); } COM: <s> logs a message of the specified level with the supplied parameter </s>
funcom_train/15567975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setDouble(int _row,int _column, double _value) { if (doubleRowList[_row]==null) return false; if (doubleV[_row].length>=_column) return false; doubleV[_row][_column]=_value; return true; } COM: <s> code set double code sets a double at a specified position </s>