__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/13490962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public RMessage next_message() { int count = -1; while (queue.size() == 0) { if (maxSeconds >= 0 && ++count >= maxSeconds) { // System.out.println("Timeout occurred: no input events for "+count+" seconds..."); return null; } try { wait(1000); } catch (InterruptedException exc) { } } RMessage ret = (RMessage) queue.remove(0); id++; ret.assign_conversation_id(agent + id); //System.out.println("rmsg="+ret); return ret; } COM: <s> retrieve the next message from the queue </s>
funcom_train/35280095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBindTransforms(Vector3f translation, Quaternion rotation, Vector3f scale) { initialPos.set(translation); initialRot.set(rotation); //ogre.xml can have null scale values breaking this if the check is removed if (scale != null) { initialScale.set(scale); } localPos.set(translation); localRot.set(rotation); if (scale != null) { localScale.set(scale); } } COM: <s> sets local bind transform for bone </s>
funcom_train/34441854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyMoreResults() { if (searchWindow != null) { //note: getResults() returns all of the ContentAdvertisements //received so far, not just the ones that were in the last list //response. searchWindow.updateResults(getResults().toArray(new QueryResponse[getResults().size()])); } } COM: <s> this function is called each time more results are received </s>
funcom_train/46767475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getExitMenuItem() { if (exitMenuItem == null) { exitMenuItem = new JMenuItem(); exitMenuItem.setText("Exit"); exitMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { close(); System.exit(0); } }); exitMenuItem.setMnemonic(KeyEvent.VK_Q); exitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,Event.CTRL_MASK)); exitMenuItem.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) {close();System.exit(0);} }); } return exitMenuItem; } COM: <s> this method initializes j menu item </s>
funcom_train/10980916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDescriptorArguments() { DynaProperty descriptor = dynaForm.getDynaClass().getDynaProperty("unknown"); assertNull("Unknown property descriptor should be null", descriptor); try { dynaForm.getDynaClass().getDynaProperty(null); fail("Should throw IllegalArgumentException"); } catch (IllegalArgumentException e) { ; // Expected response } } COM: <s> corner cases on get dyna property invalid arguments </s>
funcom_train/1071203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public void setBounds(Rectangle rect) { int borderHeight = 1; int borderWidth = rect.width; Rectangle borderRect = new Rectangle(); borderRect.setLocation(0, (int)getParent().getSize().height/ 3); borderRect.setSize(borderWidth, borderHeight); super.setBounds(borderRect); Debug.debug(this," bounds are : " +getBounds(), channel); } COM: <s> set bound is called to resize or move graphical element by eclipse </s>
funcom_train/1235879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unmarshal(File f) throws JAXBException { jc = JAXBContext.newInstance(CANRES); Unmarshaller u = jc.createUnmarshaller(); fib = (FIBEX) u.unmarshal(f); ele = fib.getELEMENTS(); inf = fib.getPROCESSINGINFORMATION(); req = fib.getREQUIREMENTS(); pro = fib.getPROJECT(); } COM: <s> nacteni elementu ze souboru do pameti </s>
funcom_train/29375716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private XMLAttribute findAttribute(String fullName) { Enumeration e = this.attributes.elements(); while (e.hasMoreElements()) { XMLAttribute attr = (XMLAttribute) e.nextElement(); if (attr.getFullName().equals(fullName)) { return attr; } } return null; } COM: <s> searches an attribute </s>
funcom_train/30043203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerSprite(BasicUnit g) { // if no Network ID set, then give it this core's if (g.getNetworkId() == -1) { g.setNetworkId(net_id); } // is this a player controlled unit? if (g.getNetworkId() == net_id && g.getAI() instanceof PlayerControl) { player = g; } // add to core and engine subUnits.add(g); engine.registerKinetic(g); } COM: <s> adds a sprite to the game </s>
funcom_train/45618258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MasterServer open() { // Create the dialog window Shell shell = new Shell(getParent(), getStyle()); shell.setText(getText()); createContents(shell); shell.pack(); shell.open(); Display display = getParent().getDisplay(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } // Return the entered value, or null return newMaster; } COM: <s> opens the dialog and returns the input </s>
funcom_train/19562743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runSqlCommand(String sqlText) { try { fSqlThread = new SqlRunnable(sqlText, this); fSqlThread.start(); } catch(Exception ex) { SqoolerPlugin.log(IStatus.ERROR, ex.getMessage(), ex); SqlView.errorLog(ex.getMessage()); } } COM: <s> run sql statement </s>
funcom_train/26438208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getDescriptors() { //System.out.println("[World.getDescriptors()] excessDemand / price = // " // + excessDemand + " / " + price); descriptors.clear(); descriptors.add( new IntegerDataDescriptor( this, "ExcessDemand", "excessDemand", excessDemand, false)); descriptors.add( new IntegerDataDescriptor(this, "Price", "price", price, false)); descriptors.add( new IntegerDataDescriptor( this, "Maximum memory size", "maximumMemorySize", maximumMemorySize, true)); return descriptors; } COM: <s> add to the bottom panel the variables resp parameters to observe resp </s>
funcom_train/27825169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getConcepts() throws KAONException { synchronized (getLock()) { Set set=new HashSet(); EntityID[] entityIDs=m_oimodelSource.getConcepts(); for (int i=0;i<entityIDs.length;i++) { Concept concept=getConcept(entityIDs[i]); set.add(concept); } return set; } } COM: <s> returns all concepts of this ontology </s>
funcom_train/8631329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getFloat(int columnIndex) throws SQLException { Object o = get(columnIndex); if (o != null && !(o instanceof Number)) { return Float.parseFloat(o.toString()); } return o == null ? 0 : ((Number) o).floatValue(); } COM: <s> returns the value as a float </s>
funcom_train/17806101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMaxBandwidthPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PhysicalConnector_MaxBandwidth_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PhysicalConnector_MaxBandwidth_feature", "_UI_PhysicalConnector_type"), CtbPackage.Literals.PHYSICAL_CONNECTOR__MAX_BANDWIDTH, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the max bandwidth feature </s>
funcom_train/22928923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isShutdown() { boolean shutdown = !serverThread.isAlive() && serverSocket.isClosed(); for (Iterator iter = sessions.values().iterator(); iter.hasNext();) { SessionInfo sessionInfo = (SessionInfo) iter.next(); shutdown = shutdown && sessionInfo.socket.isClosed() && !sessionInfo.thread.isAlive(); } return shutdown; } COM: <s> return true if this server is fully shutdown i </s>
funcom_train/30041726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResponseContainer processSendTimeDecoupled(Destination destination, Message message) throws InterruptedException, NotFoundException { MessageEvent event = _controller.createEvent(destination, message, false); _controller.putEvent(event); ResponseContainer responseContainer = new ResponseContainer(message.getID()); responseContainer.add(new Response(InteractionSignal.MSG_BUFFERED, null)); return responseContainer; } COM: <s> processes a send request into the messaging server </s>
funcom_train/6353485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showWindow(boolean visible) { AssertUtils.assertNotDisposed(this); if (_frame == null && _dialog == null) throw new IllegalStateException( "Must first call initWindowGraphic()."); if (_frame != null) { if (visible && !_frame.isDisplayable()) _frame.pack(); _frame.setVisible(visible); } else if (_dialog != null) { if (visible && !_dialog.isDisplayable()) _dialog.pack(); _dialog.setVisible(visible); } // handle post-realization // / nothing to do } COM: <s> if true shows the delegate window after first packing it if not already </s>
funcom_train/1674830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isProvisional(long logEntryLsn, long ckptEndLsn) { assert logEntryLsn != DbLsn.NULL_LSN; switch (this) { case NO: return false; case YES: return true; case BEFORE_CKPT_END: return ckptEndLsn != DbLsn.NULL_LSN && DbLsn.compareTo(logEntryLsn, ckptEndLsn) < 0; default: assert false; return false; } } COM: <s> determines whether a given log entry should be processed during </s>
funcom_train/45247928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JRadioButton getJRadioButtonRaizNao() { if (jRadioButtonRaizNao == null) { jRadioButtonRaizNao = new JRadioButton(); jRadioButtonRaizNao.setText("Não"); jRadioButtonRaizNao.setSize(new Dimension(69, 23)); jRadioButtonRaizNao.setLocation(new Point(538, 61)); jRadioButtonRaizNao.setOpaque(false); } return jRadioButtonRaizNao; } COM: <s> this method initializes j radio button raiz nao </s>
funcom_train/46999725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAppTitle() { // Set the title for the app to be informative String userString = ""; if (EquipManager.isEquipEnabled()) { User thisUser = UserRegistry.getLocalUser(); userString = " (user: " + (String) (thisUser).getAttribute(UserRegistry.USER_NAME) + ")"; } containerFrame.setTitle("MiMeG v1.0 " + userString); } COM: <s> helper for getting user information on the main window </s>
funcom_train/10985321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getWebContinuationsDataBeanList() { List beanList = new ArrayList(); for(Iterator it = this.forest.iterator(); it.hasNext();) { beanList.add(new WebContinuationDataBean((WebContinuation) it.next())); } return beanList; } COM: <s> get a list of all web continuations data only </s>
funcom_train/48145540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JFreeChart createChart(ValueDataset dataset) { CompassPlot plot = new CompassPlot(dataset); plot.setSeriesNeedle(7); plot.setSeriesPaint(0, Color.red); plot.setSeriesOutlinePaint(0, Color.red); plot.setRoseHighlightPaint(Color.CYAN); JFreeChart chart = new JFreeChart(plot); return chart; } COM: <s> creates a chart </s>
funcom_train/3561228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void saveStructure() throws DbException { TableStructureCatcher catcher; catcher = new TableStructureCatcher(); catcher.setArrays(names, types, displaySize, defaultValues); try { catcher.saveScript(getFileName()); } catch (IOException e) { throw new DbException(e.getMessage()); } } COM: <s> saves table structure into a file local config path tablename </s>
funcom_train/625958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startTest(String name) throws EveException, IOException, ClassNotFoundException { if(name == "MBM"){ //this.myMMD = "uml14"; this.myServiceName = name; System.out.println("Starting the test for MBM service"); this.checkService(); } if(name == "NOP"){ //this.myMMD = "uml14"; this.myServiceName = name; System.out.println("Starting the test for NOP service"); this.checkService(); } } COM: <s> starts the test for the particular service </s>
funcom_train/18742175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int retrieveEndOfRightParenthesisPosition(int start, int end) { this.scanner.resetTo(start, end); try { int token; while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) { switch (token) { case TerminalTokens.TokenNameRPAREN: return this.scanner.currentPosition; } } } catch (InvalidInputException e) { // ignore } return -1; } COM: <s> this method is used to retrieve the position after the right parenthesis </s>
funcom_train/3770083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BitSetMask computeApplicableMethod(Class[] args) { AnnotationSetMap[] annotations=this.annotations; BitSetMask bits=new BitSetMask( annotations[0].get(args[0])); for(int i=args.length;--i>0;) { // compute annotation bits.and(annotations[i].get(args[i])); } return bits; } COM: <s> compute applicable method if all classes are already </s>
funcom_train/46473423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadDocument() throws JDOMException, IOException { SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser", true); builder.setFeature("http://apache.org/xml/features/validation/schema", true); File file = new File(projectFile); project = builder.build(file); } COM: <s> this method loads the project document </s>
funcom_train/42521218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean goalScoringOpportunity(Instant instant) { if (instant.outcome.condition < 1) return false; if (instant.outcome.condition == Constants.RES_ShotOff || instant.outcome.condition == Constants.RES_ShotOffCorner || instant.outcome.condition == Constants.RES_ShotOnDefender || instant.outcome.condition == Constants.RES_Goal) { return true; } else { return false; } } COM: <s> checks whether an instant has a goal scoring opportunity as an outcome </s>
funcom_train/10681066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getClassSignature(long classID) { // Create new command packet CommandPacket commandPacket = new CommandPacket( JDWPCommands.ReferenceTypeCommandSet.CommandSetID, JDWPCommands.ReferenceTypeCommandSet.SignatureCommand); commandPacket.setNextValueAsReferenceTypeID(classID); ReplyPacket replyPacket = checkReply(performCommand(commandPacket)); return replyPacket.getNextValueAsString(); } COM: <s> gets class signature for specified class id </s>
funcom_train/14454702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node findNode( Node n, String fn ) throws Exception { if( ( n.fileName.compareTo( fn ) == 0 ) ) { return n; } if( n.hasChildren() ) { for( int i = 0; i < n.children.size(); i++ ) { Node child = ( ( Node )n.children.get( i ) ); return findNode( child, fn ); } } throw new Exception( "Node not found" ); } COM: <s> searches the tree for a node </s>
funcom_train/49609836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRowIndexByItem( String item ) { Object[] row; String itemFieldRow; for ( int rowIndex = 0; rowIndex < getRowCount(); rowIndex++ ) { row = getRow(rowIndex); itemFieldRow = (String) row[0]; if ( itemFieldRow.equals(item) ) return rowIndex; } return -1; } COM: <s> get row index by item name </s>
funcom_train/22710395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void store() { String oldValue = this.preferenceStore.getString(this.preferenceName); String newValue = this.convertToSetOfRGBWithBoundaries().toString(); this.preferenceStore.setValue(this.preferenceName, newValue); this.preferenceStore.firePropertyChangeEvent(this.preferenceName, oldValue, newValue); } COM: <s> stores the boundaries into the preferences </s>
funcom_train/32862985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeCard(Card card, Integer quantity) { if(this.cards.containsKey(card)) { Integer currentQuantity = this.cards.get(card); if(quantity >= currentQuantity) { this.cards.remove(card); } else { this.cards.put(card, currentQuantity - quantity); } } } COM: <s> removes a variable number of instances of a specified card from the </s>
funcom_train/43244892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsLocked() { System.out.println("isLocked"); String key = ""; Session instance = new Session(); boolean expResult = true; boolean result = instance.isLocked(key); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of is locked method of class org </s>
funcom_train/27727564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VectorN append(VectorN in) { int length = this.length + in.length; VectorN out = new VectorN(length); for (int i = 0; i < this.length; i++) { out.x[i] = this.x[i]; } for (int i = 0; i < in.length; i++) { int j = i + this.length; out.x[j] = in.x[i]; } return out; } COM: <s> construct a vector by appending a vector to this vector </s>
funcom_train/44304522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ValueSet toValueSet() throws MelbaException { ArrayList v = new ArrayList(); for (int i = 0; i < lst.size(); i++) { v.add(getSchemaValue(i).toValue()); } return new ValueSet(ConstList.createConfidence(v)); } COM: <s> convert to a code value set code with the default code column code </s>
funcom_train/44702707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean startPoll(String channel) { if (channel==null) { throw new IllegalArgumentException("channel was null."); } // No answers in the poll. if (answers.size()<1) { return false; } // poll started already. if (this.channel!=null) { return false; } this.channel=channel; return true; } COM: <s> start this poll in the given channel </s>
funcom_train/3428617
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DTMAxisIterator setStartNode(int node) { _startNode = node; // If the arugment to the function is a node set, set the // context node on it. if (_keyValueIterator != null) { _keyValueIterator = _keyValueIterator.setStartNode(node); } init(); return super.setStartNode(node); } COM: <s> set context node for the iterator </s>
funcom_train/23279066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFromWaitList(Class clazz, long id) { ConcurrentKey concurrent = new ConcurrentKey(clazz,id); Integer numberWaiting = numberWaiting(clazz,id); if(numberWaiting != -1) { if(numberWaiting==0) map.remove(concurrent); else { numberWaiting -= 1; map.remove(concurrent); map.put(concurrent,numberWaiting); } } } COM: <s> used to delete actions from an awaiting action list </s>
funcom_train/43245919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetPlaceOfBirthState() { System.out.println("setPlaceOfBirthState"); String placeOfBirthState = ""; PatientDataObject instance = new PatientDataObject(); instance.setPlaceOfBirthState(placeOfBirthState); // 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 place of birth state method of class org </s>
funcom_train/32191659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int searchBook(String isbn, int id) { int index = -1; int i = 0; boolean found = false; while ((!found) && (borrowingArray[i] != null))// linear search { if (borrowingArray[i].getIsbn().equalsIgnoreCase(isbn) && (borrowingArray[i].getId() == id) && (borrowingArray[i].getDateReturned() == null)) { index = i; found = true; } i++; } return index; } COM: <s> searches for a book in the borrowing array given its isbn and the </s>
funcom_train/49266239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveToFile(File file) throws IOException { Element root = new Element("mqProbeConnectionDataRepository"); Document doc = new Document(root); for(MQQueueManagerData mqData : repository) { root.addContent(mqData.asJDOMElement()); } XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat()); FileOutputStream fos = new FileOutputStream(file); outputter.output(doc, fos); fos.close(); } COM: <s> saves repository to file </s>
funcom_train/4358322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer("SecurityConstraint["); for (int i = 0; i < collections.length; i++) { if (i > 0) sb.append(", "); sb.append(collections[i].getName()); } sb.append("]"); return (sb.toString()); } COM: <s> return a string representation of this security constraint </s>
funcom_train/43244919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetMaxiumConnections() { System.out.println("setMaxiumConnections"); int maxiumConnections = 0; ServerStatusObject instance = new ServerStatusObject(); instance.setMaxiumConnections(maxiumConnections); // 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 maxium connections method of class org </s>
funcom_train/36003209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runAnt(final File antFilesDir, final String scriptName) { Project project = new Project(); project.init(); ProjectHelper.getProjectHelper().parse(project, new File(antFilesDir, scriptName)); project.executeTarget(project.getDefaultTarget()); } COM: <s> submit execution of an ant script </s>
funcom_train/7335831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void overwrite(Map attributes) { // docroot String docroot = (String) attributes.get(Constants.DOCROOT.getSessionname()); if (docroot != null) { setDocroot(docroot); } //cachedir String cachedir = (String) attributes.get(Constants.CACHEDIR.getSessionname()); if (cachedir != null) { setCachedir(cachedir); } if ((cachedir == null) && (docroot != null)) { setCachedir(null); } } COM: <s> overwrites over existing attributes values </s>
funcom_train/1576227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChild(final IExpression child) throws GamlException { final short[] types = getExpectedChildTypes(); try { if ( child.type() != IType.NO_TYPE && types != null ) { verifyType(types, child.type()); } } catch (final GamlException e) { e.addContext("in operand of " + name + " [expected :" + getExpectedChildTypesAsString() + "]"); throw e; } this.child = child; } COM: <s> sets the child </s>
funcom_train/37017946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DveMPanel addPanel(){ DveMAppearance appearance= new DveMAppearance(getMAppearance(), theParentMap); MPanel tmpPanel= new MPanel(appearance, "", ""); DveMPanel panel= new DveMPanel(tmpPanel, theParentMap, false); panel.addCard(false); addNext(panel); // Add in the container resetBounds(false); panel.first(false,false); return panel; } COM: <s> add a new empty panel to the container </s>
funcom_train/37822832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawRight(Graphics2D g) { Paint gp = new GradientPaint(0, 0, NODESTACKVIEW_OWNER_COLOR_LEFT, getWidth(), 0, NODESTACKVIEW_OWNER_COLOR_RIGHT); g.setPaint(gp); int xpoints[] = {0, getWidth(), 0}; int ypoints[] = {0, getHeight() / 2, getHeight()}; g.fillPolygon(xpoints, ypoints, 3); } COM: <s> draws a triangle which points to the right with a gradient </s>
funcom_train/17938572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBrushValue(int index, float brushValue) { if ((brushValue > 0.0f) && (brushValues[index] == 0.0f)){ numBrushed++; } else if ((brushValue == 0.0f) && (brushValues[index] > 0.0f)){ numBrushed--; } this.brushValues[index] = brushValue; } COM: <s> indexed setter for property brush value </s>
funcom_train/11647571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerBeanClass(Class beanClass) throws IntrospectionException { if ( ! registeredClasses.contains( beanClass ) ) { register(beanClass, null); } else { if ( log.isWarnEnabled() ) { log.warn("Cannot add class " + beanClass.getName() + " since it already exists"); } } } COM: <s> p register a bean class and add mapping rules for this bean class </s>
funcom_train/43884587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object parse() { if (thread == null) { Runnable runnable = new Runnable() { public void run() { try { parser.parse(input, handler); } catch (Exception e) { //close the buffer handler.getBuffer().close(); throw new RuntimeException(e); } } ; }; thread = new Thread(runnable); thread.start(); } return handler.getBuffer().get(); } COM: <s> streams the parser to the next element in the instance document which </s>
funcom_train/4918047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRepeatedShortFlag() throws Exception { this.record_Factory(COMMAND, "short", "s", false); this.record_Command(COMMAND, "short", "s"); this.record_Argument(COMMAND, "short", null); this.record_Argument(COMMAND, "short", null); this.doTest("-s -s", COMMAND); } COM: <s> ensure can parse command with repeated short flag </s>
funcom_train/457261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTimeSheet(final String projectGuid, final Date fromTime, final Date toTime, final String person, final String company, final Boolean declarable) throws OpsAuthenticationException, OpsProjectException { log.debug( "getTimeSheet()" ); try { return OpsTimesheet.getTimeSheet( projectGuid, fromTime, toTime, person, company, declarable ); } catch (final OpsTimesheetException e) { throw new OpsProjectException(e); } } COM: <s> return a xml output of all timesheet events matching the given constraints </s>
funcom_train/37518370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_goodSpec_1() { try { saveAs( "GoodSpec1.java", "public class GoodSpec1 {" + NEWLINE + " public void m( Object o ) { }" + NEWLINE + " public void m( Object@Number[] o ) { }" + NEWLINE + "}" ); CompilationResults results = compile( "GoodSpec1.java" ); expectSuccess( results ); } finally { remove( "GoodSpec1.java" ); } } COM: <s> typechecker should allow specialization of object to any </s>
funcom_train/9027074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndex() { Node parent = getParentNode(); if (parent == null) { return -1; } NodeList childNodes = parent.getChildNodes(); int length = childNodes.getLength(); for (int i = 0; i < length; i++) { if (childNodes.item(i) == this) { return i; } } return -1; } COM: <s> return the index in its parents node list element </s>
funcom_train/816843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean stopDerby(){ log.info("Entering StartDerbyServerThread.stopDerby()"); try{ if ( server == null ) { server = new NetworkServerControl(); } server.shutdown(); } catch ( Exception ex ){ log.debug( ex ); return false; } log.info("Done with StartDerbyServerThread.stopDerby()"); return true; } COM: <s> stops the server </s>
funcom_train/2845358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(AnnotationFile af, Writer out) throws IOException { AnnotationFileWriter afw = new AnnotationFileWriter(af); StringWriter str; str = new StringWriter(); afw.write(str); str.close(); out.write(str.getBuffer().toString()); if (af != null) af.setSaved(true); out.close(); } COM: <s> writes the given annotatino file to the writer object </s>
funcom_train/5339746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void error(Throwable problem, String msg) { // ThreadDeath must NOT be caught, or a thread will be left zombied if(problem instanceof ThreadDeath) throw (ThreadDeath)problem; else { Runnable doWorkRunnable = new Error(problem, msg); GUIMediator.instance().schedule(doWorkRunnable); } } COM: <s> displays the error to the user with a specific message </s>
funcom_train/43096852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNoElements() { Model.getPump().flushModelEvents(); try { list.getElementAt(0); fail(); } catch (ArrayIndexOutOfBoundsException a) { } assertTrue(list.size() == 0); assertTrue(Model.getFacade().getElementResidences(elem).isEmpty()); } COM: <s> test getting an element when there is none </s>
funcom_train/22718587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Boolean hasChildNodes(Node n) { boolean flag = n.hasChildNodes(); if (flag && XMLUnit.getIgnoreComments()) { List nl = nodeList2List(n.getChildNodes()); flag = nl.size() > 0; } return flag ? Boolean.TRUE : Boolean.FALSE; } COM: <s> tests whether a node has children taking ignore comments </s>
funcom_train/5322122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init() { feedbackPanel = new JFeedbackPanel(); buttonPanel = createButtonPanel(); getContentPane().setLayout(new BorderLayout()); getContentPane().add(feedbackPanel, BorderLayout.CENTER); getContentPane().add(buttonPanel, BorderLayout.SOUTH); pack(); } COM: <s> initialize the dialog ui </s>
funcom_train/49249653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createPropertieINput(DefaultValueTypeProperty prop){ JTextField jtf = new JTextField(3); // property default value jtf.setText(prop.getValue()); jtf.setPreferredSize(new Dimension(200,20)); jtf.setMaximumSize(new Dimension(200,20)); // proprpety name JLabel jl = new JLabel(prop.getName()); propertiesPanel.add(jl); propertiesPanel.add(jtf); } COM: <s> create a property in properties panel </s>
funcom_train/31456840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(int cpu_cycles) { while (cpu_cycles > 0) { if ( !isTraced() ) { vm.execute(cpu_cycles); return; } waiting.set(this); TraceState state = TraceState.TRACE; try { state = trace.take(); } catch (InterruptedException ie) { Log.exception(Log.WARNING, "Interrupted while waiting for command", ie); } if ( state == TraceState.UPDATE ) { vm.execute(cpu_cycles); return; } if ( state == TraceState.STEP ) { vm.execute(1); cpu_cycles--; } } } COM: <s> step the organisms cpu several cycles </s>
funcom_train/49046746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getJRadioButtonMenuItem4() { if (tankOpt4 == null) { tankOpt4 = new JRadioButtonMenuItem(); tankOpt4.setText("50"); //tankOpt4.setPreferredSize(new Dimension(10,10)); tankOpt4.setBorder(null); } return tankOpt4; } COM: <s> this method initializes tank opt4 </s>
funcom_train/36931167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean invert() { double determinant = determinant(); if (Math.abs(determinant) <= Float.MIN_VALUE) { return false; } double t00 = m00; double t01 = m01; double t02 = m02; double t10 = m10; double t11 = m11; double t12 = m12; m00 = t11 / determinant; m10 = -t10 / determinant; m01 = -t01 / determinant; m11 = t00 / determinant; m02 = (t01 * t12 - t11 * t02) / determinant; m12 = (t10 * t02 - t00 * t12) / determinant; return true; } COM: <s> invert this matrix </s>
funcom_train/45919836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int executeQueryAndCountResults(VirtGraph virtGraph, String qry) { Query sparql = QueryFactory.create(qry); VirtuosoQueryExecution vqe = VirtuosoQueryExecutionFactory.create (sparql, virtGraph); ResultSet rs = vqe.execSelect(); int count = 0; while(rs.hasNext()) { rs.next(); count++; } return count; } COM: <s> executes a query on the given graph </s>
funcom_train/38552339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMax( String max ) { Cube42NullParameterException.checkNull(max, "max", "setMax", this); try { this.max = Double.parseDouble(max); } catch (NumberFormatException e) { Logger.error(PropertiesSystemCodes.IMPROPER_VALUE_FORMAT, new Object[] {max, this.getName(), "Double"}); this.max = DEFAULT_DOUBLE_VALUE; } } COM: <s> sets the max value </s>
funcom_train/29922356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkUserAddress(InboundMessage inboundMessage, String fromAddress) { IdLookup checker = new IdLookup(); inboundMessage.setUserId(checker.getUserId(fromAddress)); if(inboundMessage.getUserId() != null){ //System.out.println("Valid User email address"); return true; }else{ System.out.println("Invalid User email address"); return false; } } COM: <s> check email interface user exist in the system </s>
funcom_train/42818962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String persistAuthentication() { if (authenticationHome.getInstance().getPassword() == null) { // New Authentication if (StringUtils.isEmpty(getPassword())) { return passwordNotDefined(); } else { if (passwordAreEquals()) { encodePassword(); return authenticationHome.persist(); } else { return passwordNotEquals(); } } } else{ if(!StringUtils.isEmpty(getPassword())){ // Update Authentication if(passwordAreEquals()){ encodePassword(); return authenticationHome.update(); } else{ return passwordNotEquals(); } } else return authenticationHome.update(); } } COM: <s> persist the authentication after encrypting the password </s>
funcom_train/51604231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Map collectAttributesForPath(String path) { Map attrs = new TreeMap(); int len = path.length(); Iterator i = modelSequence.iterator(); while (i.hasNext()) { String key = (String) i.next(); if (key.length() <= len) continue; if (key.startsWith(path + ".")) { FieldDesc attr = (FieldDesc) model.get(key); attrs.put(new Integer(attr.getSequence()), attr); } } return attrs; } COM: <s> load all attributes for this path </s>
funcom_train/34279974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyProgramCounterObservers() { // why -1? int address = getProgramCounter(); actualAddress = address; // Notify all program counter observers if (!programCounterObservers.isEmpty()) { try { for (ProgramCounterObserver o : programCounterObservers) { o.update(address); } } catch (Exception e) { System.err.println("A bug happened"); } } } COM: <s> notify all objects observing this processors program counter that the </s>
funcom_train/18518076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSaveCommand1() { if (saveCommand1 == null) {//GEN-END:|100-getter|0|100-preInit // write pre-init user code here saveCommand1 = new Command("Save", Command.OK, 0);//GEN-LINE:|100-getter|1|100-postInit // write post-init user code here }//GEN-BEGIN:|100-getter|2| return saveCommand1; } COM: <s> returns an initiliazed instance of save command1 component </s>
funcom_train/11644712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEscapedQuote_LANG_477() { String pattern = "it''s a {0,lower} 'test'!"; ExtendedMessageFormat emf = new ExtendedMessageFormat(pattern, registry); assertEquals("it's a dummy test!", emf.format(new Object[] {"DUMMY"})); } COM: <s> test bug lang 477 out of memory error with escaped quote </s>
funcom_train/7822470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performTask() { String uploaderUrl = Config.getInstance().getUploaderUrl(); Hashtable params = new Hashtable(); params.put("description", description); HttpMultipartUploader uploader = new HttpMultipartUploader(uploaderUrl, params, "image", "image", "image/jpeg", data); try { uploader.send(); } catch (IOException e) { e.printStackTrace(); // To change body of catch statement use File | // Settings | File Templates. } } COM: <s> actual process of uploading an image using http multipart post </s>
funcom_train/31805277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildServerList(){ // read the server list from the properties Resource res = Resource.getResourceFor("aglets"); String list = res.getString("aglets.addressbook"); // add all the items if (list != null && list.equals(currentList) == false) { currentList = list; _servers.removeAll(); String items[] = res.getStringArray("aglets.addressbook", " "); for (int i = 0; i < items.length; i++) { _servers.addItem(items[i]); } } } COM: <s> a method to build the aglets servers list </s>
funcom_train/18304677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendOpenBlockQuoteTag(String style) { StringBuffer sb = new StringBuffer("<blockquote"); if (style != null) { sb.append(" style=\""); sb.append(style); sb.append("\""); } sb.append(">"); text.append(sb.toString()); } COM: <s> appends a tag that indicates that a blockquote section begins </s>
funcom_train/44832785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxLength(Integer maxLength) { Integer result = (Integer) ComponentUtils.invokeMethod(getPage().getHandler(), getMethod("onSetMaxLength"), new Object[] {maxLength}); this.maxLength = (result != null) ? result : maxLength; } COM: <s> setter for property max length </s>
funcom_train/4369675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printLog(String log) { try { FileWriter fileWriter = new FileWriter(logFile,true) ; PrintWriter writer = new PrintWriter(fileWriter) ; writer.println("["+new Date()+"] "+log); writer.close(); } catch (IOException e) { logger.log(Level.SEVERE,"Cannot write to log file: "+logFile,e) ; } } COM: <s> write a message in the log file </s>
funcom_train/7532071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String findPrefix(String left, String right, int common) { int len = Math.min(left.length(), right.length()); int i; for (i = common; i < len; i++) if (left.charAt(i) != right.charAt(i)) break; return right.substring(0, i + 1); // i+1 } COM: <s> finds the common prefix for two strings </s>
funcom_train/10508593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isMorePowerfulThanExcludes(String name) { final String soughtexclude = name + File.separatorChar + SelectorUtils.DEEP_TREE_MATCH; for (int counter = 0; counter < excludePatterns.length; counter++) { if (excludePatterns[counter].toString().equals(soughtexclude)) { return false; } } return true; } COM: <s> find out whether one particular include pattern is more powerful </s>
funcom_train/51708929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMatchPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_CollectionTemplateExp_match_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CollectionTemplateExp_match_feature", "_UI_CollectionTemplateExp_type"), QvttemplatePackage.Literals.COLLECTION_TEMPLATE_EXP__MATCH, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the match feature </s>
funcom_train/7655102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object that) { if (that instanceof UnresolvedPrincipal) { UnresolvedPrincipal up = (UnresolvedPrincipal) that; return klass.equals(up.klass) && (name == null ? up.name == null : name.equals(up.name)); } if (that instanceof Principal) { return implies((Principal) that); } return false; } COM: <s> returns code true code if compared object is a principal </s>
funcom_train/1823553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getText(final String key) { try { return resourceBundle.getString(key); } catch (java.util.MissingResourceException e) { String[] labelpath = key.split("\\."); LOG.debug("No resource bundle or no translation found for the key : " + key); return labelpath[labelpath.length - 1]; } } COM: <s> get the i18 n text from the language file associated with this instance </s>
funcom_train/12651648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFirst(List<EligibilityCriterion> criterionList) { if (criterionList == null) return; ArrayList<EligibilityCriterion> clone = new ArrayList<EligibilityCriterion>(criterionList.size()); for (EligibilityCriterion child : criterionList) clone.add((EligibilityCriterion)child.clone()); super.addFirst(clone); // Enable the undo button undoButton.setEnabled(true); // Update the last modified lastModified = System.currentTimeMillis(); updateLastModifiedLabel(); } COM: <s> push deep cloned list onto stack so we can independently change original version </s>
funcom_train/131225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getMixerDetails () { try { sendHeader (PLAYER_MSGTYPE_REQ, PLAYER_AUDIO_REQ_MIXER_CHANNEL_LIST, 0); os.flush (); } catch (IOException e) { throw new PlayerException ("[Audio] : Couldn't send request: " + e.toString(), e); } } COM: <s> request subtype mixer channel list req request the list of channels </s>
funcom_train/8012409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean hasComponent(HtmlContainer cont, HtmlComponent component) { Enumeration e = cont.getComponents(); HtmlComponent c = null; while (e.hasMoreElements()) { c = (HtmlComponent) e.nextElement(); if (c == component) return true; else if (c instanceof HtmlContainer) { if (hasComponent((HtmlContainer) c, component)) return true; } } return false; } COM: <s> recursively determins whether a container contains a component </s>
funcom_train/49469020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endDocument(Augmentations augs) throws XNIException { ArrayList<String> missingElements = new ArrayList<String>(); // Did we found all the key elements ? if (checkElements != null && checkElements.size() != 0) { _logger.error("Didn't found the elements "+checkElements+" in XML file."); checkedOk = false; } } COM: <s> override the end document from xerces document parser </s>
funcom_train/4922876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetWithParametersAndFragments() throws Exception { this.handler.handlePath("/path"); this.handler.handleHttpParameter("FirstName", "Daniel"); this.handler.handleHttpParameter("LastName", "Sagenschneider"); this.handler .handleQueryString("FirstName=Daniel&LastName=Sagenschneider"); this.handler.handleFragment("fragment"); this .doTest( "GET", "/path?FirstName=Daniel&LastName=Sagenschneider#fragment", null); } COM: <s> ensures able to parse get with parameters and fragments </s>
funcom_train/37591281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _toggleCustomManifest() { _editManifest.setEnabled(_customManifest.isSelected() && (_jarClasses.isSelected() || _jarAll.isSelected())); _setEnableExecutable(!_customManifest.isSelected() && (_jarClasses.isSelected() || _jarAll.isSelected())); } COM: <s> toggles the enabled state on edit manifest </s>
funcom_train/42954368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void flip(Stack<Integer> pilha, int stackSize, int elementPosition) { ArrayList<Integer> bufferList = new ArrayList<Integer>(); for(int i = 0; i <= elementPosition; i++){ bufferList.add(pilha.pop()); } for(int i = 0; i <= elementPosition; i++){ pilha.push(bufferList.get(i)); } saida.printf("%d ", (pilha.size() - elementPosition)); } COM: <s> flips the sub stack with element position </s>
funcom_train/17664674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRCNOfPatientWithPatNum(int patnum) throws Exception { try { Statement stmt = getConnection().createStatement(); ResultSet rs = stmt.executeQuery("Select RCN FROM patient P WHERE P.PatNum = " + patnum); rs.first(); return rs.getInt(1); } catch (Exception e) { e.printStackTrace(); throw new Exception("failed on getting rcn from internal id "+patnum, e); } } COM: <s> returns int rcn of patient with given patnum </s>
funcom_train/24534380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getChildRoot(BeanPart bean, BeanPart child,EStructuralFeature sf) { if (bean == null || child == null) return null ; if (child.getEObject().eContainer().equals(bean.getEObject())) return child.getEObject() ; else return child.getEObject().eContainer() ; } COM: <s> parent child relationship may be aggregated by a middle object e </s>
funcom_train/18745278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeFromNodeInEdgeMap(Map<N,Set<E>> currentMap, E edge) { if (currentMap != null) { Set<E> edgeSet = currentMap.get(edge.target()); if (edgeSet != null) { edgeSet.remove(edge); } } } COM: <s> removes an incoming edge from a given node to edgeset mapping </s>
funcom_train/5899852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fixSelectedIndex(int j) { if (!_selItems.isEmpty()) { int realj = getRealIndex(j); if (realj < 0) realj = 0; if (realj < _items.size()) { for (Iterator<Listitem> it = _items.listIterator(realj); it.hasNext(); ++j) { final Listitem item = it.next(); if (item.isSelected()) { _jsel = j; return; } } } } _jsel = -1; } COM: <s> fix the selected index jsel assuming there are no selected one before </s>
funcom_train/37482647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double valueAt(double x) { double temp = 0.0; for (int i = 0; i < multiplet.size(); i++) { diff = x - p(CENTROID + i); exp = Math.exp(-B * diff * diff / (p(WIDTH + i) * p(WIDTH + i))); temp += p(AREA + i) / p(WIDTH + i) * A * exp; } return temp; } COM: <s> calculates the gaussian with background at a given x </s>
funcom_train/19174569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean bikeIsOn() { boolean status = true; for (int i = 0; i < numberOfSampleSections; i++) { status = status && (sections.get(i + 2).size() == sections.get( i + 2 + numberOfSampleSections).size()); } return status; } COM: <s> checks if bike function is on </s>
funcom_train/37449172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() throws IntactException { IntactHelper helper = getIntactHelper(); myDatabaseName = helper.getDbName(); // Initialize the Protein factory. Needs a valid to initialize factory values. try { myProteinFactory = new UpdateProteins(); } catch (UpdateProteinsI.UpdateException e) { log.error("", e); throw new IntactException("Unable to create the Protein factory"); } } COM: <s> called by the constructors to initialize the object </s>
funcom_train/16888436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void searchSchemaListForResults(String text) { // arrayOfElements= listToSearch.getItems(); listSchemas.removeAll(); for (int i = 0; i < arrayOfSchemaElements.size(); i++) { if (arrayOfSchemaElements.get(i).toUpperCase().contains( text.toUpperCase())) { listSchemas.add(arrayOfSchemaElements.get(i)); } } } COM: <s> search live for results in the list </s>