__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/38939248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ContentType findContentType(String contentType) throws NoDataAccessException { getServiceLogger().debug("Search the Content Type: "+contentType); ContentType contentTypeFound = null; if(StringUtils.isNotEmpty(contentType)) { contentTypeFound = contentDataAccess.searchContentType(contentType); } else { getServiceLogger().information("There's no Content type to search..."); } return contentTypeFound; } COM: <s> finds the content type </s>
funcom_train/29514705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ILaunchConfiguration createRelauncherConfiguration(ILaunchConfiguration originalConfiguration) { try { ILaunchConfigurationWorkingCopy wc = originalConfiguration.getWorkingCopy(); prepareWorkingCopy(wc, null, null); ILaunchConfiguration config = wc.doSave(); return config; } catch (CoreException e) { PluginUtil.logError("Can't create relauncher configuration", e); } return null; } COM: <s> creates and stores a new swing debugger relauncher configuration by a </s>
funcom_train/16849006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getValue() { cal.clear(); TimeUtil.setYear(cal, Integer.parseInt(yearSel)); cal.set(Calendar.MONTH, Integer.parseInt(monthSel) - 1); cal.set(Calendar.DATE, Integer.parseInt(daySel)); Debug.output("Date:" + TimeUtil.toText(cal.getTimeInMillis())); return cal.getTimeInMillis(); } COM: <s> gets the date </s>
funcom_train/13966458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void takeValueForKey(EOEntity entity, Object obj, String propertyName, String value, ERXRestContext context) throws ParseException, ERXRestException { Object parsedAttributeValue = parseAttributeValue(entity, obj, propertyName, value); EOKeyValueCoding.Utility.takeStoredValueForKey(obj, parsedAttributeValue, propertyName); } COM: <s> parses the attribute with parse attribute value and sets it on the object </s>
funcom_train/34527332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ELNode parseMatchExpression(int p) { List<ELNode> args = new ArrayList<ELNode>(); expect(LPAREN); if (token != RPAREN) { do { args.add(parseSyntaxExpression()); } while (scan(COMMA)); } expect(RPAREN); expect(LBRACE); ELNode exp = parseMatchPatterns(p, to_a(args)); expect(RBRACE); return exp; } COM: <s> parse a match expression </s>
funcom_train/24476822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void responseGenIllegal(HttpServletResponse response){ try{ String output = "{error: 'Value of some fields does not satisfy our requirement'}"; PrintWriter out = response.getWriter(); out.write(output); }catch(Exception e){ System.out.println("[ERROR]:In function responseGenIllegal:" + e); } } COM: <s> this function is invoked when received user information is not compatible with </s>
funcom_train/17008130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private byte getPayloadType(byte data[], int offset, int length){ // get the payload type from rtp header // payload type is 7 bits. They are the bits from 10th to 16th inclusive byte secondByte = data[offset + 1]; // set the most significant bit of secondByte off byte oneHundredTwentySeven = 127; // 01111111 secondByte = (byte)(oneHundredTwentySeven & secondByte); return secondByte; } COM: <s> return the payload type of an rtp package </s>
funcom_train/18950534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Section checkNulls( Section pSection, PropertySet pPropertySet ) { if( ErrorUtil.is_null( pSection, "pSection" ) ) { return new BasicSection(""); } if( ErrorUtil.is_null( pPropertySet, "pPropertySet" ) ) { return pSection; } return null; } COM: <s> check if p section or p property set are null </s>
funcom_train/9665271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected AmountType computeTransactionAmount() throws PriceException { if(transactionCurrencyCode == null) return getLineExtensionTotalAmount(); else if(transactionCurrencyCode == pricingCurrencyCode) return getLineExtensionTotalAmount(); else { //TODO use web service to find current exchange rate throw new PriceException("Currency conversion not implemented."); } } COM: <s> compute the transaction amount type using the transaction currency code </s>
funcom_train/20883540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadDatabaseHeader(ByteBuffer bb) throws IOException { if (bb.getInt() != MAGIC) { throw new Error("Bad magic in db"); } if (bb.getInt() != VERSION) { throw new Error("Bad VERSION in db"); } sampleRate = bb.getInt(); numChannels = bb.getInt(); lpcMin = bb.getFloat(); lpcRange = bb.getFloat(); } COM: <s> loads the database header from the given byte buffer </s>
funcom_train/26637695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doStop() { log.info("Stop the connection manager"); if (connManager != null) { connManager.stop(); connManager.removeConnManagerListener(manListener); manListener = null; statusPanel.stopAndResetAll(); actionPanel.refreshControls(); dataEventCtrl.stop(); seemsDown = false; if (useTrayIcon) { trayIcon.setIcon(JstTrayIcon.DOWN); } } } COM: <s> handle the stop action </s>
funcom_train/4837857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { LOGGER.info("-> HiveContext shutdown at "+DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd hh:mm:ss") ); LOGGER.info("-> HiveContext ["+name()+"] shutdown ...."); _registry.shutdown(); _modules.clear(); _registry = null; LOGGER.info("-> HiveContext ["+name()+"] shutdown successfully"); } COM: <s> shutdown whole hive context </s>
funcom_train/28366670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void write() { try { DocumentWriter docWriter = new DocumentWriter(); docWriter.write(); } catch (java.io.IOException exception) { Logger.getLogger("global").log( Level.SEVERE, "I/O Error writing XML.", exception ); System.err.println(exception); exception.printStackTrace(); } } COM: <s> write the document to the instances writer </s>
funcom_train/8065485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Fig createNewItem(MouseEvent me, int snapX, int snapY) { FigPoly p = new FigPoly(snapX, snapY); p.setLineColor(Globals.getPrefs().getRubberbandColor()); p.setFillColor(null); p.addPoint(snapX, snapY); // add the first point twice // _npoints = 2; return p; } COM: <s> create the new item that will be drawn </s>
funcom_train/18846803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createProcessTransactionNotFoundException(String tscToken, String transactionID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getErrorDiagnosticsCode(); String exceptionID = "80332"; propertyMap.addPropertyValuePair("transactionID", transactionID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> construct process transaction not found exception message </s>
funcom_train/17772853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getElementAt(int index) { Iterator it = set.iterator(); for (int i = 0; i < index; ) { if (currentType.isInstance(it.next())) { i++; } } Object result = null; while (result == null) { result = it.next(); if (!currentType.isInstance(result)) { result = null; } } return result; } COM: <s> gets the element at attribute of the list model object </s>
funcom_train/4991286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createUITextPassword() { // Create the text widget int style = SWT.PASSWORD | SWT.BORDER; fTextPassword = new Text(fCompositeLogin, style); // Configure layout data GridData data = new GridData(SWT.NONE, SWT.NONE, false, false); data.widthHint = F_TEXT_WIDTH_HINT; data.horizontalSpan = 2; fTextPassword.setLayoutData(data); } COM: <s> creates the ui text password </s>
funcom_train/24242682
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPortletExists(String namespace) throws DBException { boolean isPortletExists = false; PortletDB pdb = new PortletDB(conn); try { List l = pdb.getRecordBy("namespace", namespace); // portlet exists ? isPortletExists = (!l.isEmpty()); // fill portlet record this.portlet_record = pdb.record; } finally { pdb.release(); pdb = null; } return isPortletExists; } COM: <s> test if a portlet exists </s>
funcom_train/14016180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ConversationContainer getConversationContainer() { SharedAttributeMap sessionMap = ExternalContextHolder.getExternalContext().getSessionMap(); synchronized (sessionMap.getMutex()) { ConversationContainer container = (ConversationContainer) sessionMap.get(sessionKey); if (container == null) { container = createConversationContainer(); sessionMap.put(sessionKey, container); } return container; } } COM: <s> obtain the conversation container from the session </s>
funcom_train/5166868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCloneHandlerFor_3() { JGAPFactory factory = new JGAPFactory(false); ICloneHandler cloneHandler = new DefaultCloneHandler(); factory.registerCloneHandler(cloneHandler); assertNull(factory.getCloneHandlerFor(null, IntegerGene.class)); assertNull(factory.getCloneHandlerFor(null, IntegerGene.class)); } COM: <s> type with no handler registered no caching </s>
funcom_train/2033674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBuscarKeywords() { System.out.println("buscarKeywords"); Material material = new Material(); Keyword instance = new Keyword(); ArrayList<Keyword> expResult = null; ArrayList<Keyword> result = instance.buscarKeywords(material); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. } COM: <s> test of buscar keywords method of class keyword </s>
funcom_train/36074049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getAmountOfCoinsOfAllBots() throws RemoteException { allRobots = jPlayer.getPlayer().getAvailableRobots(); int amountBotsInCoins = 0; for (RobotInfo robotInfo : allRobots) { amountBotsInCoins += robotInfo.getCompleteCost(); } return amountBotsInCoins; } COM: <s> returns the whole value of all bots in coins </s>
funcom_train/34713209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void revert() { if (Thread.currentThread() != thread) { throw new IllegalStateException(this + " cannot revert in a thread other than " + thread); } if (!reverted) { if (previous != null) { thread.setContextClassLoader(previous); } reverted = true; } } COM: <s> revert back to the thread context class loader in use before this switch </s>
funcom_train/42273050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addDocument(final String documentText) throws AccessorException { IndexWriter writer = null; try { writer = accessor.getWriter(); log.debug("addDocument() [" + documentText + "]"); writer.addDocument(getDocument(documentText)); } catch (IOException e) { throw new AccessorException("Cannot add document.", e); } finally { accessor.release(writer); } } COM: <s> add a document to the repository </s>
funcom_train/8349801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TaskMonitor upload(String localFilePath, TaskOptions options) throws TaskException { FileUploadSpec fileUploadSpec = createFileUploadSpec();//new BaseFileUploadSpec(); fileUploadSpec.setFilePath(localFilePath); fileUploadSpec.setUploadLocation(getCurrentLocation()); return startTask(fileUploadSpec, options); } COM: <s> submits a task to upload the file to the current file location </s>
funcom_train/3370016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLayout(LayoutManager layout) { if (layout instanceof ScrollPaneLayout) { super.setLayout(layout); ((ScrollPaneLayout)layout).syncWithScrollPane(this); } else if (layout == null) { super.setLayout(layout); } else { String s = "layout of JScrollPane must be a ScrollPaneLayout"; throw new ClassCastException(s); } } COM: <s> sets the layout manager for this code jscroll pane code </s>
funcom_train/43569111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnCancel() { if (btnCancel == null) { btnCancel = new JButton(); btnCancel.setText(Constant.messages.getString("all.button.cancel")); btnCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { exitResult = JOptionPane.CANCEL_OPTION; HistoryFilterPlusDialog.this.dispose(); } }); } return btnCancel; } COM: <s> this method initializes btn cancel </s>
funcom_train/44708326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setKey(String key) { if (getKey() == null) { set("packageKey", key); } else if (!isNew()) { throw new RuntimeException ("setKey() cannot be called with a new key" + "once the packageType is persisted."); } } COM: <s> sets the key of the package type </s>
funcom_train/37109686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showCourseDetails() throws Exception { try { // 1.login // showCourseList() does login // 2. course list showCourseList("user1","user1"); printAktion("entering course 'Informatik 1'"); click("Informatik 1"); // check printAktion("checking course details"); showCourseDetailsCheckTable(); // click kursname printAktion("using course-link in course details.."); click("Informatik 1"); // check printAktion("checking course details again.."); showCourseDetailsCheckTable(); } catch (Exception e) { throw new Exception("Exception at 'showCourseDetails'"+e); } } COM: <s> testing course details </s>
funcom_train/45253388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ArrayList getShowInIdsFromRegistry() { PerspectiveExtensionReader reader = new PerspectiveExtensionReader(); reader .setIncludeOnlyTags(new String[] { IWorkbenchRegistryConstants.TAG_SHOW_IN_PART }); PageLayout layout = new PageLayout(); reader.extendLayout(null, descriptor.getOriginalId(), layout); return layout.getShowInPartIds(); } COM: <s> returns the show in </s>
funcom_train/12173819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (!(obj instanceof RandomEffectParameters)) { return false; } if (this == obj) { return true; } RandomEffectParameters other = (RandomEffectParameters)obj; EqualsBuilder eb = new EqualsBuilder(); eb.append(this.allowedEffects, other.allowedEffects); return eb.isEquals(); } COM: <s> random effect parameters with the same data are considered equal </s>
funcom_train/7852321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { int length=rdnList.size(); String dn = ""; if (length < 1) return null; dn = LDAPDN.escapeRDN(rdnList.get(0).toString()); for (int i=1; i<length; i++) dn += "," + LDAPDN.escapeRDN(rdnList.get(i).toString()); return dn; } COM: <s> creates and returns a string that represents this dn </s>
funcom_train/18566678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInheritCalculation(boolean inheritCalculation, boolean simpleColorator) { if(simpleColorator) { inheritFormCheckBox.setSelected(true); inheritFormCheckBox.setEnabled(false); } else { inheritFormCheckBox.setSelected(inheritCalculation); inheritFormCheckBox.setEnabled(true); } } COM: <s> method set inherit </s>
funcom_train/20884935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMin() { ValidatorTestUtil.check(XML, new IntegerDTO(0), INVALID); ValidatorTestUtil.check(XML, new IntegerDTO(1), VALID); ValidatorTestUtil.check(XML, new IntDTO(0), INVALID); ValidatorTestUtil.check(XML, new IntDTO(1), VALID); } COM: <s> tests the constraint min </s>
funcom_train/4717729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddMarkerRelPosBeats() { SynMessage msg = new SYN().sequencer().addMarker(100).beats().relative(); assertEquals("TTTi", msg.getTypetag()); assertEquals(new Integer(100), (Integer) msg.getArguments()[3]); assertEquals("/SYN/ID*/MARKER", msg.getAddress()); } COM: <s> add marker at given relative position in beats </s>
funcom_train/10617173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCertificateParsingException06() { CertificateParsingException tE = new CertificateParsingException(null, null); assertNull("getMessage() must return null", tE.getMessage()); assertNull("getCause() must return null", tE.getCause()); } COM: <s> test for code certificate parsing exception string throwable code </s>
funcom_train/4205424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Composite getFieldsComposite() { final Control[] children = myTop.getChildren(); if (children.length == 0) { return createFieldsComposite(); } final Control last = children[children.length - 1]; if (!(last instanceof Composite)) { return createFieldsComposite(); } final Composite fc = (Composite) last; if (fc.getData() != FIELDS_COMPOSITE_MARKER) { return createFieldsComposite(); } return fc; } COM: <s> check if the last control of </s>
funcom_train/10782070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetObjectIdClass() { EntityManager em= currentEntityManager(); OpenJPAEntityManager pm = OpenJPAPersistence.cast (em); assertEquals(ByteArrayPKPCId.class, pm.getObjectIdClass(ByteArrayPKPC.class)); assertEquals(ByteArrayPKPCId.class, pm.getObjectIdClass(ByteArrayPKPC2.class)); pm.close(); em.close(); } COM: <s> tests that application identity classes are returned correctly </s>
funcom_train/13994621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWindowManager01() throws Exception { internalFrames[0].setSelected(true); ToggleableActionGroup selectionActions = windowManager .getSelectionActions(); assertEquals(internalFrames.length, selectionActions .getToggleableActions().size()); assertEquals(windowManager.getAction(internalFrames[0]), selectionActions.getSelectedAction()); } COM: <s> tests that the action group of the window manager contains the correct </s>
funcom_train/2558440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readUnion(InputNode node, Object source, LabelMap map, Label label) throws Exception { Object value = readInstance(node, source, label); Collection<String> list = label.getPaths(context); for(String key : list) { Label union = map.getLabel(key); if(label.isInline()) { criteria.set(union, value); } } } COM: <s> the code read union code method is determine the unions </s>
funcom_train/19306674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int lineContentLengthUsed() { int dimension = 0; // For each child, accumulate the ipd used. final List<AbstractInlineArea> children = getChildren(); for (int i = 0; i < children.size(); i++) { final AbstractInlineArea child = children.get(i); dimension += child.getProgressionDimension(); } return dimension; } COM: <s> computes the total ipd used by the children on this line </s>
funcom_train/50086065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveIndex(){ int i = rightmostIndexBelowMax(); if (i >= 0){ index[i] = index[i] + 1; for (int j = i + 1; j < m; j++) index[j] = index[j-1]; }else hasMore = false; } COM: <s> move the index forward a notch </s>
funcom_train/2742965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTextParameter(HttpServletRequest request, String name, String [] value) { if (request instanceof MultipartRequestWrapper) { MultipartRequestWrapper wrapper = (MultipartRequestWrapper) request; for (int i = 0; i < value.length; i++) { wrapper.setParameter(name, value[i]); } } elementsText.put(name, value); elementsAll.put(name, value); } COM: <s> adds a regular text parameter to the set of text parameters for this </s>
funcom_train/2516832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkCollectionGreaterThan(Collection<?> collection, String fieldName, int collectionSize) { if (collection == null) { valid = false; fieldValidationMessages.put(fieldName, CANNOT_BE_NULL); return; } if (!(collection.size() > collectionSize)) { fieldValidationMessages.put(fieldName, MUST_BE_GREATER_THAN + Integer.toString(collectionSize)); valid = false; } } COM: <s> null safe checks that the provided collection has greater than </s>
funcom_train/36204091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CITestResult numberOfParametersNotSufficientError(int numberOfParametersNeeded) { String errorMessage = "The number of arguments for the test '" + this.getClass().getSimpleName() + "' are not sufficient. Please specify " + numberOfParametersNeeded + " arguments!"; return new CITestResult(Type.ERROR, errorMessage); } COM: <s> when the number of parameters are not sufficient a test can generate a </s>
funcom_train/42954120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { try { if (this.input != null) { this.input.close(); } } catch (Throwable t) { } try { if (this.output != null) { this.output.close(); } } catch (Throwable t) { } try { if (this.socket != null) { this.socket.close(); } } catch (Throwable t) { } } COM: <s> closes socket input stream and output stream if they are non null </s>
funcom_train/28296765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void center(Rectangle bounds) { // get the frame's current size Dimension frameSize = getSize(); // calculate center position and set it on the frame if (frameSize.height > bounds.height) { frameSize.height = bounds.height; } if (frameSize.width > bounds.width) { frameSize.width = bounds.width; } setLocation(bounds.x + (bounds.width - frameSize.width) / 2, bounds.y + (bounds.height - frameSize.height) / 2); } COM: <s> center the frame over a given rectangle on the screen </s>
funcom_train/24640489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String generateUniqueTabName(String tabName) { Set<String> titles = new HashSet<String>(); for (int i = 0; i < getTabCount(); i++) { titles.add(getTitleAt(i)); } if (!titles.contains(tabName)) { return tabName; } int i = 1; while (true) { String trial = tabName + "-" + i; if (!titles.contains(trial)) { return trial; } i++; } } COM: <s> returns a string that is unique under the opened tabs </s>
funcom_train/3294202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getType(String str) { StringTokenizer tok = new StringTokenizer(str,"="); if (tok.hasMoreTokens()) { return (String)tok.nextElement(); } log.error("getType: invalid format ...!!!"+str); return null; } COM: <s> returns the part in front of the char of the string </s>
funcom_train/11649492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void bind(final String name, final Object object) throws NamingException { log.debug("Binding JNDI object with name '{}'", name); execute(new JndiCallback() { public Object doInContext(Context ctx) throws NamingException { ctx.bind(name, object); return null; } }); } COM: <s> bind the given object to the current jndi context using the given name </s>
funcom_train/6347918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMap(TileMapLayer[] mapLayers) { Log.logger.entering("AbstractTileMap", "setMap(mapLayers)"); map = new ArrayList(); for (int i = 0; i < mapLayers.length; i++) { Log.logger.fine("SettingMapLayer:" + i); map.add(mapLayers[i]); }//for i }// setMap(TileMapLayer[] mapLayers) COM: <s> sets map layers </s>
funcom_train/44839020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean matchType(SecuredRequest request) { if (methods.isEmpty()) { return true; } String method = request.getMethod(); LogFactory.getLog(URISecurityConstraint.class).trace("matching HTTP Method : '" + method + "'"); return matchType(method); } COM: <s> is the http method allowed to access the resource </s>
funcom_train/46569766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDataVector(FuzzyBag bag) { Vector rows = new Vector(); List elements = new ArrayList(bag.getFuzzyElements()); for (int i = 0; i < elements.size(); i++) { FuzzyElement element = (FuzzyElement) elements.get(i); Float values = new Float(element.getValue()); Vector row = new Vector(); row.add(element); row.add(values.toString()); rows.add(row); } setDataVector(rows, DefaultTableModel.convertToVector(columnNames)); } COM: <s> sets the data to be displayed by the table </s>
funcom_train/26379563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertMenuActionPerformed(ActionEvent evt) { ProgramDialog programDialog = new ProgramDialog(null, _parentPanel); programDialog.setVisible(true); if (programDialog.okPressed()) { Program newProgram = programDialog.getProgram(); _basicObject.getPrograms().addProgram(newProgram); refreshList(); } programDialog.kill(); } COM: <s> handles the action performed for the insert menu </s>
funcom_train/3100669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateCoExtensionals(CycObject cycObject) throws UnknownHostException, IOException, CycApiException { try { coExtensionals = cycAccess.getCoExtensionals(cycObject); } catch (CycApiException e) { e.printStackTrace(); return; } coExtensionals = substituteGenlConstantsForNarts(coExtensionals); coExtensionals = findAllowedTermsOrGenls(coExtensionals); } COM: <s> populates the co extensionals for a cyc collection </s>
funcom_train/46577693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrent(Action action) { if (action == null) { setLookups(new Lookup[]{}); } else { // Object[] items = new Object[] {action, action.getParent()}; // setLookups(new Lookup[] {Lookups.fixed(items)}); setLookups(new Lookup[]{Lookups.singleton(action)}); } } COM: <s> sets or removes the current action </s>
funcom_train/28146409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LinkerServices createLinkerServices() { return new LinkerServices() { public boolean canConvert(Class<?> from, Class<?> to) { return TypeConverterFactory.this.canConvert(from, to); } public MethodHandle convertArguments(MethodHandle handle, MethodType fromType) { return TypeConverterFactory.this.convertArguments(handle, fromType); } }; } COM: <s> creates an implementation of </s>
funcom_train/39533505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle2D getSensitiveBounds(Element shape){ Rectangle2D bounds=null; if(shape!=null){ //gets the bridge context BridgeContext ctxt= handle.getCanvas().getBridgeContext(); if(ctxt!=null){ //gets the graphics node corresponding to the given node GraphicsNode gnode=null; try{gnode=ctxt.getGraphicsNode(shape);}catch (Exception e){} if(gnode!=null){ try{ AffineTransform transform=gnode.getTransform(); bounds=gnode.getSensitiveBounds(); if(transform!=null){ bounds=transform.createTransformedShape(bounds).getBounds2D(); } }catch (Exception ex){} } } } return bounds; } COM: <s> computes the position and the size of a node on the canvas </s>
funcom_train/5991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringBuilder createAddStatement(LDIFClass object) { StringBuilder builder = new StringBuilder(); builder.append("dn:"); builder.append(generateSafeString(object.getDN())); builder.append(SEP); builder.append("changetype:add"); builder.append(SEP); builder.append(makeAttributeDescription(object)); builder.append(SEP); return builder; } COM: <s> creates ldif add statement for ldifclass statement </s>
funcom_train/20882716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getSonority(String phone) { if ("+".equals(getPhoneFeature(phone, VC))) // vowel return 5; if ("l".equals(getPhoneFeature(phone, CTYPE))) // liquid (glide) return 4; if ("n".equals(getPhoneFeature(phone, CTYPE))) // nasal return 3; if ("+".equals(getPhoneFeature(phone, CVOX))) // voiced return 2; return 1; } COM: <s> return the sonoritry of a given phoneme </s>
funcom_train/3913871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fatalError(SAXParseException exception) { Logger logger = Logger.getLogger(this.getClass()); logger.info("Fatal Error: " + exception.getMessage() + " at line " + exception.getLineNumber() + ", column " + exception.getColumnNumber() + " in entity " + exception.getSystemId()); } COM: <s> logs a fatal parser error </s>
funcom_train/11037322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getParseExceptionInfo(SAXParseException spe) { String systemId = spe.getSystemId(); if (systemId == null) { systemId = "null"; } return "URI=" + systemId + " Line=" + spe.getLineNumber() + ": " + spe.getMessage(); } COM: <s> returns a string describing parse exception details </s>
funcom_train/16759041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void simpleInitGame() { display.setTitle("Tutorial 1"); Sphere s = new Sphere("Sphere", 30, 30, 25); s.setLocalTranslation(new Vector3f(0,0,-40)); s.setModelBound(new BoundingBox()); s.updateModelBound(); TextureState ts = display.getRenderer().createTextureState(); ts.setEnabled(true); ts.setTexture( TextureManager.loadTexture( Lesson1.class.getClassLoader().getResource( "jmetest/data/images/Monkey.jpg"), Texture.MinificationFilter.Trilinear, Texture.MagnificationFilter.Bilinear)); s.setRenderState(ts); rootNode.attachChild(s); } COM: <s> sets the title of the window creates a sphere and textures it </s>
funcom_train/1932243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createScrolledComposite() { GridData gridData = new GridData(); gridData.horizontalAlignment = GridData.FILL; gridData.grabExcessHorizontalSpace = true; gridData.grabExcessVerticalSpace = true; gridData.verticalAlignment = GridData.FILL; scrolledComposite = new ScrolledComposite(this, SWT.NONE); scrolledComposite.setLayout(new FillLayout()); scrolledComposite.setAlwaysShowScrollBars(true); scrolledComposite.setExpandHorizontal(true); scrolledComposite.setExpandVertical(true); createComposite(); scrolledComposite.setLayoutData(gridData); scrolledComposite.setContent(composite); } COM: <s> this method initializes scrolled composite </s>
funcom_train/14598578
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reset() { if (!live) { return; } try { if (serverSocket != null) { serverSocket.close(); } } catch (IOException e) { } try { serverSocket = new ServerSocket(port, backlog); } catch (IOException e) { err.println(); e.printStackTrace(err); stop(); return; } initAcceptor(serverSocket); } COM: <s> recreate the server socket and associated acceptor </s>
funcom_train/8657250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DOMParserImpl (SymbolTable symbolTable) { this ( (XMLParserConfiguration) ObjectFactory.createObject ( "org.apache.xerces.xni.parser.XMLParserConfiguration", "org.apache.xerces.parsers.XIncludeAwareParserConfiguration")); fConfiguration.setProperty ( Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY, symbolTable); } // <init>(SymbolTable) COM: <s> constructs a dom builder using the specified symbol table </s>
funcom_train/27668699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllElements() { if (items.size() > 0) { int firstIndex = 0; int lastIndex = items.size() - 1; items.clear(); selectedItem = null; fireIntervalRemoved(this, firstIndex, lastIndex); } else { selectedItem = null; } } COM: <s> empties the list </s>
funcom_train/1711427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendLinkedItem(int i,int[] linkedItems) { if(linkedItems!=null){ for(int j=0;j<linkedItems.length;j++){ if(linkedItems[j]!=-1) System.out.println(i+" Added "+linkedItems[j]); } } this.links[i] = linkedItems; } COM: <s> the linked items to set int with ids </s>
funcom_train/14460743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColFirst(int c){ byte[] b = ByteTools.shortToLEBytes((short)c); byte[] dt= this.getData(); // 20060608 KSC: THIS APPEARS WRONG System.arraycopy(b, 0, dt, 4, 2); System.arraycopy(b, 0, dt, 0, 2); this.colFirst = c; } COM: <s> set last first cols rows </s>
funcom_train/48889804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadHadith(int id) { Log.debug("Will load hadith #"+id); String raw_text = Helper.readTextFile("/ahadith/"+id, "utf-8"); Log.debug("Hadith: <"+raw_text+">"); String[] parts = Helper.split(raw_text, "\r\n"); Log.debug("Hadith #"+id+" split into "+parts.length+" parts"); if (parts[2].length() < 2) lblHadith.setText(parts[0]); else lblHadith.setText(parts[2]); } COM: <s> loads the hadith with the given id </s>
funcom_train/49608782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Contributor getContributor(String username,EntityManager em,int id) throws Throwable { try { Contributor vo = JPAMethods.find(username, em, Contributor.class, id); if (vo==null) throw new Exception("No Contributor found having id: "+id); return vo; } catch (Throwable ex) { Logger.error(null, ex.getMessage(), ex); throw ex; } } COM: <s> retrieve a contributor </s>
funcom_train/5427184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReparseDoctype() { final TextPos start = TextPos.START; final TextPos end = new TextPos(1, 27, 26); final TermContext context = StandardGrammars.DOCTYPE_CONTEXT; startReparsingResource("/net/sf/etl/tests/data/HelloWorld.ej.etl", context, start, end); boolean errorExit = true; try { readDocType("\"MinimalEJ.g.etl\"", null); errorExit = false; } finally { endParsing(errorExit); } } COM: <s> test reparsing doctype </s>
funcom_train/20365054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRandomizer() throws ComponentNotFoundException, MultipleComponentsFoundException { JButton randomizeButton = super.findButton( BioPanel.RANDOMIZE_BUTTON ); assertNotNull( randomizeButton ); Person person1 = getPerson(); buttonTester.actionClick(randomizeButton); Person person2 = getPerson(); assertFalse( person1.equals( person2 ) ); buttonTester.actionClick(randomizeButton); Person person3 = getPerson(); assertFalse( person1.equals( person3 ) ); assertFalse( person2.equals( person3 ) ); } COM: <s> test the randomizer button </s>
funcom_train/21100516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { String str; if ((str = getText()) != null) { if (0 < str.length()) { if (isSelected) { g.setColor(UIManager.getColor("Tree.selectionBackground")); } else { g.setColor(UIManager.getColor("Tree.textBackground")); } if (hasFocus) { g.setColor(UIManager.getColor("Tree.selectionBorderColor")); } } } super.paint(g); } COM: <s> overrides the paint method to make sure the label is </s>
funcom_train/181771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DbDescriptor getDescriptor(Class dbObject) throws NoSuchMethodException, IllegalAccessException, java.lang.reflect.InvocationTargetException { Class parameterTypes[] = {}; Object parameters[] = {}; java.lang.reflect.Method method = dbObject.getMethod("createDescriptor", parameterTypes); return (DbDescriptor)((method).invoke(dbObject, parameters)); } COM: <s> return descriptor of given db object </s>
funcom_train/14660861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ResultField getEquationTextField() { if (equationTextField == null) { equationTextField = new ResultField(); equationTextField.setBorder(BorderFactory.createTitledBorder(null, "Type Equations ", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51))); } return equationTextField; } COM: <s> this method initializes equation text field </s>
funcom_train/15530438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkJSP(final IFile file, final Forward forward) { if (!StruntsPlugin.getDefault().getStruntsProject(project).getWebRootFolder().getFile(forward.getPath()) .exists()) { StruntsPlugin.getDefault().fireFoundInvalidJSPForwardEvent(file, forward); } } COM: <s> checks if jsp file with given path exists </s>
funcom_train/24589095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIconHeight() { int height = 0; // Add the height of all Icons while also including the gap if (layout == Layout.VERTICAL) { height += (icons.length - 1) * gap; for (Icon icon : icons) height += icon.getIconHeight(); } else // Just find the maximum height { for (Icon icon : icons) height = Math.max(height, icon.getIconHeight()); } return height; } COM: <s> gets the height of this icon </s>
funcom_train/323399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean openInsertCursor(Connection connection) { if (preparedInsertStatement != null && connection == currentConnection) { return true; } if (connection == null) { return false; } /* * Otherwise, make a new prepared insert statement. */ closeCursors(); setCurrentConnection(connection); String insertString = getInsertString(); try { preparedInsertStatement = connection.prepareStatement(insertString); } catch (SQLException e) { e.printStackTrace(); return false; } return true; } COM: <s> open a cursor for inserting data using a non scrollable cursor </s>
funcom_train/8012605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected BaseListFormComponent getContainer(String name) { int elementsSize = _elements.size(); for (int i = 0; i < elementsSize; i++) { BaseListFormComponent blfc = (BaseListFormComponent) _elements.elementAt(i); if (blfc.getName().equals(name)) { return blfc; } } return null; } COM: <s> gets the object container matching the name else null </s>
funcom_train/43098519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConstrainingElement(Object handle, Object constraint) { if (handle instanceof MCollaboration && constraint instanceof MModelElement) { ((MCollaboration) handle).addConstrainingElement( (MModelElement) constraint); return; } throw new IllegalArgumentException( "handle: " + handle + " or constraint: " + constraint); } COM: <s> add a constraining element </s>
funcom_train/14628362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enableFullGSALoggingDebug(RepositoryBean rbean) { ((GSARepository) ((GSAItem) rbean.backingItem()).getRepository()) .setLoggingDebug(true); ((GSARepository) ((GSAItem) rbean.backingItem()).getRepository()) .setDebugLevel(10); } COM: <s> turns on logging debug for the repository containing the given bean </s>
funcom_train/13391689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printStackTrace(PrintWriter pw) { synchronized(pw) { Throwable cause = getCause(); if(cause != null) { pw.print("net.assimilator.core.JSBControlException: "); cause.printStackTrace(pw); } else { super.printStackTrace(pw); } } } COM: <s> prints the stack backtrace to the specified print writer </s>
funcom_train/22551529
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeConnection(final BTLink btc) { if (LOG.isDebugEnabled()) LOG.debug("removing connection " + btc.toString()); linkManager.removeLink(btc); if (btc.isUploading()) rechoke(); boolean connectionsEmpty = linkManager.getNumConnections() == 0; boolean peersEmpty = _peers.isEmpty(); synchronized(state.getLock()) { if (connectionsEmpty && state.get() == TorrentState.DOWNLOADING) { if (peersEmpty) state.set(TorrentState.WAITING_FOR_TRACKER); else state.set(TorrentState.CONNECTING); } } } COM: <s> private helper method removing connection </s>
funcom_train/13345470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadThrow() throws SocketException, IOException, URISyntaxException, SQLException, ClassNotFoundException{ for(DbOperationsListener listener: dbOperationListeners){ listener.bulkLoadStart(); } source.connect(); pts = new HashSet<PhyloTree>(); getTrees(); if (isLoadRequired()){ hib(writeTSV(pts)); } for(DbOperationsListener listener: dbOperationListeners){ listener.bulkLoadEnd(); } } COM: <s> loads the source into the database </s>
funcom_train/18255018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGridBorderSize(int gridBorderSize) { this.gridBorderSize = gridBorderSize; if (viewPanel.getLayout() instanceof GridLayout) { ((GridLayout) viewPanel.getLayout()).setHgap(gridBorderSize); ((GridLayout) viewPanel.getLayout()).setVgap(gridBorderSize); pack(); } } COM: <s> sets the grid border size </s>
funcom_train/7750447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getExceptionLine(ParsingContext ctx) { String[] additionalLines = ctx.getUnmatchedLog().toString().split("\n"); for (int i = 0; i < additionalLines.length; i++) { Matcher exceptionMatcher = exceptionPattern.matcher(additionalLines[i]); if (exceptionMatcher.matches()) { return i; } } return -1; } COM: <s> walk the additional lines list looking for the exception pattern </s>
funcom_train/27754833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration enumerateFileTypes() { return new Enumeration() { int idx = 0; public boolean hasMoreElements() { FileType cls = enumerateFileTypes(iptr, idx); return (cls != null); } public Object nextElement() { FileType cls = enumerateFileTypes(iptr, idx); if (cls == null) return null; idx++; return cls; } }; } COM: <s> enumerates all available language types </s>
funcom_train/12596523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void outputMsg(Message msg){ try{ msg.setNick(nickname); output.writeObject(msg); output.flush(); } catch (IOException ex) { //if an error occurs prints the stack trace to assist debugging //ex.printStackTrace(); //terminate the thread cleanly by terminating the loop using the switch variable run terminateClient(); } } COM: <s> sends a message object to the user interface to be displayed </s>
funcom_train/37504896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ErrorHandler getDefaultErrorHandler() { return new ErrorHandler() { public void error(SAXParseException ex) throws SAXException { if (context.isEmpty()) Control.error("Missing DOCTYPE."); throw ex; } public void fatalError(SAXParseException ex) throws SAXException { throw ex; } public void warning(SAXParseException ex) throws SAXException { // ignore } }; } COM: <s> creates default error handler used by this parser </s>
funcom_train/48457519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public class SIException extends Exception { /** * Default serialization id to suppress warnings */ private static final long serialVersionUID = -8992118680928506335L; /** * @param message */ public SIException(String message) { super(message); // TODO Auto-generated constructor stub } /** * @param cause */ public SIException(Throwable cause) { super(cause); // TODO Auto-generated constructor stub } /** * @param message * @param cause */ public SIException(String message, Throwable cause) { super(message, cause); // TODO Auto-generated constructor stub } } COM: <s> exception indicating a non io problem in the source interface implementation </s>
funcom_train/43817214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getAllCapabilities() { Map capabilities = new HashMap(); log.trace("Building all capability map..."); /* * WARNING the hierarchy is defined by a ordered list defined as: <code>generic -> * ... -> root</code>. */ for (Iterator iterator = hierarchy.iterator(); iterator.hasNext();) { ModelDevice device = (ModelDevice) iterator.next(); capabilities.putAll(device.getCapabilities()); } return capabilities; } COM: <s> returns all capability for the held model device </s>
funcom_train/39820572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Connection cleanup() throws HibernateException { try { if ( shouldObtainConnection ) { // the connection was previously released; nothing to do... shouldObtainConnection = false; return null; } else { if (connection==null) { throw new HibernateException( "Already disconnected" ); } batcher.closeStatements(); Connection c = null; if ( !wasConnectionSupplied ) { closeConnection(); } else { c = connection; } connection = null; return c; } } finally { callback.connectionCleanedUp(); } } COM: <s> releases the connection and cleans up any resources associated with </s>
funcom_train/10914408
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void finish() throws IOException { // restorePDFState(); closePage(); if (fontInfo != null) { pdfDoc.getResources().addFonts(pdfDoc, fontInfo); } this.pdfDoc.output(outputStream); pdfDoc.outputTrailer(outputStream); outputStream.flush(); } COM: <s> the rendering process has finished </s>
funcom_train/11733166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMixins(Set<Name> mixinTypeNames) throws RepositoryException { nodeState.setMixinTypeNames(mixinTypeNames); // update jcr:mixinTypes property setPropertyValues(NameConstants.JCR_MIXINTYPES, PropertyType.NAME, InternalValue.create( mixinTypeNames.toArray(new Name[mixinTypeNames.size()])) ); } COM: <s> sets the given mixin types </s>
funcom_train/43423321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getClientServices() { StringBuffer sb = new StringBuffer(); for (String clientService: clientServices.keySet()) { if (sb.length() > 0) { sb.append(","); } sb.append(clientService); } return sb.toString(); } COM: <s> returns the list of client services registered with the session </s>
funcom_train/44482451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isIgnoredFile(File file) { if (ignoredFilenames.contains(file)) { return true; } String filename = file.toString(); Iterator i = ignoredPatterns.iterator(); while (i.hasNext()) { String pattern = (String) i.next(); if (filename.matches(pattern)) { return true; } } return false; } COM: <s> returns true if the code cartridge </s>
funcom_train/3474475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Files () { files = new HashtableStringFile(); String jacaretoHome = System.getProperty ("JACARETO_HOME", "I:\\eclipse workspace\\jacareto"); if ((jacaretoHome != null) && ! jacaretoHome.equals ("")) { setJacaretoHome (jacaretoHome); } else { System.err.println ("Environment variable JACARETO_HOME not set."); System.exit (0); } } COM: <s> creates a new empty files instance </s>
funcom_train/4008490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reorg() { if(mPos0.getGpsX() > mPos1.getGpsX()) { Position tmp = mPos0.clone(); mPos0.setGpsX(mPos1.getGpsX()); mPos1.setGpsX(tmp.getGpsX()); } if(mPos0.getGpsY() > mPos1.getGpsY()) { Position tmp = mPos0.clone(); mPos0.setGpsY(mPos1.getGpsY()); mPos1.setGpsY(tmp.getGpsY()); } } COM: <s> sets the smaller values to x and the lager to y </s>
funcom_train/18215278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MetricResult createErrorMessage(String errorMessage, String stacktrace) { String message = errorMessage; String userid = UserSession.getUserID(getThreadLocalRequest().getSession()); String debugUser = FrontendSettingsFile.getInstance().getDebugUser(); if (debugUser != null && userid != null && userid.equals(debugUser)) { message += System.getProperty("line.separator") + stacktrace; } return MetricResult.error(message); } COM: <s> stores the error message in the metric result database </s>