__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/6260208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateImports() { StringBuffer buf = new StringBuffer(); buf.append("package "); buf.append(jmi.javaClassPackage(thisCls.getContainer())); buf.append(";"); line(buf); line("import java.lang.reflect.Method;"); line("import java.util.*;"); println(); } COM: <s> generates imports and package declarations </s>
funcom_train/5774364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private LCheckBox getChkWholeWord() { if (chkWholeWord == null) { chkWholeWord = new LCheckBox(); chkWholeWord.setBounds(new java.awt.Rectangle(4,17,141,25)); chkWholeWord.setCaptionTag("labelWholeWord"); chkWholeWord.setText("Whole word"); } return chkWholeWord; } COM: <s> this method initializes chk whole word </s>
funcom_train/8065091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cancelEditingInternal() { removeFocusListener(this); setVisible(false); figText.endTrans(); Container parent = getParent(); if (parent != null) { parent.remove(this); } figText.removePropertyChangeListener(this); removeKeyListener(this); layeredPane.remove(this); drawingPanel.requestFocus(); figText = null; } COM: <s> exit editing mode </s>
funcom_train/47675049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reinitLevel(TemplateDesignerTopComponent p_componentInstance) { MsgElement rootElement = p_componentInstance.getElementTree(true).getModel().getRoot(); //modified by bruno Correia //int depth = rootElement.getDepth(); int depth = rootElement.getRealDepth(); //modified by bruno Correia end p_componentInstance.setCurrentLevel(depth); } COM: <s> revalidates the max depth and the level dependent delimiters </s>
funcom_train/41016353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void adjustPercentages() { int totalPerc = 0; for (int i=0; i<NUM_PERCENTAGES; i++) totalPerc += perc[i]; if (totalPerc == 0) return; for (int i=0; i<NUM_PERCENTAGES; i++) perc[i] = (int) MiscTools.round((double) perc[i]*100/totalPerc); } COM: <s> adjust percentages to always sum up to 100 </s>
funcom_train/7645369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getISO3Country() throws MissingResourceException { if (countryCode.length() == 0) { return ""; //$NON-NLS-1$ } ResourceBundle bundle = getBundle("ISO3Countries", this); //$NON-NLS-1$ // BEGIN android-changed return bundle.getString(this.toString()); // END android-changed } COM: <s> gets the three letter iso country code which corresponds to the country </s>
funcom_train/39379953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buffer = new StringBuffer("Entry value -> (").append(count). append(")"); buffer.append(" lastNodeInPath -> (").append(lastNodeInPath).append(")"); return buffer.toString(); } COM: <s> returns a string representation of the entry instance </s>
funcom_train/29681135
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAgreedInvListMode(){ this.setDetailedInvitation(false); this.setAddingResult(false); this.setCurrentMode(this.getAGREEDINVLIST()); this.setInvList(this.getUserInvitations(this.getCurrentUser(), false, true)); } COM: <s> called from the webpage to set agreed invitation list mode </s>
funcom_train/19385826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCheckParams07() { jcc.setJcHome(jcHome); jcc.setPackageName("my.package"); jcc.setPackageAID(aid1); jcc.setMinorVersion(0); try { jcc.checkParams(); failNoException(); } catch(BuildException e) {} } COM: <s> minor version set but not major version </s>
funcom_train/32909845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActionListener getNextAction() { return new ActionListener() { public void actionPerformed(ActionEvent e) { ApplicationUserModel m = (ApplicationUserModel) uiUserList.getSelectedRow(); screen1.setUserObject(m); screen2.initialize(screen1, null); screen2.setTitle(ReferenceServices.getMsg(FormTitleFramework.USERMAINTENANCE) + ": " + m.getUserLogin()); screen2.getButtons().getCmdFinish().setEnabled(false); } }; } COM: <s> store the selected user in this screen </s>
funcom_train/42650302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendMessage(String message) { if (!mgrConnectedTo) { Log.e(LOG_TAG, "Not connected to Manager ! So I cannot interact with it."); return; } synchronized (this) { //Log.d(LOG_TAG, "Send => " + message); mgrOut.print(message + "\n"); } // echo // exit, quit // help // hold // kill // log // mute // net // pid // password and username // signal // state // status // username // verb // version // auth-retry } COM: <s> sends a message to the manager </s>
funcom_train/10616907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalidParameterSpecException01() { InvalidParameterSpecException tE = new InvalidParameterSpecException(); assertNull("getMessage() must return null.", tE.getMessage()); assertNull("getCause() must return null", tE.getCause()); } COM: <s> test for code invalid parameter spec exception code constructor </s>
funcom_train/2881305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MBeanInfo getMBeanInfo(ObjectName name) throws InstanceNotFoundException, IntrospectionException, ReflectionException, RemoteException { if (!isActive) { throw new RemoteException("RmiConnectorServer is not active"); } return rmiConnectorServer.getMBeanServer().getMBeanInfo(name); } COM: <s> gets the m bean info attribute of the rmi connector proxy object </s>
funcom_train/23999892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGet() { OrderedSet<String> instance = new OrderedSet<String>(); instance.add("a"); instance.add("b"); assertEquals("a",instance.get(0)); assertEquals("b",instance.get(1)); } COM: <s> test of get method of class ordered set </s>
funcom_train/26601586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(_DComparator b1, _DComparator b2) throws DException { long l1 = getLongValue(b1.getBytes(), 0); long l2 = getLongValue(b2.getBytes(), 0); return comparedates(new Date(l1), new Date(l2)); } COM: <s> compares two dates for ordering </s>
funcom_train/16586086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void trimToSize() { modCount++; int oldCapacity = elementData.length; if (size < oldCapacity) { double[] oldData = elementData; elementData = new double[size]; System.arraycopy(oldData, 0, elementData, 0, size); } } COM: <s> trims the capacity of this tt double list tt instance to be the </s>
funcom_train/18658038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getCoveredGaps(long start, long end) { Gap gap = new Gap(start, end); ArrayList result = new ArrayList(); for(Iterator i=this.gaps.iterator(); i.hasNext(); ) { Gap currentGap = (Gap) i.next(); if(gap.covers(currentGap)) result.add(currentGap); } return result; } COM: <s> returns the gaps stored in the gap list that are completely inside </s>
funcom_train/34585050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reactToEvent(final Event event) { SemaphoreReturnCode returnCode; returnCode = ActionCreator.getInstance().lockBy(this); if ( returnCode == SemaphoreReturnCode.success || returnCode == SemaphoreReturnCode.lockedByUser ) { ActionCreator.getInstance().createAction( this, event, this); returnCode = ActionCreator.getInstance().releaseBy(this); } else { // TODO (tyloesand) Fehlerfall } } COM: <s> the method lets calculate how an object reacts to an event </s>
funcom_train/1488204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String extractConceptAsString(Message message, String psNamespace, String psKey, boolean errorIfNotMapped) throws PropertyNotFoundException, MisconfiguredPropertyException, MessageAccessException { try { MessageAccessor messageAccessor = (MessageAccessor) propertyStore.getProperty(psNamespace, psKey, MessageAccessor.class); Object result = messageAccessor.invoke(message); return result.toString(); } catch (PropertyNotFoundException e) { if (errorIfNotMapped) { throw e; } else { return null; } } } COM: <s> extracts the concept as a string </s>
funcom_train/34128600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNewDocumentType() { if ( forTypeRadio.isSelected()) { return NEW_TYPE_DOCUMENT; } else if ( specifyTemplateRadio.isSelected()) { return NEW_TEMPLATE_DOCUMENT; } else if ( selectTemplateRadio.isSelected()) { return NEW_TEMPLATE_DOCUMENT; } else if ( dtdDocumentRadio.isSelected()) { return NEW_DTD_DOCUMENT; } else if (fromClipboardDocumentRadio.isSelected()) { return( NEW_FROM_CLIPBOARD_DOCUMENT); } else { return NEW_DEFAULT_XML_DOCUMENT; } } COM: <s> returns the to be created document type </s>
funcom_train/33810796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String format(FXNode node) { JButton button = componentInNode(node, JButton.class); return concat( "JavaFX SwingButton[", "id=", quote(node.getLeaf().getID()), ", ", "button=[", componentFormatter.format(button), "]", "]" ); } COM: <s> returns the code string code representation of the given code swing button code </s>
funcom_train/32319838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL getDatabase() { if (database == null) { /* This is merely for backwards compatibility with * versions of FreeTTS earlier than v1.2 (i.e., * before the voice manager was introduced). */ String name = getFeatures().getString(Voice.DATABASE_NAME); database = this.getClass().getResource(name); } return database; } COM: <s> gets the url to the database that defines the unit data for this </s>
funcom_train/10628631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOneOne() { String numA = "1"; String numB = "1"; String res = "0"; BigInteger aNumber = new BigInteger(numA); BigInteger bNumber = new BigInteger(numB); BigInteger result = aNumber.xor(bNumber); assertTrue(res.equals(result.toString())); } COM: <s> xor for one and one </s>
funcom_train/8812147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enableSuccessorsTabs() { for (final PhaseModelDTO successor : projectPresenter.getCurrentProjectDTO().getCurrentPhaseDTO() .getPhaseModelDTO().getSuccessorsDTO()) { final TabItem successorTabItem = tabItemsMap.get(successor.getId()); if (successorTabItem != null) { successorTabItem.setEnabled(true); } } } COM: <s> enables the successors tabs of the current displayed phase </s>
funcom_train/300685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDisplayInfo( boolean disp ) { this.bolImageInfo = new Boolean( disp ).booleanValue(); // if the scroller is not blocking during a transition if ( !this.bolDontRefresh ) { // enable the image info this.imgDisplay.setDisplayInfo( this.bolImageInfo ); // repaint the image panel this.imgDisplay.repaint(); } } COM: <s> toggle the visibility of the image info labels on the image panel </s>
funcom_train/18865702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BigDecimal getOpeningBalanceForReconcile() { final Date date = getFirstUnreconciledTransactionDate(); synchronized (tMutex) { for (int i = 0; i < transactions.size(); i++) { if (transactions.get(i).getDate().equals(date)) { if (i > 0) { return getBalanceAt(i - 1); } break; } } return ZERO; } } COM: <s> get the default opening balance for reconciling the account </s>
funcom_train/10482132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect() throws MessagingException { try { // create socket and connect to server. getConnection(); // receive welcoming message getWelcome(); } catch (IOException e) { if (debug) { debugOut("I/O exception establishing connection", e); } throw new MessagingException("Connection error", e); } } COM: <s> connect to the server and do the initial handshaking </s>
funcom_train/5416923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OperationContext getOperationContext() throws ServiceException { OperationContext octxt = new OperationContext(mAuthTokenAccountId, mAuthToken != null && (mAuthToken.isAdmin() || mAuthToken.isDomainAdmin())); octxt.setChangeConstraint(mChangeConstraintType, mMaximumChangeId); octxt.setRequestIP(mRequestIP); return octxt; } COM: <s> generates a new </s>
funcom_train/35461221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testElementaryStringVaryingIndent() throws Exception { emitAndCheck("dcl a, 2 b CHAR(3) VARYING;" , "" + " 01 a." + LS + " 02 b." + LS + " 03 LEN PIC 9(4) BINARY." + LS + " 03 FILLER PIC X OCCURS 1 TO 3 DEPENDING LEN OF b."); } COM: <s> an elementary character string with varying size with more indent </s>
funcom_train/31300855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getProperty(String key, int defaultValue) { if (this.ignoreCase) { key = key.toLowerCase(); } String val = this.attributes.getProperty(key); if (val == null) { return defaultValue; } else { try { return Integer.parseInt(val); } catch (NumberFormatException e) { throw this.invalidValue(key, val, this.lineNr); } } } COM: <s> returns an integer property of the object </s>
funcom_train/37749013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scanMimeType() throws PropertyException { int part1 = exprIndex; scanName(); if (part1 != exprIndex) { if (expr.charAt(exprIndex) == '/') { int part2 = ++exprIndex; scanName(); if (part2 != exprIndex) return; } } throw new PropertyException("Mime type expected; found:" + expr.substring(part1)); } COM: <s> attempt to recognize a mime type </s>
funcom_train/5384783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void treeInitVolume(TreeItem item, File volume) { item.setText(volume.getPath()); item.setImage(iconCache.stockImages[iconCache.iconClosedDrive]); item.setData(TREEITEMDATA_FILE, volume); item.setData(TREEITEMDATA_IMAGEEXPANDED, iconCache.stockImages[iconCache.iconOpenDrive]); item.setData(TREEITEMDATA_IMAGECOLLAPSED, iconCache.stockImages[iconCache.iconClosedDrive]); } COM: <s> initializes a volume item </s>
funcom_train/37757655
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPropertyKey1() { assertEquals("Failed to get value for key1 from general category", "key1 value", config.getProperty("key1")); assertEquals("Failed to get value for key1 from general category (env.general.key1)", "key1 value", config .getCategory().getProperty("key1")); } COM: <s> works without patch </s>
funcom_train/45452609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIntroduction() throws Exception { String testIntroduction = "Introduction"; Template testTemplate = new Template(testOrg, testTemplateName); assertNotNull("Unable to create template", testTemplate); testTemplate.setIntroduction(testIntroduction); assertEquals("Introduction inconsistent:", testIntroduction, testTemplate.getIntroduction()); } COM: <s> test survey template introduction accessors </s>
funcom_train/30199249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getHttpBootRadioButton() { if (httpBootRadioButton == null) { httpBootRadioButton = new JRadioButton(); httpBootRadioButton.setText("Boot from HTTP"); httpBootRadioButton.setSelected(true); httpBootRadioButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { enableTextfields(); } }); } return httpBootRadioButton; } COM: <s> this method initializes j radio button </s>
funcom_train/25315465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setTitle(String title) { GUI gui = GUI.getInstance(); int x = gui.getWidth() / 2; int y = (int) ((50.0 + TITLE_SPACE) * this.yscale); this.title = gui.createText(title, new Point(x, y), TITLE_SIZE, HIGHLIGHT_COLOUR); } COM: <s> sets title of the menu </s>
funcom_train/50373630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ServiceProxy findService(String serviceName) { if(serviceName!=null) { synchronized(services) { Iterator<ServiceProxy> it = services.iterator(); while (it.hasNext()) { ServiceProxy s = it.next(); if(s.getServiceName().equals(serviceName)) { return s; } } } } return null; } COM: <s> searches the current service listeners list for the service with the given name </s>
funcom_train/30253704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad2() { //(new SLDesktopVisualTest()).showOne(); //(new SLDesktopVisualTest()).showAll(); register(); initParams(); if (orgName == null || orgName.length() == 0) { RootPanel rootPanel = RootPanel.get(); rootPanel.clear(); ContentPanel contentPanel = new ContentPanel(); contentPanel.add(new HTML(Constants.ORGNAME_NOT_SPECIFIED)); rootPanel.add(contentPanel); } else { Controller.getController().entryPoint(); } } COM: <s> this is the entry point method </s>
funcom_train/19142746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JobStatus popDelegatedJob(int id) { Integer i = new Integer(id); // System.err.println("id is " + id); JobStatus status = (JobStatus)delegatedJobs.get(i); // System.err.println("status == null: " + (status == null)); // make sure we delete jobs that we aren't using anymore // otherwise we'll have a memory leak! delegatedJobs.put(i, "empty"); return status; } COM: <s> returns the job status of the job with the given id </s>
funcom_train/3892234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleViewExternal(ISelection selection) { final File file = (File)((IStructuredSelection)selection).getFirstElement(); if(file != null && file.exists()) { BusyIndicator.showWhile(getControl().getDisplay(), new Runnable() { public void run() { boolean result = Program.launch(file.getAbsolutePath()); } }); } } COM: <s> launch file folder natively </s>
funcom_train/35848332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetSourcePath() { assertEquals(modelElemSourcePathFile, srcCtrl.getSourcePath(modelElem)); File newSrcPath = new File("../new/source/path"); srcCtrl.setSourcePath(modelElem, newSrcPath); assertEquals(newSrcPath, srcCtrl.getSourcePath(modelElem)); } COM: <s> test setting the source path of a model element </s>
funcom_train/8845029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fileStorage(FileStorageModel storeFile) { try { String savePath = path + storeFile.fileName; BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(savePath)); outputStream.write(storeFile.bytes,0,storeFile.bytesRead); outputStream.flush(); outputStream.close(); log.debug("File " + storeFile.fileName + " saved to the disk"); } catch (IOException e) { e.printStackTrace(); } } COM: <s> file storage will be responsible in storing the file object in the local </s>
funcom_train/5870416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMapType(String mapType) { if ("normal".equals(mapType)) { setNormal(true); } else if ("satellite".equals(mapType)) { setSatellite(true); } else if ("hybrid".equals(mapType)) { setHybrid(true); } else if ("physical".equals(mapType)) { setPhysical(true); } _mapType = mapType; smartUpdate("z.mt", mapType); } COM: <s> set the map type normal satellite hybrid physical default is normal </s>
funcom_train/7518229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Funcionario entity) { EntityManagerHelper .log("saving Funcionario 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 funcionario entity </s>
funcom_train/29831066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scroll() { try { Rectangle r; if (autoScrollDown) r = modelToView(doc.getLength()); else r = modelToView(0); if (r != null) scrollRectToVisible(r); } catch (Exception e) {} revalidate(); repaint(); } COM: <s> scrolls according to given policy </s>
funcom_train/1797513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void declareExtensions() { new CrawlIssuesFeed().declareExtensions(extProfile); new KeywordsFeed().declareExtensions(extProfile); new MessagesFeed().declareExtensions(extProfile); new SitemapsFeed().declareExtensions(extProfile); new SitesFeed().declareExtensions(extProfile); } COM: <s> declare the extensions of the feeds for the google webmaster tools data </s>
funcom_train/37243019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMidiOutput(int status, int channel, int data1, int data2) { try { ShortMessage message = new ShortMessage (); message.setMessage (status, channel, data1, data2); this.midiReceiver.send (message, -1L); } catch (javax.sound.midi.InvalidMidiDataException e) {}; } COM: <s> construct a midi message and pass to the designated midi output </s>
funcom_train/19309015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeLastChar(final StringBuilder buffer) { if (isStandardFont()) { return; } buffer.append("/LastChar "); buffer.append(Integer.toString(this.fsFont.getLastIndex(), WKConstants.RADIX_BASE_10)); buffer.append(EOL); } COM: <s> write the last char component of the font entry </s>
funcom_train/10384338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected class ThreadNameElement implements AccessLogElement { public void addElement(StringBuilder buf, Date date, Request request, Response response, long time) { RequestInfo info = request.getCoyoteRequest().getRequestProcessor(); if(info != null) { buf.append(info.getWorkerThreadName()); } else { buf.append("-"); } } } COM: <s> write thread name i </s>
funcom_train/4866677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void append(char c) { if ( this.length() < this.maxBufferSize -1 ) { if ( c == KeyEvent.MK_SPACE ) { this.buffer = StringUtil.insert(this.buffer, " ", this.carrotPosition); } else { this.buffer = StringUtil.insert(this.buffer, c+"", this.carrotPosition); } this.carrotPosition++; } } COM: <s> append a char to the buffer </s>
funcom_train/3312964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPositionLabel( Point p ){ if(p!=null){ StringBuffer sb = new StringBuffer("x: "); if (p.x < 100) { if (p.x<10) sb.append("00"+p.x); else sb.append("0"+p.x); } else sb.append(p.x); sb.append("/y "); if (p.y < 100) { if (p.y<10) sb.append("00"+p.y); else sb.append("0"+p.y); } else sb.append(p.y); positionLabel.setText(sb.toString()); } } COM: <s> sets the text on the position panel on the right side </s>
funcom_train/24642961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MlnKnowledgeBase parse(String mlnKbaseString) throws ParsingException { throw new RuntimeException("Parsing of a MLN KBase string not backed by a file has been implemented yet."); // TODO Parsen eines MLN Kbase Strings ohne entsprechende MLN Datei implentieren // LOG.debug("Parsing the MLN knowledge base string:\n" + mlnKbaseString ); // return parseMlnStream(new ANTLRStringStream(mlnKbaseString)); } COM: <s> parses a mln knowledge base from a string </s>
funcom_train/10799713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasConcreteSuperclass() { for (ClassMetaData sup = _meta.getPCSuperclassMetaData(); sup != null; sup = sup.getPCSuperclassMetaData()) { if (!Modifier.isAbstract(sup.getDescribedType().getModifiers())) return true; } return false; } COM: <s> return true if this class has a concrete superclass </s>
funcom_train/49703460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void isHost() throws Exception { assertTrue("Checking isHost() with sensorbase", SensorBaseClient.isHost(getHostName())); assertFalse("Checking isHost() with bogus URL", SensorBaseClient.isHost("http://Foo")); } COM: <s> test that the sensor base client </s>
funcom_train/16883422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { // initialize Attribute-Value binders _avPairs = new HashMap<String, AVPair>(); Collection<SlotMap> slotMaps = _manager.getModelMap().getClsSlotMaps( _classType ); for ( SlotMap sm : slotMaps ) { AVPair avBinder = new AVPair( this, sm ); _avPairs.put( sm.getName(), avBinder ); } } COM: <s> initializes the attribute value binder </s>
funcom_train/35951139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdSend() { if (cmdSend == null) {//GEN-END:|30-getter|0|30-preInit // write pre-init user code here cmdSend = new Command("Send", Command.ITEM, 0);//GEN-LINE:|30-getter|1|30-postInit // write post-init user code here }//GEN-BEGIN:|30-getter|2| return cmdSend; } COM: <s> returns an initiliazed instance of cmd send component </s>
funcom_train/3803014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String info() { return p3ReferencePosition + "\tthis:" + this + "\tnext:" + cpNext + "\tprev:" + cpPrev + "\tup :" + cpNextAttached + "\tdown:" + cpPrevAttached + "\tpar :" + cpParentHook + "\tchld:" + cpChildHook + "\thp:" + fHookPos; } COM: <s> returns some textual info about this control point for debugging reasons </s>
funcom_train/39062106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addScorePropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IMarkingNode_score_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IMarkingNode_score_feature", "_UI_IMarkingNode_type"), MarkingPackage.eINSTANCE.getIMarkingNode_Score(), true, ItemPropertyDescriptor.REAL_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the score feature </s>
funcom_train/9887735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDataCopy() { if (this.currentCY3 == null || this.currentCY5 == null) { this.currentCY3 = new float[trueCY3.length]; this.currentCY5 = new float[trueCY5.length]; System.arraycopy(trueCY3, 0, currentCY3, 0, currentCY3.length); System.arraycopy(trueCY5, 0, currentCY5, 0, currentCY5.length); } } COM: <s> creates copy of an original microarray data </s>
funcom_train/18110723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getJSplitPane1() { if (jSplitPane1 == null) { jSplitPane1 = new JSplitPane(); jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); jSplitPane1.setTopComponent(getXmlTextScrollPane()); jSplitPane1.setDividerLocation(50); jSplitPane1.setBottomComponent(getChildOverviewPanel()); } return jSplitPane1; } COM: <s> this method initializes j split pane1 </s>
funcom_train/9532918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setComponentTitleFromFilename() { // String title = CharacterTableController.this.getTableAutoSaveName(); java.io.File dataSource = CharacterListManager.inst().getCurrentDataFile(); if (dataSource == null) return; String title = CharacterListManager.inst().getCurrentDataFile() .getName(); // if (title==null) // title="error"; // ComponentManager.getManager().setLabel(this.characterTablePanel,title); } COM: <s> this is clearly unfinshed as it doesnt do anything everything is commented </s>
funcom_train/14328039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(final Object context) { if (_flag == false) { _context.add(_currentContext, context); } else { _context.setElementAt(context, _currentContext); } _currentContext = _currentContext + 1; if (_currentContext == _nbMaxContext) { _currentContext = 0; _flag = true; } } COM: <s> add or replace a new context object in a circular list </s>
funcom_train/44315574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Attribute findAttribute( String name ) { List attributes = getAttributes(); for ( int i = 0; i < attributes.size(); i++ ) { Attribute attribute = (Attribute) attributes.get( i ); if ( attribute.getName().equals( name ) ) { return attribute; } } return null; } COM: <s> return the attribute with the given name or null </s>
funcom_train/13259897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testParameters() throws IncorrectDistributionParameterException { if (sigma1 <= 0) { throw new IncorrectDistributionParameterException("Error: sigma1 must be >= 0 "); } if (sigma0 <= 0) { throw new IncorrectDistributionParameterException("Error: sigma0 must be >= 0 "); } if (lambda1 < 0) { throw new IncorrectDistributionParameterException("Error: lambda1 must be >= 0"); } if (lambda0 < 0) { throw new IncorrectDistributionParameterException("Error: lambda0 must be >= 0"); } } COM: <s> tests the parameters for the constructor requiring p lambda1 and lambda0 </s>
funcom_train/28367442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double valuePhaseWrappingFunction(double inValue) { double outValue = inValue; if (valuePhaseScan_Button.isSelected()) { if (Math.abs(inValue) > 180.) { outValue += 180.; while (outValue < 0.) { outValue += 360.; } outValue = outValue % 360.; outValue -= 180.; } } return outValue; } COM: <s> wrapps the phase if the phase button is on the value scan panel </s>
funcom_train/13210920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int putMessage(int index, String msg) { int state=getClientState(index); if (state==CONNECTED || state==CONNECTING) { PrintStream outStream = getClientOutput(index); if (outStream!=null) return putMessage(outStream,msg); } return -30221; } COM: <s> puts a message to the given clients </s>
funcom_train/17380369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("HelloWorldSOAP12BindingQSPort".equals(portName)) { setHelloWorldSOAP12BindingQSPortEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/27846058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object object) { if (object == null) return false; if (this == object) return true; if (object instanceof Subject) { Subject othersubject = (Subject) object; if (!getPrincipals().equals(othersubject.getPrincipals()) || !getPublicCredentials().equals(othersubject.getPublicCredentials()) || !getPrivateCredentials().equals(othersubject.getPrivateCredentials())) return false; return true; } return false; } COM: <s> compares the specified object with this subject for equality </s>
funcom_train/26040691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String uri, Class<?> funcClass) { if ( ! Function.class.isAssignableFrom(funcClass) ) { ALog.warn(this, "Class "+funcClass.getName()+" is not a Function" ); return ; } registry.put(uri, new FunctionFactoryAuto(funcClass)) ; } COM: <s> insert a class that is the function implementation </s>
funcom_train/21423175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getAddContactMenuItem() { if (addContactMenuItem == null) { addContactMenuItem = new JMenuItem(); addContactMenuItem.setText("Add Contact"); addContactMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { getNodePopupMenu().setVisible(false); addContact(); } }); } return addContactMenuItem; } COM: <s> this method initializes add contact menu item </s>
funcom_train/51297268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getVerbalRoleType() { String verbalRoleType = ""; for (int i = 1; i < 5; i++) if (hmRoleType.get(i) != null) verbalRoleType = verbalRoleType + hmRoleType.get(i) + ", "; if (verbalRoleType.length() > 2) verbalRoleType = verbalRoleType.substring(0, verbalRoleType .length() - 2); return verbalRoleType; } COM: <s> returns contractots roles list as a string </s>
funcom_train/4381957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void alert(final String message) { if (!isDisposed()) { getInstance().getWindow().getShell().getDisplay().asyncExec( new RaptorRunnable() { @Override public void execute() { MessageDialog.openInformation(Raptor.getInstance() .getWindow().getShell(), local.getString("alert"), message); } }); } } COM: <s> displays an alert message centered in the raptor window </s>
funcom_train/15917679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prettyPrint(Object o, Translator tr) { if (o instanceof Expander) { ((Expander) o).expand(tr); } else if (o instanceof Node) { ((Node) o).del().translate(w, tr); } else if (o instanceof Type) { throw new InternalCompilerError("Should not attempt to pretty-print a type"); } else if (o != null) { w.write(o.toString()); } } COM: <s> pretty print a given object </s>
funcom_train/48151772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Observable o, Object arg) { n = getValueSetter(0).getValueAsInt(); if (arg == getValueSetter(0)) { n = getValueSetter(0).getValueAsInt(); } else { p = getValueSetter(1).getValue(); coinBox.setProbability(p); } reset(); } COM: <s> scrollbar events adjust parameters n and p </s>
funcom_train/2586690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected LogContext internalCreateContext(final String context) { synchronized (this) { LogContext ctx = (LogContext) this.logContexts.get(context); if (ctx == null) { ctx = new LogContext(context); this.logContexts.put(context, ctx); } return ctx; } } COM: <s> creates a log context </s>
funcom_train/51502901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void jmSettingsActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jmSettingsActionPerformed {//GEN-HEADEREND:event_jmSettingsActionPerformed st.setLocation(this.getWidth()/2,this.getHeight()/2); st.setVisible(true); }//GEN-LAST:event_jmSettingsActionPerformed COM: <s> opens the settings form upon selecting the settings menu in the menubar </s>
funcom_train/50062390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readMsg() throws HL7IOException { if (this.reader == null) { if (this.statusValue == HL7FileReader.CLOSED) { return(null); } // if this.open(); if (this.reader == null) { throw new HL7IOException( "HL7MessageFileStream.ReadMsg: unspecified reader.", HL7IOException.INCONSISTENT_STATE); } // if } // if return this._readMsg(); } // readMsg COM: <s> reads a hl7 message string from the context stream </s>
funcom_train/5377044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _install(CommandInterpreter intp) throws Exception { String url = intp.nextArgument(); if (url == null) { intp.println(ConsoleMsg.CONSOLE_NOTHING_TO_INSTALL_ERROR); } else { AbstractBundle bundle = (AbstractBundle) context.installBundle(url); intp.print(ConsoleMsg.CONSOLE_BUNDLE_ID_MESSAGE); intp.println(new Long(bundle.getBundleId())); String nextArg = intp.nextArgument(); if (nextArg != null) { String start = nextArg.toLowerCase(); if (Launcher.matchCommand("start", start, 1)) { //$NON-NLS-1$ bundle.start(); } } } } COM: <s> handle the install command </s>
funcom_train/12152903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void refresh() throws HttpException, IOException { int latestStatusCode = this.latestStatusCode; String latestStatusMessage = this.latestStatusMessage; String latestErrorPage = this.latestErrorPage; setProperties(DepthSupport.DEPTH_0); this.latestStatusCode = latestStatusCode; this.latestStatusMessage = latestStatusMessage; this.latestErrorPage = latestErrorPage; } COM: <s> refresh the properties of this resource </s>
funcom_train/19399567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void releaseResources() { super.releaseResources(); /* * Release hard references to any named btrees isolated within this * transaction so that the JVM may reclaim the space allocated to them * on the heap. */ btrees.clear(); /* * Close and delete the TemporaryRawStore. */ if (tmpStore != null && tmpStore.isOpen()) { tmpStore.close(); } } COM: <s> this method must be invoked any time a transaction completes </s>
funcom_train/14328988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private VirtualSocket lookup(int streamId) { if (streamId < 0 || streamId > socketTable.size()) { throw new IllegalArgumentException("Invalid parameter stream ID " + streamId); } VirtualSocket vsock = (VirtualSocket)socketTable.get(streamId); if (vsock.owner != streamId) { throw new IllegalStateException("Internal error: bad stream ID " + streamId); } return vsock; } COM: <s> retrieves the virtual socket with the given id </s>
funcom_train/36790022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object invoke(MethodInvocation invocation) throws Throwable { ContractSet contractSet = buildContractSetFor(invocation); evaluator.evaluate(contractSet.getPreconditions()); Object returnValue = invocation.proceed(); evaluator.evaluate(contractSet.getInvariants()); for (ContractDescriptor descriptor : contractSet.getPostconditions()) descriptor.getContext().put(ContextConstants.RETURN_VALUE_ALIAS, returnValue); evaluator.evaluate(contractSet.getPostconditions()); return returnValue; } COM: <s> here the intercept is applied delegating contract evaluation to the </s>
funcom_train/4716718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Renderer getTargetRenderer(Event event) { Element element = DOM.eventGetTarget(event); Renderer ret = null; for (; element != null; element = DOM.getParent(element)) { if((ret = RenderersRegister.getRegister().getRenderer(element)) != null) { break; } } return ret; } COM: <s> determines the renderer associated with the specified event </s>
funcom_train/41699356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(String fileName) { InputStream inputStream = null; if (fileName != null && fileName.length() > 0) { inputStream = this.getClass().getResourceAsStream(fileName); } if (inputStream != null) { load(inputStream); } else { System.err.println("Could not find the file " + fileName); } } COM: <s> load the specified file from the jar file </s>
funcom_train/34901097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MainGui () { // initialize model Model.getSettingsModel().addListener(this); Model.getProteinListModel().addProteinListListener(this); // initialize controller controller = new Controller(this); History.addValueChangeHandler(this); History.fireCurrentHistoryState(); Window.addResizeHandler(this); } COM: <s> construct the gui for ataqs </s>
funcom_train/491290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getDouble(String key) throws JSONException { Object o = get(key); try { return o instanceof Number ? ((Number)o).doubleValue() : Double.valueOf((String)o).doubleValue(); } catch (Exception e) { throw new JSONException("JSONObject[" + quote(key) + "] is not a number."); } } COM: <s> get the double value associated with a key </s>
funcom_train/13517480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initValuesAfterNbStepConv(){ this.stateRelation = new double[nbStepConv][nbRelations]; this.satisfaction = new double[nbStepConv][nbActors]; this.varRelation = new double[nbVarRelationStep][nbStepConv][nbRelations]; this.varActor = new double[nbVarActorStep][nbStepConv][nbActors]; } COM: <s> initialization of the class attributes </s>
funcom_train/25419018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void appendParam(StringBuffer parameters, String name, String value) { if ((value != null) && (value.length() > 0)) { if (parameters.length() > 0) parameters.append("&"); parameters.append(name).append("=").append(this.encodeUrlParam(value)); } } COM: <s> appends a parameter to the query parameters buffer </s>
funcom_train/9890679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handlePreferencesPressed() { PreferenceDialog dlg = PreferencesUtil.createPropertyDialogOn(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), new PropertyPreferenceDummy2(), "org.horen.ui.preferences.DataBasePreferencePage", null, null); dlg.getShell().setText(Resources.getDefaultBundle().getString("Action.Preferences.title")); if(dlg != null) { dlg.open(); } } COM: <s> opens the database connection preference page to allow user to switch change </s>
funcom_train/19887221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCreate() { System.out.println("create"); TransactionLine_DAO instance = null; TransactionLine expResult = null; TransactionLine result = instance.create(); 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 create method of class edu </s>
funcom_train/12156577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContentType( String type ) { String[] typeAndEncoding = parseContentTypeHeader( type ); contentType = typeAndEncoding[0]; if (typeAndEncoding[1] != null) { encoding = typeAndEncoding[1]; } else { encoding="ISO-8859-4"; } setHeader( "Content-type", contentType + "; charset=" + encoding ); } COM: <s> sets the content type of the response the server sends to </s>
funcom_train/374360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws InterruptedException { if (thread != null) { stop(); } /* * Use our own Runnable in order to synchronize the start of the thread. We * delegate to the user overriden run() method after the setup synching is * done. */ thread = new Thread(new Runnable() { public void run() { PcapTask.this.run(); thread = null; // Cleanup } }, (user != null) ? user.toString() : pcap.toString()); thread.setDaemon(true); thread.start(); } COM: <s> creates and starts up the background thread while synchronizing with the </s>
funcom_train/26228559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendArguments() { // working directory out.println(System.getProperty("user.dir")); // compiler to invoke out.println(options.compiler); // arguments for (int i = 0; i < options.nonOptions.length; i++) { out.println(options.nonOptions[i]); } // an empty line as end-of-argument delimiter out.println(); } COM: <s> sends the compilation arguments to the server </s>
funcom_train/14161398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteDir(File dir) { if (dir.isDirectory()) { String[] children = dir.list(); for (int i=0; i<children.length; i++) { boolean success = deleteDir(new File(dir, children[i])); if (!success) { return false; } } } // The directory is now empty so we can delete it return dir.delete(); } COM: <s> recursively removes all the directory </s>
funcom_train/19544033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PropertyTableModel getPropertyTableModel() { try { return worker.get(); } catch (InterruptedException e) { throw new IllegalStateException("Thread was interrupted.", e); } catch (ExecutionException e) { throw new IllegalStateException("Problem loading the model.", e); } // endtry } COM: <s> get the property table model containing the displayed items </s>
funcom_train/26020720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSessionTerminated(String sessionId){ Cursor cursor = cr.query(databaseUri, new String[]{RichMessagingData.KEY_STATUS}, RichMessagingData.KEY_CHAT_SESSION_ID + " = " + sessionId, null, RichMessagingData.KEY_TIMESTAMP + " DESC"); if(cursor.moveToFirst()){ int status = cursor.getInt(0); if(status==EventsLogApi.STATUS_TERMINATED){ cursor.close(); return true; } } cursor.close(); return false; } COM: <s> check if the im session is already terminated </s>
funcom_train/2487438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyStereoType(ModelElement modelElement, SimpleModelElement simpleModelElement) { String stereoType = simpleOOHelper.getStereotype(modelElement); if (stereoType != null && !"".equals(stereoType)) { ((SimpleModel) getRootSimpleUmlPackage(this)).setStereoType(stereoType, simpleModelElement); } } COM: <s> reads the stereo type from the model element and sets the same stereotype </s>
funcom_train/26481386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(MouseEvent e) { if (LOG.isLoggable(Level.FINER)) LOG.finer("Clicked, event: " + e); if (e.getClickCount() > 1 && doubleClickControlId != null) { Control control = new Control(doubleClickControlId, individual); issueControl(control); } } COM: <s> fire action event when double clicked controls parameter is the </s>
funcom_train/1373735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private GameEvent getEvent(Attachment attachment) { GameEvent event = null; ByteBuffer bb = ByteBuffer.wrap(attachment.payload); // get the controller and tell it to instantiate an event for us GameController gc = gameServer.getGameControllerByHash(attachment.gameNameHash); if (gc == null) { return null; } event = gc.createGameEvent(); // read the event from the payload event.read(bb); return event; } COM: <s> read an event from the attachments payload </s>
funcom_train/17566493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadFrameIcon() { URL imgUrl = null; ImageIcon imgIcon = null; imgUrl = AddressFrame.class.getResource("./addressbook32.gif"); imgIcon = new ImageIcon(imgUrl); Image img = imgIcon.getImage(); this.setIconImage(img); } COM: <s> load our own address book icon into our frame window </s>