__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/8331310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean getCachedAWTSizes(Dimension min, Dimension pref, Dimension max) { synchronized(this) { if (cachedSizesInitialized >= 1) { min.setSize(cachedMinSize); pref.setSize(cachedPrefSize); max.setSize(cachedMaxSize); return true; } else { return false; } } } COM: <s> retrieves the minimum preferred and maximum sizes of the swing </s>
funcom_train/43889531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertRow(int id, String description) throws Exception { execute("INSERT INTO " + TEST_TABLE_NAME + " (" + ID_COLUMN_NAME + ", " + DESCRIPTION_COLUMN_NAME + ") VALUES (" + id + ", '" + description + "')"); } COM: <s> insert a row into the test table </s>
funcom_train/47593064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void bureaucracy() { LOGGER.debug("> Starting phase 5 (Bureaucracy) of turn " + turn); // Power up for (final Player player : players) { player.powerCities(); // here we don't care how many they power } // Restock resource market resourceMarket.restock(step); // Discard lowest/highest plant plantMarket.endTurn(step); } COM: <s> carries out the end of turn housekeeping phase 5 </s>
funcom_train/3399606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isConstantProperty() { if(isConstantProperty!=null) return isConstantProperty; BIProperty next = getDefault(); if(next!=null) return next.isConstantProperty(); // globalBinding always has true or false in this property, // so this can't happen throw new AssertionError(); } COM: <s> gets the inherited value of the fixed attr to constant property customization </s>
funcom_train/18595403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUseCanonicalClass() { ComponentReference cr = new ComponentReference(resolver, new Frame(getName()) { public String toString() { return getName(); } }); assertEquals("Wrong class saved", Frame.class.getName(), cr.getRefClassName()); } COM: <s> saved class name should not be an anonymous or inner class </s>
funcom_train/47314399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getSlowerButton() { if (slowerButton == null) { slowerButton = new JButton(); slowerButton.setText(localization .getProperty("loc-SteeringTab-slowerButton")); slowerButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { goSlower(); } }); } return slowerButton; } COM: <s> this method initializes slower button </s>
funcom_train/882316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void afterPropertiesSet() throws Exception { if (id == null || id.length() == 0) { throw new MisconfigurationException( "No id specified for processing unit."); //$NON-NLS-1$ } for (Object ac : actions) { if (!(ac instanceof ActionConfig)) { throw new MisconfigurationException( "Unknown action type in processing unit " + getName()); //$NON-NLS-1$ } } } COM: <s> checks this bean for consistency </s>
funcom_train/18135922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeProperty(String id) { Object oldValue = propertyMap.remove(id); if (oldValue instanceof SpecificationElement) { ((SpecificationElement) oldValue) .removePropertyChangeListener(this.propertyChangeEventForwarder); } PropertyChangeEvent event = new PropertyChangeEvent(this, PROPERTIES_FIELD, new Pair<String, Object>(id, oldValue), null); propertyChangeSupport.firePropertyChange(event); } COM: <s> method for removing a property the event contains one pair values </s>
funcom_train/24316203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadProperties(String propertiesFileName) { if (propertiesFileName != null) { File file = new File(propertiesFileName); if (file.exists()) { loadProperties(file); } else { InputStream is = this.getClass().getClassLoader() .getResourceAsStream(propertiesFileName); if (is != null) loadProperties(is); } } else loadProperties(); } COM: <s> loading properties from property file name </s>
funcom_train/18254999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeAll(java.util.Collection c) { clearCoordinates(c); //We don't know how many agents were in either collections, so we have to do a sweep to make sure we have the right size deleteSweep(); setSize(collection.size()); return collection.removeAll(c); } COM: <s> removes all of the agents contained in the collection </s>
funcom_train/8659697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String isUnique(String path) throws SftpException, Exception{ Vector v=glob_remote(path); if(v.size()!=1){ throw new SftpException(SSH_FX_FAILURE, path+" is not unique: "+v.toString()); } return (String)(v.elementAt(0)); } COM: <s> this method will check if the given string can be expanded to the </s>
funcom_train/32056529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAccept(){ TPGraphModelFileFormatXML tpxml = new TPGraphModelFileFormatXML(); assertNotNull(tpxml.fileFilter); assertFalse(tpxml.fileFilter.accept(null)); assertFalse(tpxml.fileFilter.accept(new File("incorrect.sss"))); assertTrue(tpxml.fileFilter.accept(new File("correct.tpb"))); } COM: <s> tests the default file filter accept </s>
funcom_train/41464668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeEventActionList(String id) { if(id == null) { return; } ActionListTemplate target = null; for(ActionListTemplate actionList: eventActionList) { if(id.equals(actionList.getId())) { target = actionList; } } if(target != null) { eventActionList.remove(target); } } COM: <s> id action list template </s>
funcom_train/51788003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addParticipatingRolePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Interaction_participatingRole_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Interaction_participatingRole_feature", "_UI_Interaction_type"), RAMPackage.Literals.INTERACTION__PARTICIPATING_ROLE, false, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the participating role feature </s>
funcom_train/48858633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readMessage() { try { HttpServletRequest req = this.getRequest(); String id = req.getParameter("ID"); //System.out.println(id); if (id == null || id.equals("")) { return null; } Message message = this.changeReadingStatus(Long.parseLong(id), MessageReadingStatus.READ.toString()); this.prepareReplyMessage(message); /** reset the all the messages */ this.messages = null; } catch (Exception ex) { ex.printStackTrace(); } return MessageConstant.BACK_TO_DETAIL_PAGE; } COM: <s> mark a message as read and navigate to detail page </s>
funcom_train/27811942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String setCoverArtImage(int albumId, String url) { try { MediaFile mediaFile = mediaFileService.getMediaFile(albumId); saveCoverArt(mediaFile.getPath(), url); return null; } catch (Exception x) { LOG.warn("Failed to save cover art for album " + albumId, x); return x.toString(); } } COM: <s> downloads and saves the cover art at the given url </s>
funcom_train/38384803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveInto(String filename) { callListeners(LI_BEFORESAVEINTO, filename); REDFile saveFile = new REDFile(filename); REDFileRider saveRider = new REDFileRider(saveFile); saveFile.purge(); REDRun cur = fHead; while (cur != null) { cur.copyInto(saveRider); cur = cur.fNext; } saveFile.close(); callListeners(LI_AFTERSAVEINTO, filename); } COM: <s> save text into another file </s>
funcom_train/12178549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAllocateElementWithoutStyle() { // set expectations factoryMock.expects.createElement().returns(emptyElement); factoryMock.expects.createElement("test").returns(element); element.expects.getStyles().returns(null); buffer = new DOMOutputBuffer(factoryMock); Element element = buffer.allocateElement("test"); assertNull(element.getStyles()); } COM: <s> tests that the allocate element method returns an element with a null </s>
funcom_train/17850717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int calcTimeForSelection(int selectedIndex) { int time = getCurrentTime(); if (selectedIndex == 1) { return time + 15; } else if (selectedIndex == 2) { return time + 30; } else if (selectedIndex > 2 && selectedIndex < (mBox.getItemCount() - 1)) { return mTimes[selectedIndex - 3]; } return time; } COM: <s> calculates the time based on the current selection </s>
funcom_train/10911969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getKernValue(char ch1, char ch2) { Map<Integer, Integer> kernPair = getKerning().get((int) ch1); if (kernPair != null) { Integer width = kernPair.get((int) ch2); if (width != null) { return width.intValue() * getFontSize() / 1000; } } return 0; } COM: <s> returns the amount of kerning between two characters </s>
funcom_train/27944074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed( java.awt.event.ActionEvent actionEvent ) { System.err.println( "JOscarLibPlugin.actionPerformed() - Login timeout reached." ); loginTimer.stop(); session = null; fireOnLoginFailed(); fireOnRegisterUserFailed(); // Called here because this login could be a user registration (onRegisterexistingUser) } COM: <s> implement the timer event for login timer object </s>
funcom_train/44165344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void quitGame(boolean stopServer, boolean notifyServer) { if (freeColClient.isLoggedIn()) logout(notifyServer); final FreeColServer server = freeColClient.getFreeColServer(); if (stopServer && server != null) { server.getController().shutdown(); freeColClient.setFreeColServer(null); } } COM: <s> quits the current game optionally notifying and stopping the server </s>
funcom_train/1937923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PartialTimestamp parse(String str) throws ParseException { ParsePosition pp = new ParsePosition(0); PartialTimestamp pt = this.parse(str, pp); if (pp.getErrorIndex() >= 0) { throw new ParseException("Unable to parse DRMAA date string: \"" + str + "\"", pp.getErrorIndex()); } return pt; } COM: <s> translates a drmaa specified time string into a partial timestamp object </s>
funcom_train/6329028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator iterator() { // TODO: replace when FakeFactoryGenerator is ready // return = _BaseList_IteratorImplFactory.getDefault.create(self()); return (Iterator) database().createObject(_BaseList_IteratorImpl.class.getName(), BaseList.class.getName(), new Object[] {self()}); } COM: <s> obtain an iterator over this list whose sequence is the list order </s>
funcom_train/46763959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResourceScheduleModel getResourceSchedule(final long resourceScheduleId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return SchedulingData.getResourceSchedule(resourceScheduleId, chain, call); }}; return (ResourceScheduleModel) call(method, call); } COM: <s> same transaction return the single resource schedule model for the primary key </s>
funcom_train/50879480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setAttributeName(String inAttributeName){ for (int i=0; i<myComboAttributes.getItemCount(); i++){ String tempItem = (String) myComboAttributes.getItemAt(i); if (inAttributeName.equalsIgnoreCase(tempItem)){ myComboAttributes.setSelectedIndex(i); break; } } } COM: <s> method to set the attribute to use </s>
funcom_train/21430581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearAnnotations(Peak p) { if( p==null ) return; for( Iterator<PeakAnnotation> i=peak_annotations.iterator(); i.hasNext(); ) { PeakAnnotation pa = i.next(); if( p.equals(pa.getPeak()) ) i.remove(); } addPeakAnnotation(p); } COM: <s> remove all annotations for a specific peak leave the peak in </s>
funcom_train/10984922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insert() throws ModelException { Model.insert( getId(), getDate(), getAmount(), getCheck(), getPhone(), getZip(), getEmail(), getText(), getWizard() ); } COM: <s> insert code key code record </s>
funcom_train/12163268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEndMenuItemSuccess() throws Exception { builder.startMenu(); builder.startMenuGroup(); Object current = getCurrentEntity(); builder.startMenuItem(); configureMinimalItem(); builder.endMenuItem(); assertSame(current, getCurrentEntity()); builder.endMenuGroup(); builder.startMenuItem(); configureMinimalItem(); builder.endMenuItem(); assertSame("menu should be current again", getMenuModel(), getCurrentEntity()); } COM: <s> menu items may appear in menus and menu groups </s>
funcom_train/28753020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSampletype(String newVal) { if ((newVal != null && this.sampletype != null && (newVal.compareTo(this.sampletype) == 0)) || (newVal == null && this.sampletype == null && sampletype_is_initialized)) { return; } this.sampletype = newVal; sampletype_is_modified = true; sampletype_is_initialized = true; } COM: <s> setter method for sampletype </s>
funcom_train/48524079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendInvestigation(ActiveInvestigationInfo<Handle> investigation) { Identifier id = peerreview.getIdentifierExtractor().extractIdentifier(investigation.target); AuthRequest<Identifier> request = new AuthRequest<Identifier>(investigation.since,id); evidenceTransferProtocol.sendMessageToWitnesses(id, request, null, null); } COM: <s> starts an investigation by sending authenticator requests to all the </s>
funcom_train/12685666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void nodeChanged(Node node) { TreeModelEvent event1 = new TreeModelEvent(this, node.getPath()); synchronized (listeners) { for (TreeModelListener listener : listeners) { synchronized (listener) { listener.treeNodesChanged(event1); listener.treeStructureChanged(event1); } } } } COM: <s> this method is called to indicate that some node has been changed </s>
funcom_train/42227512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double getTickIncVal(double maxVal, double minVal) { double tickMax = Math.abs(minVal)>maxVal?Math.abs(minVal):maxVal; int tickInc=1; for (int div=5; div>0;div--) { if (tickMax%div==0) { tickInc = (int)tickMax/div; break; } } return tickInc; } COM: <s> this method returns the increment between tick marks in graph values </s>
funcom_train/38310668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIncrMinute() throws Exception { Date date = preciseDf.parse("2008-04-30 08:15:00"); date = DateUtils.incrMinute(date, 46); assertEquals(preciseDf.parse("2008-04-30 09:01:00"), date); } COM: <s> tests the incr minute method </s>
funcom_train/10666773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Result assertSame(String message, Object expected, Object actual) { if (expected != actual) { String msg = message != null ? message + "\n" : ""; msg += "assertSame(Object, Object):\n expected: " + parseMessage(expected, " ") + "\n actual: " + parseMessage(actual, " "); return fail(msg, 3); } return pass(3); } COM: <s> asserts that two objects refer to the same object </s>
funcom_train/2337416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFrame(JInternalFrame jInternalFrame) { jDesktopPane.add(jInternalFrame); try { jInternalFrame.setSelected(true); } catch (PropertyVetoException ex) { Logger.getLogger(FormPrincipal.class.getName()).log(Level.SEVERE, null, ex); } } COM: <s> this method add a j internal frame </s>
funcom_train/28754752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRead(Long newVal) { if ((newVal != null && this.read != null && (newVal.compareTo(this.read) == 0)) || (newVal == null && this.read == null && read_is_initialized)) { return; } this.read = newVal; read_is_modified = true; read_is_initialized = true; } COM: <s> setter method for read </s>
funcom_train/20294552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPostgresSeqName(String tableName, String uniqueField) { String seqName = null; if (tableName.length() > 22) { seqName = tableName.substring(0, 22) + "_" + uniqueField + "_seq"; } else { seqName = tableName + "_" + uniqueField + "_seq"; } return seqName; } COM: <s> gets the sequence name attribute of the custom lookup element object </s>
funcom_train/38535005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLatestStartTime(int lst, boolean notify) throws PropagationFailureException { if ((startTimes.getMax()>lst)&&(!startTimes.isEmpty())) { if (notify) { ActDelta delta = new ActDelta(); delta.startTimes = startTimes.removeStartingAfterGetDelta(lst); makeBoundConsistent(delta); notifyDelta(delta); } else { startTimes.removeStartingAfter(lst); makeBoundConsistent(null); } } } COM: <s> set the latest start time for this resource </s>
funcom_train/16791289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int calculateWidth(Date start, Date finish) { long total = this.finish.getTime() - this.start.getTime(); return (int) ((finish.getTime() - start.getTime()) * (this.canvas.getSize().x - this.LABEL_WIDTH) / total); } COM: <s> calculate the width of a cell </s>
funcom_train/39892755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String deleteCallEvent(String jabberId, String inviteId) { String method = "POST"; String url = "/callevent/delete"; Map <String, String> paramList = new HashMap<String, String>(); paramList.put("jabberId", jabberId); paramList.put("inviteId", inviteId); return TB_Request(method, url, paramList); } COM: <s> delete a call event from the feed of the given user id </s>
funcom_train/34479467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int pTestCurrentMember(SdaiIterator iter) throws SdaiException { // synchronized (syncObject) { int value = getCurrentSelectionNrAsCurrentMember(iter, true); if (value < 0) { String base = SdaiSession.line_separator + "Failed to get select path number"; throw new SdaiException(SdaiException.SY_ERR, base); } return value; // } // syncObject } COM: <s> returns select path number for the aggregate element referenced by the </s>
funcom_train/20148920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addInPlace(SearchHit sh, Vector<SearchHit> v) { if (v.size() == 0) { v.add(sh); return; } for (int i=0; i<v.size(); i++) { SearchHit shv = v.get(i); if (sh.getScore()<=shv.getScore()) { v.insertElementAt(sh,i); return; } } } COM: <s> the assumption on vector v is that its always sorted </s>
funcom_train/1805060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCountBySource(String source, int count) { if (count == -1) { if (countBySource != null) { countBySource.remove(source); } } else { if (countBySource == null) { countBySource = new HashMap<String, Integer>(); } countBySource.put(source, count); } } COM: <s> sets the sub total for a specific source </s>
funcom_train/33834954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand1() { if (okCommand1 == null) {//GEN-END:|47-getter|0|47-preInit // write pre-init user code here okCommand1 = new Command("Send Text", Command.OK, 0);//GEN-LINE:|47-getter|1|47-postInit // write post-init user code here }//GEN-BEGIN:|47-getter|2| return okCommand1; } COM: <s> returns an initiliazed instance of ok command1 component </s>
funcom_train/14179976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkWalkerRulePut(Building building, int x, int y) throws AgainstRules { if (!canGoInDirection(building, x, y, BuildingConstants.LEFT) && !canGoInDirection(building, x, y, BuildingConstants.RIGHT) && !canGoInDirection(building, x, y, BuildingConstants.UP) && !canGoInDirection(building, x, y, BuildingConstants.DOWN)) { throw new AgainstRules(); } } COM: <s> checks if a walker can go the new building </s>
funcom_train/21655917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtFichaTecnica() { if (btFichaTecnica == null) { btFichaTecnica = new JButton(); btFichaTecnica.setBounds(new Rectangle(20, 280, 150, 30)); btFichaTecnica.setMnemonic('f'); btFichaTecnica.setText("Ficha Tecnica"); btFichaTecnica.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { ControladorPrincipal.mostrarFichaTecnica(); } }); } return btFichaTecnica; } COM: <s> this method initializes bt ficha tecnica </s>
funcom_train/43135002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColorAt(int index, int r, int g, int b) { int tempColorPos = index * 3 + paletteStartIndex; pngData[tempColorPos] = (byte) r; pngData[tempColorPos + 1] = (byte) g; pngData[tempColorPos + 2] = (byte) b; } COM: <s> changes an entry in the palette to a desired color </s>
funcom_train/18744594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean testGrammarModified() { boolean result = false; if (getGrammar() != null) { int modCount = getGrammar().getModificationCount(); result = (modCount != this.lastModCount); if (result) { this.lastModCount = modCount; this.status = Status.START; notifyGrammarModified(); } } return result; } COM: <s> tests if the grammar has been modified since last call of this method </s>
funcom_train/8990710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DmsDocument createNewShortcut(DmsDocument sourceDoc, DmsDocument targetDoc, DmsDocument newDoc) throws ApplicationException { DocumentValidateManager dmsValidateManager = new DocumentValidateManager(sessionContainer, conn); dmsValidateManager.validateNewShortcutAction(sourceDoc, targetDoc); return this.createDocument(newDoc, null, false, null); } COM: <s> create a new shortcut in dms </s>
funcom_train/20769802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOpticalGyroTauLowpassMs(float opticalGyroTauLowpassMs) { this.opticalGyroTauLowpassMs = opticalGyroTauLowpassMs; putFloat("opticalGyroTauLowpassMs", opticalGyroTauLowpassMs); translationFilter.setTauMs(opticalGyroTauLowpassMs); rotationFilter.setTauMs(opticalGyroTauLowpassMs); } COM: <s> sets the highpass corner time constant </s>
funcom_train/28896965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeSourcePixel(int x,int y,int[] pix) { byte[] value = new byte[pix.length]; for (int i=0;i<value.length;i++) { value[i] = (byte) pix[i]; } source.position((x+(y*width))*componentCount); source.put(value,0,componentCount); } COM: <s> write a single pixel into the source image </s>
funcom_train/4232178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMember(String group) { try { String[] groups = ((String)userMapHashTable.get("groups")).split("\\s+"); for (int i = 0; i < groups.length; i++) { if (groups[i].equals(group)) return true; } } catch (Throwable e) { e.printStackTrace(); } return false; } COM: <s> authorization method to determine if a user is in a particular group </s>
funcom_train/9408503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSet(){ AtomicReferenceFieldUpdater<AtomicReferenceFieldUpdaterTest, Integer>a; try { a = AtomicReferenceFieldUpdater.newUpdater(AtomicReferenceFieldUpdaterTest.class, Integer.class, "x"); } catch (RuntimeException ok) { return; } x = one; assertEquals(one,a.get(this)); a.set(this,two); assertEquals(two,a.get(this)); a.set(this,m3); assertEquals(m3,a.get(this)); } COM: <s> get returns the last value set or assigned </s>
funcom_train/2759260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean dispose(long timeout) throws JMSException, InterruptedException { if(logger.isDebugEnabled()) { logger.debug("JmsConsumerPool.dispose["+Thread.currentThread().getName()+"]: Disposing consumer pool for destination("+_destination+")."); } _disposed = true; return disposeOfConsumers(timeout); } COM: <s> disposes of all the consumers in this pool </s>
funcom_train/11725324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getUnusedURI() throws RepositoryException { Set<String> uris = new HashSet<String>(Arrays.asList(nsRegistry.getURIs())); String uri = TEST_URI; int i = 0; while (uris.contains(uri)) { uri = TEST_URI + i++; } return uri; } COM: <s> returns a namespace uri that currently not used in the namespace </s>
funcom_train/33623371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TransactionCounterState getState() { lock.lock(); try { TransactionCounterState stat = new TransactionCounterState(); stat.setMaxHour(this.maxHour); stat.setLastHour(this.lastHour); stat.setCurrentHour(this.currentHour); stat.setMaxTxNum(this.maxTxNum); stat.setLastHourTxNum(this.lastHourTxNum); stat.setCurrHourTxNum(this.currHourTxNum); return stat; } finally { lock.unlock(); } } COM: <s> returns current state of transaction counter </s>
funcom_train/44101641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void multiplyTopAndBottom(final BaseNumber factor) { // no need to check isMutable (it should have been checked already) try { ensureNumeratorArithmutable(); if (!factor.isExact()) { ensureNumeratorFuzzy(); ensureDenominatorFuzzy(); } ((Arithmutable) _Numerator).multiply(factor); ensureDenominatorArithmutable(); ((Arithmutable) getDenominator()).multiply(factor); } catch (final MathException ex) { throw new RationalException("multiplyTopAndBottom(BaseNumber): unexpected exception: " + ex); } // do not normalize // do not reset the identifier } COM: <s> mutating method to multiply the top and bottom of a rational equally </s>
funcom_train/5451268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Move(int CurIndex, int NewIndex) { Object TempObject; String TempString; if (CurIndex == NewIndex) return; BeginUpdate(); try { TempString = getString(CurIndex); TempObject = getObject(CurIndex); Delete(CurIndex); Insert(NewIndex, TempString, TempObject); } finally { EndUpdate(); } } COM: <s> moves this item to the new position and remove the old one </s>
funcom_train/18050991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File eventLoopChecker(String com) { if (com == null) return null; int index = -1; if (com.startsWith(ident)) { String tmp = com.substring(ident.length()); try { index = Integer.parseInt(tmp); } catch (NumberFormatException e) { return null; } } return getFile(index); } COM: <s> returns the file correspodending to an indetifying string or null </s>
funcom_train/49675099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Serializable getData(final Widget w) { if (w instanceof Label) { return ((Label) w).getText(); } else if (w instanceof TextBox) { return ((TextBox) w).getText(); } else { try { return internalGetData(w); } catch (RuntimeException e) { // open a dialog and re-throw exception Window.alert("Unexpected type: " + w.getClass()); throw e; } } } COM: <s> sub classes may override this method to handle the default widgets differently e </s>
funcom_train/10615758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEngineGenerateCertPath() throws Exception { X509CertFactoryImpl certFactory = new X509CertFactoryImpl(); ByteArrayInputStream bais = new ByteArrayInputStream( CertFactoryTestData.getCertPathPkiPathEncoding()); certFactory.engineGenerateCertPath(bais); try { certFactory.engineGenerateCertPath(bais); fail("Expected CertificateException was not thrown."); } catch (CertificateException e) { } } COM: <s> engine generate cert path input stream in stream method testing </s>
funcom_train/4358716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSessionAttribute( String sessionId, String key ) { Session s = (Session) sessions.get(sessionId); if( s==null ) { if(log.isInfoEnabled()) log.info("Session not found " + sessionId); return null; } Object o=s.getSession().getAttribute(key); if( o==null ) return null; return o.toString(); } COM: <s> for debugging get a session attribute </s>
funcom_train/19838089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int sort(int number) { final int[] digits = new int[length(number)]; int i = 0; do digits[i++] = number % base; while ((number /= base) > 0); Arrays.sort(digits); number = 0; for (int digit : digits) number = base * number + digit; return number; } COM: <s> sort the digits of a number </s>
funcom_train/50909661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveItem() { assertTrue("Inventory not empty.", inventory.getWeight() == 0); inventory.add(item1); inventory.add(item2); assertTrue("Items were not added.", inventory.getWeight() == item1.getWeight() + item2.getWeight()); inventory.remove(item1); assertTrue("Item was not removed.", inventory.getWeight() == item2.getWeight()); } COM: <s> tests removing of item </s>
funcom_train/18203155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startMouseCursorUpdaterThread() { updateMouseCursorThread = new Thread(new Runnable() { public void run() { try { while (true) { if (!isFitScreen) { updateMouseCursor(); Thread.sleep(10); Thread.yield(); } } } catch (InterruptedException e) { } } }); updateMouseCursorThread.start(); } COM: <s> creates new instance of update mouse cursor thread and starts it </s>
funcom_train/22962481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(FilterConfig config) throws ServletException { super.init(config); Map<String, Object> values = new Hashtable<String, Object>(); values.put("urls", ConfigMapImpl.getConfigMap().scriptify()); try{ updateLinks = AjaxPostprocessingFilter.AJAXIFIABLE_LINKS_TEMPLATE.makeString(values); logger.debug("The update is:\r\n" + updateLinks); } catch(Exception e) { logger.error("Failed to generate the initialization script due to an exception", e); updateLinks = ""; } } COM: <s> initializes the filter </s>
funcom_train/1691538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateClose(boolean showClose) { if (showClose && _close.getParent() == null) { _top.add(_close, GroupLayout.FIXED); } else if (!showClose && _close.getParent() != null) { _top.remove(_close); } } COM: <s> updates the visibility of the close tab button </s>
funcom_train/880719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(IEditorSite site, IEditorInput editorInput) throws PartInitException { setSite(site); setInput(editorInput); setPartName(editorInput.getName()); site.setSelectionProvider(this); site.getPage().addPartListener(partListener); ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); } COM: <s> this is called during startup </s>
funcom_train/48889720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { long temp = period; long hours = temp / 60 / 60 / 1000; temp -= hours * 60 * 60 * 1000; long minutes = temp / 60 / 1000; temp -= minutes * 60 * 1000; long seconds = temp / 1000; temp -= seconds * 1000; String str = ""; if (hours > 0) str += hours +" hours "; if (minutes > 0) str += minutes + " minutes "; if (seconds > 0) str += seconds + " second "; if (temp > 0) str += temp + " millis"; return str; } COM: <s> converts it to string in humand readable format </s>
funcom_train/3039248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateEntitiesIndex(){ DocFile docFile = docFileManager.getClassIndexDocFile(); File file = docFile.getFile(); Map parameters = new HashMap(); parameters.put("docFile", docFile); processTemplate(parameters, VM_ENTITIES_INDEX, file ); } COM: <s> generate the index file of the class documentation </s>
funcom_train/45250847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IPath getNewWorkbenchStateLocation(IPath newWorkspaceRoot) { IPath currentWorkspaceRoot = Platform.getLocation(); IPath dataLocation = WorkbenchPlugin.getDefault().getDataLocation(); if (dataLocation == null) return null; int segmentsToRemove = dataLocation .matchingFirstSegments(currentWorkspaceRoot); // Strip it down to the extension dataLocation = dataLocation.removeFirstSegments(segmentsToRemove); // Now add in the dataLocation = newWorkspaceRoot.append(dataLocation); return dataLocation; } COM: <s> return the workbench settings location for the new root </s>
funcom_train/48182904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void serialize (DataOutputStream out) throws IOException { out.writeByte (size ()); for (Enumeration e = keys (); e.hasMoreElements (); ) { Byte teamId = (Byte) e.nextElement (); Integer points = (Integer) get (teamId); out.writeByte (teamId.byteValue ()); out.writeInt (points.intValue ()); } } COM: <s> serialize this object to a stream </s>
funcom_train/11373016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setExpectedLocations(DatanodeDescriptor[] targets) { int numLocations = targets == null ? 0 : targets.length; this.replicas = new ArrayList<ReplicaUnderConstruction>(numLocations); for(int i = 0; i < numLocations; i++) replicas.add( new ReplicaUnderConstruction(this, targets[i], ReplicaState.RBW)); } COM: <s> set expected locations </s>
funcom_train/15996365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public View create(Element elem) { Object obj = elem.getAttributes().getAttribute(StyleConstants.NameAttribute); if (obj instanceof HTML.Tag) { HTML.Tag tagType = (HTML.Tag) obj; if (tagType == HTML.Tag.IMG) { return new RelativeImageView(elem); } else if ((tagType == HTML.Tag.UL) || (tagType == HTML.Tag.OL)) { //return new ListView(elem); } } return super.create(elem); } COM: <s> method to handle img tags and invoke the image loader </s>
funcom_train/10981200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset(ActionMapping mapping, HttpServletRequest request) { /* * The ActionForm reset method should only be used to *clear* * checkboxes. The correct place to *set* default checkbox values is in * the 'prepare' action, called prior to displaying the form page. */ String[] empty = {}; this.fruits = empty; this.colors = empty; } COM: <s> clear all checkboxes </s>
funcom_train/1676676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove() { if (!setAndRemoveAllowed) throw new IllegalStateException(); try { moveToCurrent(); cursor.delete(); setAndRemoveAllowed = false; toNext = MOVE_NEXT; toPrevious = MOVE_PREV; } catch (Exception e) { throw StoredContainer.convertException(e); } } COM: <s> removes the last element that was returned by next or previous optional </s>
funcom_train/50274546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected HTMLDocumentImpl createDocument(org.xml.sax.InputSource inputSource) throws IOException, org.xml.sax.SAXException { DocumentBuilderImpl builder = new DocumentBuilderImpl(this.getUserAgentContext(), this); return (HTMLDocumentImpl) builder.createDocument(inputSource); } COM: <s> creates a blank document instance </s>
funcom_train/3117807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCrosshairsVisible(boolean flag) { crosshairs.setVisible(flag); // HACK: must damage manually Rectangle2D bounds = crosshairs.getBounds2D(COORD_ABS); bounds.setRect(bounds.getX(), bounds.getY(), 24, 24); this.damage(DAMAGE_NOW, bounds); } // of method COM: <s> sets the visibility of the crosshairs </s>
funcom_train/13402425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Lease write( Entry entry, Transaction tx, long lease) throws TransactionException, RemoteException { if ( lease == Lease.ANY) lease = SpaceProxy.ANY; if ( ( lease < 0) && ( lease != Lease.FOREVER)) throw new IllegalArgumentException( "Lease duration can't be less than zero but is " + lease + "."); return remoteSpace.write( new MarshalledEntry( entry), tx, lease); } COM: <s> this method works as described in java spaces specification </s>
funcom_train/48982982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performValidationList() { logger.log("\n\nValidating list"); // verifies if the discipline is null if (discipline == null) { addActionError(getText("unit.validation.requiredDiscipline")); } else { // verifies if the discipline id is null if (discipline.getId() == null) { addActionError(getText("unit.validation.requiredDisciplineId")); } } } COM: <s> validates the data of the method list </s>
funcom_train/33069058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleFormProperty(Attributes attributes){ if(attributes==null){ stack.pop(); return; } String name = attributes.getValue("name"); String type = attributes.getValue("type"); String size = attributes.getValue("size"); String initial = attributes.getValue("initial"); String className = attributes.getValue("className"); if(name==null){ name = ""; } if(type==null){ type = ""; } if(size==null){ size = ""; } if(initial==null){ initial = ""; } if(className==null){ className = ""; } Object prevObj = getPrevObject(); FormProperties model = ((FormBeanModel) prevObj).getFormProperties(); model.addProperty(name, type, size, initial, className, new Properties()); stack.push(model); } COM: <s> process lt form property gt </s>
funcom_train/37650498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CPDView2 showView() { CPDView2 view = null; try { final IWorkbenchPage workbenchPage = targetPartSite().getPage(); view = (CPDView2) workbenchPage.showView(PMDUiConstants.ID_CPDVIEW2); } catch (PartInitException pie) { logError( getString(StringKeys.ERROR_VIEW_EXCEPTION), pie); } return view; } COM: <s> shows the view </s>
funcom_train/13850716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void computeMaxLeases() { if (inRecovery) return; maxServiceLease = Math.max(minMaxServiceLease, minRenewalInterval * (serviceByID.size() + ((eventByID.size() * minMaxServiceLease) / minMaxEventLease))); maxEventLease = Math.max(minMaxEventLease, ((maxServiceLease * minMaxEventLease) / minMaxServiceLease)); } COM: <s> compute new max service lease and max event lease values </s>
funcom_train/23333626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayPreviousLevelSet() { // Display previous level set name: if (!_iLevelSetIdentifier.hasPrevious()) { _iLevelSetIdentifier = _levelSetIdentifiers.listIterator(_levelSetIdentifiers.size()); } _iLevelSetIdentifier.previous(); if (!_iLevelSetIdentifier.hasPrevious()) { _iLevelSetIdentifier = _levelSetIdentifiers.listIterator(_levelSetIdentifiers.size()); } _levelSetIdentifier = _iLevelSetIdentifier.previous(); _iLevelSetIdentifier.next(); displayLevelSet(); } COM: <s> the previous level set becomes the current level set </s>
funcom_train/32012219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activate() throws DPWSException { if (status != STATUS_READY) throw new DPWSException( "Device cannot be activated, it has incorrect status " + status); status = STATUS_ADVERTIZING; fireDeviceEvent(new DeviceEvent(DeviceEvent.ACTIVATE, this)); status = STATUS_RUNNING; } COM: <s> method activating a device </s>
funcom_train/2808905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getErrorPage(String uriStr) { Map uri = getRequestMapMap(uriStr); if (uri != null) { String returnPage = getViewPage((String) uri.get(ConfigXMLReader.ERROR_PAGE)); if (returnPage != null) return returnPage; else return getDefaultErrorPage(); } else return getDefaultErrorPage(); } COM: <s> gets the error page from the request map if none uses the default </s>
funcom_train/1825679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Geometry intersection(Geometry geometry, Viewport viewport) { Geometry geo; try { //LDB: need to catch the NoninvertibleTransformException instead of just throwing it geo = geometry.intersection(viewportRectangle(viewport)); } catch (NoninvertibleTransformException e){ return null; } if (geo.getNumGeometries() == 0){ return null; } return geo; } COM: <s> even though a features envelope intersects the viewport the feature </s>
funcom_train/4529633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsAll(TagMap other) { for (Map.Entry<String,Object> entry : other.entrySet()) { Object value = get(entry.getKey()); if (value == null || !value.equals(entry.getValue())) { // either key does not exist here, or the value is different return false; } } return true; } COM: <s> returns true if this tagmap contains every tag in other </s>
funcom_train/46701586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(final UjoProperty p1, final UjoProperty p2) { final int i1 = p1.getIndex()>=0 ? p1.getIndex() : Integer.MAX_VALUE; final int i2 = p2.getIndex()>=0 ? p2.getIndex() : Integer.MAX_VALUE; return i1<i2 ? -1 : i1>i2 ? 1 : 0 ; } COM: <s> compare ujo properties by index </s>
funcom_train/3341239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matches(IPv4Address otherAddress, IPv4Address mask) { for (int i = 0; i < length; i++) { final int a = address[i] & 0xFF; final int o = otherAddress.address[i] & 0xFF; final int m = mask.address[i] & 0xFF; if ((a & m) != (o & m)) { return false; } } return true; } COM: <s> does this address matches a given mask </s>
funcom_train/943889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int lookupFontSize() { InstanceWorld iw = InstanceWorld.getCurrentInstanceWorld(); String oldValue = iw.getMatchingObject(USER_PROFILE_CONTEXT_URI, null, MdkURI.FONT_SIZE); if (oldValue == null) return DEFAULT_FONT_SIZE; try { return Integer.parseInt(oldValue); } catch (Exception ex) { return DEFAULT_FONT_SIZE; } } COM: <s> retrieve a font size from the data model </s>
funcom_train/32212684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateConnections(){ connectionCount = arena.getConnections().size(); for(int i = 0; i < connectionCount; i++){ thisConnection = (Connection)arena.getConnections().get(i); if(thisConnection.getSource() == this || thisConnection.getTarget() == this ){ thisConnection.setPoints(); } } arena.repaint(); } COM: <s> reclaims all of this code component instance code s connections </s>
funcom_train/25291060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPolygonOffsetFactor(float polygonOffsetFactor) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_OFFSET_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("PolygonAttributes10")); if (isLive()) ((PolygonAttributesRetained)this.retained). setPolygonOffsetFactor(polygonOffsetFactor); else ((PolygonAttributesRetained)this.retained). initPolygonOffsetFactor(polygonOffsetFactor); } COM: <s> sets the polygon offset factor to the specified value </s>
funcom_train/569112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean performOk() { // Retrieve preference store. IPreferenceStore preferences = getPreferenceStore(); if (sliderDefaultCompressionLevel != null) preferences.setValue(ZipArchivePreferences.FormatZipDefaultCompressionLevel, sliderDefaultCompressionLevel.getSelection()); // Return ture to allow dialog to close. return true; } COM: <s> called when use clicks ok </s>
funcom_train/34580343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getResumeCommand () { if (resumeCommand == null) {//GEN-END:|56-getter|0|56-preInit // write pre-init user code here resumeCommand = new Command (lang.getProperty("command.resume"), Command.BACK, 0);//GEN-LINE:|56-getter|1|56-postInit // write post-init user code here }//GEN-BEGIN:|56-getter|2| return resumeCommand; } COM: <s> returns an initiliazed instance of resume command component </s>
funcom_train/51169398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openLine() throws LineUnavailableException { if (m_line != null) { AudioFormat audioFormat = m_audioInputStream.getFormat(); trace(1, getClass().getName(), "AudioFormat : " + audioFormat); m_line.open(audioFormat, m_line.getBufferSize()); } } COM: <s> opens the line </s>
funcom_train/7630538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onServiceConnected(ComponentName className, IBinder service) { if (Config.LOGV) { Log.v(TAG, "Connected to Media Scanner"); } synchronized (this) { mService = IMediaScannerService.Stub.asInterface(service); if (mService != null && mClient != null) { mClient.onMediaScannerConnected(); } } } COM: <s> part of the service connection interface </s>
funcom_train/34562778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Item run(final QueryContext ctx) throws QueryException { final IO io = file(ctx); try { return eval(ctx, io.content()); } catch(final IOException ex) { Main.debug(ex); Err.or(NODOC, ex.getMessage()); return null; } } COM: <s> performs the query function </s>
funcom_train/50499277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDictList( Vector newContent ) { // create the list model Vector intList = new Vector(); for( int index = 0; index < newContent.size(); index++ ) { intList.addElement( new Integer( index ) ); } dictChoice.setListData( intList ); // store data used by cell renderer theDisplayContent = newContent; } COM: <s> fill the list dictionary choice </s>