__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/51575184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCondition(final String cond) { // Separate our word and option final String[] tempCond = this.splitOptionWord(cond); if (DEBUG) { System.err.println("Rule.addCondition: adding: " + tempCond[OPTION] + " " + tempCond[WORD]); } conditions.addElement(tempCond); } COM: <s> adds a new rule to the end the existing list of rules </s>
funcom_train/1170232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CardList getEnchantMagnets() { return this.filter(new CardListFilter() { public boolean addCard(Card c) { return (c.isCreature() && (c.getSVar("EnchantMe").equals("Multiple") || (c.getSVar("EnchantMe").equals("Once") && !c.isEnchanted()))); } }); } COM: <s> p get enchant magnets </s>
funcom_train/14230156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mediaSignalDetectorPatternMatched(java.lang.String terminal, javax.telephony.media.Symbol[] sigs, int index) { // Try to send the event to the client side try { this.getDelegate().mediaSignalDetectorPatternMatched(terminal, SymbolHolder.create(sigs), index); } catch (RemoteException re) { // eat System.err.println("Error pushing events back to client: "); re.printStackTrace(System.err); } } COM: <s> media signal detector pattern matched method comment </s>
funcom_train/15717398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection getConnection() { if (connection == null) { try { connection = ((OkApplication)Application.get()). getConnectionPool().getConnection(); // configure connection connection.setAutoCommit(false); } catch (SQLException ex) { ex.printStackTrace(); } } return connection; } COM: <s> whenver you need a connection just call </s>
funcom_train/35285398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsAll(final T source, final T... targets) { if (source == null) { throw new NullPointerException("null source"); } if (targets == null) { throw new NullPointerException("null targets"); } for (T target : targets) { if (!contains(source, target)) { return false; } } return true; } COM: <s> check if all of specified code targets code has a direct or indirect </s>
funcom_train/34527739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ListFeed getQueryResult( String structuredQuery ) { ListFeed result = null; try { ListQuery query = new ListQuery( new URL ( getUrl() ) ); query.setSpreadsheetQuery(structuredQuery); result = service.query( query, ListFeed.class ); } catch( Exception ex ) { String msg = "Unable to perform a SalesForce query '" + structuredQuery + "'."; // throw new DataSourceException(msg, ex); } return result; } COM: <s> executes a query on the sales force data store </s>
funcom_train/42794920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RectF fill(final PDFRenderer state, final Canvas g, final Path s) { g.drawPath(s, mainPaint); final RectF bounds = new RectF(); final RectF result = new RectF(); s.computeBounds(bounds, false); g.getMatrix().mapRect(result, bounds); return bounds; } COM: <s> fill a path with the paint and record the dirty area </s>
funcom_train/28867547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(long time, int nm) { assert (currentTime > time); recordMinMax(nm); int off = current.offset; current.values[off] = nm; current.times[off] = time; total++; currentTime = time; current.offset++; if (current.offset >= fragSize) { newFragment(); } } COM: <s> the code add code method adds a new measurement to this set </s>
funcom_train/29722383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemQuit() { if (jMenuItemQuit == null) { jMenuItemQuit = new JMenuItem(); jMenuItemQuit.setText(Bundle.getText("mainFrame.exit")); jMenuItemQuit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { tryToquit(); } }); } return jMenuItemQuit; } COM: <s> this method initializes j menu item quit </s>
funcom_train/13272001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFloorColoredOrTextured(boolean roomFloorColoredOrTextured) { if (this.roomFloorColoredOrTextured != roomFloorColoredOrTextured) { this.roomFloorColoredOrTextured = roomFloorColoredOrTextured; this.propertyChangeSupport.firePropertyChange(Property.ROOM_FLOOR_COLORED_OR_TEXTURED.name(), !roomFloorColoredOrTextured, roomFloorColoredOrTextured); } } COM: <s> sets whether room floors should be rendered with color or texture </s>
funcom_train/18032176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getButtonScale() { if (m_buttonScale == null) { m_buttonScale = new JButton(); m_buttonScale.setIcon(FBImage.getIcon(FBImage.SCALE)); m_buttonScale.setToolTipText(Messages.getString("FBToolbar.4")); //$NON-NLS-1$ m_buttonScale.setMargin(new Insets(0, 0, 0, 0)); } return m_buttonScale; } COM: <s> returns the scale button </s>
funcom_train/34342707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem1() { if (stringItem1 == null) {//GEN-END:|24-getter|0|24-preInit // write pre-init user code here stringItem1 = new StringItem("Mi primer programa", "Milciades Ramirez");//GEN-LINE:|24-getter|1|24-postInit // write post-init user code here }//GEN-BEGIN:|24-getter|2| return stringItem1; } COM: <s> returns an initiliazed instance of string item1 component </s>
funcom_train/14520219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHardTokenProfile(Admin admin, String name, HardTokenProfile profile) throws HardTokenProfileExistsException{ if (log.isTraceEnabled()) { log.trace(">addHardTokenProfile(name: " + name + ")"); } addHardTokenProfile(admin,findFreeHardTokenProfileId().intValue(),name,profile); log.trace("<addHardTokenProfile()"); } // addHardTokenProfile COM: <s> adds a hard token profile to the database </s>
funcom_train/34069323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { //change mode mode = this.m; //set edit and delete button status updateStaticButtons(); //set node, connector & move button status AbstractButton ab = (AbstractButton) e.getSource(); updateButtons(ab.getAction().getValue("type").toString()); } COM: <s> updates mode and sets correct button enabled </s>
funcom_train/1493400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getForwardLimitOK() { byte[] dataBuffer = new byte[8]; byte dataSize; dataSize = getTransaction(LM_API_STATUS_LIMIT, dataBuffer); if (dataSize == 1) { return (dataBuffer[0] & Limits.kForwardLimit_val) != 0; } return false; } COM: <s> get the status of the forward limit switch </s>
funcom_train/325271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Double getHorizonPixel(int x) { Double y = null; switch (vrControl.getVrStatus()) { case VRControl.MEASURE_FROM_HORIZON: y = getHorizonPixel_H(x); break; case VRControl.MEASURE_FROM_SHORE: y = getHorizonPixel_H(x); break; } if (y == null) { /* * Work something out based on the tilt so that the * shore line gets shown at the top of the image in any case. */ double dx = x - (getImageWidth()/2); y = -dx * Math.tan(vrControl.getHorizonTilt() * Math.PI / 180); } return y; } COM: <s> gets the y coordinate of the horizon at a given x </s>
funcom_train/40327437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Property getProperties (Config config) throws Config.Exception { Property props = null; ObjArray<Property> a = config.getInstances("search.properties", Property.class); if (a != null) { for (Property p : a) { props = PropertyMulticaster.add(props, p); } } return props; } COM: <s> return set of configured properties </s>
funcom_train/37421418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isParentSchema() { Node parentNode; PmtSchemaElement pmtParentNode = new PmtSchemaElement(); parentNode = mNode.getParentNode(); if (parentNode.getNodeType() == Node.ELEMENT_NODE) { pmtParentNode.setNode((Element)parentNode); if (pmtParentNode.isTagNameGivenName(SCHEMA_TAG_NAME)) { return true; } } return false; } COM: <s> determines if the parent of the current node is the schema node </s>
funcom_train/8484879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ATObject base_clone_(ATObject original) throws InterpreterException { if (original.meta_isTaggedAs(NativeTypeTags._MIRROR_).asNativeBoolean().javaValue) { return base_reflect_(base_clone_(original.impl_invokeAccessor(original, NATMirrorRoot._BASE_NAME_, NATTable.EMPTY))); } else { return original.meta_clone(); } } COM: <s> the tt clone tt language construct </s>
funcom_train/42612834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONArray toJSONArray(JSONArray names) throws JSONException { if (names == null || names.length() == 0) { return null; } final JSONArray ja = new JSONArray(); for (int i = 0; i < names.length(); i += 1) { ja.put(this.opt(names.getString(i))); } return ja; } COM: <s> produce a jsonarray containing the values of the members of this </s>
funcom_train/46124000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSessionId(String pSessionId) { if(pSessionId == null) { throw new RequiredValueMissingValidationException("The given session's id can not be null."); // If the session's id length is lower than 70 characters }else if(pSessionId.length() < 70) { throw new RequiredValueMissingValidationException("The given session's id should have more than 70 characters for security reason."); } this.id = pSessionId; } COM: <s> a sessions id </s>
funcom_train/45494633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Observable obs, Object obj) { /* * Check if there are conference members in the council which need * to be added to the results, but only if this vote is not yet * finished, because then it will be frozen. */ for(ConferenceMember c: council.getConferenceMembers()) { if(c instanceof VotingMember && !quorumResults.contains(new QuorumResult(c))) { quorumResults.add(new QuorumResult(c)); } } } COM: <s> gets called when the observable changes </s>
funcom_train/42068203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUnshiftedNotePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ChunkInstrument_unshiftedNote_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ChunkInstrument_unshiftedNote_feature", "_UI_ChunkInstrument_type"), WavPackage.Literals.CHUNK_INSTRUMENT__UNSHIFTED_NOTE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the unshifted note feature </s>
funcom_train/45776146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveToFile() throws IOException{ File f = new File("RegisteredNames.txt"); if (! f.exists()) { f.createNewFile(); } BufferedWriter out = new BufferedWriter(new FileWriter(f, false)); for (String name : allowedNames) { out.write(name + "\r\n"); } out.close(); logger.log(Level.INFO, "Allowed name list saved to disk"); } COM: <s> basic implementation for saving allowed name list from disk </s>
funcom_train/50364838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MibNode getPreviousNode() { MibNode previousSibling; MibNode myParent = (MibNode) getParent(); if (myParent == null) { return null; } previousSibling = getPreviousSibling(); if (previousSibling != null) { if (previousSibling.getChildCount() == 0) return previousSibling; else return previousSibling.getLastLeaf(); } else { return myParent; } } COM: <s> returns the node that precedes this node in a preorder traversal of this </s>
funcom_train/47184308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PersonnelBean getPersonnel(String input) throws iTrustException { try { long mid = Long.valueOf(input); PersonnelBean personnel = personnelDAO.getPersonnel(mid); if (personnel != null) { return personnel; } else throw new iTrustException(Messages.getString("ViewPersonnelAction.1")); //$NON-NLS-1$ } catch (NumberFormatException e) { e.printStackTrace(); throw new iTrustException(Messages.getString("ViewPersonnelAction.2")); //$NON-NLS-1$ } } COM: <s> retrieves a personnel bean for the mid passed as a param </s>
funcom_train/10448185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String generateNonce(Request request) { long currentTime = System.currentTimeMillis(); String ipTimeKey = request.getRemoteAddr() + ":" + currentTime + ":" + getKey(); byte[] buffer; synchronized (md5Helper) { buffer = md5Helper.digest( ipTimeKey.getBytes(Charset.defaultCharset())); } return currentTime + ":" + md5Encoder.encode(buffer); } COM: <s> generate a unique token </s>
funcom_train/28351016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getInd0(double[] arr, int nP, double x) { int ind0 = 0; int ind1 = nP - 1; if (x <= arr[ind0]) { return ind0; } if (x >= arr[ind1]) { return (ind1 - 1); } int ind = 0; while ((ind1 - ind0) != 1) { ind = (ind1 + ind0) / 2; if (arr[ind] > x && arr[ind0] <= x) { ind1 = ind; } else { ind0 = ind; } } return ind0; } COM: <s> returns the index in array for which arr index x arr index 1 </s>
funcom_train/41665687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceEntry(IEntities<?> entry) { if (entry != null) { ConceptConfig conceptConfig = entry.getConceptConfig(); if (conceptConfig != null) { IEntities<?> entryEntities = getEntry(conceptConfig); if (entryEntities != null) { entryMap.put(entry.getConceptConfig(), entry); } } } else { String msg = "Model.replaceEntry -- entry is null."; throw new ModelibraRuntimeException(msg); } } COM: <s> replaces the entry </s>
funcom_train/10822527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void get(DataInputStream in, Tuple row) throws IOException, ParseException { checkNumberColumnCompatible(row, projection.getSchema()); tuple.readFields(in); TypesUtils.resetTuple(row); try { subcolextractor.splitColumns(row); } catch (ExecException e) { // not going to happen. } } COM: <s> read a tuple from the stream and perform projection </s>
funcom_train/3909552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDocument(Metadata md) { //FIXME Added on 13/04 for error while importing/exporting embedded MD destroy(); this.removeAll(); controller.setMetadata(md, this); mdPanel = new FormSubPanel(md.getRootElement(), controller); initPanel(); return; } COM: <s> set the document for the panel and add all inner panels </s>
funcom_train/25587890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void parseVersionControl(WebDAVResponseEvent responseEvent) { try { int code = responseEvent.getResponse().getStatusCode(); if (code >= 200 && code < 300) fireVersionControlEvent(responseEvent.getResource(), code); else fireVersionControlEvent(responseEvent.getResponse() .getReasonLine(), code); } catch (Exception e) { } } COM: <s> process the response to a version control request </s>
funcom_train/37167857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Class loadClass(final String name, boolean resolve) throws ClassNotFoundException { //System.out.println(this+" loading "+name); Class c; try { if (!name.startsWith(packageName)) c = super.loadClass(name, resolve); else c = packageLoader.loadClass(name); } catch (ClassNotFoundException e) { c = peerFindLoadedClass(name); if (c == null) c = peerLoadClass(name); if (c == null) throw e; if (resolve) resolveClass(c); } return c; } COM: <s> altered class lookup </s>
funcom_train/32069029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeDocumentAttachmentContent(DocumentAttachmentContent documentAttachmentContent) { boolean removedOK = getDocumentAttachmentContents().remove(documentAttachmentContent); if (removedOK) { documentAttachmentContent.setDocumentAttachment(null); } else { if (logger.isWarnEnabled()) { logger.warn("remove returned false"); } } return removedOK; } COM: <s> remove the passed document attachment content from the document attachment collection and unset </s>
funcom_train/18214060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DatabaseAccessConfiguration_name_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DatabaseAccessConfiguration_name_feature", "_UI_DatabaseAccessConfiguration_type"), EvaluationmodelPackage.Literals.DATABASE_ACCESS_CONFIGURATION__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the name feature </s>
funcom_train/48705372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void concludeMoveGroup(AbstractUndoableEdit undo, GroupTreeNode node) { panel.undoManager.addEdit(undo); panel.markBaseChanged(); frame.output(Globals.lang("Moved group \"%0\".", node.getGroup().getName())); } COM: <s> concludes the moving of a group tree node by storing the specified </s>
funcom_train/32789863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addThreads (int cThreadsToAdd) { synchronized (getThreadCountLock()) { m_cThreadsToAdd += cThreadsToAdd; for (; m_cThreadsToAdd > 0; m_cThreadsToAdd --) { new PooledThread(this, m_nNextID ++).start (); m_cThreads ++; } } } COM: <s> add the specified number of threads to the pool of worker threads </s>
funcom_train/2285491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Component getActiveComponentAt(MouseEvent e) { Point p = e.getPoint(); if (pinnedMark.contains(p)) { pinnedMark.setHidden(false); return pinnedMark; } else { pinnedMark.setHidden(true); } if (titlePanel.contains(p)) { return titlePanel; } return null; } COM: <s> decide which componet is active and return it </s>
funcom_train/41717629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String addPage() { int tabCount = pane.getTabCount(); int pageIdx = pageCount++; String pageName = "Page " + pageIdx; ShapeBuilderPanel task = new ShapeBuilderPanel(configuration); // ExpressedShape nullShape = new ExpressedRectangle(new // NotifyingPoint(0, // 0), null, null); // task.getModel().addShape(nullShape); pane.addTab(pageName, task); pane.getModel().setSelectedIndex(tabCount); return pageName; } COM: <s> adds a page to the tabbed pane </s>
funcom_train/31163509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CursorData createCursorData(CaretEvent e) { int start = e.getDot(), end = e.getMark(); if (end < start) { start = end; end = e.getDot(); } else if (start == end) start = Math.max(0, start-length); return new CursorData(getID(), start, end); } COM: <s> creates a cursor data that will move the cursors highlight </s>
funcom_train/10782427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getExpecetedResultCount(String key, boolean innerJoin) { int count = 0; for (int i = 0; i < MAGAZINE_PUBLISHER_NAME_PAIRS.length; i++) { String magName = MAGAZINE_PUBLISHER_NAME_PAIRS[i][0]; String pubName = MAGAZINE_PUBLISHER_NAME_PAIRS[i][1]; if (magName.indexOf(key) != -1) if (!innerJoin || (innerJoin && pubName != null)) count++; } return count; } COM: <s> count number of expected result based on inner outer join condition and </s>
funcom_train/7644319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void growBits(int pos) { pos++; // Inc to get correct bit count long[] tempBits = new long[(pos / ELM_SIZE) + (pos % ELM_SIZE > 0 ? 1 : 0)]; System.arraycopy(bits, 0, tempBits, 0, bits.length); bits = tempBits; } COM: <s> increase the size of the internal array to accomodate pos bits </s>
funcom_train/19221515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HashSet separateMinimalElements(Hashtable sd){ HashSet mins = new HashSet(); mins.addAll(sd.keySet()); Iterator tiles = sd.keySet().iterator(); while (tiles.hasNext()){ TiledSet atile = (TiledSet) tiles.next(); mins.removeAll((HashSet)sd.get(atile)); } //removing entries Iterator ms = mins.iterator(); while(ms.hasNext()){ TiledSet ts = (TiledSet) ms.next(); sd.remove(ts); } return mins; } COM: <s> do it negatively </s>
funcom_train/27806535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean confirmData(String org, String addr, String phone, String fax) { if(org.compareTo("") == 0 || addr.compareTo("") == 0 || phone.compareTo("") == 0 || fax.compareTo("") == 0) return false; return true; } COM: <s> verifies that the data of the parameters are not empty </s>
funcom_train/21042911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPivot(Placeable mover, Point newPivot) throws PositionException { if (!this.contents.contains(mover)) throw new UnsupportedOperationException(); testChange(mover, newPivot, mover.getOrientation()); this.contents.remove(mover); mover.setPivot(newPivot); this.contents.add(mover); } COM: <s> moves placeable to have a new pivot </s>
funcom_train/21430701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOf(double mz) { int ind = 0; double last_err = Double.POSITIVE_INFINITY; for( PeakAnnotation pa : peak_annotations ) { double err = Math.abs(mz - pa.getPeak().getMZ()); if( err > last_err ) return ind-1; last_err = err; ind++; } return ind-1; } COM: <s> return the index of the first annotation for the peak with the </s>
funcom_train/17989298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getPercent() { // If we have no range if (m_maxProgress <= m_minProgress) { return 0.0; } // Calculate the relative progress double percent = ((m_curProgress - m_minProgress) / (m_maxProgress - m_minProgress)); return Math.max(0.0, Math.min(1.0, percent)); } COM: <s> get the current percent complete relative to the minimum and </s>
funcom_train/15687906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String fetchRegionID(int teamID) { String xmlFile = ""; try { xmlFile = htUrl + "?file=teamdetails&teamID=" + teamID; xmlFile = getCHPPWebFile(xmlFile); } catch (Exception e) { HOLogger.instance().log(getClass(), e); return "-1"; } return XMLTeamDetailsParser.fetchRegionID(xmlFile); } COM: <s> get the region id for a certain team </s>
funcom_train/48024398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getOriginalCode(CommonTree tree) { String indent = removeIndent(tree.getToken()); StringBuffer originalCode = new StringBuffer(indent); originalCode.append(tokens.toOriginalString( input.getTreeAdaptor().getTokenStartIndex(tree), input.getTreeAdaptor().getTokenStopIndex(tree))); String output = originalCode.toString(); // remove multiline comments output = output.replaceAll("/\\*(?:.|[\\n\\r])*?\\*/",""); return output; } COM: <s> will return original code of the tree before any rewrite </s>
funcom_train/583085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModule( Module module ){ setModuleWithoutMenu( module ); // String key = module.getMenu(); // _______________________________________ // // ADD IT TO THE MENU [and remove it from // his eventually previous menu] // _______________________________________ fireSystemEvent( ISystemListener._SYSTEM_MODULE_MENUSET_, module ); Log.internalLog( "Module # " + module.getName() ); //$NON-NLS-1$ } COM: <s> add module to modules and add it to the menu </s>
funcom_train/37559248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBaseSize(Dimension newSize) throws IllegalArgumentException { if ((newSize.width > 0) && (newSize.width < maxSize.width) && (newSize.height > 0) && (newSize.height < maxSize.height)) { this.baseSize = newSize; } else { throw new IllegalArgumentException("Base size out of bounds"); } } COM: <s> sets the base size of the tile popup window </s>
funcom_train/28117086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(InputSource input) throws SAXException { if (input instanceof JDOMInputSource) { try { this.output(((JDOMInputSource)input).getDocument()); } catch (JDOMException e) { throw new SAXException(e.getMessage(), e); } } else { throw new SAXNotSupportedException( "Only JDOM Documents are supported as input"); } } COM: <s> parses an xml document </s>
funcom_train/29298436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getQuestion() { currentTestPair = examiner.getNextQuestion(); nrQuestionsAsked++; testform.Question_label.setText(currentTestPair.getQuestion()); testform.hint_label.setText(currentTestPair.getHint()); testform.context_label.setText(currentTestPair.getContext()); testform.lineEdit.setText(""); } COM: <s> get a question from the examiner </s>
funcom_train/39314478
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReadInt(){ System.out.println("testReadInt"); System.out.print("readInt function can't be tested because "); System.out.print("the function needs DataInputStream parameter "); System.out.print("which is from Stream. Therefore DataInputStream "); System.out.println("can't just be initialized to be used for testing"); } COM: <s> test of read int method of class converter </s>
funcom_train/19626841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleSocketError(Socket socket, IOException e) { LOG.warn(String .format("Error on socket to %s", socket.getInetAddress()), e); try { socket.close(); } catch (IOException e1) { // can't do anything if it wont close... LOG.warn("Error closing socket", e1); } } COM: <s> prints an error message and attempts to close the socket </s>
funcom_train/39305335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(byte[] data, int offset, int length) { for (int x = offset; x < (offset + length) && x < data.length; x++) { if (data[x] == 13) newline = this.count + x; } super.write(data, 0, data.length); } COM: <s> overrides the basic write does inline checking to see if the return </s>
funcom_train/26138789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel3() { if (jPanel3 == null) { FlowLayout flowLayout = new FlowLayout(); flowLayout.setHgap(0); flowLayout.setAlignment(FlowLayout.LEFT); jPanel3 = new JPanel(); jPanel3.setPreferredSize(new Dimension(100, 30)); jPanel3.setLayout(flowLayout); jPanel3.add(jLabel, null); } return jPanel3; } COM: <s> this method initializes j panel3 </s>
funcom_train/1870578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MortgagePaymentDetails getMortgagePaymentByID(final int paymentID) { MortgagePaymentDetails temp; for(Iterator it = mortgagePayments.iterator(); it.hasNext();) { temp = (MortgagePaymentDetails)it.next(); if(temp.getPaymentID() == paymentID) return temp; } return null; } COM: <s> get the mortgage payment by its id if it exists for this mortgage </s>
funcom_train/47540634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String showSendMassEmail() throws Exception { if (logger.isDebugEnabled()) { logger.debug("showSendMassEmail() - start"); //$NON-NLS-1$ } populateGroupList(); if(submit!=null && submit.contains("Send Letter")){ addActionMessage("Unable to connet mail server"); groupId = null; } if (logger.isDebugEnabled()) { logger.debug("showSendMassEmail() - end"); //$NON-NLS-1$ } return SUCCESS; } COM: <s> show send mass email </s>
funcom_train/12278396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void installExtensionFromStore(String id, String version, HttpServletRequest request) throws IOException, ExtensionException { URLConnection connection = downloadExtension(id, version); InputStream inputStream = connection.getInputStream(); installExtensionFromStore(id, inputStream, request, connection.getContentLength()); } COM: <s> install an extension directly from the adito extension store given its id </s>
funcom_train/3087312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clientInput(String input) { if (renderedActive) { DateField df = (DateField) getComponent(); String text = input; int index = input.lastIndexOf('|'); if (index != -1) { text = input.substring(0, index); String expanded = input.substring(index + 1); df.setExpanded(Boolean.valueOf(expanded).booleanValue()); } df.setText(text); } } COM: <s> called when the client state has to be saved </s>
funcom_train/20286956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPriorityId(String tmp) { try { if (tmp.toLowerCase().startsWith("h")) { setPriorityId(3); } else if (tmp.toLowerCase().startsWith("l")) { setPriorityId(1); } else { this.priorityId = Integer.parseInt(tmp); } } catch (Exception e) { setPriorityId(2); } } COM: <s> sets the priority id attribute of the assignment object </s>
funcom_train/24589060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean include( ITableFilter.Row entry ) { for( int col=0; col< entry.getValueCount(); col++ ) { Collection<DistinctColumnItem> values = getValues(col); if ( isEmpty(values) ) continue; // no filtering for this column if ( !values.contains( new DistinctColumnItem( entry.getValue(col), 0))) return false; } return true; } COM: <s> standard test for row inclusion using current filter values </s>
funcom_train/10906862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int outputStreamData(StreamCache encodedStream, OutputStream out) throws IOException { int length = 0; byte[] p = encode("stream\n"); out.write(p); length += p.length; encodedStream.outputContents(out); length += encodedStream.getSize(); p = encode("\nendstream"); out.write(p); length += p.length; return length; } COM: <s> output just the stream data enclosed by stream endstream markers </s>
funcom_train/29021491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillPath (Path path) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (path == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (path.handle == 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT); initGdip(); checkGC(FILL); int mode = OS.GetPolyFillMode(handle) == OS.WINDING ? Gdip.FillModeWinding : Gdip.FillModeAlternate; Gdip.GraphicsPath_SetFillMode(path.handle, mode); Gdip.Graphics_FillPath(data.gdipGraphics, data.gdipBrush, path.handle); } COM: <s> fills the path described by the parameter </s>
funcom_train/41646298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object doAdaptedaui2adaptedaui2android7cui(IProgressMonitor monitor) throws ATLCoreException, IOException, ATLExecutionException { ILauncher launcher = new EMFVMLauncher(); Map<String, Object> launcherOptions = getOptions(); launcher.initialize(launcherOptions); launcher.addInModel(inModel, "IN", "adaptedaui"); launcher.addOutModel(outModel, "OUT", "adaptedaui2android7cui"); return launcher.launch("run", monitor, launcherOptions, (Object[]) getModulesList()); } COM: <s> transform the models </s>
funcom_train/29598595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireNodePositionEvent(final NodePositionEvent event) { // Get listeners final EventListener[] list = listeners.getListeners(NodePositionListener.class); // Fire the event (call-back method) for (int i = list.length - 1; i >= 0; i -= 1) { ((NodePositionListener) list[i]).handleEvent(event); } } COM: <s> fires a node position event </s>
funcom_train/16614298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection getTargetConnection() { return buildConnection(System.getProperty("idmapping.target.host"), System.getProperty("idmapping.target.port"), System .getProperty("idmapping.target.database"), System.getProperty("idmapping.target.user"), System .getProperty("idmapping.target.password")); } COM: <s> return a connection to the target database </s>
funcom_train/10938975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T get(ServletRequest request, Map<String, Object> expandContext) { AttributeAccessor<T> aa = new AttributeAccessor<T>(name, expandContext, this.attributeName, this.fma, this.needsExpand); return aa.get(request); } COM: <s> based on name get from servlet request or from list in servlet request </s>
funcom_train/12177024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PAPIElement getCurrentElement() { PAPIElement element; if (papiElementStack == null || papiElementStack.isEmpty()) { element = null; } else { element = (PAPIElement) papiElementStack.peek(); } if (logger.isDebugEnabled()) { logger.debug("PAPI ELEMENT STACK: Current " + element); } return element; } COM: <s> papi get the current papielement from the top of the stack </s>
funcom_train/10532974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSerializationEmptyBCS() throws IOException, ClassNotFoundException { org.apache.beehive.controls.runtime.webcontext.ControlBeanContextServicesSupport cbcss = getContext(); cbcss.setDesignTime(true); File serFile = serializeCBCSS(cbcss, "cbcss_1"); cbcss = deserializeCBCSS(serFile); assertTrue(cbcss.isEmpty()); assertTrue(cbcss.isDesignTime()); } COM: <s> test the serialization of an empty control bean context services support </s>
funcom_train/8078851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double times( int i, int j0, int j1, PaceMatrix B, int l ) { double s = 0.0; for(int j = j0; j <= j1; j++ ) { s += A[i][j] * B.A[j][l]; } return s; } COM: <s> multiplication between a row or part of a row of the first matrix </s>
funcom_train/33149209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disable () { checkAccess () ; /* Release references to allow gc */ _pageContext = null ; _session = null ; _application = null ; _config = null ; _out = null ; _page = null ; _request = null ; _response = null ; /* Prevent future access */ enabled = false ; } COM: <s> invoke this method when the invocation context is finished with </s>
funcom_train/37557499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String setNewPassword(String newPasswd, String oldPasswd) { // TODO: Change back to true/false return if (checkPassword(oldPasswd)) { setProp(PASSWORD, crypt.getHash(newPasswd)); return "Password successfully changed!"; } else { return "Settings.setNewPassword - FAILED: Old password was wrong."; } } COM: <s> check if the supplied old plaintext password matches the stored </s>
funcom_train/3330002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processAttributes(ComplexType complexType, SGStateInfo sInfo) { if (complexType == null) return; Enumeration enum = complexType.getAttributeDecls(); while (enum.hasMoreElements()) { AttributeDecl attribute = (AttributeDecl)enum.nextElement(); processSimpleType(attribute.getSimpleType(), sInfo); } } //-- processAttributes COM: <s> processes the attribute declarations for the given complex type </s>
funcom_train/35005979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getIDFromBeanClass(Class<?> clazz) { Definition def = definitionManager.getDefinition(clazz); String ID = ""; if (def.isAnnotationPresent(Bean.class)) { String value = def.getAnnotation(Bean.class).value(); ID = value == null || value.isEmpty() ? clazz.getName() : def .getAnnotation(Bean.class).value(); } else ID = clazz.getName(); return ID; } COM: <s> returns the id </s>
funcom_train/43213050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean verifySignature(byte[] bytes, byte[] sig, PublicKey key, String algorithm) throws GeneralSecurityException, IOException { java.security.Signature signature = java.security.Signature.getInstance(algorithm); signature.initVerify(key); signature.update(bytes); return signature.verify(sig); } COM: <s> helper method to verify signatures </s>
funcom_train/25811375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopAnim(Cell cell) { if (cell == null) return; CellRegion dirty = mStopDirty; mStopDirty.clear(); synchronized(cell) { AnimType type = cell.getAnimType(); if (type != null) { AnimData data = (AnimData) cell.getAnimData(); type.onStop(this, cell, data, dirty); cell.setAnimType(null); if (data != null) data.clear(); } } if (!dirty.isEmpty) { mAsqareContext.invalidateRegion(dirty); } } COM: <s> stops the animation associated with a given cell </s>
funcom_train/23671587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public E findNodeForChild(List<E> nodes, Object value) { E result = null; for( E child :nodes) { Object childValue = child.getValue(); boolean match = value == null ? childValue==null : value.equals(childValue); if(match){ result = child; break; } } return result; } COM: <s> looks up node by value </s>
funcom_train/42658509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void step(final int stepDirection, final int stepSpeedMode, final boolean playNote, final long delay) { // TODO Auto-generated method stub stepNotesPlayed = true; try { while (stepMidi(stepDirection, playNote, delay) == false) { } } catch (Exception ex) { UIUtils.log("Error while playing midi: " + ex.getMessage()); } stepNotesPlayed = false; } COM: <s> steps thru midi events </s>
funcom_train/42061244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performDataThroughputTest() { long dtt_start = 0L; long dtt = 0L; int id = 0; results = new long[Config.METHOD_CALLS]; for (int i = 0; i < Config.METHOD_CALLS; i++) { byte[] testBytes = new byte[PTClient.datasize]; id = messageId++; dtt_start = System.nanoTime(); sendBytes(id, testBytes); dtt = System.nanoTime(); dtt = dtt - dtt_start; results[i] = dtt; } } COM: <s> test method for measuring the data throughput </s>
funcom_train/15922611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Context pushStatic() { assert (depType == null); if (reporter.should_report(TOPICS, 4)) reporter.report(4, "push static"); Context v; if (isCode() || isAsync() || isAt()) { v = pushBlock(); } else { v = push(); } v.staticContext = true; return v; } COM: <s> enter a static scope </s>
funcom_train/12280956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VFSStore getStore(String scheme) { for(Iterator i = stores.values().iterator(); i.hasNext(); ) { VFSStore s = (VFSStore)i.next(); if(s.getProvider().willHandle(scheme)) { return s; } } return null; } COM: <s> get a store that will handle a given a scheme </s>
funcom_train/8571712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object findObject(Widget sender) { Iterator<A> idIt = ids.iterator(); for (Iterator<W> widgetIt = widgets.iterator(); widgetIt.hasNext();) { Widget widget = widgetIt.next(); Object id = idIt.next(); if (widget == sender) { return id; } } return null; } COM: <s> finds the id for a given widget </s>
funcom_train/21049550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(PrintWriter out) throws IOException { out.print("<!ENTITY "); if (isParsed) { out.print(" % "); } out.print(name); if (value != null) { char quoteChar = '"'; if (value.indexOf(quoteChar) >= 0) quoteChar = '\''; out.print(quoteChar); out.print(value); out.print(quoteChar); } else { externalID.write(out); if (ndata != null) { out.print(" NDATA "); out.print(ndata); } } out.println(">"); } COM: <s> writes out an entity declaration for this entity </s>
funcom_train/44497373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSequence times(ResultSequence arg) throws DynamicError { XSDouble val = (XSDouble) NumericType.get_single_type(arg, XSDouble.class); int res = (int) Math.round(value() * val.double_value()); return ResultSequenceFactory.create_new(new XDTYearMonthDuration(res)); } COM: <s> mathematical multiplication between this duration stored and the supplied duration </s>
funcom_train/31478295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void login(String userName, String password) throws ProtocolException, IOException { out.writeUTF(userName); out.writeUTF(password); checkOk(); World.getInstance().setId(in.readInt()); checkOk(); Communication.getInstance().logMessage("Logged in to "+toString(socket)+" as user '" + userName+"'.", MESSAGE); } COM: <s> sends username and password </s>
funcom_train/38258542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String ipHexToString(long ipaddress) { long part1 = ipaddress >> 24; long part2 = (ipaddress & 0x00FF0000) >> 16; long part3 = (ipaddress & 0x0000FF00) >> 8; long part4 = (ipaddress & 0x000000FF); return part1 + "." + part2 + "." + part3 + "." + part4; } COM: <s> auxiliary method to convert an hexadecimal ip address into the text form </s>
funcom_train/35716442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setCustomInformationControlCreator(IInformationControlCreator informationControlCreator) { if (informationControlCreator != null && fCustomInformationControlCreator instanceof IInformationControlCreatorExtension) { IInformationControlCreatorExtension extension= (IInformationControlCreatorExtension) fCustomInformationControlCreator; if (extension.canReplace(informationControlCreator)) return; } fCustomInformationControlCreator= informationControlCreator; } COM: <s> sets the temporary custom control creator overriding this managers default information control creator </s>
funcom_train/26229779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restoreBackup() { for (Iterator i = backupMap.keySet().iterator(); i.hasNext();) { File source = (File) i.next(); if ( ! successMap.containsKey(source) ) { File dest = (File) backupMap.get(source); utility.backupFile(dest, source); } } } COM: <s> restore the backup registered </s>
funcom_train/6279341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFromString() throws MessagingException { String s = ""; String sender = ""; Address[] ad = message.getFrom(); if (ad != null) { for (int i = 0; i < ad.length; i++) { if (i != 0) s = s + "; "; sender = ad[i].toString(); s = s + sender; } } try { return MimeUtility.decodeText(s); } catch (UnsupportedEncodingException e) { return s; } } COM: <s> method get from string </s>
funcom_train/21976711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRef(EdaObject o){ if(o instanceof EdaSymbol){ EdaSymbol s = (EdaSymbol)o; EdaAttribute ea = s.getPart().getAttribute("ref"); String ref = null; //only bring up an option dialog if the symbol has a reference designator if(ea != null){ ref = JOptionPane.showInputDialog(this,"Enter new reference.",ea.getValue()); } setRef(s,ref); } } COM: <s> sets the reference of the selected symbol </s>
funcom_train/28292910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPreventActivation(boolean iPreventActivation) { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - " + "setPreventActivation"); System.out.println(" ::--> " + iPreventActivation); } mPreventActivation = iPreventActivation; if (_Debug) { System.out.println(" :: SeqActivity --> END - " + "setPreventActivation"); } } COM: <s> sets the value of the choice constraint prevent activation sequencing </s>
funcom_train/33556922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Person mockOperation(Person person, String operation) { Assert.notNull(person, "person"); Assert.notNull(person, "operation"); final Person target = new Person(); ObjectUtils.shallowCopy(person, target); target.setAddress(target.getName().concat(operation)); target.addVets(Vet.createVets(DefaultPersonService.NUMBER_OF_ENTITIES)); // target.addVets(Vet.createVets(1)); return target; } COM: <s> makes a shallow copy of the given person and fills some parameters </s>
funcom_train/50398036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void submit(WorkflowWrapper workflow, IResultReceiver<WFClient, IInfo> receiver) { try { WorkflowManagementClient wf=createWorkflow( workflow.getWorkflowName(), workflow.getTerminationTime(), workflow.getStorageAddress()); wf.submitWorkflow(workflow); IInfo info=new InfoImpl(this); receiver.putResult(wf, info); } catch (Exception e) { Log.logException("Error submitting", e,logger); IInfo info=null; receiver.error(e, info); } } COM: <s> submit a workflow asynchronously </s>
funcom_train/4672833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showRecommendedSchedule(JFrame parentFrame) { SasDataReader reader = StudentAdvisingSystemApp.getSasDataReader(); if (reader != null) { ScrRecommendedSchedule scr = new ScrRecommendedSchedule(parentFrame, "Recommended Schedule", true); scr.setRecommendedScheduleModel(getNewTableModel()); scr.setLocationRelativeTo(scr.getParent()); scr.setVisible(true); } } COM: <s> shows the recommended schedule to the user by instantiating an instance of </s>
funcom_train/24049584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void normalize() { for (int i = 0; i < 2; i++) { if (!isNull(i)) { int minDepth = depth[i][1]; if (depth[i][2] < minDepth) minDepth = depth[i][2]; if (minDepth < 0) minDepth = 0; for (int j = 1; j < 3; j++) { int newValue = 0; if (depth[i][j] > minDepth) newValue = 1; depth[i][j] = newValue; } } } } COM: <s> normalize the depths for each geometry if they are non null </s>
funcom_train/44838048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAssistant(Assistant assistant) { try { AssistantObject assistantObject = (AssistantObject) assistant; assistantPK = ((AssistantPK) assistantObject.getPrimaryKey()).id; this.assistant = assistant; // EJB container specific setModified(true); } catch (Exception ex) { throw new EJBException("Error on setting the assistant"); } } COM: <s> sets the assistant </s>
funcom_train/43667157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getFileMenu() { if (fileMenu == null) { fileMenu = new JMenu("File"); fileMenu.setFont(new Font(Constants.FONT, Constants.FONT_STYLE_TOOL, 12)); fileMenu.setMnemonic(KeyEvent.VK_F); fileMenu.add(getNewInspectionItem()); fileMenu.add(getOpenInspectionItem()); fileMenu.add(getSaveInspectionItem()); fileMenu.add(getSaveInspectionAsItem()); fileMenu.add(getCloseItem()); } return fileMenu; } COM: <s> this method initializes file menu </s>
funcom_train/10364644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void applyOverrides(Configuration configuration) throws InvalidConfigException { Bundle bundle = configuration.getBundle(); Collection<GBeanData> gbeans = configuration.getConfigurationData().getGBeans(bundle); if (configuration.getManageableAttributeStore() != null) { configuration.getManageableAttributeStore().applyOverrides(configuration.getId(), gbeans, bundle); } } COM: <s> used to apply overrides to a configurations gbeans </s>