__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/49319104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void wcsshift(double rra, double rdec, String coorsys) { if (!isValid()) { return; } // Approximate world coordinate system from a known plate scale fCenterRa = this.xref = rra; fCenterDec = this.yref = rdec; // Coordinate reference frame this.radecsys = coorsys; if (coorsys.startsWith("FK4")) { this.equinox = 1950.0; } else { this.equinox = 2000.0; } } COM: <s> reset the center of a wcs structure </s>
funcom_train/26433029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SubmitDBBeanHome getSubmitDBBeanHome(InitialContext initialCtx) { try { if(null != initialCtx) { return (SubmitDBBeanHome) PortableRemoteObject.narrow(initialCtx.lookup("ejb/mhptester_server/SubmitDBBean"),SubmitDBBeanHome.class); } } catch(Exception ex) { logger.error( "Error locating SubmitDBBeanHome: " + ex ); return null; } return null; } COM: <s> retrieves the submit dbhome </s>
funcom_train/5345227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateSchedule(UDPTimerEvent evt) { synchronized(UDPScheduler.this) { // If the event is sooner and still active, make it current if ( evt.getEventTime() < _scheduledEvent.getEventTime() && _connectionEvents.contains(evt) ) { _scheduledEvent = evt; // Notifying UDPScheduler.this.notify(); } } } COM: <s> process the updating of an event </s>
funcom_train/50084360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() throws CloneNotSupportedException { ReactionSet clone = (ReactionSet)super.clone(); // clone the reactions clone.reactionCount = this.reactionCount; clone.reactions = new Reaction[clone.reactionCount]; for (int f = 0; f < clone.reactionCount; f++) { clone.reactions[f] = (Reaction)((Reaction)reactions[f]).clone(); } return clone; } COM: <s> clones this code reaction set code and the contained code reaction code s </s>
funcom_train/39564881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void repaintEdge(Edge edge) { JPowerGraphRectangle r = new JPowerGraphRectangle(0, 0, 0, 0); getEdgeScreenBounds(edge, r); Rectangle redraw = new Rectangle(r.x, r.y, r.width, r.height); redraw.grow(5,5); repaint(redraw); } COM: <s> repaints the given edge </s>
funcom_train/43246892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTmpAddrPhoneNumber() { System.out.println("getTmpAddrPhoneNumber"); PatientDemographicsObject instance = new PatientDemographicsObject(); String expResult = ""; String result = instance.getTmpAddrPhoneNumber(); 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 tmp addr phone number method of class org </s>
funcom_train/30190802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear() { this.insertPacketStmt = null; this.insertPacketSummaryStmt = null; this.insertHostStmt = null; this.updateHostStmt = null; this.selectHostStmt = null; this.selectHostFrequencyStmt = null; this.selectTimeFrequencyStmt = null; this.selectPacketsForHostStmt = null; this.localHostMap.clear(); this.localHostArrivalList.clear(); this.remoteHostList.clear(); this.remoteHostArrivalList.clear(); } COM: <s> clear out all saved statements and data </s>
funcom_train/32780175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSpeedLoad(double s) { if (s <= 0.0) { sendWarning( "The loaded speed of a internal transporter should be changed to zero or " + "a negative value. The load speed will remain unchanged!", "InternalTransporter : " + getName() + " Method: void setSpeedLoad(double s)", "A speed which is zero or negative does not make sense.", "Make sure to provide a valid positive load speed " + "when changing this attribute."); return; // forget that rubbish } this.speedLoad = s; } COM: <s> sets the loaded speed of this internal transporter to a new value </s>
funcom_train/7981078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getRegexp(Object o) { int rep = 0; try { rep = ((Integer)getAttribute(o, ATTR_REPETITIONS)).intValue(); } catch (AttributeNotFoundException e) { logger.severe(e.getMessage()); } return rep == 0? null: REGEX_PREFIX + (rep - 1) + REGEX_SUFFIX; } COM: <s> construct the regexp string to be matched aginst the uri </s>
funcom_train/7272506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T createDataLine() { try { T dl = _dataLineClass.newInstance(); return dl; } catch (IllegalAccessException e) { throw new RuntimeException(e); } catch (InstantiationException e) { throw new RuntimeException(e); } catch (ClassCastException e) { throw new RuntimeException(e); } } COM: <s> instantiates a data line </s>
funcom_train/322355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sortChannelListIndexes() { int max = 0; getHardwareChannelList(); for (int i = 0; i < nChannels; i++) { max = Math.max(max, channelList[i]); } channelListIndexes = new int[max+1]; for (int i = 0; i < channelListIndexes.length; i++) { channelListIndexes[i] = -1; } for (int i = 0; i < nChannels; i++) { channelListIndexes[channelList[i]] = i; } } COM: <s> creates a set of easily accessible channel indexes </s>
funcom_train/46934676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void executeXQuery() throws Exception { BasicXQuerySearchCriteria criteria = new BasicXQuerySearchCriteria(); criteria.setXQuery("<A>33</A>"); XQuerySearchResults results = testOracleXmlDb.executeXQuery(criteria); assertNotNull(results); assertNotNull(results.getMetadata()); if ( log.isDebugEnabled() ) { log.debug("Got " +results.getMetadata().getTotalMatches() +" results in " +results.getMetadata().getSearchTimeInMillis() +"ms"); } } COM: <s> test able to execute a trivial xquery statement </s>
funcom_train/9236208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasLocalArrayListFlavor(final DataFlavor[] flavors) { if (localArrayListFlavor == null) { return false; } for (int i = 0; i < flavors.length; i++) { if (flavors[i].equals(localArrayListFlavor)) { return true; } } return false; } COM: <s> do any of the specified flavours match the local flavour </s>
funcom_train/9025326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // Use the file dialog FileDialog dlg = new FileDialog(Librarian.getApp().getShell(), SWT.OPEN); String fileName = dlg.open(); if (fileName != null) { Librarian.getApp().openFile(fileName); } } COM: <s> opens an existing file </s>
funcom_train/1169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int effStepInt( boolean slowstep ) { float step = effStep(slowstep); int istep = Math.round(step); // When we would tell a zero delay (or even less), but the original // intention was a positive delay, we shall return the smallest // possible positive value: 1. if( istep <= 0 ) { if( stepMillis > 0 ) { istep = 1; } } // Never consider negative values if( istep < 0 ) { istep = 0; } return istep; } COM: <s> based of the mathematical value from </s>
funcom_train/8109470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { label = new Label(); label.setBounds(new Rectangle(11, 16, 118, 23)); label.setBackground(new Color(200, 255, 200)); label.setText("Treinment Database"); jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.add(getPanel(), null); jContentPane.add(label, null); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/14518006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ICertificateStoreSessionLocal getCertificateSession() { if (certStore == null) { try { ICertificateStoreSessionLocalHome home = (ICertificateStoreSessionLocalHome) getLocator().getLocalHome(ICertificateStoreSessionLocalHome.COMP_NAME); certStore = home.create(); } catch (CreateException e) { throw new EJBException(e); } } return certStore; } COM: <s> gets connection to certificate store session bean </s>
funcom_train/14093439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getSuiteFile() { String name = null; try { File file = File.createTempFile("test", ".xml"); name = file.getAbsolutePath(); saveFile(file); return file; } catch (IOException ioe) { RuntimeException re = new RuntimeException("Could not create file:" + name); throw re; } } COM: <s> create a test file with the current document </s>
funcom_train/14402169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setUiCallback(IConfigurationElement pConfigElement) { if (iUiCallback == null) { try { iUiCallback = (IUiCallback) pConfigElement .createExecutableExtension(EXTENSION_TAG_CLASS_ATTRIB); } catch (CoreException e) { // This exception occurs when the class attribute // value could not be instantiated (maybe a typing error in // class name). ModelPlugin.getDefault().log(Status.ERROR, "* ...failed! Reason: ", e); } } } COM: <s> this method creates and sets the new instance from of the executable </s>
funcom_train/13318476
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SWATGame gameOver(int gameID){ // guard condition -- check game exists SWATGame game = getGameStub(gameID); // guard condition if ( !game.getState().equals(SWATGame.STATE_PLAYING) ) { // TODO exception code throw new SWATGameServiceException("Illegal operation -- game must be in playing state."); } // update game state game.setState(SWATGame.STATE_OVER); gameDao.updateSWATGame(gameID, game); return deepFillGame(game); } COM: <s> end a swat game in progress </s>
funcom_train/15931542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private E unlinkLast() { Node<E> l = last; if (l == null) return null; Node<E> p = l.prev; l.prev = null; // help GC last = p; if (p == null) first = null; else p.next = null; --count; notFull.signal(); return l.item; } COM: <s> removes and returns last element or null if empty </s>
funcom_train/44513199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeInvisible() { // alle ge?ffneten ProfileGuis in den Hintergrund stellen Enumeration profiles = profiletable.elements(); while (profiles.hasMoreElements()) { BuddyProfileGui bpg = (BuddyProfileGui) profiles.nextElement(); bpg.setVisible(false); } if (helpgui != null) { helpgui.setVisible(false); } if (aboutgui != null) { aboutgui.setVisible(false); } if (autoresponder != null) { autoresponder.setVisible(false); } if (searchgui != null) { searchgui.setVisible(false); } } COM: <s> makes all opened windows invisible when maingui has been minimized </s>
funcom_train/45020375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remask(Boolean alertListeners) { for (int i = 0; alertListeners && i < maskListeners.size(); i++) { maskListeners.get(i).maskUpdated(); } for (int i = 0; !alertListeners && i < maskListeners.size(); i++) { maskListeners.get(i).maskViewUpdated(); } } COM: <s> reapplies the mask </s>
funcom_train/3710614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getRawValues (double[] x, double[] y) { Arrays.fill (y, 0.0); for (int i = 0; i < getNumberOfComponents(); i++) { if (isUsable(i)) { getComponent(i).addRawValues (x, y); } } } COM: <s> computes values on a dependent variable array given an array </s>
funcom_train/26412697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { respond(new Socket(addr, port)); } catch (Exception e) { if (logger.isLoggable(Level.INFO)) { logThrow(Level.INFO, getClass().getName(), "run", "failed to connect to {0}:{1}", new Object[] { addr, new Integer(port) }, e); } } } COM: <s> connect and then process a unicast discovery request </s>
funcom_train/44701911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object anObject) { boolean result = false; Sequence sequence; char[] characters; try { sequence = (Sequence) anObject; result = true; characters = sequence.getSequence(); for (int i = 0; i < characters.length; i++) { if(characters[i] != this.sequence[i]) { result = false; break; } } } catch (Exception e) { result = false; } return result; } //equals() COM: <s> compares another sequence with this checking their characters </s>
funcom_train/10573302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCloneNodeAttrs() { Node toClone = m_docNS.getFirstChild(); //the foo elt /* Node clone1=toClone.cloneNode(false); NamedNodeMap attrSet1=toClone.getAttributes(); assertEquals(true,DomUtils.compareNamedNodeMaps(attrSet1,clone1.getAttributes())); */ Node clone2 = toClone.cloneNode(true); } COM: <s> clone node with atts </s>
funcom_train/2985824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void windowDestroyed(final ScreenInstanceInfo info) { final JMenuItem mi = (JMenuItem) m_idToMenuMap.get(info.getId()); m_idToMenuMap.remove(info.getId()); m_menuBar.remove("window", mi); } COM: <s> process window destruction as far as menubar is concerned remove </s>
funcom_train/37721568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getWindowLocation(String name) { String value = getProperty(WINDOW_PREFIX + name + LOCATION_SUFFIX); if (value == null) return null; int comma = value.indexOf(','); return new Point( Integer.parseInt(value.substring(0, comma).trim()), Integer.parseInt(value.substring(comma+1).trim()) ); } COM: <s> returns the location for the specified window </s>
funcom_train/104207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fromCookieStore(CookieStore cs) { boolean storeChanged = false; for(Cookie c : cs.getCookies()) { String hv = hashCookie(c); WSCookieWrapper cw = cookies.get(hv); // cookie already exists and is unchanged if(cw != null && cw.equals(c)) continue; // (re-)wrap a cookie cookies.put(hv, new WSCookieWrapper(c)); storeChanged = true; System.out.println("New Cookie: " + hv); } if(storeChanged) { WSCookieStoreHandler.save(this); } } COM: <s> populate this cookie store from an apache cookie store </s>
funcom_train/25523294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJtpProfile() { if(jtpProfile == null) { jtpProfile = new JTabbedPane(); // Add the tabs. jtpProfile.addTab("Second Life", getJpSecondLife()); if(avatarProfile != null) { jtpProfile.addTab("First Life", getJpFirstLife()); jtpProfile.addTab("Interests", getJpInterests()); } } return jtpProfile; } COM: <s> get the profile tab pane </s>
funcom_train/241908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMessageNumber() throws SQLException { ResultSet rs = msgno.executeQuery(); try { if (rs.next()) { return rs.getInt(1); } else { throw new SQLException("Invalid message number sequence"); } } finally { try { rs.close(); } catch (Exception ex) {} } } COM: <s> returns a new message number from the message number sequence </s>
funcom_train/12652016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSent() { // Ensure that the holder is empty Invitation invitation = new Invitation(); assert invitation.getSent() == null : "sent not null " + invitation.getSent(); // Test the set and get Date date = new Date(Long.valueOf(Math.abs(GENERATOR.nextLong()))); invitation.setSent(date); assert date.equals(invitation.getSent()) : "Sent " + invitation.getSent() + " not stored as " + date; } COM: <s> test sent field </s>
funcom_train/1111224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setupOffScreen(int x, int y, int width, int height, Rectangle2D newOffscreenBuffer) { offgraphics = offscreen.getGraphics(); setOffscreenValid(false); offgraphics.setColor(getBackground()); offgraphics.setPaintMode(); offgraphics.fillRect(0, 0, width, height); offscreenBounds = newOffscreenBuffer; offscreenOffset = new Point2D.Double(x, y); } COM: <s> utility method that initialises the offscreen graphics area </s>
funcom_train/50152733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void applyButtonActionPerformed(java.awt.event.ActionEvent evt) { // set categories TreeSet<String> newcats = new TreeSet<String>(); Iterator<JCheckBox> it = cbs.iterator(); while (it.hasNext()) { JCheckBox cb = it.next(); if (cb.isSelected()) { newcats.add(cb.getText()); } } // set the shown categories in the model CategoryModel.getReference().setShownCategories(newcats); } COM: <s> apply button action performed </s>
funcom_train/37859669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean resumeJob(String jobName, String jobGroup) { boolean resumedJob = false; try { getScheduler().resumeJob(jobName, jobGroup); resumedJob = true; } catch(SchedulerException se) { LOG.error("Failed to resume job '" + jobName + "': " + se.getMessage(), se); } return resumedJob; } COM: <s> resume a job with the scheduler </s>
funcom_train/9276452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnsupportedSetObject() throws SQLException { PreparedStatement ps = prepare(); try { ps.setObject(1, null, typeInfo.type); fail("No exception thrown."); } catch (SQLFeatureNotSupportedException e) { // expected exception } ps.close(); } COM: <s> test that code set object code with the specified </s>
funcom_train/5232668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLanguage(){ log.info("Getting language..."); String language; try{ language = xmlConfigObject.getXMLConfigValue("/pdfsam/settings/i18n"); }catch(Exception e){ log.warn("Unable to get language ResourceBudle, setting the default language.", e); language = LanguageLoader.DEFAULT_LANGUAGE; } //get bundle i18nMessages = (new LanguageLoader(language, "org.pdfsam.i18n.resources.Messages").getBundle()); } COM: <s> sets the resource boudle for the selected language </s>
funcom_train/47611234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setSize(482, 283); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setContentPane(getPanMain()); this.setTitle("PJFileSplitter - by PerezDeQueya80"); this.addWindowListener(this); btnWait.addActionListener(this); txtSFile.requestFocus(); this.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("file_icon.png"))); } COM: <s> this method initializes this </s>
funcom_train/103347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getI18nTag() { if(this.toString().equals(PlotAgent.SEMILOG.toString())) return "graph.agent_semilog"; else if (this.toString().equals(PlotAgent.STANDARD.toString())) return "graph.agent_standard"; else if (this.toString().equals(PlotAgent.TOOTHED.toString())) return "graph.agent_toothed"; else return null; } COM: <s> get the internationalization tag for this plot agent </s>
funcom_train/18550397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Integer getCurrentState(ResourceTaskTO rtto) throws BusinessException{ TaskStatusBUS tsbus = new TaskStatusBUS(); Integer currStatus = null; //load current machine order from data base rtto.setTaskStatus(tsbus.getObjectByResourceTask(rtto)); currStatus = rtto.getTaskStatus().getStateMachineOrder(); return currStatus; } COM: <s> retrieve the current state of task from current resource task object </s>
funcom_train/801668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showTabs() { if (getPageCount() > 1) { setPageText(0, getString("_UI_SelectionPage_label")); if (getContainer() instanceof CTabFolder) { ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); Point point = getContainer().getSize(); getContainer().setSize(point.x, point.y - 6); } } } COM: <s> if there is more than one page in the multi page editor part </s>
funcom_train/16604691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void itemStateChangedHandler(ItemEvent e) { String valueName = (String) controlToValueName.get(e.getSource()); LinearInterpolator value = (LinearInterpolator) valueMap.get(valueName); if (e.getStateChange() == ItemEvent.SELECTED) { value.setActive(true); editor.registerValue(value, valueName); } else { value.setActive(false); editor.removeValue(valueName); } } COM: <s> notificaiton that one of the configuration option has changed state </s>
funcom_train/50573064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buf = new StringBuffer(); buf.append(getClass().getName()).append(": ").append(_msg); if (_nestedTrace != null) { buf.append("\n------ nested exception ------\n"); buf.append(_nestedTrace); } return(buf.toString()); } COM: <s> get a string representation of this exception including details </s>
funcom_train/41085783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JRDataSource createResultDatasource() { JRDataSource resDatasource; try { int pageSize = JRProperties.getIntegerProperty(dataset, JRJpaQueryExecuterFactory.PROPERTY_JPA_QUERY_PAGE_SIZE, 0); resDatasource = new JRJpaDataSource(this, pageSize); } catch (NumberFormatException e) { throw new JRRuntimeException("The " + JRJpaQueryExecuterFactory.PROPERTY_JPA_QUERY_PAGE_SIZE + " property must be numerical."); } return resDatasource; } COM: <s> creates a data source out of the query result </s>
funcom_train/37041853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reinsert(PriorityBuffer heap, int quantity) { while (quantity > 0) { Order top = (Order) heap.remove(); if (top.getQuantity() > quantity) { heap.add(top.split(top.getQuantity() - quantity)); } quantity -= top.getQuantity(); try { if (top.isBid()) { addBid(top); } else { addAsk(top); } } catch (DuplicateShoutException e) { throw new AuctionRuntimeException("Invalid market state"); } } } COM: <s> remove possibly several shouts from heap such that quantity heap is </s>
funcom_train/21188132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getModifications(Date lastBuild, Date now) { modifications = new ArrayList(); LOG.debug("Reading pom: " + pomFile.getAbsolutePath() + " with lastBuild: " + lastBuild); ArtifactInfo[] artifactsToCheck = getSnapshotInfos(); for (int i = 0; i < artifactsToCheck.length; i++) { checkFile(artifactsToCheck[i], lastBuild.getTime()); } return modifications; } COM: <s> the quiet period is ignored </s>
funcom_train/51226422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeBandsFromInputList() { int inputListLength = inputData.length; for(int i=0; i<inputListLength; i++) { if(suggList.containsKey(new Integer(inputData[i].getId()))) { suggList.remove(new Integer(inputData[i].getId())); } } } COM: <s> removes the bands from the input data from the suggestion list </s>
funcom_train/1463461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean disableUserAccount(User user) throws NoSuchUserException{ logger.debug("disableUserAccount: username="+user); User u = null; if(user.getId() <= 0 && user.getUsername() != null){ u = GnizrDaoUtil.getUser(userDao,user.getUsername()); if(u == null){ throw new NoSuchUserException("no such user: "+user.getUsername()); } }else{ u = new User(user); } u.setAccountStatus(AccountStatus.DISABLED); return userDao.updateUser(u); } COM: <s> disables an existing user account </s>
funcom_train/9025770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColor(RGB color) { if (this.color == null || this.color.equals(PreferenceConverter.getColor(DenguesUiPlugin.getDefault().getPreferenceStore(), IDenguesPrefsConstant.DESIGNER_COLOR_BLOCK))) { this.color = color; fireStructureChange(PROP_BLOCKEXIT_COLOR, this.color); } } COM: <s> sets the color </s>
funcom_train/48073058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IPropertyValue getProp(String propPath) throws IllegalArgumentException { IPropertyBinding prop = getPropertyBinding(propPath); if(prop == null) return null; if(!prop.getType().isValue()) { throw new IllegalArgumentException("Property '" + propPath + "' does not map to a value property"); } return (IPropertyValue) prop; } COM: <s> retrieves a property value from the model given a property path </s>
funcom_train/6289594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void poll() { if (pollTimer == null) { pollTimer = new Timer(); pollTimer.scheduleAtFixedRate(new Polling(), 0, Settings.pollInvl >= 5 ? Settings.pollInvl * 1000 : 5 * 1000); } else { pollTimer.cancel(); pollTimer = null; } } COM: <s> if there is polling not active enables polling if it is active </s>
funcom_train/3613414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLinesOfCodeWithoutRepository1() throws Exception { buildRevision("1.2", date12, 5, 0); buildRevisionInitial("1.1", date11); finishBuilder(); assertEquals(5, file.getCurrentLinesOfCode()); assertRevisionLines(rev0, 5, 5, 5); assertRevisionLines(rev1, 0, 0, 0); } COM: <s> method test lines of code without repository1 </s>
funcom_train/2955207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void redo() throws CannotRedoException { if (redoList.size() == 0) { throw new CannotRedoException(); } UndoableEditEvent event = (UndoableEditEvent) redoList.removeLast(); this.moveTo(event.caretOffset, false); event.edit.redo(); this.undoList.add(event); undoDepth++; } COM: <s> redoes the last action on the redo stack </s>
funcom_train/36980027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBookMarks() { Page page = (Page)helpView.getCurrentPage(); if(page==null) return; JMenuItem menuItem = new JMenuItem(((Page)helpView.getCurrentPage()).getBookMarkLabel()); menuItem.addActionListener(this); menuBookMarks.add(menuItem); PageBookMarks.getInstance().addBookMark(menuItem, helpView.getCurrentPage()); } COM: <s> set a bookmark to the current page </s>
funcom_train/37077562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SeqFeatureI getPrevFeature(int p, Level level) { SeqFeatureI feature = null; int position = pixelPositionToTierPosition(p); if (orientation == Orientation.FIVE_TO_THREE) { feature = this.tier.getPrevFeature(position, level); } else if (orientation == Orientation.THREE_TO_FIVE) { feature = this.tier.getNextFeature(position, level); } return feature; } COM: <s> given a pixel position return the previous feature on the tier </s>
funcom_train/48535856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float getUnCommentCharacters() { float totalUnComments = 0; // Recursively get the subfolder's uncomment characters for (SFolder folder : subFolders) { totalUnComments += folder.getUnCommentCharacters(); } // Get the all the file's uncomment characters for (SFile file : allFiles) { totalUnComments += file.getCharactersWithoutComments(); } return totalUnComments; } COM: <s> gets the number of un comment characters using recursion </s>
funcom_train/9136175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void setBoundaries(double xlow, double xup) { // int len = 1; // if (N > 0) // len = N; // LBound = new double[len]; // UBound = new double[len]; // for (int i= 0; i < len; ++i) { // LBound[i] = xlow; // UBound[i] = xup; // } // } COM: <s> set lower and upper boundary in all variables </s>
funcom_train/16937123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer("ResourceParams["); sb.append("name="); sb.append(name); sb.append(", parameters="); sb.append(resourceParams.toString()); sb.append("]"); return (sb.toString()); } COM: <s> return a string representation of this object </s>
funcom_train/25365702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEnemyattackPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RoomEvent_enemyattack_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RoomEvent_enemyattack_feature", "_UI_RoomEvent_type"), LeveleditorPackage.Literals.ROOM_EVENT__ENEMYATTACK, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the enemyattack feature </s>
funcom_train/43888340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected BoundingBoxAttribute boundsAttribute() { for (Iterator itr = attributes().iterator(); itr.hasNext();) { Attribute att = (Attribute)itr.next(); //JD: check for GML namespace if ("bounds".equals(att.name().getLocalPart())) { return (BoundingBoxAttribute) att; } } return null; } COM: <s> accessor for getting bouding box attribute </s>
funcom_train/2880214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() throws BuildException { verifyHostUndefined(); setHost(""); setStandardSmartfrogProperties(); enableFailOnError(); checkApplicationsDeclared(); String paths = deployApplications(ACTION_DEPLOY_WAIT); addExitFlag(); execSmartFrog(ERROR_COULD_NOT_RUN + " " + paths); } COM: <s> run a task </s>
funcom_train/45692124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReservedShortPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SongEventDrumNote_reservedShort_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SongEventDrumNote_reservedShort_feature", "_UI_SongEventDrumNote_type"), EsxPackage.Literals.SONG_EVENT_DRUM_NOTE__RESERVED_SHORT, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the reserved short feature </s>
funcom_train/37859657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean pauseJob(String jobName, String jobGroup) { boolean pausedJob = false; try { getScheduler().pauseJob(jobName, jobGroup); pausedJob = true; } catch(SchedulerException se) { LOG.error( "Failed to pause job '" + jobName + "': " + se.getMessage(), se); } return pausedJob; } COM: <s> pauses a job with the scheduler </s>
funcom_train/51544623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (e.getSource() == cancel) { myPane.selected=null; setVisible(false); } else if (e.getSource() == myPane.m_select) if(myPane.selected != null) setVisible(false); } COM: <s> reaction of users actions </s>
funcom_train/27674734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getIsProtected( final String sym ) { // TODO - Should we also search all public imports. // TODO - Should this also check the autoloadables? // TODO - Should we use findIndentFor and put all this code in // CompilerState GlobalIdent id = globalSymbols.get( sym ); return id != null && id.getIsProtected(); } COM: <s> returns code true code if the specified symbol is protected </s>
funcom_train/31309353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addComponentInfo( Component comp, DefaultMutableTreeNode parent ) { // FIXME: Should not be hard-coded. if ((comp instanceof LayoutGap) || (comp instanceof JPopupMenu)) return; if (comp instanceof Container) { // note! All Swing-components are containers! if (((Container)comp).getComponentCount() > 0) { addContainerInfo( (Container)comp, parent ); return; } } parent.add( createNode( comp ) ); } COM: <s> adds the component recursivly to the tree </s>
funcom_train/29713996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getCookieValue(String cookieName, HttpServletRequest request) { String value = ""; Cookie[] cookies = request.getCookies(); if (cookies != null) { for (int i = 0; i < cookies.length; i++) { if (cookies[i].getName().equals(cookieName)) { value = cookies[i].getValue(); } } } return value; } COM: <s> return a requested cookie value </s>
funcom_train/5344219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadWithNewDirectories(Set shared) { SharingSettings.DIRECTORIES_TO_SHARE.setValue(shared); synchronized(_data.DIRECTORIES_NOT_TO_SHARE) { for(Iterator i = shared.iterator(); i.hasNext(); ) _data.DIRECTORIES_NOT_TO_SHARE.remove((File)i.next()); } RouterService.getFileManager().loadSettings(); } COM: <s> loads the file manager with a new list of directories </s>
funcom_train/45075685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readPolicies(String fileName) { if (fileName != null) { Element root = null; try { Builder docBuilder = new Builder(); Document doc = docBuilder.build(fileName); root = (Element) doc.getRootElement(); } catch (Exception e) { cat.error("readPolicies failed to read: " + fileName + " " + e); } traverseTX(root); } } COM: <s> reads policyname policy pairs from input file name and stores them in hashtable </s>
funcom_train/3561885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { dateValue = new Date(); cal.setTime(dateValue); setDate(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH), cal.get(Calendar.HOUR), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND)); } COM: <s> initializes the panel with default values 1 1 1900 00 00 </s>
funcom_train/36764472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildEndRecord(){ Linker linker_instance = new Linker(); linker_end_record[0][0] = "LE"; linker_end_record[0][1] = linker_instance.intToFourHex(linker_text_record_counter+1/*linker_header_record_counter*/+1); } COM: <s> this function adds the end record to linker end record array </s>
funcom_train/16258450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateLayoutData() { widthHint = SWT.DEFAULT; heightHint = SWT.DEFAULT; if (!axis.getTick().isVisible()) { widthHint = 0; heightHint = 0; } else { if (axis.isHorizontalAxis()) { heightHint = Axis.MARGIN + TICK_LENGTH; } else { widthHint = TICK_LENGTH + Axis.MARGIN; } } } COM: <s> updates title layout </s>
funcom_train/8797109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double calculateNewValueFromWorldLocation( Point3d worldPoint ) { TransformGroup objectTransformGroup = object.getTransformGroup(); Transform3D transform = new Transform3D(); Vector3d delta = new Vector3d( worldPoint ); objectTransformGroup.getTransform( transform ); transform.setScale(AGNObject.ONE_DISTANCE_UNIT); transform.transform( delta ); recentValue = delta.length(); return recentValue; } COM: <s> calculate new value from world location </s>
funcom_train/8469310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkIndices(int row, int col) { if (row < 0 || row >= rows) throw new ArrayIndexOutOfBoundsException("row: " + row); else if (col < 0 || col >= cols) throw new ArrayIndexOutOfBoundsException("column: " + col); } COM: <s> check that the indices of a requested cell are within bounds </s>
funcom_train/33075269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean runDirectoryTransform(String sourceXMLDir, String stylesheetPath, String outputDir, String suffix, Writer outputWriter, boolean cleanTarget) { DirectoryTransformer directoryTransformer = new DirectoryTransformer(switchSetter, outputWriter, cleanTarget); directoryTransformer.addProgressObserver(view); view.addCancelObserver(directoryTransformer); return directoryTransformer.runDirectoryTransform(sourceXMLDir, stylesheetPath, outputDir, suffix); } COM: <s> creates a directory transformer to compile the stylesheet and then transform </s>
funcom_train/2290450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFileTranslation(String translation) { m_fileTranslations.add(translation); if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_VFS_ADD_FILE_TRANSLATION_1, translation)); } } COM: <s> adds one file translation rule </s>
funcom_train/25026893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getListAsString(JList list) { String s = ""; DefaultListModel mdl = (DefaultListModel) list.getModel(); Object[] elts = mdl.toArray(); for (int i = 0; i < elts.length; i++) { // add a comma only internally in the list if (i == 0) { s = (String) elts[i]; } else { s = s + "," + (String) elts[i]; } } return s; } COM: <s> gets the contents of a code jlist code as a comma delimited string </s>
funcom_train/1662793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProject(final Project project) { this.project = project; setHeading(MessageFormat.format(I18n.getMessage("jsite.project-files.heading"), project.getName())); setDescription(I18n.getMessage("jsite.project-files.description")); I18nContainer.getInstance().registerRunnable(new Runnable() { public void run() { setHeading(MessageFormat.format(I18n.getMessage("jsite.project-files.heading"), project.getName())); setDescription(I18n.getMessage("jsite.project-files.description")); } }); } COM: <s> sets the project whose files to manage </s>
funcom_train/2877443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line ; while ((line = br.readLine()) != null) { if (out) { System.out.println(line); } else { System.err.println(line); } } } catch (IOException ioe) { ioe.printStackTrace(); } } COM: <s> reads an input stream and shows the content in the system </s>
funcom_train/18115894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Match getMatch(String title, String text, String[] info) { text = stripHtml(text); text = getFormattedLines(text); if (title.equals("")) title = "unknown"; for (int i = 0; i < info.length; i++) { info[i] = formatLine(info[i]); } Match match = new MatchImpl(null, title, text, 1, info); return match; } COM: <s> this method inserts bold tags around hits within the text </s>
funcom_train/18089801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectGPS() { closeGPS(); Generic .debug("Freeport is " + m.getStringOpt(AppSettings.FREETEXTPORT)); if (m.getStringOpt(AppSettings.FREETEXTPORT).length() != 0) { openFreeTextPort(m.getStringOpt(AppSettings.FREETEXTPORT)); } else { m.gpsRxTx().openPort(); if (m.isConnected()) { performOperationsAfterGPSConnect(); } } } COM: <s> connect to the gps open the serial connection </s>
funcom_train/38530132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void select(final boolean selectedState) { final Border border = ((layoutType == LayoutType.LABELS_BORDER) || (layoutType == LayoutType.NO_LABELS_BORDER)) ? (selectedState ? BorderFactory .createLineBorder(Color.BLACK, 2) : BorderFactory.createEmptyBorder(2, 2, 2, 2)) : BorderFactory.createEmptyBorder(2, 2, 2, 2); panel.setBorder(border); } COM: <s> select this plot as the current plot </s>
funcom_train/45121640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addToStringPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AbstractField_toString_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AbstractField_toString_feature", "_UI_AbstractField_type"), DictionaryPackage.Literals.ABSTRACT_FIELD__TO_STRING, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, getString("_UI_FormGridPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the to string feature </s>
funcom_train/12547379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finalizeStateRemove() { if (collapseState == null) { JOptionPane.showMessageDialog(frame, "A valid state has not been selected yet!", "No State Selected", JOptionPane.ERROR_MESSAGE); return; } FSAToRegularExpressionConverter.removeState(collapseState, transitionWindow.getTransitions(), automaton); remaining--; nextStep(); collapseState = null; drawer.clearSelected(); drawer.clearSelectedTransitions(); // transitionWindow.setTransitions(new Transition[0]); transitionWindow.setVisible(false); transitionWindow.dispose(); // transitionWindow.hide(); } COM: <s> this finalizes a state remove </s>
funcom_train/34675298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testProduceDocumentationFail() throws Exception { // create policy Policy policy = new Policy(); policy.setId("pol1"); policy.setPolicyNumber("pol1"); policy.setStatus(PolicyStatus.REFERRED); // run command ProduceDocumentationCommand command = (ProduceDocumentationCommand) getCore().newCommand("ProduceDocumentationService"); command.setPolicyArg(policy); try { command.invoke(); } catch(PreconditionException e) { // this is what we want } } COM: <s> test produce documentation from refer staus </s>
funcom_train/18255570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer s = new StringBuffer("Lat: "); s.append((new Double(getLatitude())).toString()); s.append(", Lon: "); s.append((new Double(getLongitude())).toString()); return s.toString(); } COM: <s> return a string of the latitude and longitude of the map coordinate </s>
funcom_train/50221544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getInstanceAttribute(GraphObject ele, String key) { Object res = ele.getAttribute(key); if (res == null) { AttributeSpec spec = getTypeSpec(ele, key); if (spec != null) // has a spec so return the default value return spec.value; else return null; } else return res; } COM: <s> return the nominated attribute </s>
funcom_train/12318460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getActions() { if (actions == null) { StringBuffer sb = new StringBuffer(); boolean comma = false; if ((action_mask & ACTION_CHANGE_CREDENTIAL) == ACTION_CHANGE_CREDENTIAL) { sb.append(CHANGE_CREDENTIAL); comma = true; } if ((action_mask & ACTION_CHANGE_PROPERTY) == ACTION_CHANGE_PROPERTY) { if (comma) sb.append(','); sb.append(CHANGE_PROPERTY); comma = true; } if ((action_mask & ACTION_GET_CREDENTIAL) == ACTION_GET_CREDENTIAL) { if (comma) sb.append(','); sb.append(GET_CREDENTIAL); } actions = sb.toString(); } return (actions); } COM: <s> returns the canonical string representation of the actions separated by </s>
funcom_train/51703936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertColumn(int index, Object defaultValue) { if (index > 1 && getData() instanceof IExtendableTableData) { IExtendableTableData tableData = (IExtendableTableData) super.getData(); tableData.insertColumn(index, defaultValue); } else throw new UnsupportedOperationException( "ITableData implementation does not support inserting table columns."); } COM: <s> inserts a column into the table and adds the specified value to all </s>
funcom_train/23216926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addWSDLLinkPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ListOfWSDL_wSDLLink_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ListOfWSDL_wSDLLink_feature", "_UI_ListOfWSDL_type"), ContractPackage.Literals.LIST_OF_WSDL__WSDL_LINK, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the wsdl link feature </s>
funcom_train/14061686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void selectionChanged() { int index = list.getSelectionIndex(); int size = list.getItemCount(); editButton.setEnabled(index >= 0); removeButton.setEnabled(index >= 0); upButton.setEnabled(size > 1 && index > 0); downButton.setEnabled(size > 1 && index >= 0 && index < size - 1); } COM: <s> notifies that the list selection has changed </s>
funcom_train/39563508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SyntaxTreeNode getPreviousNode() { SyntaxTreeNode previousSibling; SyntaxTreeNode myParent = (SyntaxTreeNode)getParent(); if (myParent == null) { return null; } previousSibling = getPreviousSibling(); if (previousSibling != null) { if (previousSibling.getChildCount() == 0) return previousSibling; else return previousSibling.getLastLeaf(); } else { return myParent; } } COM: <s> returns the node that precedes this node in a preorder traversal of </s>
funcom_train/44852596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueryResult getAuthors(Long inTextID, int inVersion) throws VException, SQLException { KeyObject lKey = new KeyObjectImpl(); lKey.setValue(TextAuthorReviewerHome.KEY_TEXT_ID, inTextID); lKey.setValue(TextAuthorReviewerHome.KEY_VERSION, new Integer(inVersion)); lKey.setValue(ResponsibleHome.KEY_TYPE, ResponsibleHome.Type.AUTHOR.getValue()); return select(lKey); } COM: <s> returns the entry of the author responsible for the specified text version </s>
funcom_train/35883059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Option getSelectedOption() { Option theOption = null; ListIterator<Option> theListIterator = getOptions().listIterator(); while (theListIterator.hasNext()) { Option theCurrentOption = (Option) theListIterator.next(); if(theCurrentOption.isSelected()) { theOption = theCurrentOption; break; } } return theOption; } COM: <s> gets the selected option based on the selected attribute </s>
funcom_train/49793848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notify(String message) { this.logger.info(String.format("Notifying Twitter user %s: %s", this.user, message)); try { twitter4j.updateStatus(message); } catch (TwitterException e) { this.logger.warning("Tweet failed: " + StackTrace.toString(e)); } } COM: <s> notify twitter with the passed message </s>
funcom_train/9086713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Employees entity) { EntityManagerHelper.log("saving Employees instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved employees entity </s>
funcom_train/32197580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resign(ClientConnection loser) { if (loser == whitePlayer) { finishGame(OnlineChessGame.GameResult.RESIGN, "0-1"); } else if (loser == blackPlayer) { finishGame(OnlineChessGame.GameResult.RESIGN, "1-0"); } else throw new RuntimeException("Wrong player specified for the game"); } COM: <s> causes the finishing of the game due to resignation of either player </s>
funcom_train/4260657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _getRecursivelyAccessedLocalsIndicesHelper(Set s, Subroutine[] subs){ for (int i=0; i<subs.length; i++){ int[] lvs = subs[i].getAccessedLocalsIndices(); for (int j=0; j<lvs.length; j++){ s.add(new Integer(lvs[j])); } if(subs[i].subSubs().length != 0){ _getRecursivelyAccessedLocalsIndicesHelper(s, subs[i].subSubs()); } } } COM: <s> a recursive helper method for get recursively accessed locals indices </s>
funcom_train/42861301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchNode(long rowId) throws SQLException { Cursor mCursor = mDb.query(true, DATABASE_TABLE_NODES, null, KEY_ROWID + "=" + rowId, null, null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } return mCursor; } COM: <s> return a cursor positioned at the node that matches the given row id </s>