__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/9231393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteMessage(String queueName, String messageId) { QueueParameters qp = name_mapping.get(queueName); if (qp==null) { throw new QueueNotFoundException("Queue:" + queueName + " not found. Check your configuration..."); } try { qp.getQueue().deleteMessage(messageId); } catch (SQSException sqse) { log_.error(sqse); } } COM: <s> deletes a message in a specific queue </s>
funcom_train/4870802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DataObject getById(int objid) { Object elements[] = objectlist.toArray(); for (int i = 0; i < elements.length; i++) { if (elements[i] instanceof DataObject) { if (((DataObject) elements[i]).getObjid() == objid) { return (DataObject) elements[i]; } } } return null; } COM: <s> cycle through the list and get a data object by id </s>
funcom_train/32651267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PortalURL createPortalURL(HttpServletRequest request) { PortalURL portalURL = (PortalURL) request.getAttribute(KEY); if (portalURL == null) { portalURL = PortalURLParser.getParser().parse(request); request.setAttribute(KEY, portalURL); } return (PortalURL) portalURL.clone(); } COM: <s> creates a portal url from the servlet request </s>
funcom_train/46009670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeCopyOfCustomizedSectionIfNeeded() { if (!(customizableSectionOnScratchPad.isThisIsACustomizedSection())) { // Make Copy customizableSectionOnScratchPad = customizableSectionOnScratchPad.makeCopy(afso.schema, this.afso.sim_id); // Set id to the newly made copies id _custom_section_id = customizableSectionOnScratchPad.getId() + ""; } } COM: <s> if this is the original template then make a copy of it for </s>
funcom_train/21116866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetGun() { System.out.println("getGun"); Zaman instance = new Zaman(); String expResult = ""; String result = instance.getGun(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get gun method of class persistence </s>
funcom_train/39877325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getMaximumTimeToLock(ComponentName admin) { if (mService != null) { try { return mService.getMaximumTimeToLock(admin); } catch (RemoteException e) { Log.w(TAG, "Failed talking with device policy service", e); } } return 0; } COM: <s> retrieve the current maximum time to unlock for all admins </s>
funcom_train/12736325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addDummyRow() { if (getComponentType() != TABLE_BOX) { throw new IllegalArgumentException("Method addDummyRow must be called on a Table Box component"); } XComponent dataSet = this.getDataSetComponent(); dataSet.addNullDataRow(); this.removeSorting(); this.doLayout(); this.repaint(); } COM: <s> adds a dummy row to the data set of this table box </s>
funcom_train/39482295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeRowFromMap(Vector column, BitSet row) { // Get the columns corresponding to the row TreeSet columns = (TreeSet) TRowsToColumnMap_.get(row); // Remove the requested row columns.remove(column); // If columns is empty, remove the entry for the row from the // HashMap if (columns.size() == 0) { TRowsToColumnMap_.remove(row); } } COM: <s> removes a column row combination from the reverse map </s>
funcom_train/23792904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void putStaticHelper(Instruction s, BasicBlock b) { PutStatic ps = (PutStatic)s; FieldOperand locOp = ps.getField(); Field field = locOp.getField(); registerUse(s, field); registerDef(s, b, field); } COM: <s> record the effects of a putstatic instruction on the heap array </s>
funcom_train/4806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AgentAction selectAction(List<Case> nearestNeighbours) { //check parameters if(nearestNeighbours == null){ throw new IllegalArgumentException("Null value given to ClosestNeighbourSelection"); } if(nearestNeighbours.size() == 0){ throw new IllegalArgumentException("ClosestNeighbourSelection requires at least 1 Case to be given."); } //get the first Case and its actions Case firstCase = nearestNeighbours.get(0); List<AgentAction> actions = firstCase.getActions(); return this.m_actionEst.estimateAction(actions); } COM: <s> returns the agent action associated with the most similar case </s>
funcom_train/944276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Properties props) { String key = "RecentFile_" + (type != null ? type + "_" : ""); for (int i = 0; i < used; i++) { props.put(key + i, files.elementAt(i).toString()); } props.put(key + "Used", String.valueOf(used)); } COM: <s> save the recent file list in a properties set </s>
funcom_train/9048663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object getBean(HttpServletRequest request) { String service = getService(request); Object bean = getBean(service); if (!(bean instanceof RemoteService)) { throw new IllegalArgumentException("Spring bean is not a GWT RemoteService: " + service + " (" + bean + ")"); } log.debug("Bean for service {} is {}", service, bean); return bean; } COM: <s> determine spring bean to handle request based on request url e </s>
funcom_train/35148582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OrderMetadata getMetadata() { Game g = ((GameHolder) Application.instance().getApplicationContext().getBean("gameHolder")).getGame(); if (g == null) return null; GameMetadata gm = g.getMetadata(); if (gm == null) return null; OrderMetadata om = gm.getOrders().findFirstByProperty("number", getOrderNo()); return om; } COM: <s> returns the metadata for this order description etc by automatically </s>
funcom_train/19888166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String queryMythScreen() { if (this.sendData("query location")) { if (this.IsConnected()) { return this.readData(); } else { Log.e(MythMote.LOG_TAG, sStatus + ": Not connected on receive"); return null; } } else { Log.e(MythMote.LOG_TAG, sStatus + ": Send failed"); return null; } } COM: <s> returns the string representation of the current mythfrontend screen </s>
funcom_train/8078861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateClassifier(Instance instance) throws Exception { m_ReplaceMissingValues.input(instance); m_ReplaceMissingValues.batchFinished(); Instance filtered = m_ReplaceMissingValues.output(); m_NominalToBinary.input(filtered); m_NominalToBinary.batchFinished(); filtered = m_NominalToBinary.output(); if(m_Balanced) actualUpdateClassifierBalanced(filtered); else actualUpdateClassifier(filtered); } COM: <s> updates the classifier with a new learning example </s>
funcom_train/42535238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o){ if(!(o instanceof LocDef))return false; if(o == this)return true; LocDef oo = (LocDef)o; return (((Object)id).equals(oo.id))&&(((Object)re).equals(oo.re)); } COM: <s> is the given object equal to this loc def </s>
funcom_train/34445722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(long elapsedTime){ if(isOnScreen()){ jumping = true; super.update(elapsedTime); if(jumping){ gravity(elapsedTime); } } if(!mustDie&&isOnScreen()){ if(walkingLeft){ walkLeft(elapsedTime); } else if(!walkingLeft){ walkRight(elapsedTime); } } if(mustReduce){ reduce(); mustReduce = false; } if(mustDie){ die(elapsedTime); } if(this.getScreenX()<-SPRITE_SIZE){ this.setActive(false); this.game.getWorld().getMONSTERS().remove(this); } if(this.getScreenY()>640){ this.setActive(false); this.game.getWorld().getMONSTERS().remove(this); } } COM: <s> the update method is called at every update of the game </s>
funcom_train/50605321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMatchesStringsOfMinimumLength () { Strings spec = Strings.withAtLeastNumChars(4); assertTrue(!spec.isSatisfiedBy("")); assertTrue(!spec.isSatisfiedBy("foo")); assertTrue(spec.isSatisfiedBy("foobar")); assertTrue(!spec.isSatisfiedBy("baz")); } COM: <s> ensures strings is capable of matching strings of a minimum length </s>
funcom_train/50067875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isIncluded(Symbol c, Scope scope) { for (Scope.Entry e = scope.lookup(c.name); e.scope == scope; e = e .next()) { if (e.sym.kind == c.kind && e.sym.fullName() == c.fullName()) return true; } return false; } COM: <s> given a class and an import scope is there already a class with </s>
funcom_train/20215515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand() { if (okCommand == null) {//GEN-END:|57-getter|0|57-preInit // write pre-init user code here okCommand = new Command("Ok", Command.OK, 0);//GEN-LINE:|57-getter|1|57-postInit // write post-init user code here }//GEN-BEGIN:|57-getter|2| return okCommand; } COM: <s> returns an initiliazed instance of ok command component </s>
funcom_train/40434496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Injector getInjector() { Injector injector = GwtGuiceHelper.get().getInjector(); if (injector == null) { throw new GwtTestConfigurationException( this.getClass().getSimpleName() + ".getInjector() default implementation is not able to localize the Guice Injector to use. You should override it to provide our own implementation"); } return injector; } COM: <s> get the guice injector to use </s>
funcom_train/14166412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int train(){ if (!pp.hasNext()){ pp.resetCounter(); } double[] pat = pp.next().getDescDoubleArr(); SmallNeuron winner = som.getWinnerNeuron(pat); som.updateWeights(winner, pat, time, tp.maxTime); time++; checkUpdates(time); return time; } COM: <s> trains som by presenting data patterns in sequential order </s>
funcom_train/28125574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean doShutdown() { if (getClientState().isRunning()) { getClientState().stopCurrentTimeSpan(); } try { writeProjectData(); getClientState().stopCleanly(); SummaryFrame.this.dispose(); return true; } catch (IOException ioe) { getLogger().fatal(ioe.getMessage()); return false; } catch (SAXException saxe) { getLogger().fatal(saxe.getMessage()); return false; } } COM: <s> brings the application down without user interaction stopping </s>
funcom_train/1785653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String repr = "\n"; repr += "Alcomo-Exception caused by " + this.mainDescription + "\n"; repr += "General: " + this.generalDescription + "\n"; if (this.specificDescription != null) { repr += "Specific: " + this.specificDescription + "\n"; } if (this.catchedException != null) { repr += "Caught exception: " + this.catchedException + ".\n"; } return repr; } COM: <s> returns a human understandable string representation </s>
funcom_train/51645402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isParameter(ILocalVariable currentLocal) throws JavaModelException { final IJavaElement parent= currentLocal.getParent(); if (parent instanceof IMethod) { final String[] params= ((IMethod) parent).getParameterNames(); for (int i= 0; i < params.length; i++) { if (params[i].equals(currentLocal.getElementName())) return true; } } return false; } COM: <s> returns true iff the given local variable is a parameter of its </s>
funcom_train/8608152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { onInteractionStart(); task = ThreadPoolManager.getInstance().scheduleAtFixedRate(new Runnable() { @Override public void run() { if (!validateParticipants()) stop(); boolean stopTask = onInteraction(); if (stopTask) stop(); } }, 1000, interval); } COM: <s> interaction scheduling method </s>
funcom_train/3561978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer createEmptySession(Integer volumeID, Integer fatherSessionID) throws DbException { LinkedList parmList; parmList = new LinkedList(); addIfNotNull(parmList, "volumeID", volumeID); addIfNotNull(parmList, "fatherSessionID", fatherSessionID); return (Integer) simpleResponse(CREATE_NEW_SESSION_PAGE, parmList); } COM: <s> creates a new empty session </s>
funcom_train/21015481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String validate ( ) { Vector<String> ids = new Vector<String>( ); String error = null; for ( Item i : items ) { if ( ids.contains ( i.getId ( ) ) ) { return "The id '" + i.getId ( ) + "' appears at least two times.\n"; } ids.add ( i.getId ( ) ); } return error; } COM: <s> validates the questionnaire </s>
funcom_train/32761283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PreparedStatement getEntryAttachmentAssociationStatement() { try { final String sql = "INSERT INTO logbook.LOG_ENTRY_ATTACHMENT ( LOG_ENTRY_ID, attachment_id, log_entry_attachment_ord ) VALUES (?, ?, ?)"; return _connection.prepareStatement( sql ); } catch( SQLException exception ) { exception.printStackTrace(); throw new RuntimeException( "Exception getting an insert statement for inserting an entry-attachment record.", exception ); } } COM: <s> get the entry attachment insert statement </s>
funcom_train/32913834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ReferenceDisplayList getChildren(ReferenceDisplayList parentList) throws java.rmi.RemoteException, DataAccessException { ReferenceDisplayList list = new ReferenceDisplayList(); Enumeration e1 = parentList.elements(); while (e1.hasMoreElements()) { ReferenceDisplay rd = (ReferenceDisplay) e1.nextElement(); ReferenceDisplayList rdl = getChildren(rd.getRefId()); Enumeration e2 = rdl.elements(); while (e2.hasMoreElements()) { ReferenceDisplay d = (ReferenceDisplay) e2.nextElement(); list.add(d); } } return list; } COM: <s> returns a list of all the reference display children of all </s>
funcom_train/43748066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getPostinRadioButton() { if (postinRadioButton == null) { postinRadioButton = new JRadioButton(); postinRadioButton.setBounds(new Rectangle(9, 206, 162, 26)); postinRadioButton.setText("Wordpress Post ID in"); } return postinRadioButton; } COM: <s> this method initializes postin radio button </s>
funcom_train/14180666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMoneyCard(MoneyCard moneyCard) { moneyCards.add(moneyCard); int index = moneyCards.lastIndexOf(moneyCard); NotifyMessage message = new NotifyMessage(); message.setMessageCode(NotifyMessage.MONEYSACK_CHANGED); try { message.setMessageData(0, playerNumber); message.setMessageData(1, index); } catch (IllegalMessageDataIndex e) { // TODO Auto-generated catch block e.printStackTrace(); } setChanged(); notifyObservers(message); } COM: <s> adds a money card to the money cards of the player </s>
funcom_train/11070775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() { for (Entry<String, Ftplet> entry : ftplets.entrySet()) { try { entry.getValue().destroy(); } catch (Exception ex) { LOG.error(entry.getKey() + " :: FtpletHandler.destroy()", ex); } } } COM: <s> destroy all ftplets </s>
funcom_train/44665274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ArrayList findReviews(ReviewSearchForm form){ int numResults = NUM_SEARCH_RESULTS; if (form.getReturnAllResults()){ numResults = -1; } return getReviewAccess().findReviews(form.getReviewId(), form.getDeveloperId(), form.getReviewerId(), form.getBuildversion(), form.getStatusId(), numResults); } COM: <s> find reviews using the search parameters on the form </s>
funcom_train/44705998
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void deleteCategory(PageState state) { Category category = (Category) m_categories.getSelectedObject(state); PermissionService.assertPermission(new PermissionDescriptor (PrivilegeDescriptor.DELETE, category, Kernel.getContext().getParty())); if (category != null && !category.isRoot()) { Category parent = category.getDefaultParentCategory(); m_categories.setSelectedObject(state, parent); category.deleteCategoryAndOrphan(); } } COM: <s> delete a category and all of its children from a content section </s>
funcom_train/35847771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getQuickViewDump(Project project) { OutputStream stream = new ByteArrayOutputStream(); try { quickViewDump.writeProject(project, stream, null); } catch (Exception e) { // If anything goes wrong return the stack // trace as a string so that we get some // useful feedback. e.printStackTrace(new PrintStream(stream)); } return stream.toString(); } COM: <s> generates a string dump of the current model for quick viewing </s>
funcom_train/46456028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object loadObject(XMLControl control, Object obj) { super.loadObject(control, obj); InteractiveCircle circle = (InteractiveCircle) obj; circle.enableInteraction = control.getBoolean("interaction enabled"); circle.enableMeasure = control.getBoolean("measure enabled"); return obj; } COM: <s> loads data from the xml control into the interactive circle object </s>
funcom_train/17890973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void add(final BigInteger pInt) { if (fingerfound) { if (pInt.getLowestSetBit() >= k) { fingermap.add(new Integer(pInt.intValue())); } } else { if (pInt.getLowestSetBit() >= k) { fingermap.clear(); } fingermap.add(new Integer(pInt.intValue())); } } COM: <s> add a fingerprint to the set br </s>
funcom_train/21375467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showDirectoryInput(boolean show) { if (show) { if (mDirectoryInput == null) { onCreateDirectoryInput(); } } if (mDirectoryInput != null) { mDirectoryInput.setVisibility(show ? View.VISIBLE : View.GONE); mDirectoryButtons.setVisibility(show ? View.GONE : View.VISIBLE); } refreshDirectoryPanel(); } COM: <s> show the directory line as input box instead of button row </s>
funcom_train/22447918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJTabbedPane() { if (jTabbedPane == null) { jTabbedPane = new JTabbedPane(); jTabbedPane.addTab("Test", null, getTestConsole(), null); jTabbedPane.addTab("Prng", null, getPrngConsole(), null); } return jTabbedPane; } COM: <s> this method initializes j tabbed pane </s>
funcom_train/13965213
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String lineDivClass() { String lineBase = (String)d2wContext().valueForKey("baseClassForLine"); String eveness = "Even" + lineBase; if (index %2 == 0) { eveness = "Odd" + lineBase; } String type = (String)d2wContext().valueForKey("pageType"); return lineBase + " " + eveness + " " + type + lineBase + " " + type + entityName() + lineBase; } COM: <s> returns the css class for the current line in the query form </s>
funcom_train/7495664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { getFolded(); try { CaseInsensitiveString cis = (CaseInsensitiveString) o; cis.getFolded(); return folded.equals(cis.folded); } catch (ClassCastException e) { try { String s = (String) o; return folded.equals(foldCase(s)); } catch (ClassCastException e2) { return false; } } } COM: <s> compare the object with this </s>
funcom_train/2584950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test1169972() { CategoryPlot plot = new CategoryPlot(null, null, null, null); plot.setDomainAxis(new CategoryAxis("C")); plot.setRangeAxis(new NumberAxis("Y")); plot.setRenderer(new BarRenderer()); plot.setDataset(new DefaultCategoryDataset()); assertTrue(plot != null); } COM: <s> a test for bug report 1169972 </s>
funcom_train/9368709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeToParcel(Parcel dest, int flags) { dest.writeString(exceptionClassName); dest.writeString(exceptionMessage); dest.writeString(throwFileName); dest.writeString(throwClassName); dest.writeString(throwMethodName); dest.writeInt(throwLineNumber); dest.writeString(stackTrace); } COM: <s> save a crash info instance to a parcel </s>
funcom_train/2586780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEquals2() { final ObjectList l1 = new ObjectList(20); l1.set(0, Color.blue); l1.set(1, Color.red); final ObjectList l2 = new ObjectList(); l2.set(0, Color.blue); l2.set(1, Color.red); assertTrue(l1.equals(l2)); assertTrue(l2.equals(l2)); } COM: <s> another test of the equals method </s>
funcom_train/13246459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getLicensePanel() { if (licensePanel == null) { JScrollPane scrollPane = new JScrollPane(getLicenseEditorPane()); licensePanel = new JPanel(new BorderLayout()); licensePanel.add(new JLabel(" "), BorderLayout.WEST); licensePanel.add(scrollPane, BorderLayout.CENTER); licensePanel.add(new JLabel(" "), BorderLayout.EAST); } return licensePanel; } COM: <s> returns the license panel for this license </s>
funcom_train/31800665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addProject(String projectName) throws Exception { boolean noErrors = true; try { // create and get the ejb for adding the user AdminHome home = EjbLocator.getAdminHome(); Admin bean = home.create(); //check if the login and password are correct noErrors = bean.addProject(projectName); bean.remove(); } catch (Exception e) { throw new ServletException(e); } return noErrors; } /* addProject() */ COM: <s> function adds new project </s>
funcom_train/4286509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ScaledValue_value_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ScaledValue_value_feature", "_UI_ScaledValue_type"), OrmUsageProfilePackage.Literals.SCALED_VALUE__VALUE, true, false, false, ItemPropertyDescriptor.REAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the value feature </s>
funcom_train/4450157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTranCount(final Connection conn) { Statement stmt; ResultSet rs; int trancount = 0; try { stmt = conn.createStatement(); rs = stmt.executeQuery("select @@trancount as trancount"); rs.next(); trancount = rs.getInt(1); stmt.close(); } catch(SQLException ex) { ex.printStackTrace(); } return trancount; } COM: <s> returns value of sybase variable </s>
funcom_train/8095732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLabels() { String result; int i; result = ""; for (i = 0; i < m_Labels.size(); i++) { if (i > 0) result += ","; result += Utils.quote((String) m_Labels.get(i)); } return result; } COM: <s> get the comma separated list of labels that are added </s>
funcom_train/37834018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void teleportAway(final Player player) { if (player != null) { final IRPZone playerZone = player.getZone(); if (playerZone.equals(zone)) { player.teleport(zone, 15, 16, Direction.DOWN, player); // complete the quest if it already started if (player.hasQuest(QUEST_SLOT)) { player.setQuest(QUEST_SLOT, "done"); } } } } COM: <s> finishes the time and teleports the player out </s>
funcom_train/3949606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setParameterMap(final ParameterMap sharedMap) { mMap.clear(); final Set<String> keySet = sharedMap.keys(); for (final String key : keySet) { final String value = sharedMap.getParam(key); mMap.setParam(key, value); } } COM: <s> loads the parameter map </s>
funcom_train/10801155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(Class cls) { if (cls == null) return; if (ACTION_DROP.equals(_action)) _drop.add(cls); else if (ACTION_ADD.equals(_action)) add(cls); else throw new IllegalArgumentException("action == " + _action); } COM: <s> generate new metadata for the given class </s>
funcom_train/47518785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void mandatoryFieldsCheck() { if (userNameJTextField.getText().length() > 0 && serverHostJTextField.getText().length() > 0 && schemaJTextField.getText().length() > 0) { nextJButton.setEnabled(true); } else { nextJButton.setEnabled(false); } } COM: <s> checks if all mandatory information is filled in and enables or disables </s>
funcom_train/43895267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected FeatureSource createFeatureSource(final FeatureType featureType) { return new AbstractFeatureSource() { public DataStore getDataStore() { return parent; } public void addFeatureListener(FeatureListener listener) { listenerManager.addFeatureListener(this, listener); } public void removeFeatureListener(FeatureListener listener) { listenerManager.removeFeatureListener(this, listener); } public FeatureType getSchema() { return featureType; } }; } COM: <s> create the feature source override for your own custom implementation </s>
funcom_train/21112364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeLogRecord (byte[] logRecord){ try{ rafCurrentLogFile.write(logRecord); } catch (Exception e) { if (debugLevel > SAWSConstant.NoInfo) { //adding log4j logging sawsDebugLog.write(e.toString()); } } long currentTime = System.currentTimeMillis(); } COM: <s> this method is to write the log record into the log file </s>
funcom_train/7277224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scanFields() { String canonicalKey = getCanonicalKey(getNameValueSet()); //System.out.print("***FTA DEBUG*** SCANNED FIELD: " + canonicalKey); if(canonicalKey == null) return; setFields(canonicalKey); fieldToValue.remove(canonicalKey + XML_INDEX_ATTRIBUTE); fieldToValue.remove(canonicalKey + XML_ID_ATTRIBUTE); } COM: <s> looks in the fields for the action identifier and index and a license </s>
funcom_train/24121262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream out) throws IOException { int size = this.getSize(); WMFConstants.writeLittleEndian(out, size); WMFConstants.writeLittleEndian(out, WMFConstants.WMF_RECORD_SETWINDOWORG); WMFConstants.writeLittleEndian(out, y); WMFConstants.writeLittleEndian(out, x); } COM: <s> writes the content of the set window org record to a stream </s>
funcom_train/46453889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(String function) throws ParserException { define(function); parse(); if(getErrorCode()!=NO_ERROR) { String msg = "Error in function string: "+function; msg = msg+'\n'+"Error: "+getErrorString(); msg = msg+'\n'+"Position: "+getErrorPosition(); throw new ParserException(msg); } } COM: <s> parses defined function </s>
funcom_train/39467313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @NotNull public JMenuBar createMenuBar(final boolean store, final String barKey) throws NullPointerException { final JMenuBar menuBar = new JMenuBar(); //noinspection ConstantConditions for (final String key : getString(barKey + ".menubar").split("\\s+")) { menuBar.add(createMenu(store, key)); } return menuBar; } COM: <s> method for creating a menubar </s>
funcom_train/4509297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHandler(IQHandler handler) { if (iqHandlers.contains(handler)) { throw new IllegalArgumentException("IQHandler already provided by the server"); } // Ask the handler to be initialized handler.initialize(XMPPServer.getInstance()); // Register the handler as the handler of the namespace namespace2Handlers.put(handler.getInfo().getNamespace(), handler); } COM: <s> p adds a new iqhandler to the list of registered handler </s>
funcom_train/39560997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void undeploy(String key) throws ServerServentException { // Application prefix File appToUndeploy = new File(this.deployPath, key); // Remove form repository logger.debug("Removing application adapter [" + key + "]"); context.getRepository().removeWrapper(key); // Delete directory logger.debug("Deleting application form disk " + appToUndeploy); FSTool.rmdir(appToUndeploy); logger.debug(appToUndeploy + " deleted from disk"); } COM: <s> undeploys an application </s>
funcom_train/34793948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BigInteger getTableId(String itemid) { if (checkItemIdentifier(itemid)) { StringTokenizer token = new StringTokenizer(itemid, ":"); if (token.hasMoreTokens()) { return new BigInteger(token.nextToken()); } } return new BigInteger("0"); } COM: <s> get the tableid from an internal item identifier </s>
funcom_train/3083972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHorizontalAlignment(int i) { if (i != Alignment.LEFT && i != Alignment.CENTER && i != Alignment.RIGHT) throw new IllegalArgumentException("setHorizontalAlignment must be one of Alignment.LEFT, Alignment.CENTER, or Alignment.RIGHT"); int oldValue = horizontalAlignment; horizontalAlignment = i; if (oldValue != horizontalAlignment) { fireImageChange(); } } COM: <s> sets the horizontal alignment of the text relative to the x y </s>
funcom_train/2677305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean writeBasic(Output out, Object basic) { if (basic == null) { out.writeNull(); } else if (basic instanceof Boolean) { out.writeBoolean((Boolean) basic); } else if (basic instanceof Number) { out.writeNumber((Number) basic); } else if (basic instanceof String) { out.writeString((String) basic); } else if (basic instanceof Date) { out.writeDate((Date) basic); } else { return false; } return true; } COM: <s> writes a primitive out as an object </s>
funcom_train/40700814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTab(int index) { checkTabIndex(index); // (index + 1) to account for 'first' placeholder widget. Widget toRemove = panel.getWidget(index + 1); if (toRemove == selectedTab) { selectedTab = null; } panel.remove(toRemove); if (index - 1 > -1) { selectTab(index - 1); } else { if (getTabCount() > 0) { selectTab(0); } } } COM: <s> removes the tab at the specified index </s>
funcom_train/22233831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getDecayTime() { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_DECAY_TIME_READ)) throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes29")); return ((AuralAttributesRetained)this.retained).getDecayTime(); } COM: <s> retrieve decay time </s>
funcom_train/45502367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAssignmentType (AssignmentType val) throws NullPointerException { if( val == null ) throw new NullPointerException ( ZLocalization.getSingleton().getString("ds.z.AssignmentArea.NoAssignmentTypeException") ); if( val.equals( assignmentType ) ) return; // no change if (assignmentType != null) { assignmentType.deleteAssignmentArea (this); } assignmentType = val; assignmentType.addAssignmentArea (this); } COM: <s> sets a new assignment type </s>
funcom_train/18440268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int count(String resource) { int count = -1; CachedRowSet rs; try { rs = SQLHelper.executeResultSet("SELECT count FROM hitcount WHERE resource=\"" + resource + "\" LIMIT 1;"); if (rs.next()) count = rs.getInt(1); } catch (Exception e) { log.error("count(): " + e.getMessage()); } return count; } COM: <s> retrieve the counter value </s>
funcom_train/3719356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPrimTOPrimCopy1() throws Exception{ String value = "hello"; ST st1 = new ST(null); st1.setValue(value); ST st2 = new ST(null); DeepCopy.copy(st1,st2); assertEquals(value,st2.getValue()); }//end method COM: <s> test copy from primitive type to composite </s>
funcom_train/3340241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processKeyEvent(KeyEvent ke_) { int key = ke_.getKeyCode(); if (key >= 'a' && key <= 'z') { ke_.setKeyCode(key - ('a' - 'A')); } super.processKeyEvent(ke_); } COM: <s> convert keystrokes to uppercase before calling the jtext fields </s>
funcom_train/45320044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBotonGestionReservas() { if (botonGestionReservas == null) { botonGestionReservas = new JButton(); botonGestionReservas.setText("Gestion de Reservas"); botonGestionReservas.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { padre.cambiarPanel("panelReservas"); } }); } return botonGestionReservas; } COM: <s> this method initializes boton gestion reservas </s>
funcom_train/35924627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configureInstaller(Component comp) { /* * Introspect JadeNode component to find the Installer component */ Component osgiInstaller = null; try { osgiInstaller = FractalUtil.getSubComponentByPath((Component) comp, "controllers/installer"); } catch (NoSuchComponentException e) { fatalError(e); } /* * set HeartBeat component attributes */ try { GenericAttributeController gac = fr.jade.fractal.util.FractalUtil .getGenericAttributeController(osgiInstaller); gac.setAttribute("profileName", name); } catch (Exception e) { fatalError(e); } } COM: <s> configure the heartbeat by settings attibutes node discovery host </s>
funcom_train/7668240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ByteBuffer put(ByteBuffer src) { if (src == this) { throw new IllegalArgumentException(); } if (src.remaining() > remaining()) { throw new BufferOverflowException(); } byte[] contents = new byte[src.remaining()]; src.get(contents); put(contents); return this; } COM: <s> writes all the remaining bytes of the </s>
funcom_train/19767402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonSave() { if (jButtonSave == null) { jButtonSave = new JButton(); jButtonSave.setBounds(new java.awt.Rectangle(215, 388, 102, 20)); jButtonSave.setText("打开保存"); jButtonSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { openOrSaveFile(); } }); } return jButtonSave; } COM: <s> this method initializes j button save </s>
funcom_train/23875305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStartedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DateType_started_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DateType_started_feature", "_UI_DateType_type"), MetadataPackage.Literals.DATE_TYPE__STARTED, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the started feature </s>
funcom_train/50301659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(String path){ StringTokenizer tokens = new StringTokenizer(path, "/"); String validPath = "/"; while(tokens.hasMoreElements()){ String pathToken = tokens.nextToken() + "/"; try{ read(validPath + pathToken); }catch(StrutsFileSystemException e){ makedir(validPath + pathToken); } //the pathToken exists so add it to the validPath validPath = validPath + pathToken; } return true; } COM: <s> helper method used in unit tests to setup the mock filesystem </s>
funcom_train/24484365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL getJarLocation() { String jarURL = transformerInfo.getJarURL(); try { if (jarURL != null) { return new URL(jarURL); } } catch (MalformedURLException ex) { Logger.getLogger(ProcessingRule.class.getName()).log(Level.SEVERE, null, ex); } return null; } COM: <s> get the jar location </s>
funcom_train/11344629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startTest(Test test) { m_abort = false; m_report.testStarting(); System.setErr(new ReportPrintStream(m_err,m_errBackup, hideOutputs)); System.setOut(new ReportPrintStream(m_out, m_outBackup, hideOutputs)); getLogService().enableOutputStream(); } COM: <s> the test starts </s>
funcom_train/38542744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDouble(int parameterIndex, double x) throws SQLException { try { ((PreparedStatement) this.realStatement).setDouble(parameterIndex, x); if (parameterIndex <= this.currentParams.length) { this.currentParams[parameterIndex - 1] = new Double(x); } } catch (SQLException e) { manageException(e); throw generateException(e); } } COM: <s> sets the designated parameter to the given java code double code </s>
funcom_train/20205439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Control add(Control control, int position) { PositionHolder holder = new PositionHolder(); holder.control = control; holder.position = position; // Need to increase the colspan if controls are docked to west or east if (position == WEST || position == EAST) { dockColspan++; } dockedControls.add(holder); return control; } COM: <s> adds the control at the specified dock position </s>
funcom_train/39104075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int replace(String from, String to) { int ret = 0; StringVector new_list = new StringVector(); Enumeration<String> e = elements(); while (e.hasMoreElements()) { XString xs = new XString((String) e.nextElement()); ret += xs.replace(from, to); new_list.append(xs.toString()); } removeAllElements(); append(new_list); return ret; } COM: <s> replace every occurence of from with to </s>
funcom_train/49078464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PrintFormat create(){ String ID = null; try { ID = new GUID().generate(); } catch (Exception ex) { ex.printStackTrace(); } PrintFormat printFormat = new PrintFormat(); printFormat.setPrintFormatGUID(ID); Cache.getInstance().put(ID,printFormat); printFormat.setDirty(true); return printFormat; } COM: <s> creates a print format object that is empty except for an id guid </s>
funcom_train/4209657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processPacket(Packet packet) { if (packet == null) { return; } System.out.println("recvPacket "+packet.toXML()); // Loop through all collectors and notify the appropriate ones. for (PacketCollector collector: collectors) { collector.processPacket(packet); } // Deliver the incoming packet to listeners. listenerExecutor.submit(new ListenerNotification(packet)); } COM: <s> processes a packet after its been fully parsed by looping through the installed </s>
funcom_train/23267823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNomBeneficiario() { System.out.println("setNomBeneficiario"); String nomBeneficiario = ""; Giros instance = new Giros(); instance.setNomBeneficiario(nomBeneficiario); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set nom beneficiario method of class capa negocios </s>
funcom_train/22675241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getShortName(Locale locale) { OMElement doc = getDocumentation(locale); if (doc == null) { return schema.name.getLocalPart(); } OMElement name = doc.getFirstChildWithName(XsdConstants.CCTS_NAME); if (name == null) { return schema.name.getLocalPart(); } else { return name.getText(); } } COM: <s> returns a short descriptive name for the message type to be displayed on </s>
funcom_train/44716451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDeletingRole() { Role r = createRole("testDeletingRole"); r.addMember(createUser("testDeletingRole-user1")); r.save(); try { r.delete(); } catch (Exception e) { e.printStackTrace(); fail("Could not delete role #" + r.getID()); } } COM: <s> tests deleting a role </s>
funcom_train/13596292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void logCurrentPhonemes() { Phoneme[] phonemes = getPhonemes(); StringBuffer log = new StringBuffer(); for (int j = 0; j < phonemes.length; j++) { log.append(phonemes[j].getName() + " "); } if (Constants.DEBUG){ DefaultLogs.getDefaultUserActivityLog().debug( "WordDisplayPanel", "Display phomenes: " + log.toString()); } } COM: <s> write the list of phonemes currently on screen to log </s>
funcom_train/7959780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void installDockViewSettings(){ UIManager.put("DockViewUI", "com.vlsolutions.swing.docking.ui.DockViewUI"); UIManager.put("DetachedDockViewUI", "com.vlsolutions.swing.docking.ui.DetachedDockViewUI"); } COM: <s> installs the dock view related properties </s>
funcom_train/20896089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetUser() { System.out.println("getUser"); String uname = ""; String pwd = ""; UsersList instance = new UsersList(); User expResult = null; User result = instance.getUser(uname, pwd); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get user method of class it </s>
funcom_train/35249710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void append(final String line) { raw.append(DelimitedParser.NEWLINE); raw.append(line); final int size = variables.size(); final StringBuilder buf = new StringBuilder(); final int last = size - 1; buf.append(variables.get(last)); buf.append(DelimitedParser.NEWLINE); buf.append(line); variables.set(last, buf.toString()); } COM: <s> add a line to the existing record </s>
funcom_train/46458124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private XMLControlElement encrypt(XMLControlElement control) { // return controls that are already encrypted if (control.getObjectClass() == Cryptic.class) return control; // encrypt control and set its password String xml = control.toXML(); Cryptic cryptic = new Cryptic(xml); XMLControlElement encrypted = new XMLControlElement(cryptic); encrypted.setPassword(control.getPassword()); return encrypted; } COM: <s> encrypts the specified xmlcontrol using a cryptic object </s>
funcom_train/22284477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getProperties(PropertyList list) { super.getProperties(list); list.setString("items", menu.getMenuContent(), ""); list.setOption("popupDirection", popupDirectionOptions, popupDirection, DOWN); list.setOption("popupAlignment", popupAlignmentOptions, popupAlignment, LEFT); } COM: <s> get the properties of this menu button store the </s>
funcom_train/37611632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void wakeUpAllWaiters() { synchronized (m_condition) { if (m_waiters == 0) { return; } m_wakeUp = true; m_condition.notifyAll(); try { while (m_waiters > 0) { m_condition.waitNoInterrruptException(); } } finally { m_wakeUp = false; m_condition.notifyAll(); } } } COM: <s> wake up other threads that are waiting in </s>
funcom_train/7230891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node removeNode(String nodeName) throws NodeDoesNotExistException{ Node ndRemoved = null; Integer intIndex = (Integer)mhshIndex.get(nodeName); if (intIndex != null){ ndRemoved = removeNode(intIndex.intValue()); } else { throw new NodeDoesNotExistException("The NodeList does not contain a Node with the name: " + nodeName + "."); } return ndRemoved; } COM: <s> removes a node from the node list based on its unique name </s>
funcom_train/26454835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGet() { // Add an entry and verify that it is there getCache().put(KEY, CONTENT); assertTrue(getCache().get(KEY).equals(CONTENT)); // Call with invalid parameters try { getCache().get(null); fail("Get called with null parameters!"); } catch (Exception e) { /* This is what we expect */ } getCache().clear(); } COM: <s> test the get method </s>
funcom_train/7623602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTransactionSuccessful() { if (!mLock.isHeldByCurrentThread()) { throw new IllegalStateException("no transaction pending"); } if (mInnerTransactionIsSuccessful) { throw new IllegalStateException( "setTransactionSuccessful may only be called once per call to beginTransaction"); } mInnerTransactionIsSuccessful = true; } COM: <s> marks the current transaction as successful </s>
funcom_train/37146302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int createTaskCategory(){ TaskCategoryVO cat = new TaskCategoryVO(); cat.setDescription(i18n.getText("option.taskCategories.default.description")); cat.setColor(Color.LIGHT_GRAY); this.categories.add(cat); int position = this.categories.indexOf(cat); fireIntervalAdded(this, position, position); return position; } COM: <s> creates a new category and intializes it with default vaules </s>
funcom_train/40360323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNullStoreToStream() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); assertEquals(0, baos.size()); PropertiesUtils.storeProperties(null, baos, COMMENT); assertEquals(0, baos.size()); } COM: <s> test store null properties to output stream </s>
funcom_train/7624427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLocalClassName() { final String pkg = getPackageName(); final String cls = mComponent.getClassName(); int packageLen = pkg.length(); if (!cls.startsWith(pkg) || cls.length() <= packageLen || cls.charAt(packageLen) != '.') { return cls; } return cls.substring(packageLen+1); } COM: <s> returns class name for this activity with the package prefix removed </s>