__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/11075694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeSet getNodeSetByKey(String key, Object value) { KeyManager manager = getKeyManager(); if (manager != null) { return KeyManagerUtils.getExtendedKeyManager(manager) .getNodeSetByKey(this, key, value); } throw new JXPathException("Cannot find an element by key - " + "no KeyManager has been specified"); } COM: <s> locates a node set by key value </s>
funcom_train/36628209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buff = new StringBuffer(48); String delim = "|"; buff.append("driverUrl=> ").append(driverUrl); buff.append(delim); buff.append("userid=> ").append(userId); buff.append(delim); buff.append("dbUrl=> ").append(dbUrl); buff.append(delim); buff.append("timeOut=>").append(timeOut); buff.append(delim); buff.append("cacheTimeOut=>").append(cacheTimeOut); return buff.toString(); } COM: <s> p method to streamline all members of the instance to string format </s>
funcom_train/22396435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteSelectedIdentity() { // Assume that all the focus checking has been done prior to // this method being called. int index = identityListField.getSelectedIndex(); int response = Dialog.ask(Dialog.D_DELETE); if(response == Dialog.DELETE) { mailSettings.removeIdentityConfig(index); identityListField.delete(index); mailSettings.saveSettings(); } } COM: <s> delete the currently selected identity </s>
funcom_train/16897722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void assertResponseEXCEPTION(Response response) { if (!(response instanceof ResponseProblem)) { if (response instanceof ResponseREPLY) { if (response.isAffirmative()) throw new AssertionError("response=reply:affirmative; msg=" + ((ResponseREPLY) response).getReplyMessage()); else throw new AssertionError("response=reply:negative; msg=" + ((ResponseREPLY) response).getReplyMessage()); } else throw new AssertionError("response=error; reason=" + ((ResponseProblem) response).getMessage()); } } COM: <s> checks that the response is a exception </s>
funcom_train/1953129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPWRPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_I2CBusSegment_PWR_feature"), getString("_UI_PropertyDescriptor_description", "_UI_I2CBusSegment_PWR_feature", "_UI_I2CBusSegment_type"), I2cPackage.Literals.I2C_BUS_SEGMENT__PWR, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the pwr feature </s>
funcom_train/47360348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeImplication(Aliasing var, Implication impl) { if( frozen ) throw new IllegalStateException("Cannot change frozen object. Get a mutable copy to do this."); ConsList<Implication> is = knownImplications.get(var); // We only remove one copy of the implication, because an // implication is a linear fact. if( is != null ) knownImplications.put(var, is.removeElementOnce(impl)); } COM: <s> remove one of the given implication with the given object location as its </s>
funcom_train/17020225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkRelationship(Product product) { List<Product> originalProducts = adminService.findProductById(productId).getComponents(); if (originalProducts == null) { return false; } for (Product componentsOfProduct : originalProducts) { if (componentsOfProduct.getId().equals(product.getId())) { return true; } } return false; } COM: <s> find if entry product is component of main product </s>
funcom_train/13650323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AS2MessageInfo getMessageInfo(String messageId) throws Exception { MessageAccessDB messageAccess = new MessageAccessDB(this.connection); AS2MessageInfo info = messageAccess.getLastMessageEntry(messageId); if (info == null) { throw new Exception("No message entry found for " + messageId); } return (info); } COM: <s> returns the message info object a a passed message id from the database </s>
funcom_train/33848863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAnnotation(AnnotationValue annotationValue) { HashMap<ClassDescriptor, AnnotationValue> updatedMap = new HashMap<ClassDescriptor, AnnotationValue>(classAnnotations); updatedMap.put(annotationValue.getAnnotationClass(), annotationValue); classAnnotations = Util.immutableMap(updatedMap); } COM: <s> destructively add an annotation to the object </s>
funcom_train/2310032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node nextNode(Node node, Node root) { if (node == null) { return null; } // Need to walk back up to parent if no more siblings. Node nextNode = node.getNextSibling(); Node parent = node.getParentNode(); while ((nextNode == null) && (parent != null)) { if (parent == root) { return null; } nextNode = parent.getNextSibling(); parent = parent.getParentNode(); } return nextNode; } COM: <s> return the next sibling or parent sibling node </s>
funcom_train/19427058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged(ChangeEvent event) { Component selected = this.tabbedPane.getSelectedComponent(); if (selected.equals(this.vegetationTab)) { this.selectedTab = VEGETATION_TAB; } else if (selected.equals(this.unitTab)) { this.selectedTab = UNIT_TAB; } } COM: <s> is called when a tab is selected </s>
funcom_train/42857767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStrangeProblem1() throws StringMatchingPatternSyntaxException { RegexPattern pat = new RegexPattern("^(/.*)$", false); StringMatchingMatcher mat = pat.matcher("/tester/one-level-sub/two-leel-sub/"); mat.find(); mat.groupCount(); mat.groupCount(); mat.groupCount(); mat.group(1); } COM: <s> this was throwing an exception </s>
funcom_train/42115014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMember(String name, Object value) throws JSException { synchronized (evaluator) { try { ESValue esvalue = ESLoader.normalizeValue(value, evaluator); object.putProperty(name, esvalue, name.hashCode()); } catch (EcmaScriptException e) { throw new JSException(e.getMessage(), e); } } return; } COM: <s> implements the set value of a named property of this object </s>
funcom_train/2759313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { // stop the monitor... _connectionMonitor.dispose(); // dispose of all the connection handlers... Iterator connectionHandlerIter = _connectionHandlers.iterator(); while(connectionHandlerIter.hasNext()) { ConnectionHandler connectionHandler = (ConnectionHandler) connectionHandlerIter.next(); connectionHandler.dispose(); } } COM: <s> disposes of this monitor by closing the active connection </s>
funcom_train/29915867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getRemoveCardButton() { if (removeCardButton == null) { removeCardButton = new JButton(UIHelper.getText("cardmeny.removecard")); removeCardButton.setBounds(new Rectangle(228, 301, 347, 45)); removeCardButton.setIcon(UIHelper.getImage("blockcard.gif")); removeCardButton.setHorizontalAlignment(SwingConstants.LEFT); } return removeCardButton; } COM: <s> this method initializes remove card button </s>
funcom_train/14327050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeAllContents(OpBroker broker) { OpQuery query = broker.newQuery("select content.id from " + OpContent.CONTENT + " content"); List<Long> contentIds = broker.list(query); for (long contentID : contentIds) { OpContent content = broker.getObject(OpContent.class, contentID); broker.deleteObject(content); } } COM: <s> removes all the content objects from the db </s>
funcom_train/18518244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Item createItemByDetail(Details d) throws Exception { Connection conn = null; try { conn = Transaction.begin(Torque.getDefaultDB()); Item item = ItemFactory.getInstance().getNewItem(d, conn); Transaction.commit(conn); conn = null; return item; } finally { if (conn != null) { Transaction.safeRollback(conn); } } } COM: <s> creates an item locally using the given amazon detail object </s>
funcom_train/19433969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activateOption( int option ) { if ( state == MenuModel.DEFAULT_STATE ) { AbstractUIImpl.activateOption( optionLabels, option ); } else if ( state == UnitsMenuModel.CREATING_NEW_STATE || state == UnitsMenuModel.EDITING_STATE ) { AbstractUIImpl.activateOption( createPackOptions, option ); } } COM: <s> flags the specified option as active i </s>
funcom_train/11745075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGenerated(boolean generated) { if (this.generated != generated) { this.generated = generated; Entity e = this.getEntity(); if (e instanceof DbAttributeListener) { ((DbAttributeListener) e).dbAttributeChanged(new AttributeEvent( this, this, e)); } } } COM: <s> updates attribute generated property </s>
funcom_train/50152433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fontActionPerformed(JTextField fontText) { // get font from pref name Font pf = Font.decode(fontText.getText()); // choose a new font Font f = NwFontChooserS.showDialog(null, null, pf); if (f == null) { return; } // get the font name and store String s = NwFontChooserS.fontString(f); fontText.setText(s); } COM: <s> bring up a font chooser ui and let the user change a font </s>
funcom_train/12647099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void openServer(String host) throws IOException { int port = FTP_PORT; /* String source = Firewall.verifyAccess(host, port); if (source != null) { Firewall.securityError("Applet at " + source + " tried to open FTP connection to " + host + ":" + port); return; } */ openServer(host, port); } COM: <s> open a ftp connection to host i host i </s>
funcom_train/31545273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(final int minThreads, final int maxThreads, final int chunkSize) { if (LOG.isDebugEnabled()) { LOG.debug("init(min, max, chunk):(" + minThreads + ", " + maxThreads + ", " + chunkSize + ")"); } scheduler.init(minThreads, maxThreads, chunkSize, jobQueue); } COM: <s> initialises the thread manager </s>
funcom_train/9296583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileObject createFileObject(FileObject dir, String filename) { FileObject file = null; try { if (dir == null) { file = VFS.getManager().resolveFile(filename); } else { file = VFS.getManager().resolveFile(dir, filename); } } catch (FileSystemException e) { // TODO Auto-generated catch block e.printStackTrace(); } return file; } COM: <s> returns a file object object constructed in dir from the given filename </s>
funcom_train/1332976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ContentValues emptyValues() { ContentValues values = new ContentValues(); values.put(DbAdapter.KEY_DATE, 0); values.put(DbAdapter.KEY_PAYEE, EMPTY); values.put(DbAdapter.KEY_AMOUNT, EMPTY); values.put(DbAdapter.KEY_CATEGORY, EMPTY); values.put(DbAdapter.KEY_MEMO, EMPTY); values.put(DbAdapter.KEY_TAG, EMPTY); return values; } COM: <s> create a new content values with non null values </s>
funcom_train/3416548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String next() { ensureOpen(); clearCaches(); while (true) { String token = getCompleteTokenInBuffer(null); if (token != null) { matchValid = true; skipped = false; return token; } if (needInput) readInput(); else throwFor(); } } COM: <s> finds and returns the next complete token from this scanner </s>
funcom_train/46439250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFull() { if (type == Type.INVALID) { return String.format("INVALID [%s]", numberText); } return String.format("%02d%02d%02d%02d-%03d%d", century, year, month, day, birthNumber, checkNumber); } COM: <s> get the full string representation of the person number </s>
funcom_train/19139604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean forEachEntry(TIntObjectProcedure procedure) { byte[] states = _states; int[] keys = _set; Object[] values = _values; for (int i = keys.length; i-- > 0;) { if (states[i] == FULL && ! procedure.execute(keys[i],values[i])) { return false; } } return true; } COM: <s> executes tt procedure tt for each key value entry in the </s>
funcom_train/49870070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void SendMessageToDevice(String msg) { char[] chars = msg.toCharArray(); try{ for (char b : chars) { _outputStream.write((int) b); } _outputStream.flush(); System.out.println("Wrote (" + System.currentTimeMillis() + ") " + msg); } catch (IOException e){ _sendError = true; CommunicationController.getInstance().connectionError(); } } COM: <s> send the passed string to the remote device </s>
funcom_train/46929968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void apply() { String align = (String) value; if (align.equalsIgnoreCase("left")) { super.cellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER); } else if (align.equalsIgnoreCase("right")) { super.cellStyle.setAlignment(HSSFCellStyle.ALIGN_LEFT); } else if (align.equalsIgnoreCase("cetnre")) { super.cellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER); } } COM: <s> the method to do the actual job </s>
funcom_train/14122970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void displayAttachments(MailItem mailItem) { GWTMailAttachment[] mailAttachments = mailItem.getMailMessage().getAttachements(); if (mailAttachments == null || mailAttachments.length <= 0) { return; } initAttachmentPanel(mailItem.getMailMessage().getId()); attachmentPanel.clear(); attachmentPanel.addMailAttachments(mailAttachments); } COM: <s> displays attachments related to mail item </s>
funcom_train/23279083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeLaunchResource(LaunchResource lr){ if (!validateClass(lr)) throw new ARISException("Invalid Lauch Resource"); //Delete all objects related to this Launch Resource List<LaunchFile> files = lr.getFiles(); while (files.size() > 0) removeLaunchResourceFile(lr, files.get(0).getId()); getHibernateTemplate().delete(lr); } COM: <s> removes the launch resource </s>
funcom_train/20889722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handlePNewNodeIndication(PNewNodeIndication newPNewNodeIndication) { NodeId senderNodeId, newNodeId; Position newNodePosition; newNodeId = newPNewNodeIndication.getNewNodeId(); senderNodeId = newPNewNodeIndication.getSender().getId(); newNodePosition = newPNewNodeIndication.getNewNodePosition(); this.handleNewNodeIndication(newNodeId, newNodePosition, senderNodeId); } COM: <s> this method handles the reception of a pnew node indication packet </s>
funcom_train/46676342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getSaveAsButton() { if (saveAsButton == null) { saveAsButton = new JButton(new SaveBasketAction(coma,IconFactory.createImageIcon("document-save-as.png"))); saveAsButton.putClientProperty("JButton.buttonType", "segmented"); saveAsButton.putClientProperty("JButton.segmentPosition", "last"); } return saveAsButton; } COM: <s> this method initializes save as button </s>
funcom_train/2801706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData(Object pData) throws IllegalArgumentException { if (pData != null) { if (pData instanceof InetAddress) { InetAddress inetAddress = (InetAddress) pData; super.data = new TibrvIPAddr(inetAddress); } else { super.data = pData; } } else { throw new IllegalArgumentException(FIELD_DATA_NOT_NULL); } } COM: <s> defines the data associated to this field instance </s>
funcom_train/25098569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLabelPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AXLOperation_label_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AXLOperation_label_feature", "_UI_AXLOperation_type"), TransactioneditorPackage.Literals.AXL_OPERATION__LABEL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the label feature </s>
funcom_train/18095676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton() { if (jButton == null) { jButton = new JButton(); jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { HintDialog.showDialog( conf, data,false); } }); HelperPanel.formatButton(jButton); jButton.setText(Msg.getString("PanelTippAdd.BUTTON_TITEL_MANAGE_HINTS")); //$NON-NLS-1$ } return jButton; } COM: <s> this method initializes j button </s>
funcom_train/3100123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void substituteVariable(CycVariable variable, Object newObject) { if (! (variables.contains(variable))) throw new RuntimeException(variable + " is not a variable of " + this); variables.remove(variable); if (newObject instanceof CycVariable) variables.add(newObject); formula = formula.subst(newObject, variable); } COM: <s> substitutes an object for a variable </s>
funcom_train/2289021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void increaseCache(I_CmsLruCacheObject theCacheObject) { // notify the object that it was now added to the cache //theCacheObject.notify(); theCacheObject.addToLruCache(); // update the cache stats. m_objectCosts += theCacheObject.getLruCacheCosts(); m_objectCount++; } COM: <s> increase this caches statistics </s>
funcom_train/13985926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String sendDelete(String url){ String responseBody = ""; DeleteMethod method = new DeleteMethod(url); org.apache.commons.httpclient.HttpClient client = new HttpClient(); client.getParams().setParameter("http.useragent", "jbrofuzz"); try { client.executeMethod(method); responseBody = method.getResponseBodyAsString(); } catch (HttpException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } finally{ client.getHttpConnectionManager().closeIdleConnections(0); } return responseBody; } COM: <s> http delete for rest interface to couchdb </s>
funcom_train/33913737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File getCachedFile(String fileName) { File fetchDir = getFetchDir(); File file = new File(fetchDir, fileName); if (!file.exists()) { return null; } if (!file.canRead()) { throw new BuildException(fetchDir.getAbsolutePath() + " is not readable"); } return file; } COM: <s> get file from local fetch directory </s>
funcom_train/29895781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileType getFileTypeForFileDefinition(FileDefinition fileDef) { if (fileDef.getType() == null) { return null; } for (ImplementableTypeMapping typeMapping : styleMapping.getAllImplementableTypeMappings()) { FileType ft = typeMapping.getFileType(fileDef.getType()); if (ft != null) { return ft; } } return null; } COM: <s> returns the file type for the given file definition or null </s>
funcom_train/3935983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ListSerializer processBullet(Bullet inBullet, int inLine) { //we're still in the same list if (inBullet == bullet) return this; //we returned to the parent list ListSerializer lAncestor = getAncestor(inBullet); if (lAncestor != null) { return consolidate(inLine, lAncestor); } //create new list or sublist endLine = inLine; //at this line, we switched to another bullet return new ListSerializer(inBullet, inLine, this); } COM: <s> processed the specified bullet </s>
funcom_train/7756746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { // All members are either immutable or never modified nor allowed to // be modified: all accessors return clones or immutable objects. // IDs are know to be immutable but that could change. Accessors // clone() them for safety; their clone method costs nothing. try { return super.clone(); } catch (CloneNotSupportedException impossible) { return null; } } COM: <s> clone this module impl advertisement </s>
funcom_train/32780263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drive(SimTime time) { // trace with the note that the crane is driving now if (currentlySendTraceNotes()) { sendTraceNote("drives for " + time.toString(getModel().getExperiment().getTimeFloats()) + " until " + SimTime.add(currentTime(), time).toString( getModel().getExperiment().getTimeFloats())); } skipTraceNote(); // hold for the driving time hold(time); } COM: <s> this method describes the driving of the crane crane speader </s>
funcom_train/35048553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMimeType(InputStream is) throws MimeTypeException{ String fileMimeType = null; MimeTypeIdentifier identifier = new MagicMimeTypeIdentifier(); try { BufferedInputStream buffer = new BufferedInputStream(is); byte[] bytes = IOUtil.readBytes(buffer, identifier.getMinArrayLength()); fileMimeType = identifier.identify(bytes, "", null); buffer.close(); } catch (IOException e) { throw new MimeTypeException("Error to determine mime type from inputStream"); } return fileMimeType; } COM: <s> gets the mime type based on an input stream </s>
funcom_train/2504830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addMessage(String source, byte[] data) { String oldMessage = messageOutput.getText(); if (oldMessage instanceof String && !oldMessage.equalsIgnoreCase("")) { messageOutput.setText(oldMessage + "\n" + source + ": " + Util.toASCIIString(data)); } else { messageOutput.setText(source + ": " + Util.toASCIIString(data)); } } COM: <s> this method combines the data and the source to a </s>
funcom_train/20828377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveOutput(){ if(saveDialog == null){ saveDialog = new JFileChooser("."); } int result = saveDialog.showSaveDialog(this); if(result == JFileChooser.APPROVE_OPTION){ File file = saveDialog.getSelectedFile(); try{ BufferedWriter out = new BufferedWriter(new FileWriter(file)); out.write(output.getText()); out.close(); } catch(IOException e){ ErrorReporter.reportError(this, "Could not save output.", e); } } } COM: <s> saves the current output to a file </s>
funcom_train/16850191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateList(TodoItem item){ FilterableListModel model = ftodolist.getContents(); for(int i = 0;i < model.getSize();i++){ TodoItem titem = (TodoItem)model.getElementAt(i); if(titem.getId().equals(item.getId())){ model.removeElement(i); model.addElement(item); ftodolist.repaint(); //this.scroller.repaint(); //added by stone //model.setFireContentsChanged(i, i+1); //ListCellRenderer render = ftodolist.getCellRenderer(); // (ListCellRenderer)render. return; } } model.addElement(item); ftodolist.repaint(); } COM: <s> this is a call back for edit dialog when edit finished </s>
funcom_train/46630441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBestLocation(String parentLocation) { String bestLocation = this.getLocation(); // If no location defined, use default one. if (parentLocation == null && bestLocation == null) { bestLocation = AbstractConfigurationLoader.getInstance().getDefaultLocation(); } else if (bestLocation == null) { bestLocation = parentLocation; } // else if group has no location use parent one. return bestLocation; } COM: <s> return the most effective location </s>
funcom_train/42771972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IPath getStoragePath() throws CoreException { if (this.storagePath != null) { return storagePath; } IPath pluginState = SketchPlugin.getDefault().getStateLocation(); String configurationName = configuration.getName(); IPath configurationPath = pluginState.append(configurationName); IPath filePath = configurationPath.append(getID()); File file = new File(filePath.toOSString()); if (!file.exists()) { file.mkdirs(); } storagePath = filePath; return storagePath; } COM: <s> returns the path in which data will be stored for this trace </s>
funcom_train/22131541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean fillLast() throws IOException { int count; if (lastFilled == pageSize) { throw new IllegalStateException(); } count = src.read(pages[lastNo], lastFilled, pageSize - lastFilled); if (count <= 0) { if (count == 0) { throw new IllegalStateException(); } return false; } lastFilled += count; return true; } COM: <s> reads bytes to fill the last page </s>
funcom_train/19099642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sortBy( String sortColumn ) { if ( sortColumn != null ) { boolean ascend = true; if ( sortColumn.startsWith( "-" ) ) { ascend = false; sortColumn = sortColumn.substring( 1 ); } int columnIdx = ts.findColumn( sortColumn ); if ( columnIdx < 0 ) return; // silently fail ts.sortByColumn( columnIdx, ascend ); headerRenderer.setSortColumn( sortColumn ); headerRenderer.setSortDirection( ascend ); table.getTableHeader().repaint(); } } COM: <s> sorts the history display by the specified column </s>
funcom_train/37721276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createPrimaryKeyPanel(ConstraintsBuilder builder) { JPanel panel = new JPanel(new GridBagLayout()); builder.resetConstraints(); primaryKeys = new JComboBox(); panel.add(new JLabel("Primary Key: "), builder.build("PrimaryKeyLabel")); panel.add(primaryKeys, builder.build("PrimaryKey")); return panel; } COM: <s> create the primary key panel </s>
funcom_train/11292889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateDefaultEnv(Hashtable<Object, Object> env) { env.put(Context.INITIAL_CONTEXT_FACTORY, connectionDescriptor .getProviderType().getClassName()); env.put(Context.REFERRAL, connectionDescriptor.getReferralPreference()); // Enable connection pooling env.put("com.sun.jndi.ldap.connect.pool", "true"); env.put(Context.BATCHSIZE, "100"); } COM: <s> populate the environment with a few default settings </s>
funcom_train/29922752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void verifyAttribute(AttributeDO attribute) throws ResourceStoreAuthorisationException { //if attribute is null there has been a problem creating it, otherwise no problem if (attribute == null){ throw new ResourceStoreAuthorisationException("Unable to create the required resourceStore attribute, therefore User cannot be authorised."); } }//end method COM: <s> verifies that attribute exists </s>
funcom_train/12799770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize (RCMain rcMain) { this.rcMain = rcMain; this.plClient = new PluginClientImpl(rcMain.getClient()); this.azsmrcInterface = new AzSMRCInterfaceImpl(rcMain); this.uiManager = new UISWTManagerImpl(); for (PluginInterfaceImpl pi:pluginMap.values()) { try { SplashScreen.setText("Initializing Plugin: "+pi.getPluginName()); pi.initializePlugin(); } catch (Throwable e) { e.printStackTrace(); } } } COM: <s> initializes the interfaces and plugins </s>
funcom_train/12368676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getRootElement() { if (rootElement == null) { svgNamespace = Namespace.getNamespace(SVG_NAMESPACE); rootElement = new Element("svg", svgNamespace); xlinkNamespace = Namespace.getNamespace("xlink", XLINK_NAMESPACE); rootElement.addNamespaceDeclaration(xlinkNamespace); Namespace xsiNamespace = Namespace.getNamespace("xsi", XSI_NAMESPACE); rootElement.addNamespaceDeclaration(xsiNamespace); Attribute schemaLocation = new Attribute("schemaLocation", SVG_SCHEMA_LOCATION, xsiNamespace); rootElement.setAttribute(schemaLocation); } return rootElement; } COM: <s> creates the root element including the xml header </s>
funcom_train/50849074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "[" + name + "," + (attributes().isEmpty() ? " no attr" : " attr: " + attributes().toString()) + ", " + ("".equals(value()) ? childsAsList().size() + " child(s)]" : "val: " + value() + "]"); } COM: <s> returns a string representation of this xml </s>
funcom_train/3868353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkForPseudoActivity() { for (int a = 1; a < npElemente.size(); a++) { NetworkplanElement np = ((NetworkplanElement) npElemente.get(a)); int parent[] = np.getParent(); /** This Element is a pseudo Activity */ if (parent[0] == 0) { np.setParent(new int[] { 1 }); np.setPseudoActivity(true); } } } COM: <s> check from second to last element if parent is 0 </s>
funcom_train/46836992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJComboAdobePath() { if (jtextPDFPath == null) { jtextPDFPath = new JTextField(); jtextPDFPath.setBounds(new java.awt.Rectangle(139, 34, 214, 20)); jtextPDFPath.setEditable(true); } return jtextPDFPath; } COM: <s> this method initializes j combo adobe path </s>
funcom_train/947720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveMessage(int argMId, int argFolderId) throws DomainException { try { this.getFolderMsgResponse(argMId, argFolderId, this.move); } catch (AuthenticationException e) { throw new DomainException(e.getMessage()); } catch (IOException e) { throw new DomainException(e.getMessage()); } } COM: <s> moves passed message to passed folder </s>
funcom_train/13955546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _appendValueAttributeToResponse(WOResponse response, WOContext context) { if (_value != null) { String valueString = _valueStringInContext(context); if (valueString != null) { // stringValue = ERXLocalizer.currentLocalizer().localizedStringForKeyWithDefault(stringValue); response._appendTagAttributeAndValue("value", valueString, true); } } } COM: <s> appends the attribute value to the response </s>
funcom_train/12119202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC75(java.util.EventObject arg1) { try { // user code begin {1} // user code end this.vediAnalisiPratiche_OkJButtonAction_actionPerformed(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c75 vedi analisi pratiche </s>
funcom_train/22359944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getIconName() { if (!iconNameEvaluated && (iconName == null)) { if (category != null) { iconName = category.getIconName(); } if (iconName == null) { iconName = getID().toString(); } iconName = Umlaut.convertUmlauts(iconName.toLowerCase()); iconNameEvaluated = true; } return iconName; } COM: <s> returns the file name of the icon to use for this item </s>
funcom_train/35007192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testProcessNextCommand() throws Exception { System.out.println("processNextCommand"); PerfMonMetricGetter instance = new PerfMonMetricGetter(new PerfMonWorker(), DatagramChannel.open()); boolean expResult = false; boolean result = instance.processNextCommand(); assertEquals(expResult, result); } COM: <s> test of process next command method of class perf mon metric getter </s>
funcom_train/2639889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean retainAll(int[] array) { boolean changed = false; Arrays.sort(array); int[] set = _set; byte[] states = _states; for (int i = set.length; i-- > 0;) { if (states[i] == FULL && (Arrays.binarySearch(array,set[i]) < 0)) { remove(set[i]); changed = true; } } return changed; } COM: <s> removes any values in the set which are not contained in </s>
funcom_train/43283401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ModelPart before(final TreeItem current) { final TreeItem parentItem = current.getParentItem(); if (parentItem != null) { final TreeItem[] children = parentItem.getItems(); for (int i = 0; i < children.length; i++) { final TreeItem sillable = children[i]; if (sillable == current) { // next if (i > 0) { return (ModelPart) children[i - 1].getData(); } break; } } return last(parentItem); } return null; } COM: <s> the next after a tree item </s>
funcom_train/23028963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPrducenciPanel() { if (prducenciPanel == null) { try { GridLayout gridLayout2 = new GridLayout(); gridLayout2.setRows(Constans.liczbaProducentow); prducenciPanel = new JPanel(); prducenciPanel.setLayout(gridLayout2); for (Producent producent : producenci) { prducenciPanel.add(new ProducentView(producent.getTowaryP().size(),producent)); } } catch (java.lang.Throwable e) { // TODO: Something } } return prducenciPanel; } COM: <s> this method initializes prducenci panel </s>
funcom_train/45692114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBpmSyncPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_PartWithCommon_bpmSync_feature"), getString("_UI_PropertyDescriptor_description", "_UI_PartWithCommon_bpmSync_feature", "_UI_PartWithCommon_type"), EsxPackage.Literals.PART_WITH_COMMON__BPM_SYNC, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the bpm sync feature </s>
funcom_train/25665265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean initializeConnectionPool() throws SQLException { // create Sql connection pool source = new Jdbc3PoolingDataSource(); source.setDataSourceName("Test-DataSource"); source.setServerName(server); source.setPortNumber(port); source.setDatabaseName(dbName); source.setUser(dbUser); source.setPassword(password); source.setMaxConnections(maxConnections); source.setInitialConnections(initialConnections); source.initialize(); return true; } COM: <s> this method initialize the connection pool to the database </s>
funcom_train/2389105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getCobxBratioType() { if (cobxBratioType == null) { cobxBratioType = new JComboBox(); cobxBratioType.setBounds(new Rectangle(119, 54, 94, 26)); cobxBratioType.addItem("flow"); cobxBratioType.addItem("stock"); cobxBratioType.addItem("value per unit"); } return cobxBratioType; } COM: <s> this method initializes cobx bratio type </s>
funcom_train/10748825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCause() { Throwable th = new Throwable(); Throwable th1 = new Throwable(); assertNull("cause should be null", th.getCause()); th = new Throwable(th1); assertSame("incorrect cause", th1, th.getCause()); } COM: <s> method under test throwable get cause </s>
funcom_train/18070277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void endpointOptimize(Level level, SelectContainer selectContainer) throws NoDataException { for(int i = 0; i < selectContainer.getEndpoints().size(); i ++){ int endpointIndex = selectContainer.getEndpoint(i).getIndex(); fixWithEndpoint(endpointIndex, level); } // TODO Auto-generated method stub } COM: <s> optimize end points </s>
funcom_train/45240333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JTextField getJTextFieldCategoriasSitios() { if (jTextFieldCategoriasSitios == null) { jTextFieldCategoriasSitios = new JTextField(); jTextFieldCategoriasSitios.setEditable(false); jTextFieldCategoriasSitios.setLocation(new Point(350, 58)); jTextFieldCategoriasSitios.setSize(new Dimension(200, 20)); } return jTextFieldCategoriasSitios; } COM: <s> this method initializes j text field categorias sitios </s>
funcom_train/21940837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Field25 getField25() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("25"); if (t == null) { log.fine("field 25 not found"); return null; } else { return new Field25(t.getValue()); } } } COM: <s> iterates through block4 fields and return the first one whose name matches 25 </s>
funcom_train/13875268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addKeyTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DictionaryType_keyType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DictionaryType_keyType_feature", "_UI_DictionaryType_type"), ImperativeoclPackage.Literals.DICTIONARY_TYPE__KEY_TYPE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the key type feature </s>
funcom_train/2969836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getExistingValuesFrom(AbstractProperties ap) { Map<String, Object> proper = ap.getProperties(); for(String key : getProperties().keySet()) { Object obj = proper.get(key); if(obj != null) { set(key, obj); } } } COM: <s> this method overwrites all non null values of this </s>
funcom_train/49994599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialiseImageRegistry() { for (int i = 0; i < IdeWikiConstants.ICONS.length; i++) { getImageRegistry().put(IdeWikiConstants.ICONS[i], AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, IdeWikiConstants.ICONS[i])); } } COM: <s> initialise the image registry </s>
funcom_train/31679375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLObjectWriter setOutput(OutputStream out) throws XMLStreamException { if ((_outputStream != null) || (_writer != null)) throw new IllegalStateException("Writer not closed or reset"); _xml._writer.setOutput(out); _outputStream = out; _xml._writer.writeStartDocument(); return this; } COM: <s> sets the output stream for this xml object writer </s>
funcom_train/25138519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ARINCDefaultStyles getDefaultStyles(ARINCWidget widget) { if (widget.getWidgetDefinition().hasDefaultStyleAttribute()) { String attrID = widget.getWidgetDefinition().getDefaultStyleAttribute().getAttribute().getID(); return (ARINCDefaultStyles) widget.getPropertyValue(attrID); } else { return null; } } COM: <s> return the default styles associated with a widget or null if this widget </s>
funcom_train/44704648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long writeText(Writer writer) throws IOException { // We don't know whether content is going to be a string or a lob // if it's a string, just write it; // if it's a lob, stream it out to avoid running out of memory String text = null; Object content = get(CONTENT); if(content == null) { return (long)0; } text = (String)content; writer.write(text); writer.close(); return (long)text.length(); } COM: <s> writes character data from the content object to the specified </s>
funcom_train/566352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void setUShortimaattrw(final short[][] uShortimaattrw) { // xlogger.entry(); // this.uShortimaattrw = uShortimaattrw; // /* PROTECTED REGION ID(DevTest.setUShort_ima_attr_w) ENABLED START */ // // put write attribute code here // /* PROTECTED REGION END */ // xlogger.exit(); // } COM: <s> write attribute ushort ima attr w </s>
funcom_train/13994207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddChangeEvent() { ChangeEvent e = new ChangeEvent(new MockIdentifiable(IDS[0], TYPES[0])); ChangedAttribute changedAttribute = new ChangedAttribute(ATTRIBUTES[0], "old", "new"); e.addChangedAttribute(changedAttribute); assertEquals(changedAttribute, e.getChangedAttributes().next()); assertEquals(changedAttribute, e.getChangedAttribute(ATTRIBUTES[0])); } COM: <s> tests that a code changed attribute code is correctly added </s>
funcom_train/13211481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeGameScore(GamePlayer player) { PlayerKey key = new PlayerKey(player); HGBaseConfig.remove(ConstantValue.CONFIG_PLAYERSCORE+"."+key.toString()); if (getScoreMap(SCORE_GAME)!=null) getScoreMap(SCORE_GAME).remove(key.toString()); } COM: <s> removes the save game scores of a player </s>
funcom_train/33607033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTimeClock(TimeClock clock) { if (clock == null) { throw new IllegalArgumentException("setClockTimer called with null argument!"); } if (timer != clock) { if (timer != null) timer.removeActionListener(this); this.timer = clock; timer.addActionListener(this); } } COM: <s> sets this components clock </s>
funcom_train/10494467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MarketSummaryDataBean getMarketSummaryInternal() throws Exception { if (Log.doActionTrace()) { Log.trace("TradeAction:getMarketSummaryInternal()"); } MarketSummaryDataBean marketSummaryData = null; marketSummaryData = tradeServicesList[TradeConfig.runTimeMode].getMarketSummary(); return marketSummaryData; } COM: <s> compute and return a snapshot of the current market conditions this </s>
funcom_train/42381968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addResponseContent(HttpMethod method, ProcessorURI curi) { curi.setFetchStatus(method.getStatusCode()); Header ct = method.getResponseHeader("content-type"); curi.setContentType((ct == null) ? null : ct.getValue()); // Save method into curi too. Midfetch filters may want to leverage // info in here. curi.setHttpMethod(method); } COM: <s> this method populates code curi code with response status and </s>
funcom_train/7346639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateDifference(Node node, int difference) { if (current_node == null) { current_node = node; current_offset_adj = difference; } else if (current_node == node) { current_offset_adj += difference; } else if (current_node != node) { current_node = node; current_offset_adj = difference; } } COM: <s> updates the current offset based on the difference in lengths between the </s>
funcom_train/48978692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected T performOperation(Class<? extends Operation> type, T a1, T a2) { if (type==Addition.class) return add(a1,a2); if (type==Multiplication.class) return multiply(a1,a2); if (type==Division.class) return divide(a1,a2); if (type==Exponentiation.class) return pow(a1,a2); if (type==Negation.class) return negate(a1); return null; } COM: <s> perform an arithmetical operation on two mapped arguments </s>
funcom_train/27674639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Package newPackage( final String fqn ) { // TODO - must add inventory to package, otherwise some code will not work. // Which code, dunce? I really should have put a better comment here. final Package p = new Package( this, fqn, false ); this.addPackage( p ); return p; } COM: <s> returns a package for the specified fully qualified name and nick name </s>
funcom_train/5548597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File f) { if (f.isDirectory()) { return true; } String ext = getExtension(f); if (ext==null) return false; return ext.equalsIgnoreCase("xml")|| ext.equalsIgnoreCase("xsl")|| ext.equalsIgnoreCase("xsd"); } COM: <s> the method used by the gui </s>
funcom_train/4547801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MemoryArea deepCopy(){ MemoryArea newMemoryArea = new MemoryArea(this.getStartPos(), this.getSize()); newMemoryArea.setUsedSize(this.getUsedSize()); //newMemoryArea.setProcessNumber(this.getProcessNumber()); return newMemoryArea; } COM: <s> returns a deep copy of the memory area all elements are new created </s>
funcom_train/14088691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setReceivedDate(Date d) throws IOException { String chunkId = "0E06"; removeEntry(chunkId, IMessage.PT_SYSTIME); this.createHeaderEntry(this.rootNode, "__substg1.0_" + chunkId, INode.PT_SYSTIME, INode.createPtSysDate(d)); } COM: <s> sets the recieved date of the email the msg file represents </s>
funcom_train/3273048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void launchMissile(Ship target, MissileWeaponComponent weapon, Vector attackDamage, Point3f location, Vector3f heading, Vector3f up) { Missile missile = new Missile(target, location, heading, up, nextMissileName(), weapon, attackDamage); missiles.addLast(missile); fleetGroup.addChild(missile.shipGroup()); } COM: <s> launch a missile that follows the specified </s>
funcom_train/28426361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSlideshowIntervalMillis(int millis) { millis = clip(SLIDESHOW_MIN_MILLIS, SLIDESHOW_MAX_MILLIS, millis); this.slideshowIntervalMillis = millis; ImageUtils.msg("-#- slideshow wait interval is " + millis + " msec."); if (slideshowManager != null) { slideshowManager.setIntervalMillis(millis); slideshowManager.interrupt(); // apply new value now } } COM: <s> sets a new wait interval for slideshows </s>
funcom_train/39893729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void configureTokenButton(Object tokenId, Button button) { button.setCaption(getTokenCaption(tokenId) + " ×"); button.setIcon(getTokenIcon(tokenId)); button.setDescription("Click to remove"); button.setStyleName(Button.STYLE_LINK); } COM: <s> configures the token button </s>
funcom_train/50899111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isTranslatable(String sFileName) { if (sFileName==null) return false; int iExt = sFileName.lastIndexOf('.'); if (iExt!=-1) return Arrays.binarySearch(aExtensions, sFileName.substring(iExt).toLowerCase())>=0; else return false; } // isTranslatable COM: <s> find out whether the given file is in the list of translatable files </s>
funcom_train/11104574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeScriptStart(ResponseWriter writer) throws IOException { writer.startElement("script", this); writer.writeAttribute("type", "text/javascript", null); writer.writeAttribute("language", "Javascript1.1", null); writer.write("\n"); } COM: <s> p write the start of the script for client side validation </s>
funcom_train/33134247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean endsWith(final BinaryData data) { if (data.length() > length()) { return false; } final ByteIterator i1 = data.iterator(); final ByteIterator i2 = iterator(length() - data.length(), length()); while (i1.hasNext()) { if (i1.nextByte() != i2.nextByte()) { return false; } } return true; } COM: <s> check if one binary data ends with another </s>
funcom_train/28257956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(long mediaTime) { ProgressBar bar; if (!isOperational()) { return; } bar = (ProgressBar) getControlComponent(); long diff = bar.getMaximum() - bar.getMinimum(); // Translate time to slider value int value = (int) ((diff * mediaTime) / duration); SwingUtilities.invokeLater( new SetProgressSliderValueThread(bar, value)); } COM: <s> position slider based on media time </s>