__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/40653869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadConfiguration(String configFilename) { try { InputStream in = FileHelper.openFileOrUrl(configFilename); String contents = FileHelper.getContentsFromInputStream(in); in.close(); loadConfigurationFromSpecification(contents.toString()); } catch (IOException e) { Logz.println("" + e); System.exit(-1); } } COM: <s> loads the simulations configuration parameters from the given xml file </s>
funcom_train/43256582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSubId(ComponentContext ctx, String subid) { if (subid.startsWith(this.id) && subid.indexOf("$") != -1) subid = subid.substring(subid.indexOf("$") + 1); ctx.getRequest().setAttribute(this.id + ":" + ATTRIBUTE_SUBID, subid); } COM: <s> sets the subid on the component </s>
funcom_train/51204478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void imagePanelMouseMoved(java.awt.event.MouseEvent evt)//GEN-FIRST:event_imagePanelMouseMoved {//GEN-HEADEREND:event_imagePanelMouseMoved evt.consume(); if(display != null) { Point loc = new Point(evt.getX(), evt.getY()); session.sendMousePosition(MouseInputType.MOUSE_MOVED, loc, evt.getModifiers(), 0); } }//GEN-LAST:event_imagePanelMouseMoved COM: <s> p called when the mouse is moved </s>
funcom_train/3709995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildList (int extension) { int nspectra = file_desc.getNSpectra (extension); data = new String[nspectra][]; // file descriptors support 1-indexed spectra ! for (int i = 0; i < data.length; i++) { data[i] = file_desc.getSpecRepresentation (i+1, extension); } String[] title = file_desc.getSpecRepresentation (0, 0); buildBasicList (data, title); } COM: <s> populates the list object with information from all </s>
funcom_train/11739636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startupAction() { view = new DefaultsPreferencesView(ALL_CONTROL, UNINIT_CONTROL); view.setTitle("Update ObjEntities and Embeddables Java Package"); initController(); view.pack(); view.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); view.setModal(true); makeCloseableOnEscape(); centerView(); view.setVisible(true); } COM: <s> creates and runs the package update dialog </s>
funcom_train/31782139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void receivedCVR( IncomingMessage incomingMessage ) { /* >>> USR [number] TWN I [userName] */ OutgoingMessage outgoingMsg = new OutgoingMessage( Message.USR, getTransactionID() ); outgoingMsg.addArgument( Message.commandToString( Message.TWN ) ); outgoingMsg.addArgument( "I" ); outgoingMsg.addArgument( userName ); sc.sendMSNPMessage( outgoingMsg ); } COM: <s> called when an cvr message is </s>
funcom_train/47193504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getInputBox() { if (InputBox == null) { InputBox = new JTextField(); InputBox.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent e) { if (e.getKeyChar() == '\n') send(Commands.SEND, InputBox.getText()); } }); } return InputBox; } COM: <s> this method initializes input box </s>
funcom_train/31095201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Glyph getGlyph( int code ) { if( glyphLookup == null ) { glyphLookup = new HashMap(); for( Iterator it = glyphs.iterator(); it.hasNext(); ) { Glyph g = (Glyph)it.next(); glyphLookup.put( new Integer( g.code ), g ); } } Glyph g = (Glyph)glyphLookup.get( new Integer( code ) ); return g; } COM: <s> look up a glyph by code </s>
funcom_train/9821958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void build(){ Wire prioritized = wire( i_width, "prioritized" ); new Priority( this, i, prioritized ); if( active == null ) new Encoder( this, prioritized, o, zero ); else new Encoder( this, prioritized, o, zero, active ); } // end build() COM: <s> builds the structural circuit for a priority encoder </s>
funcom_train/45844873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void jSlider_AnimationsStateChanged(javax.swing.event.ChangeEvent e) { if (jSlider_Animations.isEnabled()) { float fAnimSpeed = (jSlider_Animations.getValue() * 0.10f); Manipulator.setBodyAnimationSpeed(character, fAnimSpeed); } } COM: <s> change the speed of the animation </s>
funcom_train/21105958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MJButton getBtBS_Show() { if (btBS_Show == null) { btBS_Show = new MJButton(); btBS_Show.setText("aF3 Show"); btBS_Show.setPreferredSize(new java.awt.Dimension(100, 20)); btBS_Show.setMnemonic(KeyEvent.VK_F3); } return btBS_Show; } COM: <s> this method initializes bt bs show </s>
funcom_train/35848264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveName() throws BadLocationException { Model.getCoreHelper().setName(elem, "test"); Model.getCoreHelper().setName(elem, ""); Model.getPump().flushModelEvents(); assertEquals("", model.getText(0, model.getLength())); } COM: <s> test set name for removal of a name </s>
funcom_train/2272502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setID(String id) { String prefix = WSSecurityUtil.setNamespace(this.element, WSConstants.WSU_NS, WSConstants.WSU_PREFIX); this.element.setAttributeNS(WSConstants.WSU_NS, prefix + ":Id", id); } COM: <s> set wsu id attribute of this signature confirmation element </s>
funcom_train/37148836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private GraphicalNode getGraphicalNode(int x, int y) { Iterator it = myGraphicalNodes.iterator(); while (it.hasNext()) { GraphicalNode gn = (GraphicalNode) it.next(); if (isInRectancle(x, y, gn.x, gn.y, NODE_WIDTH, NODE_HEIGHT)) return gn; } return null; } COM: <s> returns the graphical node at the code x code code y code </s>
funcom_train/9536346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reloadPluginTabPanes() { if (jSplitPaneHorizontal != null) { jTabbedPaneClient = null; jTabbedPaneServer = null; jPanelRight = null; jSplitPaneHorizontal.setLeftComponent(getJTabbedPaneClient()); jSplitPaneHorizontal.setRightComponent(getJPanelRight()); jSplitPaneHorizontal.setDividerLocation(DIVIDER_HORZ); jSplitPaneHorizontal.repaint(); } } COM: <s> this method reloads the tab panes for client and server view </s>
funcom_train/5801913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Message initializeMessage() throws MessagingException, AddressException { Message message; message = new MimeMessage(getSession()); message.setFrom(new InternetAddress(getFrom())); message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(getTo(), false)); message.setSubject(getSubject()); return message; } COM: <s> helper method to that creates a mime message </s>
funcom_train/10237826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextFieldDBuserPasswd() { if (jTextFieldDBuserPasswd == null) { jTextFieldDBuserPasswd = new JTextField(); jTextFieldDBuserPasswd.setBounds(new Rectangle(195, 178, 167, 23)); jTextFieldDBuserPasswd.setHorizontalAlignment(JTextField.CENTER); } return jTextFieldDBuserPasswd; } COM: <s> this method initializes j text field dbuser passwd </s>
funcom_train/25307686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void registerHelper(Bundle bundle, List<?> helpers, Class<?> constructorClass, String descriptorPath) { // Discover server helpers URL configUrl = bundle.getEntry(descriptorPath); if (configUrl == null) { configUrl = bundle.getEntry("/src/" + descriptorPath); } if (configUrl != null) { registerHelper(bundle, helpers, constructorClass, configUrl); } } COM: <s> registers the helpers for a given bundle </s>
funcom_train/48105346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSession(ClientSession session) { DataManager dataMgr = AppContext.getDataManager(); dataMgr.markForUpdate(this); currentSessionRef = session == null ? null : dataMgr .createReference(session); logger.log(Level.INFO, "Set session for {0} to {1}", new Object[] { this, session }); } COM: <s> mark this slime client as logged in on the given session </s>
funcom_train/50939941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(InputStream stream) throws IOException { ObjectInputStream objInputStream = new ObjectInputStream(stream); try { Object obj = objInputStream.readObject(); if (obj instanceof Map) { putAll((Map) obj); } } catch (ClassNotFoundException e) { throw new IOException(e.getMessage()); } finally { objInputStream.close(); } } COM: <s> load the read status of message from a input stream </s>
funcom_train/51420546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isGoOnline() { try { configuratorProxy.goOnline(getBeanName()); } catch (Exception e) { logger.error(TextUtils.formatLogMessage( "resumeMBean", module.getDomainName(), module.getObjectName(), MSGCAT_SYSTEM, ERRORMSG_GENERAL + "-" + e.getMessage()), e); return false; } return true; } COM: <s> state machine action </s>
funcom_train/29063241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addHrefPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IncludeType_href_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IncludeType_href_feature", "_UI_IncludeType_type"), AspectxPackage.eINSTANCE.getIncludeType_Href(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the href feature </s>
funcom_train/35649874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void blankOutInputComponentFields() { if (subForm != null) { if (subForm.getChildren() != null) { Iterator<UIComponent> iterator = subForm.getChildren() .iterator(); while (iterator.hasNext()) { Object comp = iterator.next(); if (comp instanceof UIInput) { /* Reset the submittedValue for this component. */ ((UIInput) comp).setSubmittedValue(null); } } } } } COM: <s> blank out the component fields so users dont see old values </s>
funcom_train/31986554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StandardDrawingView replaceDrawingView(StandardDrawingView newDrawingView) { StandardDrawingView oldDrawingView = findDrawingView(newDrawingView, getContentPane()); if (oldDrawingView != null) { Container parent = ((StandardDrawingView)oldDrawingView).getParent(); parent.remove(oldDrawingView); parent.add(newDrawingView); setDrawingView(newDrawingView); return oldDrawingView; } else { //DrawingView not found return null; } } COM: <s> replace an existing drawing view with a new one </s>
funcom_train/4436565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSessionValid(HttpServletRequest request){ if (request == null) return (false); HttpSession session = request.getSession(); if (session == null) return(false); // Checked for a currently logged on user UserBean user = (UserBean) session.getAttribute(Constants.USER_KEY); return ((user == null) ? false : true); } COM: <s> check to make sure that we have a valid session </s>
funcom_train/35157293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renderBoundsOfObject(GL gl, int id, Model model) { if (id >=0 && id <= model.getNumberOfMeshes()) { if (model.getMesh(id).bounds != null) { drawBounds(gl, model.getMesh(id).bounds); } } } COM: <s> render the desired object of the model specified by an id number of </s>
funcom_train/32316069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIndividualPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ObjectOneOf_individual_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ObjectOneOf_individual_feature", "_UI_ObjectOneOf_type"), OdmPackage.Literals.OBJECT_ONE_OF__INDIVIDUAL, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the individual feature </s>
funcom_train/32094716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void get(boolean copy) { if (sudokuSolver != null) { sudokuSolver.getState(this, copy); } if (solutionPanel != null) { solutionPanel.getState(this, copy); } if (sudokuPanel != null) { sudokuPanel.getState(this, copy); } } COM: <s> gets all necessary gui state information </s>
funcom_train/40702109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void eventsRsvp(Long eventId, RsvpStatus status, AsyncCallback<Boolean> callback) { Json j = new Json (); j.put ( "eid", eventId ).put ( "rsvp_status", status.toString () ); callMethodRetBoolean ( "events.rsvp", j.getJavaScriptObject (), callback ); } COM: <s> sets a users rsvp status for an event </s>
funcom_train/21016912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean intersects(Cell cell) { int thisC = column, thisL = line; int cSpan = cell.columnSpan, lSpan = cell.lineSpan; int c = cell.column, l = cell.line; return ((c + cSpan > thisC) && (l + lSpan > thisL) && (c < thisC + columnSpan) && (l < thisL + lineSpan)); } COM: <s> checks whether or not this cell intersects the given cell </s>
funcom_train/3470293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { nextInputEvents.clear(); allowNextKeyTyped = false; allowNextKeyPressed = false; allowNextMousePressed = false; allowNextMouseReleased = false; allowNextMouseClicked = false; allowNextMouseWheel = false; allowNextMouseMotion = false; isUndoMouseMotion = false; lastMouseMotion = null; } COM: <s> clears the memory of the replay input filter </s>
funcom_train/4389996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void saveFile(String str, File file) throws IOException { ByteArrayInputStream bis = new ByteArrayInputStream(str.getBytes()); InputStreamReader isr = new InputStreamReader(bis); BufferedReader reader = new BufferedReader(isr); FileWriter fw = new FileWriter(file); PrintWriter writer = new PrintWriter(new BufferedWriter(fw)); String line = null; while ((line = reader.readLine()) != null) { writer.println(line); } writer.flush(); writer.close(); } COM: <s> spew the contents of a string object out to a file </s>
funcom_train/31976786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int DB_CLOB_GETVALUE(CommandEvent event, String where, String clobname) throws Exception{ Clob clob = (Clob) event.instance.nv.get(clobname); BufferedReader reader = new BufferedReader(clob.getCharacterStream()); StringBuffer sb = new StringBuffer(); char data[] = new char[4096]; int numread; while((numread = reader.read(data,0,4096)) > 0){ sb.append(data,0,numread); } String str = sb.toString(); event.instance.nv.putValue(where,str); return str.length(); } COM: <s> get the value of specified clob </s>
funcom_train/36254001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { if(updateTimer != null) { updateTimer.cancel(); } try { if(connection != null) { connection.close(); } } catch (SQLException ex) { Logger.getLogger(Accounting.class.getName()).log(Level.SEVERE, null, ex); } if(serverThread != null) { serverThread.interrupt(); } } COM: <s> closes all the connections and stops the database server </s>
funcom_train/40299813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean selectBracketingEntries(final AbsoluteDate date) { try { // select the bracketing elements next = (EarthOrientationParameters) (eop.tailSet(date).first()); previous = (EarthOrientationParameters) (eop.headSet(next).last()); return true; } catch (NoSuchElementException nsee) { previous = null; next = null; return false; } } COM: <s> select the entries bracketing a specified date </s>
funcom_train/12556809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getField(int field, Object defaultValue) { Integer fieldKey = new Integer(field); Object fieldValue = fields.get(fieldKey); if (fieldValue == null) { if (defaultValue == NO_DEFAULT) { throw new FieldEmptyException(); } else { return defaultValue; } } return fieldValue; } COM: <s> gets the requested field contents </s>
funcom_train/12166919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreateElementOutputStateWithNonAtomicElement() { final boolean isElementAtomic = false; ElementOutputStateBuilderImpl builder = new ElementOutputStateBuilderImpl( context, parentOutputState, null, null, false, isElementAtomic); parentOutputState.expects.isSuppressing().returns(false); // Test with null container and layout. doTest(true, false, null, null, FormattingResult.PROCESS, builder); } COM: <s> make sure that if output state is calculated for non atomic element and </s>
funcom_train/17898977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printException(Throwable e) { if (e != null && e != noMoreExceptions) { StringWriter sw = new StringWriter(); PrintWriter out = new PrintWriter(sw); e.printStackTrace(out); textPane.setText(sw.toString()); } else { textPane.setText("Exception stack trace not available."); } textPane.setCaretPosition(0); } COM: <s> prints the specified exceptions stack trace </s>
funcom_train/38330398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeActivation(Rete engine) throws ExecuteException { try { this.theRule.setTriggerFacts(this.getFacts()); Action[] actions = this.theRule.getActions(); for (int idx = 0; idx < actions.length; idx++) { if (actions[idx] != null) { actions[idx].executeAction(engine, this.getFacts()); } else { throw new ExecuteException(ExecuteException.NULL_ACTION); } } this.theRule.resetTriggerFacts(); } catch (ExecuteException e) { throw e; } } COM: <s> the purpose of the method is to execute the actions of the </s>
funcom_train/18001572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getLaterVersionName(String versionName1, String versionName2) { if(versionName1 == null) { if(versionName2 == null) return null; else return versionName2; } else { if(versionName2 == null) return versionName1; else { long value1 = Long.valueOf(versionName1).longValue(); long value2 = Long.valueOf(versionName2).longValue(); return ((value1 > value2)? versionName1 : versionName2); } } } COM: <s> return version name that is later of two </s>
funcom_train/28125214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTimeBetween(Date start, Date end, boolean isRecursive) { if (start.compareTo(end) > 0) { throw new IllegalArgumentException("Start time > end time."); } /* * Candidate for optimization. We essentially get the total time since * start, and subtract off the total time since the end. */ return getTimeSince(start, isRecursive) - getTimeSince(end, isRecursive); } COM: <s> returns the time put into the project between the two given intervals </s>
funcom_train/2027468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeProperty(SessionProperty property) { Checker.nullArg(property, "session property"); ItemName propertyName = property.getName(); if (!hasProperty(property)) { throw new IllegalArgumentException("Property " + propertyName + " is not registered"); } this.properties.remove(propertyName); this.removedProperties.put(propertyName, property); } COM: <s> marks the specified property as removed </s>
funcom_train/1590198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long set(ReadablePartial partial, long instant) { for (int i = 0, isize = partial.size(); i < isize; i++) { instant = partial.getFieldType(i).getField(this).set(instant, partial.getValue(i)); } return instant; } COM: <s> sets the partial into the instant </s>
funcom_train/2628380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetStep() { System.out.println("setStep"); List<StepType> step = new ArrayList(); edu.umd.cs.guitar.model.data.TestCase instance = new edu.umd.cs.guitar.model.data.TestCase(); instance.setStep(step); assertEquals(instance.step,step); } COM: <s> test of set step method of class test case </s>
funcom_train/39544256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executionResumed(RunnableQueue rq) { synchronized (UpdateManager.this) { // System.err.println("Resumed: " + suspendCalled + // " : " + running); if (suspendCalled && !running) { running = true; suspendCalled = false; UpdateManagerEvent ev = new UpdateManagerEvent (this, null, null); fireEvent(resumedDispatcher, ev); } } } COM: <s> called when the execution of the queue has been resumed </s>
funcom_train/1028984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBug11798() throws Exception { if (isRunningOnJdk131()) { return; // test not valid on JDK-1.3.1 } try { this.pstmt = this.conn.prepareStatement("SELECT ?"); this.pstmt.setObject(1, Boolean.TRUE, Types.BOOLEAN); this.pstmt.setObject(1, new BigDecimal("1"), Types.BOOLEAN); this.pstmt.setObject(1, "true", Types.BOOLEAN); } finally { if (this.pstmt != null) { this.pstmt.close(); this.pstmt = null; } } } COM: <s> tests fix for bug 11798 pstmt </s>
funcom_train/26206100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doFlush() { final int arrayLength = this.array.length; int offset = 0; int bytesWritten; do { bytesWritten = this.stream.put(this, this.sessionId, this.id, offset); offset += bytesWritten; } while (offset < arrayLength); this.state = JobLOB.STATE_CLEAN; } COM: <s> flushes the array content of this into job </s>
funcom_train/8059952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void modifyParticipantRoleOfWavelet(Wavelet wavelet, String participant, String role) { appendOperation(OperationType.WAVELET_MODIFY_PARTICIPANT_ROLE, wavelet, Parameter.of(ParamsProperty.PARTICIPANT_ID, participant), Parameter.of(ParamsProperty.PARTICIPANT_ROLE, role)); } COM: <s> modifies the role of a participant in a wavelet </s>
funcom_train/24092697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void timingEvent(float f) { // animation is in the beginning if (animationFrame == AnimationFrame.ONSHOW) { // alpha goes from zero to one AWTUtilities.setWindowOpacity(frame, f); } else { // animation is in the end if (animationFrame == AnimationFrame.ONCLOSE) { // alpha goes from one to zero AWTUtilities.setWindowOpacity(frame, (1 - f)); } } } COM: <s> implements the code timing event code method from code org </s>
funcom_train/6254859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String encode(MessageDigest md, String str) { md.reset(); byte[] digest = md.digest(str.getBytes()); StringBuffer sbuf = new StringBuffer(digest.length * 2); for (int i = 0; i < digest.length; i++) { sbuf.append(hexChars[(digest[i] >>> 4) & 0xF]); sbuf.append(hexChars[digest[i] & 0xF]); } return sbuf.toString(); } COM: <s> returns digest of the given string represented as string of hexadecimal </s>
funcom_train/18047685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getArea() { Point l_originPoint = new Point(0.0, 0.0); int numVertices = vertices.size(); double area = 0; for (int iVertex = 0; iVertex < numVertices; iVertex++) { int iVertexNext = (iVertex == numVertices - 1) ? 0 : iVertex + 1; // clockwise should be positive area -= Point.crossProduct(l_originPoint, vertices.get(iVertex), vertices.get(iVertexNext)); } return area * 0.5; } COM: <s> returns the area of the polygon in degrees squared positive if clockwise </s>
funcom_train/5342068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mousePressed(MouseEvent e) { if(storedPress == e) return; dndArmed = false; storedPress = e; if (table.isPointSelected(e.getPoint()) && SwingUtilities.isLeftMouseButton(e) ) { dndArmed = true; e.consume(); delegate.mousePressed(e); } } COM: <s> ignores the event if it was the stored press allowing </s>
funcom_train/13246546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getNewPasswordLabel() { if (newPasswordLabel == null) { newPasswordLabel = new JLabel(RESOURCE_BUNDLE.getString(ConverterResource.NEW_PASSWORD), SwingConstants.RIGHT); newPasswordLabel.setLabelFor(getNewPasswordField()); } return newPasswordLabel; } COM: <s> returns the label prompting the user to enter their new password </s>
funcom_train/25217664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTranslateHtml(boolean translateHtml) { this.translateHtml = translateHtml; logger.config("translate HTML = " + Boolean.toString(translateHtml) + "\n"); // ResourceBundle bundle = // ResourceBundle.getBundle(getClass().getName()); // bundle.getString(""); } COM: <s> setter for translate html </s>
funcom_train/26019233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rejectSession() { if (logger.isActivated()) { logger.debug("Session invitation has been rejected"); } invitationStatus = INVITATION_REJECTED; // Unblock semaphore synchronized(waitUserAnswer) { waitUserAnswer.notifyAll(); } // Decline the invitation send603Decline(getDialogPath().getInvite(), getDialogPath().getLocalTag()); // Remove the session in the session manager imsService.removeSession(this); } COM: <s> reject the session invitation </s>
funcom_train/19080992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void payMana(int paidColor, int withColor, int amount, ManaPool manas) { if (requiredMana[paidColor] < amount) { throw new InternalError("Cannot pay the required mana : paidColor=" + paidColor + ", withColor=" + withColor + ", amount=" + amount); } requiredMana[paidColor] -= amount; manaPaid[withColor] += amount; manas.manaButtons[withColor].removeMana(amount, StackManager.currentAbility, this); } COM: <s> pay a required mana </s>
funcom_train/15713524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkNode(final Node aNode) { if (aNode instanceof Section && topSectionLevel == null) { topSectionLevel = Integer.valueOf(((Section) aNode).getLevel() .ordinal()); } if (escapeHandler != null) { escapeHandler.escapeNode(aNode); } } COM: <s> this method changes nodes if necessary </s>
funcom_train/10806905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { // this.build(); this.serialize(baos); } catch (XMLStreamException e) { throw new RuntimeException("Can not serialize OM Element " + this.getLocalName(), e); } return new String(baos.toByteArray()); } COM: <s> overridden to string for ease of debugging </s>
funcom_train/36135071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void normalizeExtendDefinition( List<ExtendDefinitionType> extendDefs) throws Exception{ for( ExtendDefinitionType extend : extendDefs ){ this.normalizeExtendDefinitionComment( extend ); XmlObjectUtilities.removeAttrWithValue( extend.newCursor(), this.negate, "false" ); this.normalizeXmlObjectAttr( extend, this.extendDefinitionOrder ); } } COM: <s> normalizes the attribute ordering of extend definition type elements designated by extend definition </s>
funcom_train/19746318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Integer getNumberOfReplies(Long forumId) { String hql = new StringBuffer("select count(post) from Topic as topic ") .append("left outer join topic.posts as post ") .append("where topic.forum.id = ? ") .append("and post.first != 'T' ") .toString(); return findUniqueIntegerResult(hql, new Object[]{forumId}); } COM: <s> returns number of replies in all topics of a forum </s>
funcom_train/43589902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel() { if (jPanel == null) { jPanel = new JPanel(); jPanel.setLayout(new FlowLayout()); jPanel.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); jPanel.setEnabled(false); jPanel.setPreferredSize(new Dimension(416, 36)); jPanel.add(getCancelUpdateButton(), null); jPanel.add(getUpdateButton(), null); } return jPanel; } COM: <s> this method initializes j panel </s>
funcom_train/45302914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getInputControlPanel() { if (inputControlPanel == null) { inputControlPanel = new JPanel(); inputControlPanel.setLayout(new BoxLayout(inputControlPanel, BoxLayout.LINE_AXIS)); inputControlPanel.add(Box.createHorizontalGlue()); inputControlPanel.add(getInputParseButton()); inputControlPanel.add(Box.createRigidArea(new Dimension(10, 0))); inputControlPanel.add(getInputClearButton()); inputControlPanel.add(Box.createHorizontalGlue()); } return inputControlPanel; } COM: <s> getter for the input control panel </s>
funcom_train/2893346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDBObjects(int nObjectType, List objs) { if (objs == null) return; m_Objects.set(nObjectType, objs); int nSize = objs.size(); int nPagesNeeded = getNumberOfPagesNeeded(nObjectType); setLastPage(nObjectType, nPagesNeeded); setFirstPage(nObjectType, 1); setCurrentPage(nObjectType, 1); } COM: <s> set a list of dbobjects of given type </s>
funcom_train/40461068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTF_RIG_EYE() { if (jTF_RIG_EYE == null) { jTF_RIG_EYE = new JTextField(); jTF_RIG_EYE.setText(""); jTF_RIG_EYE.setPreferredSize(new Dimension(30, 20)); jTF_RIG_EYE.setHorizontalAlignment(JTextField.LEFT); } return jTF_RIG_EYE; } COM: <s> this method initializes j tf rig eye </s>
funcom_train/21016943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActionModel(String modelId, ActionModel actionModel) { // TODO is there a better solution? for (ActionClosure actionClosure : actionModel.getActions()) { if (actionClosure.getAction() instanceof CreationAction) { ((CreationAction) actionClosure.getAction()) .setEditManager(getEditManager()); } } _actionModels.put(modelId, actionModel); } COM: <s> sets the given </s>
funcom_train/3779270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNoEndTitleTag() throws ParserException { createParser( "<TITLE>KRP VALIDATION<PROCESS/TITLE>"); parseAndAssertNodeCount(1); TitleTag titleTag = (TitleTag)node[0]; assertEquals("Expected title","KRP VALIDATION",titleTag.getTitle()); } COM: <s> testcase based on claude duguays report </s>
funcom_train/32056705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetImageIcon() { System.out.println("testGetImageIcon"); String name = "buttonEdge"; ImageLoader il = new ImageLoader(); assertNull(il.getImageIcon(1, name)); il.getImageIcon(0, name); il.getImageIcon(0, null); } COM: <s> test of get image icon method of class image loader </s>
funcom_train/11554688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeState(FacesContext context, Object state) throws IOException { if (!(state instanceof Object[])) return; Object[] structureAndState = (Object[])state; if (structureAndState.length < 2) return; writeState(context, new StateManager.SerializedView(structureAndState[0], structureAndState[1])); } COM: <s> associate the provided state object with the current response being generated </s>
funcom_train/49265795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ByteArrayBuffer getProcessed() { ByteArrayBuffer Result = new ByteArrayBuffer(this.readPointer); Result.data = new byte[this.readPointer]; System.arraycopy(this.data, 0, Result.data, 0, this.readPointer); return Result; } COM: <s> get the part of the buffer </s>
funcom_train/50054500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean registerUser(String host, String user) { Boolean result = Boolean.TRUE; try { SensorBaseClient.registerUser(host, user); } catch (SensorBaseClientException e) { result = Boolean.FALSE; log("TV isRegistered, user: " + user + ", error thrown: " + e.getMessage()); } return result; } COM: <s> registers the user with this sensor base host </s>
funcom_train/33848535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ICodeBaseEntry search(List<? extends ICodeBase> codeBaseList, String resourceName) { for (ICodeBase codeBase : codeBaseList) { ICodeBaseEntry resource = codeBase.lookupResource(resourceName); if (resource != null) { return resource; } // Ignore, continue trying other codebases } return null; } COM: <s> search list of codebases for named resource </s>
funcom_train/35677764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFixarnum() { try { CComplexReflectBinding ccem = new CComplexReflectBinding( FixarnumCases.getFactory(), FixarnumCases.getJavaObject().getClass()); assertEquals(78, ccem.getByteLength()); } catch (ReflectBindingException e) { fail(e.getMessage()); } } COM: <s> fixarnum has a various array types </s>
funcom_train/47869021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String addFeaturesHeader(File file, boolean restrict) throws Exception { BufferedReader bis = new BufferedReader( new InputStreamReader(new FileInputStream(file), "UTF8")); String line = null; List<String> lines = new ArrayList<String>(); while ((line = bis.readLine()) != null) { lines.add(line); } bis.close(); return addFeaturesHeader(lines, restrict); } COM: <s> add feature for header recognition to labeled data in a file </s>
funcom_train/15416455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void execute(CommandContext context, Command command){ if (commandSecurity != null){ if (!commandSecurity.allow(context, command)) { String m = "Disallowed Command "+command+" "+context; logger.log(Level.SEVERE, m); return; } } command.execute(context); } COM: <s> execute the command in the given context </s>
funcom_train/25309159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DataSet createDatasetHeadersJoinMySQL(TypeJointure typeJointure, String urlAttach) throws InterruptedException { DataSet item = CreateDatasetUtil.createDatasetHeadersJoinMySQL(datasetId, urlAttach, typeJointure); persistDataset(item); changeStatus(item.getId(), "/start"); return item; } COM: <s> create and activate a dataset for mysql datasource with join </s>
funcom_train/11742697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getFirstRows(Query query) { List allResults = getResults(query); int size = allResults.size(); if (size == 0) { return Collections.EMPTY_LIST; } else { for (Object obj : allResults) { if (obj instanceof List) { return (List) obj; } } } return Collections.EMPTY_LIST; } COM: <s> returns the first results for the query </s>
funcom_train/7625871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPreferenceScreen(PreferenceScreen preferenceScreen) { if (mPreferenceManager.setPreferences(preferenceScreen) && preferenceScreen != null) { postBindPreferences(); CharSequence title = getPreferenceScreen().getTitle(); // Set the title of the activity if (title != null) { setTitle(title); } } } COM: <s> sets the root of the preference hierarchy that this activity is showing </s>
funcom_train/48024056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TreeNodeStream prepareTreeNodeStream(CharStream inputStream) throws TransformationException { logger.finer("Tokenizing stream"); tokens = new TokenRewriteStream(ANTLRJavaHelper.tokenizeStream(inputStream)); logger.finer("Parsing tokens"); tree = ANTLRJavaHelper.parseStream(tokens); CommonTreeNodeStream nodes = new CommonTreeNodeStream(tree); nodes.setTokenStream(tokens); return nodes; } COM: <s> prepares tree node stream from input stream </s>
funcom_train/13965240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WOComponent saveAction() { if ("create".equals(inlineTask())) { relationshipDisplayGroup().fetch(); int count = relationshipDisplayGroup().allObjects().count(); if (count > 0) { Object object = relationshipDisplayGroup().allObjects().objectAtIndex(relationshipDisplayGroup().allObjects().count() - 1); relationshipDisplayGroup().selectObject(object); relationshipDisplayGroup().displayBatchContainingSelectedObject(); } } setInlineTaskSafely(null); return null; } COM: <s> performs the save action </s>
funcom_train/14306453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Component getCellRendererComponent(int row, int col) { String value = getValueAt(row, col).toString(); TableCellRenderer rend = getCellRenderer(row, col); return rend == null ? null : rend.getTableCellRendererComponent(this, value, isCellSelected(row,col), hasFocus(), row, col); } COM: <s> return the cell renderer component for the cell at row col </s>
funcom_train/3069165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handle(ServiceRequestMessage srm, ObjectOutputStream oos){ int i; for(i=0; i<availableServices.length; i++) if(srm.getRequestedService().compareTo(availableServices[i])==0) break; try{ if(i==availableServices.length) oos.writeObject(new ServiceNotAvailableMessage()); else oos.writeObject(new ServiceAvailableMessage()); oos.flush(); } catch(IOException ioe){} } COM: <s> if an error occurs the negotiation is aborted </s>
funcom_train/3329235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createComment(Annotation annotation) { if (annotation == null) return null; Enumeration enum = annotation.getDocumentation(); if (enum.hasMoreElements()) { //-- just use first <info> Documentation documentation = (Documentation) enum.nextElement(); return normalize(documentation.getContent()); } return null; } //-- createComment COM: <s> creates a comment to be used in javadoc from the given annotation </s>
funcom_train/4203321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCheckbox(Boolean checked) { if (checked == null) { setInternalValues(null, null); return; } if (checked) { setInternalValues(JFaceResources.getImageRegistry().get(CHECKED_KEY), null); } else { setInternalValues(JFaceResources.getImageRegistry().get(UNCHECKED_KEY), null); } } COM: <s> sets the painter to paint a image only based on the checked state </s>
funcom_train/1165458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getSentDirectMessagesAsync(WeiboListener listener) { getDispatcher().invokeLater(new AsyncTask(DIRECT_MESSAGES, listener,null) { public void invoke(WeiboListener listener,Object[] args) throws WeiboException { listener.gotSentDirectMessages(getSentDirectMessages()); } }); } COM: <s> returns a list of the direct messages sent by the authenticating user </s>
funcom_train/32154259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { this.timeStart = System.currentTimeMillis(); if (Logger.LOG_DEBUG) { this.logger = new Logger(Commands.MASTER + ".txt"); this.logger.printToLog(""+getClass()+" :: "+toString()); } this.agentIds = this.com.getRegisteredAgentIds().clone(); this.agentIds.remove(MasterId); while (!this.terminate) { this.treatReceivedMsgs(); Thread.yield(); } } COM: <s> called when master is started </s>
funcom_train/14236486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onPreWindowOpen( ApplicationWindowConfigurer configurer ) { // If you override this method, it is critical to allow the superclass // implementation to run as well. super.onPreWindowOpen(configurer); // Uncomment to hide the menubar, toolbar, or alter window size... // configurer.setShowMenuBar(false); // configurer.setShowToolBar(false); configurer.setInitialSize(new Dimension(1024, 768)); } COM: <s> this method is called prior to the opening of an application window </s>
funcom_train/50106581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String _parseIPAddress(String ipstr) { StringBuffer sb = new StringBuffer(ipstr); if (ipstr.startsWith("[") || ipstr.startsWith("(")) { sb.setCharAt(0, ' '); } if (ipstr.endsWith("]") || ipstr.endsWith(")")) { sb.setCharAt(ipstr.length() - 1, ' '); } return sb.toString().trim(); } COM: <s> tries to extract an ip address string from the given </s>
funcom_train/18957983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void AddStatus(String statusName) throws SQLException, Exception { Statement stmt = dbConn.createStatement(); // insert the new status into the Status table. String update = "INSERT INTO Status (StatusName) VALUES" + "('" + statusName + "');"; System.out.println(update); stmt.executeUpdate(update); stmt.close(); } COM: <s> adds the new status to the project </s>
funcom_train/12556839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() throws IOException { if (baos == null) { throw new IOException("Cannot reset an unmarked stream"); } if (baos.size() == 0) { // no data was read since the call to mark() baos = null; } else { buffer = baos.toByteArray(); baos = null; bufferIndex = 0; } } COM: <s> reset the line markers </s>
funcom_train/45852031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TwoPhaseCommitParticipant add2PCParticipant(CoordinationContext context, State state, Type type) { TwoPhaseCommitParticipant participant = new TwoPhaseCommitParticipant(type); participant.setCoordinationContext(context); participant.setState(state); TwoPhaseCommitParticipantDAOLocal participantDAO = injector.getTwoPhaseCommitParticipantDAO(); participantDAO.save(participant); long participantId = participant.getId(); W3CEndpointReference epr = getParticipantEndpointReference(participantServiceName, participantId); participant.setParticipantProtocolService(epr); participantDAO.update(participant); return participant; } COM: <s> creates a new two phase commit participant for the specified context </s>
funcom_train/26618173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initAttributes(IContext context) { super.initAttributes(context); ObjectUtil.initializeField("gradientIndex", m_configElement, this, ObjectUtil.PRIMITIVE_CONVERSION); ObjectUtil.initializeField("startGradientIndex", m_configElement, this, ObjectUtil.PRIMITIVE_CONVERSION); ObjectUtil.initializeField("endGradientIndex", m_configElement, this, ObjectUtil.PRIMITIVE_CONVERSION); } COM: <s> always remember some attrs might not be there </s>
funcom_train/22285093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertChoiceAt(String newChoice, int index) { super.insertChoiceAt(newChoice, index); int i = newChoice.lastIndexOf('/'); if ((i >= 0) && (i < newChoice.length() - 1)) { newChoice = newChoice.substring(0, i); } list.addItem(index, new ListBoxItemWidget(newChoice)); list.setValue(list.getItem(current)); } COM: <s> when inserting a choice also update the list </s>
funcom_train/5475164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPan_modelos() { if (pan_modelos == null) { jLabel = new JLabel(); jLabel.setText("Detalhes do Modelo"); jLabel.setBounds(new java.awt.Rectangle(15,251,155,15)); pan_modelos = new JPanel(); pan_modelos.setLayout(null); pan_modelos.setBackground(java.awt.Color.white); pan_modelos.add(getPan_addmodel(), null); pan_modelos.add(getPan_listaItens(), null); pan_modelos.add(jLabel, null); } return pan_modelos; } COM: <s> this method initializes pan modelos </s>
funcom_train/34996917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getCurrentExposure(Instrument instr) throws JFException { List<IOrder> list = engine.getOrders(instr); double rc = 0; for (IOrder order : list) { if (order.getState() == IOrder.State.FILLED) { double amo = order.getAmount(); if (order.isLong()) { rc = rc + amo; } else { rc = rc - amo; } } } return rc; } COM: <s> calculates current exposure for specified instrument </s>
funcom_train/1460725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetAllGameActions() { for (int i=0; i<keyActions.length; i++) { if (keyActions[i] != null) { keyActions[i].reset(); } } for (int i=0; i<mouseActions.length; i++) { if (mouseActions[i] != null) { mouseActions[i].reset(); } } } COM: <s> resets all game actions so they appear like they havent </s>
funcom_train/48910274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getTxfPlaca() { if (txfPlaca == null) { txfPlaca = new JTextField(); txfPlaca.setBounds(new Rectangle(297, 55, 64, 20)); txfPlaca.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent e) { if(e.getKeyCode()==KeyEvent.VK_ENTER) txfConductor.grabFocus(); } }); } return txfPlaca; } COM: <s> this method initializes txf placa </s>
funcom_train/32764093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean accept(double [] coords){ if(coords == null) return false; List varsV = getVariables(); int n = varsV.size(); boolean res = true; if(coords.length >= n){ for(int i = 0; i < n; i++){ ParameterProxy variable = (ParameterProxy) varsV.get(i); if(coords[i] < variable.getLowerLimit() || coords[i] > variable.getUpperLimit()){ res = false; break; } } } else{ res = false; } return res; } COM: <s> returns true if all coordinates inside limits and false otherwise </s>
funcom_train/5421245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLoadedPackagesAsString() { String[] packages = getLoadedPackages(); StringBuffer sbuf = new StringBuffer(); for (int i = 0; i < packages.length; i++) { sbuf.append(packages[i]); sbuf.append('\n'); } return sbuf.toString().trim(); } COM: <s> if you want to dump all packages you can use this method </s>
funcom_train/19273850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParentAccess(AbstractSyncCompositeAccess<? extends Composite> newParentAccess) { this.parentAccess = newParentAccess; if (this.parentAccess.getDelegate() != null) { if (getDelegate() != null) { assert (checkReady()); invoke(OPERATION_SET_PARENT); } } } COM: <s> this method sets the parent sync access of this control </s>
funcom_train/3159214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Field getParamImpl(String key) { Guardian.assertNotNullOrEmpty("key", key); Field param = getParam(key); if (param == null) { throw new IllegalArgumentException("unknown header parameter '" + key + "'"); /*I18N*/ } return param; } COM: <s> gets the header parameter with the given key </s>