__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/20335744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void CommandExpression() throws ParseException { Token t; Command c; Vector l = null; t = jj_consume_token(WORD); if (jj_2_9(2)) { l = Arguments(); } else { ; } expressions.add(new Command(lines, t.image, l)); } COM: <s> valid command expressions consist of an initial word command name </s>
funcom_train/44223162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged(ChangeEvent ce){ JSlider slider = (JSlider)ce.getSource(); // // Update the value in the system // int value = slider.getValue(); float transValue = (float)value / (float)10; this.canvas.get_config().set_groupObjectTransparency(transValue); this.canvas.repaint(); } COM: <s> event handler for transparency control slider </s>
funcom_train/23011572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOutOfExtent(DisplayContext dc) { boolean f = (!((dc == null) || metadata.maxExtent.isZero() || metadata.maxExtent.intersects(dc.getLastExtent()))); return f; /* return (!((dc == null) || metadata.maxExtent.isZero() || metadata.maxExtent.intersects(dc.getLastExtent()))); */ } COM: <s> determines whether the current display context has extent out </s>
funcom_train/36359306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand2() { if (backCommand2 == null) {//GEN-END:|53-getter|0|53-preInit // write pre-init user code here backCommand2 = new Command("Back", Command.BACK, 0);//GEN-LINE:|53-getter|1|53-postInit // write post-init user code here }//GEN-BEGIN:|53-getter|2| return backCommand2; } COM: <s> returns an initiliazed instance of back command2 component </s>
funcom_train/42114914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getWrappedBean(Object object) throws JSException { if (object == null) throw new NullPointerException("getWrappedBean(null)"); synchronized (evaluator) { if (object instanceof ESWrapper) { ESWrapper eswrapper = (ESWrapper) object; if (eswrapper.isBean()) { return eswrapper.getJavaObject(); } else { throw new JSException( "getWrappedBean call on an object not created by makeWrappedBean"); } } else { throw new JSException( "getWrappedBean call on an object not created by makeWrappedBean"); } } } COM: <s> given an object that was created by make bean wrapper returned the wrapped </s>
funcom_train/12661907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "Errorhandler{" + "prompt=" + prompt + ", email=" + email + ", command=" + command + ", arg=" + arg + ", quiet=" + quiet + ", errorProperty=" + errorProperty + "}"; } COM: <s> returns useful info for debugging </s>
funcom_train/14141854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void attach() { super.attach(); WorkflowOperation.detachDecompositionFromSpec( gateway ); for (int i = 0; i < varProxies.size(); i++) { context.detachProxy(varProxies.get(i), vars.get(i) , taskProxy); } context.detachProxy( gatewayProxy, gateway, specProxy ); WorkflowOperation.detachVariablesFromNet( netVariables ); } COM: <s> removes the task from its net </s>
funcom_train/32748633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doPropagation(IProbe probe, IElement elem) throws ModelException { int nSteps = compStepCount(elem); double dblStepSize = elem.getLength() / nSteps; for (int i=0 ; i<nSteps ; i++) { this.advanceState(probe, elem, dblStepSize); this.advanceProbe(probe, elem, dblStepSize); probe.update(); } } COM: <s> propagates the probe through the element </s>
funcom_train/12151421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(long time) { try { //Send updated samples to audio if (_audioSkipCounter == 0) { updateAudio(time); _audioSkipCounter = 3; } else { _audioSkipCounter--; } updateAudio(time); } catch (Exception e) { if (Config.DEBUG) { LogProxy.error(e); } } } COM: <s> flush any current audio data </s>
funcom_train/49199774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTextFilePathPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new TextPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Text_textFilePath_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Text_textFilePath_feature", "_UI_Text_type"), ExhibitionPackage.Literals.TEXT__TEXT_FILE_PATH, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the text file path feature </s>
funcom_train/50326290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeSerialNode(SerialNode node) { synchronized (this) { // find the node in the registered node list for (int i=0; i<getNumNodes(); i++) { if (getNode(i) == node) { // found node - set up for initialization setMustInit(i, true); return; } } } } COM: <s> public method to set up for initialization of a serial node </s>
funcom_train/34823350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clean() { ArrayList<SDFEdge> edges = new ArrayList<SDFEdge>(this.edgeSet()); for (int i = 0; i < edges.size(); i++) { this.removeEdge(edges.get(i)); } ArrayList<SDFAbstractVertex> vertices = new ArrayList<SDFAbstractVertex>( this.vertexSet()); for (int i = 0; i < vertices.size(); i++) { this.removeVertex(vertices.get(i)); } } COM: <s> clean the graph removes all edges and vertices </s>
funcom_train/6407715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void putTriggerInfo( InputActionEvent event, int invocationIndex ) { event.setTriggerName( name ); event.setTriggerAllowsRepeats( allowRepeats ); event.setTriggerDevice( getDeviceName() ); event.setTriggerCharacter( '\0' ); event.setTriggerDelta( 0 ); event.setTriggerIndex( 0 ); event.setTriggerPosition( 0 ); event.setTriggerPressed( false ); } COM: <s> called by input handler to fill info about the trigger into an event </s>
funcom_train/21610725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPositiveVerifyInvocation() throws SequenceNotFoundException { try { signature.unify( new Value[] { new StringValue(), new StringValue(), new StringValue(), new StringValue() } ); } catch (SequenceNotFoundException snfe) { fail("Expected unification here."); } } COM: <s> tests the unify with right number of arguments </s>
funcom_train/16914487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFilter(final Filter filter) { if (filter == null) { throw new IllegalArgumentException("filter must not be null"); } Filter oldFilter = this.filter; this.filter = filter; updateProducerDescription(); propertyChangeSupport.firePropertyChange("filter", oldFilter, this.filter); } COM: <s> set the filter for this sensor to code filter code </s>
funcom_train/26323651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String int2ip(long intIp){ String ip=(intIp % (long)256) +""; intIp=intIp/(long)256; for(int i=1;i<4;i++){ ip=(intIp % (long)256) +"."+ ip; intIp=intIp/(long)256; } return ip; } COM: <s> parses an ip string out of its long number representation </s>
funcom_train/48703267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValues() { fileTypes.clear(); ExternalFileType[] types = Globals.prefs.getExternalFileTypeSelection(); for (int i = 0; i < types.length; i++) { fileTypes.add(types[i].copy()); } Collections.sort(fileTypes); } COM: <s> update the editor to show the current settings in preferences </s>
funcom_train/28342112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initAnalysisGraph(FunctionGraphsJPanel graphAnalysis) { SimpleChartPopupMenu.addPopupMenuTo(graphAnalysis); graphAnalysis.setOffScreenImageDrawing(true); graphAnalysis.setAxisNames("Slope of Quad-BPM", "Center BPM Measured Value"); graphAnalysis.setGraphBackGroundColor(Color.white); graphAnalysis.setLegendButtonVisible(true); } COM: <s> initialize the attribute of graph panel of analysis </s>
funcom_train/21656135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtReporteProyecto() { if (btReporteProyecto == null) { btReporteProyecto = new JButton(); btReporteProyecto.setBounds(new Rectangle(19, 552, 157, 33)); btReporteProyecto.setText("GENERAR REPORTE"); btReporteProyecto.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { mostrarReporte(); } }); } return btReporteProyecto; } COM: <s> this method initializes bt reporte proyecto </s>
funcom_train/50939372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSubject() { //return getService() + "->" + getAction(); Iterator iterator = message.getMessageHeader().getDescriptions(); if (iterator.hasNext()) { Description description = (Description) iterator.next(); return description.getDescription(); } return ""; } COM: <s> get the subject of the message </s>
funcom_train/11008207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOpenSave() throws Exception { String originalFile = OpenXML4JTestDataSamples.getSampleFileName("TestPackageCommon.docx"); File targetFile = OpenXML4JTestDataSamples.getOutputFile("TestPackageOpenSaveTMP.docx"); OPCPackage p = OPCPackage.open(originalFile, PackageAccess.READ_WRITE); p.save(targetFile.getAbsoluteFile()); // Compare the original and newly saved document assertTrue(targetFile.exists()); ZipFileAssert.assertEquals(new File(originalFile), targetFile); assertTrue(targetFile.delete()); } COM: <s> test that just opening and closing the file doesnt alter the document </s>
funcom_train/48066247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeDocumentToOutput(Node node) { // write all child nodes recursively NodeList children = node.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node child = children.item(i); //Process filter tag if ((child.getNodeType() == Node.ELEMENT_NODE)&&(child.getNodeName() == "filter")) { processFilterTag(child); } } } COM: <s> writes node and all child nodes to standard output </s>
funcom_train/51188455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createUUID() throws UUIDGeneratorException { // NOTE : UUIDGeneratorException is not thrown at present but this is // added so that should the internals of this class change and native // calls or other calls that can throw exceptions are used we have a // standard way to propergate them back to the user without needing to // change the method signature and effecting components return generator.generateTimeBasedUUID(address).toString(); } COM: <s> this method creates a new uuid </s>
funcom_train/36906722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("Add")) { if (Project.getInstance().isReadyForUse()) { frame.setTitle("Add Resource"); frame.setVisible(true); } else { GUIUtils.error("You must first create or open a project"); } } else if (e.getActionCommand() == "Close") { frame.setVisible(false); } } COM: <s> display the add resource gui </s>
funcom_train/17694367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFontSize(int index){ System.out.println("Font size is " + index); Integer fontSize = Integer.parseInt(fontArr[index].toString()); Font w1 = new Font("Arial", Font.BOLD, fontSize); sp.jtpSend.setFont(w1); }//End setFontSize COM: <s> something i tried to get working for the font size robert </s>
funcom_train/12812188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringBuffer editInfinite(StringBuffer buf, int width, int sign) { int nb = width - inf_string.length(); if (sign != 0) nb--; while (--nb>=0) buf.append(' '); if (sign<0) buf.append('-'); else if (sign != 0) buf.append('+'); buf.append(inf_string); return buf; } COM: <s> assignment to infinity represention right aligned </s>
funcom_train/13442801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintChildren(Graphics g) { super.paintChildren(g); DividerPainter dp = getDividerPainter(); Rectangle clipR = g.getClipBounds(); if ((dp != null) && (clipR != null)) { Graphics dpg = g.create(); try { MultiSplitLayout msl = getMultiSplitLayout(); for (Divider divider : msl.dividersThatOverlap(clipR)) { dp.paint(dpg, divider); } } finally { dpg.dispose(); } } } COM: <s> uses the divider painter if any to paint each divider that overlaps the </s>
funcom_train/32779565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CommandFrame clone() throws CloneNotSupportedException{ //System.out.println("Command.clone start"); CommandFrame out = CommandFactory.createCommand(this.cmd, this.remark, this.parameter); out.cmd = this.cmd; out.remark = this.remark; out.parameter = this.parameter.clone(); for(int i=0; i<out.parameter.length; i++){ out.parameter[i] = out.parameter[i].clone(); } out.time = this.time; out.template = this.template; out.init = this.init; //System.out.println("Command.clone end"); return out; } COM: <s> creates a clone of a command </s>
funcom_train/28349035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateLogText() { LoggerSessionHandler handler = _model.getSelectedSessionHandler(); if ( handler != null ) { latestLogTextView.setText( handler.getLastPublishedSnapshotDump() ); latestLogTextView.setCaretPosition(0); String dateText = TIMESTAMP_FORMAT.format( handler.getTimestampOfLastPublishedSnapshot() ); latestLogDateField.setText(dateText); } else { latestLogTextView.setText(""); latestLogDateField.setText(""); } } COM: <s> update the the text of the latest log from the selected logger handler </s>
funcom_train/15954335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetChars() throws BMLException{ String lsValue = "abcdefg"; DataString ldString = new DataString(fBlank); ldString.setString(lsValue); char lcValue[] = new char[7]; ldString.getChars(2,5,lcValue,0); assertEquals("cdef",String.valueOf(lcValue,0,lcValue.length)); } COM: <s> test of get chars method </s>
funcom_train/41164605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoSingleTextCheckList2 entity) { EntityManagerHelper.log("deleting CoSingleTextCheckList2 instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoSingleTextCheckList2.class, entity.getCheckListId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co single text check list2 entity </s>
funcom_train/28399567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void newTime(long time){ //calculates the first average if(firstTime && position==0){ average= time; } //verifies if it filled the array the firts time if(firstTime && position==times.length-1) firstTime=false; //insert the time in the array times[position]=time; if(times[position] > average){ if(last==UP) count++; else{ last=UP; count=0; } } if(times[position]< average){ if(last==DOWN) count++; else{ last=DOWN; count=0; } } //upadtes the next position. position= ((position+1) % times.length); //if there are 7 times below or above average it updates the average. if(count == times.length) calculateAverage(); } COM: <s> insert a new time </s>
funcom_train/45608875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createFormNewProduct() { winModalNewProduct = new Window(); createWindowCenter(winModalNewProduct, widthAddProdWin, heightAddProdWin, constants.newProduct()); winModalNewProduct.addItem(addFormcreateNewProduct()); configureFormWindow(winModalNewProduct); winModalNewProduct.addItem(errorMessage); } COM: <s> create a window with a empty form </s>
funcom_train/4914731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleContainerBrowse() { // Dialog to select container ContainerSelectionDialog dialog = new ContainerSelectionDialog(this .getShell(), ResourcesPlugin.getWorkspace().getRoot(), false, "Select new container"); if (dialog.open() == ContainerSelectionDialog.OK) { // Specify container Object[] result = dialog.getResult(); if (result.length == 1) { this.containerText.setText(result[0].toString()); } } } COM: <s> handle browsing for a container </s>
funcom_train/19455200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Filter and(String fieldName, String operator, Object value) { if (primaryExpression == null) { where(fieldName, operator, value); } else if (getOpenExpression() != null) { getOpenExpression().and(fieldName, operator, value); } else { getPrimaryExpression().and(fieldName, operator, value); } return this; } COM: <s> returns this filter with an additional expression attached at the end </s>
funcom_train/15490516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProcessor(String title, ImageProcessor ip) { int stackSize = getStackSize(); if (stackSize>1 && (ip.getWidth()!=width || ip.getHeight()!=height)) throw new IllegalArgumentException("ip wrong size"); if (stackSize<=1) { stack = null; currentSlice = 1; } setProcessor2(title, ip, null); } COM: <s> replaces the image processor if any with the one specified </s>
funcom_train/8711297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDeclType(int declType) { if (!(declType == Token.FUNCTION || declType == Token.LP || declType == Token.VAR || declType == Token.LET || declType == Token.CONST)) throw new IllegalArgumentException("Invalid declType: " + declType); this.declType = declType; } COM: <s> sets symbol declaration type </s>
funcom_train/15955336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StateVertex deepClone(StateMachine globalLevel,Region region,CompositeState container) { DefaultDeepHistoryState lNew = new DefaultDeepHistoryState(fName, fBehavior, fIndex, fGlobalIndex, globalLevel,region,container, fIncomming, fOutgoing, fKind); /* Attach to global */ globalLevel.makeGlobalIndex(lNew); return lNew; } COM: <s> clones this deep history state and replaces sub machine states with referenced sm </s>
funcom_train/42644825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addKeywordsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EmbryoMetadata_keywords_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EmbryoMetadata_keywords_feature", "_UI_EmbryoMetadata_type"), EmbryomodelPackage.Literals.EMBRYO_METADATA__KEYWORDS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the keywords feature </s>
funcom_train/50916028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addAtomId(String id) { String[] content = {}; int size = 0; if (this.getSizeAttribute() != null) { content = this.getXMLContent(); size = this.getSize(); } this.setXMLContent(Util.addElementToStringArray(content, id)); this.setSize(size + 1); } COM: <s> add atom id </s>
funcom_train/13593434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMinMaxCaps() { if(net == null) return; maxCap = Double.MIN_VALUE; minCap = Double.MAX_VALUE; for(Link link : net.getLinks().values()) { if(!validLink(link)) continue; maxCap = Math.max(maxCap, link.getCapacity()); minCap = Math.min(minCap, link.getCapacity()); } updateCapacityLabels(); } COM: <s> sets the variables mini cap and maxi cap </s>
funcom_train/9853607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(String line) { try { out.write(line +"\r\n"); out.flush(); if (level == 1) { // not registered IRCParser p = new IRCParser(line); if (p.getCommand().equalsIgnoreCase("NICK")) nick = p.getParameter(1).trim(); } } catch (Exception exc) { // nothing } } COM: <s> sends a string to the server </s>
funcom_train/49426513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showPopup(final Screen screen, final String id, final Element defaultFocusElement) { Element popup = activePopups.get(id); if (popup == null) { log.warning("missing popup [" + id + "] o_O"); } else { screen.addPopup(popup, defaultFocusElement); } } COM: <s> show popup in the given screen </s>
funcom_train/38342313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean initializeEngine(Engine engine, AgentApplication app) { if (this.classloader != null) { boolean init = true; init = this.loadModels(engine, app.getModels()); if (init) { init = this.loadFunctionPackage(engine, app.getFunctionPackage(), app); } if (init) { init = this.loadRulesets(engine, app.getRulesets()); } if (init) { init = this.loadInitialData(engine, app.getInitialData()); } return init; } return false; } COM: <s> initialize engines for the application pools </s>
funcom_train/32362568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addExceptionHandler(IEventQueueExceptionHandler handler) { synchronized (getLock()) { if (finalizing) { throw new IllegalStateException("Event queue is being finalized"); } if (handlers.contains(handler)) return; handlers = new LinkedHashSet(handlers); handlers.add(handler); handlers = Collections.unmodifiableSet(handlers); } } COM: <s> adds specified exception handler to process unhandled exceptions occured </s>
funcom_train/43269037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setToConcept(String toConcept) { // Error handiling to match database schema if ((toConcept != null) && (toConcept.length() > 50)) { toConcept = toConcept.substring(0, 50); log.warn("WARNING: Truncating toConcept to 50 characters"); } rebuildStringValue = true; // Need to rebuild the value used for hashing. this.toConcept = toConcept; } COM: <s> sets the code link template code to concept </s>
funcom_train/5342318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSendableVersion() { Version myVersion; Version lastVersion; try { myVersion = new Version(CommonUtils.getLimeWireVersion()); lastVersion = new Version(BugSettings.LAST_ACCEPTABLE_VERSION.getValue()); } catch(VersionFormatException vfe) { return false; } return myVersion.compareTo(lastVersion) >= 0; } COM: <s> determines if were allowed to send a bug report </s>
funcom_train/324322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void newViewTime() { if (gpsDataBlock == null) return; long now = PamCalendar.getTimeInMillis(); GpsDataUnit gpsDataUnit = gpsDataBlock.getClosestUnitMillis(now); mapPanel.newViewTime(gpsDataUnit); if (gpsDataUnit == null) return; newGpsData(gpsDataUnit); GpsData gpsData = gpsDataUnit.getGpsData(); if (centerOnFirstShipGPS) { mapPanel.setMapCentreDegrees(gpsData); centerOnFirstShipGPS = false; } repaint(); } COM: <s> notification that the viewer slider has moved </s>
funcom_train/21613493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected XMLTagScanner getXMLTagScanner() { if (tagScanner == null) { tagScanner = new XMLTagScanner(colorManager); tagScanner.setDefaultReturnToken(new Token(new TextAttribute(colorManager.getPreferredColor(PreferencesPage.XML_TAG_PREF_NAME)))); } return tagScanner; } COM: <s> returns the xmltag scanner instance with its default return token already set </s>
funcom_train/26138786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel6() { if (jPanel6 == null) { FlowLayout flowLayout4 = new FlowLayout(); flowLayout4.setVgap(7); flowLayout4.setAlignment(FlowLayout.LEFT); flowLayout4.setHgap(0); jPanel6 = new JPanel(); jPanel6.setPreferredSize(new Dimension(100, 30)); jPanel6.setLayout(flowLayout4); jPanel6.add(jLabel1, null); } return jPanel6; } COM: <s> this method initializes j panel6 </s>
funcom_train/26098247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTable getTableAuth() { if (tableAuth == null) { tableAuth = new JTable(); tableAuth.setModel(getAuthModel()); tableAuth.setRowHeight(18); tableAuth.setIntercellSpacing(new Dimension(1,1)); for (int i = 0; i < 5; i++) { TableColumn column = tableAuth.getColumnModel().getColumn(i); column.setPreferredWidth(width[i]); } } return tableAuth; } COM: <s> this method initializes table auth </s>
funcom_train/49211352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getStartPanel() { if (startPanel == null) { startPanel = new JPanel(); startPanel.setLayout(new GridLayout(0,1)); startPanel.setSize(new Dimension(327,80)); startPanel.setMaximumSize(startPanel.getSize()); startPanel.setMinimumSize(startPanel.getSize()); startPanel.setPreferredSize(startPanel.getSize()); startPanel.setBorder(BorderFactory.createTitledBorder("Start")); startPanel.setBackground(Color.white); startPanel.add(getBox(), null); } return startPanel; } COM: <s> this method initializes start panel for cluster button and threshold slider </s>
funcom_train/10808993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OMSerializable getNext() { if (next == null) { return null; } node = next; visited = backtracked; backtracked = false; updateNextNode(); // set the starting and ending flags if (root.equals(node)) { if (!start) { end = true; } else { start = false; } } return node; } COM: <s> get the next information item </s>
funcom_train/18215616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initPage(DockPanel dock) { queryNameLabel.setVisible(false); VerticalPanel vp = new VerticalPanel(); dock.setSpacing(12); vp.add(grid); HorizontalPanel ap = new HorizontalPanel(); vp.add(errorLabel); errorLabel.setVisible(false); ap.setSpacing(18); ap.add(evaluateButtonGUI); ap.add(modifyButton); ap.add(xmlLoadButton); ap.add(deleteButton); ap.add(staticLinkButton); vp.add(ap); dock.add(vp, DockPanel.NORTH); dock.setCellHorizontalAlignment(vp, HasAlignment.ALIGN_LEFT); } COM: <s> add the needed gui components into the category page </s>
funcom_train/22758003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot(); Set <Connection> connections = ConnectionManager.getInstance().getActiveConnections(); if (connections.size() == 0) { // If there are no connections, set the default root and be done // with it. removeChildren(root); root.setUserObject(defaultTreeRoot); } else { // Otherwise recursively update the root. update(root); } } COM: <s> updates the whole tree </s>
funcom_train/16463818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test() throws DuplicateKeyException { assertEquals(0, dao.getSmsInternetServiceAccounts().size()); ClickatellInternetService clickatell = new ClickatellInternetService(); SmsInternetServiceSettings settings = new SmsInternetServiceSettings(clickatell); dao.saveSmsInternetServiceSettings(settings); assertEquals(1, dao.getSmsInternetServiceAccounts().size()); dao.deleteSmsInternetServiceSettings(settings); assertEquals(0, dao.getSmsInternetServiceAccounts().size()); } COM: <s> test everything all at once </s>
funcom_train/7388048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand() { if (exitCommand == null) {//GEN-END:|21-getter|0|21-preInit // write pre-init user code here exitCommand = new Command("Exit", Command.EXIT, 0);//GEN-LINE:|21-getter|1|21-postInit // write post-init user code here }//GEN-BEGIN:|21-getter|2| return exitCommand; } COM: <s> returns an initiliazed instance of exit command component </s>
funcom_train/11729065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveLabel() throws RepositoryException { vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false); vHistory.removeVersionLabel(versionLabel); assertFalse("VersionHistory.removeLabel(String) must remove the version label if it exists (has successfully been added before).", vHistory.hasVersionLabel(versionLabel)); } COM: <s> test the removal of an version label that has successfully been added </s>
funcom_train/31900755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getColorPreference(String key) { String value = preferences.getProperty(key, ""); // check for the sixteen HTML common name colors for (int i = 0; i < COLORNAMES.length; i++) { if (value.equalsIgnoreCase(COLORNAMES[i])) { return COLORVALUES[i]; } } try { return Color.decode(value); } catch (NumberFormatException nfe) {} return null; } COM: <s> return a preference setting as a color </s>
funcom_train/2586026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMondayNearest22Jan1970() { SerialDate jan22Y1970 = SerialDate.createInstance(22, MonthConstants.JANUARY, 1970); SerialDate mondayNearest = SerialDate.getNearestDayOfWeek(SerialDate.MONDAY, jan22Y1970); assertEquals(19, mondayNearest.getDayOfMonth()); } COM: <s> the monday nearest to 22nd january 1970 falls on the 19th </s>
funcom_train/37191489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void menusVisible(boolean menusVisible) { mDataManipulator.setVisible(menusVisible); mFile.setVisible(menusVisible); mEdit.setVisible(menusVisible); mAction.setVisible(menusVisible); mObject.setVisible(menusVisible); mRecord.setVisible(menusVisible); mTools.setVisible(menusVisible); mWindow.setVisible(menusVisible); mHelp.setVisible(menusVisible); } COM: <s> hide or show the menus in the menu bar </s>
funcom_train/49929464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void hitImage(HitCounter counter, Image image) { if (counter == null || image == null) { return; } int id = image.getId(); if (!this.hitImageIds.contains(id)) { this.hitImageIds.add(id); counter.hitImage(image); } } COM: <s> cover facade for hit counter </s>
funcom_train/36679501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Player getMapPlayerFor(Color color) { Color neutralColor = App.getColor("plugin.neutral_color"); for (Player mapPlayer : getUniquePlayers()) { if (mapPlayer.getColor().equals(color)) { return mapPlayer; } } if (color.equals(neutralColor)) { return neutralPlayer; } else { return null; } } COM: <s> retrieve a map player with the given color from this map </s>
funcom_train/11103332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected HtmlForm form(String id) throws Exception { Iterator forms = page.getForms().iterator(); while (forms.hasNext()) { HtmlForm form = (HtmlForm) forms.next(); if (id.equals(form.getAttributeValue("id"))) { return (form); } } return (null); } COM: <s> p return the form with the specified code id code from the most </s>
funcom_train/25394527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTransparencyLevel(float aLevelTransparency) { // make sur value is in range [0.0 - 1.0] float level = JMaths.jClamp(aLevelTransparency, 0.0f, 1.0f); // apply new value ambient.setA(level); diffuse.setA(level); specular.setA(level); emission.setA(level); } COM: <s> set transparency level sets the alpha value for all color </s>
funcom_train/11379118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertJob(Job job, List<Path> corruptFiles) { List<CorruptFileInfo> fileInfos = new LinkedList<CorruptFileInfo>(); for (Path file: corruptFiles) { CorruptFileInfo fileInfo = new CorruptFileInfo(file, job); fileInfos.add(fileInfo); fileIndex.put(file.toString(), fileInfo); } jobIndex.put(job, fileInfos); numJobsRunning++; } COM: <s> inserts new job into file index and job index </s>
funcom_train/26575520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void fatal(Component activeWindow, String message) { if (getMainFrame() != null) JOptionPane.showMessageDialog(activeWindow, message + "\n" + "This program will exit.", "Fatal Exception", JOptionPane.ERROR_MESSAGE); else System.out.println("Fatal Exception: " + message + "\n" + "This program will exit."); System.exit(-1); } COM: <s> display a fatal error </s>
funcom_train/1776067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void calculateGlacierArea(Envelope2D extent, Rectangle rect, WritableRaster raster, List<MultiPolygon> fs, MultiPolygon catchment, Map<Integer, Integer> areas) throws Exception { Stack<Param> _stack = new Stack<Param>(); Param _param = new Param(); _param.setExtent(extent); _param.setRect(rect); _param.setFs(fs); _stack.push(_param); this.calculate(_stack, raster, catchment, areas); } COM: <s> calculate the glacier area for each altitude level </s>
funcom_train/34899446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String removeRandomNumber(String original) { Matcher m = randSuffixPattern.matcher(original); int idx = -1; if (m.find()) { idx = m.start(); // System.out.println("Found: "+m.group()); } if ( idx == -1) return original; else return original.substring(0, idx); } COM: <s> remove randomly assigned number from string </s>
funcom_train/18847344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createInterfaceOperationNotFoundException(String tscToken, String operationID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getErrorDiagnosticsCode(); String exceptionID = "80390"; propertyMap.addPropertyValuePair("operationID", operationID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> construct interface operation not found exception message </s>
funcom_train/43093658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setURL(URL theUrl) { if (theUrl != null) { theUrl = PersistenceManager.getInstance().fixUrlExtension(theUrl); } if (LOG.isDebugEnabled()) { LOG.debug("Setting project URL from \"" + url + "\" to \"" + theUrl + "\"."); } url = theUrl; } COM: <s> set the url for this project </s>
funcom_train/43245701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetBenefitsAssignable() { System.out.println("setBenefitsAssignable"); boolean benefitsAssignable = true; InsuranceDG1Object instance = new InsuranceDG1Object(); instance.setBenefitsAssignable(benefitsAssignable); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set benefits assignable method of class org </s>
funcom_train/32631246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InstanceMapper getInstanceMapper(final Class clazz) { InstanceMapper mapper = (InstanceMapper) instanceMappers.get(clazz); if (mapper == null) { Class[] interfaces = clazz.getInterfaces(); for (int i = 0; mapper == null && i < interfaces.length; i++) { mapper = (InstanceMapper) instanceMappers.get(interfaces[i]); } } return mapper; } COM: <s> returns the mapper that is registered for a given instance class </s>
funcom_train/2713138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doRun(InputParams in, OutputParams out) { String menuId = (String) in.get("MENU_ID"); ProvidedTool tool = getContext().getConfiguration().getMenuConfig(). getProvidedTools().getProvidedToolById(menuId); Function compile = new RunJavaApplet(tool); compile.process(in, out); } COM: <s> runs the current java applet </s>
funcom_train/25027836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateByID(int id, String combination, Integer coeff) { ContentValues values = new ContentValues(); values.put(KEY_COMBINATION, combination); values.put(KEY_COEFF, coeff); sqLiteDatabase.update(DATABASE_TABLE, values, KEY_ID + "=" + id, null); } COM: <s> update the coefficient by id </s>
funcom_train/44778664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (!(obj instanceof SimpleDatabaseMapping)) { return false; } SimpleDatabaseMapping mapping = (SimpleDatabaseMapping) obj; if ((myField.equalsIgnoreCase(mapping.getField())) && (myDBTable.equalsIgnoreCase(mapping.getDBTable()))) { return true; } return false; } COM: <s> this determines if two database mapping are equal </s>
funcom_train/33289401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { final int x_buffer_size = 32; StringBuffer x_buf = new StringBuffer(x_buffer_size); for (int i = 0; i < o_octets.length - 1; i++) { x_buf.append(Short.toString(o_octets[i])); x_buf.append("."); } x_buf.append(Short.toString(o_octets[o_octets.length - 1])); return x_buf.toString(); } COM: <s> increments the rating and hands back the same object </s>
funcom_train/49425769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseFromString(final String resizeString, final Box[] boxArray) { String[] data = resizeString.split(","); int y = 0; y = processRow(y, boxArray, 0, data, 0); y = processRow(y, boxArray, 3, data, 4); y = processRow(y, boxArray, 6, data, 8); } COM: <s> parse the given string and extract the images boxes </s>
funcom_train/36248065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String lookupAttachedInstance(String elasticIp) throws AmazonClientException { DescribeAddressesRequest request = new DescribeAddressesRequest().withPublicIps(elasticIp); DescribeAddressesResult result = getEc2Client().describeAddresses(request); if (!result.getAddresses().isEmpty()) { return result.getAddresses().get(0).getInstanceId(); } return null; } COM: <s> returns the ec2 instance id of the instance attached to the specified </s>
funcom_train/16738310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double dot(final Vector3D vector) throws Vector3DUndefinedException { if (this.isUndefined() || vector.isUndefined()) { throw new Vector3DUndefinedException(); } else { return this.getX() * vector.getX() + this.getY() * vector.getY() + this.getZ() * vector.getZ(); } } COM: <s> dot operation on vector and another </s>
funcom_train/44709869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void respond(PageState s) { String event = s.getControlEventName(); if (TOGGLE_EVENT.equals(event)) { setSelected(s, s.getControlEventValue() != null); } else { throw new IllegalArgumentException("Unknown event '" + event + "'"); } fireActionEvent(s); } COM: <s> responds to the incoming request represented by code s code </s>
funcom_train/50070380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String fire( String s ) { boolean t = true; String ts; StringTokenizer st = new StringTokenizer( s, "." ); while ( st.hasMoreTokens() ) { ts = st.nextToken(); if ( t ) { t = !t; } else { return ts; } }; return s; }; COM: <s> xlate function used to grab the columnname from col0 </s>
funcom_train/40435752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addAdjacentSiblingElements() { for (Node node : nodes) { Node n = GwtDomHelper.getNextSiblingElement(node); if (n != null) { String tag = selector.getTagName(); if (tag.equalsIgnoreCase(n.getNodeName()) || tag.equals(Selector.UNIVERSAL_TAG)) { result.add(n); } } } } COM: <s> add adjacent sibling elements </s>
funcom_train/44781954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init(String psTitleText,String psLabelText) { setTitle(psTitleText); getContentPanel().setLayout(new GridLayout()); getLabel().setText(psLabelText); getProgressBar(); getButtonPanel(1); getCancelButton(); getDialog().setSize(280,130); center(); } COM: <s> initializes the dialog to a standard layout </s>
funcom_train/46393034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAnnotatedQueryString(String annotatedQueryString) throws NoQuerySpecifiedException, JAXBException { this.annotatedQueryString = annotatedQueryString; if(annotatedQueryString == null) { throw new NoQuerySpecifiedException("Input query string below minimum length"); } // reset entityURIs entityURIs = new Vector <String> (); // Create new query object query = new Query(annotatedQueryString); // throws JAXBException } COM: <s> set the string representation of the xml encoded annotated query </s>
funcom_train/39166120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void warning(SAXParseException ex) throws SAXException { // do something with the warning. File fInput = new File(ex.getSystemId()); Err.println("w: " + fInput.getName() + ": line " + ex.getLineNumber() + ": " + ex); } // warning COM: <s> warning method comment </s>
funcom_train/50911548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDelimitedXMLContent(String s) { if (s == null) { s = S_EMPTY; } if (!s.equals(S_EMPTY)) { if (!isWhitespace()) { if (!s.startsWith(concat)) { s = concat + s; } if (!s.endsWith(concat)) { s += concat; } } } return s; } COM: <s> set text content </s>
funcom_train/1174155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Deck generateConstructed3ColorDeck() { GenerateConstructedMultiColorDeck gen = new GenerateConstructedMultiColorDeck(); CardList name = gen.generate3ColorDeck(); Deck deck = new Deck(Constant.GameType.Constructed); for (int i = 0; i < 60; i++) deck.addMain(name.get(i).getName()); return deck; } COM: <s> p generate constructed3 color deck </s>
funcom_train/50714059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnect() throws IOException { exit=true; rt.pleaseExit(); try { rt.join(700); myThread.join(700); } catch (InterruptedException e) { } if (connected) { if (loggedIn) { logOut(); } s.close(); connected=false; } } COM: <s> disconnect from the toc server </s>
funcom_train/9085197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchAllCharacters() { // query(table, columns, select stmt, select args, group clause, having, // order return mDb.query(DATABASE_TABLE, new String[] { KEY_ROWID, KEY_NAME, KEY_DESC, KEY_BIO }, null, null, null, null, null); } COM: <s> return a cursor over the list of all characters in the database </s>
funcom_train/12164379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDefaultCanvasDetails() throws Exception { //set up a DefaultPageDetails object CanvasDetails canvasDetails = new DefaultCanvasDetails( "myTitle", CanvasType.GEAR, "myTheme", "myLayout"); doComparison(canvasDetails, "myTitle", CanvasType.GEAR, "myTheme", "myLayout"); } COM: <s> perform simple test to ensure that the default canvas details object </s>
funcom_train/16849381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCatalogName(int catalogID) { String catName = ""; for (int i = 0; i < this.catalogs.size(); i++) { CatalogData catData = (CatalogData) catalogs.get(i); if (catData.getCatalogID() == catalogID) { catName = catData.getCatalogName(); break; } } return catName; } COM: <s> gets the catalog s name given its id </s>
funcom_train/43244980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveSession() { System.out.println("removeSession"); String sessionId = ""; SessionManager instance = new SessionManager(); instance.removeSession(sessionId); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of remove session method of class org </s>
funcom_train/34758620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rm(File file, Directory dir) { if (dir == current) { dir.contents.remove(file); } if (file.type == FileType.DATA) { data -= file.size; dir.data -= file.size; } else { apps -= file.size; dir.apps -= file.size; } } COM: <s> remove a file from the harddrive </s>
funcom_train/45143508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExtendsName() { CompilerDef baseCompiler = new CompilerDef(); setCompilerName(baseCompiler, "msvc"); CompilerDef extendedCompiler = (CompilerDef) createExtendedProcessorDef( baseCompiler); extendedCompiler.setExceptions(true); String[] preArgs = getPreArguments(extendedCompiler); assertEquals("/EHsc", preArgs[2]); } COM: <s> tests that the name attribute in the base compiler is effective </s>
funcom_train/19057876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect() throws IOException, AuthenticationException { socket = new Socket("127.0.0.1", SessionController .deserializePortNumber()); writer = new PrintWriter(socket.getOutputStream()); writer.write("Columba " + VersionInfo.getVersion()); writer.write(NEWLINE); writer.flush(); writer .write("User " + System.getProperty("user.name", ColumbaServer.ANONYMOUS_USER)); writer.write(NEWLINE); writer.flush(); reader = new BufferedReader(new InputStreamReader(socket .getInputStream())); String response = reader.readLine(); if (response.equals("WRONG USER")) { throw new AuthenticationException(); } } COM: <s> tries to connect to a running server </s>
funcom_train/19296115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TSDateSelector getStartDateSelector() { if (startDateSelector == null) { startDateSelector = new TSDateSelector(); startDateSelector.setPreferredSize(new java.awt.Dimension(100, 20)); startDateSelector.setMinimumSize(new java.awt.Dimension(100, 20)); } return startDateSelector; } COM: <s> this method initializes start date selector </s>
funcom_train/15615894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PHPArray buildResponseHeader(Result result) { PHPArray array = new PHPArray(); array.addEntry("error_code", new PHPSimpleValue(Integer.toString(result.getErrorCode().ordinal()))); array.addEntry("message", new PHPSimpleValue(result.getMessage())); return array; } COM: <s> creates the generic part of the php result array </s>
funcom_train/9878872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetSelection(int sampleIndex) { ((JLabel)(factorALabelVector.get(sampleIndex))).setText("Exclude"); ((JLabel)(factorBLabelVector.get(sampleIndex))).setText("Exclude"); ((JLabel)(sampleLabelVector.get(sampleIndex))).setBorder(BorderFactory.createLineBorder(Color.black,3)); validate(); repaint(); //remove from vector and repaint removeAssignment(sampleIndex); } COM: <s> resets a selection given a sample index </s>
funcom_train/45452859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedManagers(final String[] selectedManagers) { if (selectedManagers == null) { this.selectedManagers = null; return; } this.selectedManagers = new String[selectedManagers.length]; for (int i = 0; i < selectedManagers.length; i++) { this.selectedManagers[i] = selectedManagers[i]; } } COM: <s> sets the indices of the selected managers </s>