__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/22497069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean loadTopic(String name) { for (NoteData noteData : topics) { if (noteData.getTopic().equals(name)) { if (noteData == currentTopic) { return true; } topic.setText(name); if (currentTopic != null) { currentTopic.collectData(topicNote); } noteData.createData(topicNote); topicNote.setLineBullet(0, 1, topicNote.getBullets().get(0)); currentTopic = noteData; return true; } } return false; } COM: <s> this method loads the given topic into the note taking section of the </s>
funcom_train/6273643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void re_ninit() { closeFps(); String env = System.getProperty("WNDBVERSION"); if (env == null) { env = "1.7"; } WNGlobal.wnRelease = env;// set release. doInit(); wnRtl.OpenDB = true; morpher.re_morphInit(); } COM: <s> re initialization function </s>
funcom_train/43827453
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TypeDeclaration_type_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TypeDeclaration_type_feature", "_UI_TypeDeclaration_type"), DeclarationPackage.Literals.TYPE_DECLARATION__TYPE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the type feature </s>
funcom_train/5168570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstruct_3() { Configuration conf1 = new Configuration("id1","doesnotmatter"); conf1.setFitnessEvaluator(new DefaultFitnessEvaluator()); Configuration conf2 = new Configuration("id2","doesnotmatter"); conf2.setFitnessEvaluator(new DeltaFitnessEvaluator()); assertEquals("id1", conf1.getId()); assertEquals("id2", conf2.getId()); } COM: <s> construct with explicit id given </s>
funcom_train/21610777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateTestGraph(Graph<Value> g) { for(int i = 0; i < SIZE; i++) { g.addArc( new StringValue(FROM_PREFIX + i), new StringValue(TO_PREFIX + i), new StringValue(LABEL_PREFIX + i) ); } } COM: <s> populates a given graph </s>
funcom_train/3361891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { // Calculate the string representation if it has not yet been done (ie 1st call to toString()) // if (myToString == null) { myToString = this.getClass().getName()+ "(name="+ getTypeName() +")"; } // return always the same string representation for this instance (immutable) // return myToString; } COM: <s> returns a string representation of this code simple type code instance </s>
funcom_train/42371896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHasMany() { Topic topic = new Topic(); topic.read(topics.first.getId()); assertNotNull("Topic.replies is null when it shouldn't have been", topic.getReplies()); List replies = topic.getReplies(); assertNotNull("Iterator from Topic.replies is null when it shouldn't have been", replies); assertEquals(1, replies.size()); } COM: <s> test the has many association </s>
funcom_train/48468835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeNode(String nodePath) throws NamingException, RepositoryException, Exception{ Repository repository = super.getRepository(); Credentials credentials = new SimpleCredentials(USERID,PASSWORD); Session session = repository.login(credentials); Node node = session.getRootNode(); node = node.getNode(nodePath); node.remove(); session.save(); session.logout(); } COM: <s> removes node on basis of node path </s>
funcom_train/49199856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLinkedContainerPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ModuleCategoryContainer_linkedContainer_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ModuleCategoryContainer_linkedContainer_feature", "_UI_ModuleCategoryContainer_type"), ExhibitionPackage.Literals.MODULE_CATEGORY_CONTAINER__LINKED_CONTAINER, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the linked container feature </s>
funcom_train/43245352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetECTwoCity() { System.out.println("getECTwoCity"); EmergencyContactDG4Object instance = new EmergencyContactDG4Object(); String expResult = ""; String result = instance.getECTwoCity(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get ectwo city method of class org </s>
funcom_train/13587663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentIteration(final int iteration) { this.iteration = Integer.valueOf(iteration); if (this.iterations.get(this.iteration) == null) { this.currentIterationValues = new HashMap<String, Long>(); this.iterations.put(this.iteration, this.currentIterationValues); this.nextIdentifierPosition = 0; this.nextOperationPosition = 0; } } COM: <s> sets the current iteration so that the times measured using </s>
funcom_train/9086775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Areas entity) { EntityManagerHelper.log("saving Areas 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 areas entity </s>
funcom_train/31875190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object o1, Object o2) { if (((Word) o1).getScore() < ((Word) o2).getScore()) return -1; if (((Word) o1).getScore() == ((Word) o2).getScore()) return 0; return 1; } COM: <s> the comparator interface </s>
funcom_train/18598128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createOrUpdateSubtemplate(Element fragment) throws Exception { String uuid = fragment.getAttributeValue("uuid"); String schema = fragment.getAttributeValue("schema"); String title = fragment.getAttributeValue("title"); if (schema==null) return; //skip fragments with unknown schema Element md = (Element) fragment.getChildren().get(0); String id = dataMan.getMetadataId(dbms, uuid); if (id == null) { createSubtemplate(schema, md, uuid, title); } else { updateSubtemplate(id, uuid, md); } } COM: <s> create or update a sub template for an xml fragment </s>
funcom_train/13956788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NSArray primaryKeysMatchingQualifier(EOEditingContext ec, EOQualifier eoqualifier, NSArray sortOrderings) { EOFetchSpecification fs = primaryKeyFetchSpecificationForEntity(ec, eoqualifier, sortOrderings, null); //NSArray nsarray = EOUtilities.rawRowsForQualifierFormat(ec, fs.qualifier(), ); NSArray nsarray = ec.objectsWithFetchSpecification(fs); return nsarray; } COM: <s> fetches an array of primary keys matching a given qualifier </s>
funcom_train/22777696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChild(TreeNode child) { if(child == null) throw new IllegalArgumentException("Child was null"); List childList = getChildList(); int size = childList.size(); childList.add(child); child.setParent(this); if(isInTree()) fireTreeNodesInserted(getPath(), new int[]{size}); } COM: <s> add child node to this one </s>
funcom_train/43245928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMothersName() { System.out.println("getMothersName"); PatientDataObject instance = new PatientDataObject(); String expResult = ""; String result = instance.getMothersName(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get mothers name method of class org </s>
funcom_train/172820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initializeJavaProject(IJavaElement javaElement, ILaunchConfigurationWorkingCopy config) { IJavaProject javaProject = javaElement.getJavaProject(); String name = null; if (javaProject != null && javaProject.exists()) { name = javaProject.getElementName(); } config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, name); } COM: <s> set the java project attribute based on the ijava element </s>
funcom_train/49078593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Store create(){ String ID = null; try { ID = new GUID().generate(); } catch (Exception ex) { ex.printStackTrace(); } Store store = new Store(); store.setStoreGUID(ID); Cache c = Cache.getInstance(); c.getInstance().put(ID,store); store.setDirty(true); return store; } COM: <s> creates a store object that is empty except for an id guid </s>
funcom_train/444573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitNegationAsFailure(NegationAsFailure expr) { if (!body) { addError(expr, ValidationError.AX_HEAD_ERR + ": Must not " + "contain a NegationAsFailure:\n" + leSerializer.serialize(expr)); } else { expr.getOperand().accept(this); } } COM: <s> checks if a negation as failure is valid to wsml rule </s>
funcom_train/38491847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addNewItem(GetElement c) { sessionEntry s = getSessionEntry(mibDialog.createSession()) ; GetDisplayPanel p = getFrontPanel() ; String panelName = tabbedPane.getTitleAt(tabbedPane.getSelectedIndex()) ; s.addComponent(panelName, (JComponent)c) ; s.mgr.submit(c) ; p.add((JComponent)c) ; configurationChanged = true ; } COM: <s> adds a new element to the frontmost panel </s>
funcom_train/18735767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printStackTrace(PrintStream s) { IMessage m = getIMessage(); Throwable thrown = (null == m? null : m.getThrown()); if (!isPorter() || (null == thrown)) { s.println("Message: " + m); super.printStackTrace(s); } else { thrown.printStackTrace(s); } } COM: <s> print the stack trace of any enclosed thrown </s>
funcom_train/45257484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFastView(IViewReference ref) { Perspective persp = getActivePerspective(); if (persp == null) { return; } // Do real work. persp.removeFastView(ref); // Notify listeners. window.firePerspectiveChanged(this, getPerspective(), ref, CHANGE_FAST_VIEW_REMOVE); window.firePerspectiveChanged(this, getPerspective(), CHANGE_FAST_VIEW_REMOVE); } COM: <s> removes a fast view </s>
funcom_train/44847008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String formatString(Noteable note, String description) { description = description.replaceAll("%p", String.valueOf(note .getPriority())); description = description.replaceAll("%n", note.getSubject()); description = description.replaceAll("%t", sdf .format(note.getEndDate())); return description; } COM: <s> formats the description string </s>
funcom_train/5472434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BinaryPerceptronModelWriter (AbstractModel model, File f) throws IOException { super(model); if (f.getName().endsWith(".gz")) { output = new DataOutputStream( new GZIPOutputStream(new FileOutputStream(f))); } else { output = new DataOutputStream(new FileOutputStream(f)); } } COM: <s> constructor which takes a gismodel and a file and prepares itself to </s>
funcom_train/28541635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Documentation xml2Documentation(Element documentationElement) { Documentation documentation = BPELFactory.eINSTANCE.createDocumentation(); // TODO: Facade ? // documentation.setElement(documentationElement); if (documentationElement.hasAttribute("xml:lang")) { documentation.setLang(documentationElement.getAttribute("xml:lang")); } if (documentationElement.hasAttribute("source")) { documentation.setSource(documentationElement.getAttribute("source")); } String text = getText(documentationElement); if (text != null) { documentation.setValue(text); } return documentation; } COM: <s> converts an xml documentation element to a bpel documentation object </s>
funcom_train/20313433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExtendedIterator listLabels( String lang ) { checkProfile( getProfile().LABEL(), "LABEL" ); return WrappedIterator.create( listProperties( getProfile().LABEL() ) ) .filterKeep( new LangTagFilter( lang ) ) .mapWith( new ObjectMapper() ); } COM: <s> p answer an iterator over all of the label literals for this resource </s>
funcom_train/9751246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void lock() { while(locked) { //System.out.println("Lock: " + Thread.currentThread().getName() + " waiting"); try { wait(); } catch (InterruptedException e) { // Ignore interrupts and continue } } locked = true; //System.out.println("Lock: " + Thread.currentThread().getName() + " acquired"); } COM: <s> lock the comms </s>
funcom_train/17204376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void pokeAddr(int reg, int idx) { int offset = BYTES_IN_STACKSLOT - BYTES_IN_ADDRESS + (idx << LOG_BYTES_IN_STACKSLOT); if (VM.VerifyAssertions) validateStackPush(-offset); asm.emitSTAddr(reg, spTopOffset + offset, FP); } COM: <s> emit the code to poke an address </s>
funcom_train/36756443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetRemainingCourseCount() { System.out.println("getRemainingCourseCount"); Plan plan = null; Degree instance = null; int expResult = 0; int result = instance.getRemainingCourseCount(plan); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get remaining course count method of class csis543 tfinal project </s>
funcom_train/2881390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int row, int col) { if (col == 0) { return params[row].getType(); } if (col == 1) { return m_propNames.get(row); } else if (col == 2) { return m_propVals.get(row); } else { return null; } } COM: <s> gets the value at attribute of the parameter table model object </s>
funcom_train/5433866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String msg = fKeyword + fMethodName + "("; for (int i=0,len=fParams.length; i<len; i++) { msg += (((i!=0) ?", " :"") + fParams[i]); } return msg + ")" + chainToString(); } COM: <s> gets this expression as it would appear in an expression string </s>
funcom_train/11073966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertElementNames(List names, List elements) { assertEquals(names.size(), elements.size()); Iterator nameIter = names.iterator(); Iterator elementIter = elements.iterator(); while (elementIter.hasNext()) { assertEquals(nameIter.next(), ((Element) elementIter.next()).getTagName()); } } COM: <s> do assertions on dom element names </s>
funcom_train/24560813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void thumbprintContributionOnClose(Map<String, Object> msg) { String contributionId = (String) msg.get("contributionId"); String screenId = (String) msg.get("screenId"); String userId = (String) msg.get("userId"); PendingThumbprints.addPendingThumbprint(contributionId, screenId, userId); } COM: <s> adds a contribution to the list of pending thumbprints </s>
funcom_train/35683562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getDefaultNamespacePrefix() { IPreferenceStore store = getDefaultPreferences(); String str = store.getString(PreferenceConstants.XSD_NAMESPACE_PREFIX); if (str != null && str.length() != 0) { str = setSeparatorChar(str, '/'); return str; } return ""; } COM: <s> the default namespace prefix comes from the leg star general preferences </s>
funcom_train/36427644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean changeFileType(boolean binaryTransfer) { try { if (binaryTransfer) { return this.ftpClient.setFileType(FTP.BINARY_FILE_TYPE); } else { return this.ftpClient.setFileType(FTP.ASCII_FILE_TYPE); } } catch (IOException e) { status = ErrorResult.CHANGEFILETYPE.code; return false; } } COM: <s> change the file type of transfer binary true ascii false </s>
funcom_train/33853047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLAttributeList addAttribute(@NonNull String name, @NonNull String value) { if (name == null) throw new NullPointerException("name must be nonnull"); if (value == null) throw new NullPointerException("value must be nonnull"); nameValuePairList.add(new NameValuePair(name, value)); return this; } COM: <s> add a single attribute name and value </s>
funcom_train/18353878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void reset(Exe exe) { tabbedPane.setSelectedIndex(0); tabbedPane.setEnabledAt(1, false); setTitle(exe.getName()); objectViewPanel.setContext(new ContextItem( "Exe " + exe.getName() + " running...")); } COM: <s> resets the output value to exe exe </s>
funcom_train/45897966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T getItemAt(int x, int y) { int rowCount = (height + rowHeight - 1) / rowHeight; int columnWidth = width / columns; int col = x / columnWidth; int row = Math.min(y / rowHeight, rowCount - 1); int idx = (col + columnIndex) * rowCount + row; List<T> items = getList.invoke(null); if (idx >= 0 && idx < items.size()) { return items.get(idx); } return null; } COM: <s> find a planet at the given render coordinates </s>
funcom_train/43231066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gotoPresenter(final Presenter presenter) { if (this.getPresenterStack().contains(presenter)) { if (!this.getPresenterStack().peek().equals(presenter)) { this.getPresenterStack().peek().close(new CloseCallback() { @Override public void closed() { ApplicationController.this.gotoPresenter(presenter); } @Override public void closeAborted() { } }); } } } COM: <s> tries to jump to a presenter in the current presenter stack </s>
funcom_train/46884759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void looseAttack(final int from, final int to) { byte[] nsq = Geometry.NEXT_SQ[from]; int sq = to; for (;;) { sq = nsq[sq]; if (sq < 0) { break; } atkTo[from] &= BitBoard.CLEAR_MASK[sq]; atkFr[sq] &= BitBoard.CLEAR_MASK[from]; if (board[sq] != 0) { break; } } } COM: <s> recalculate attacks from from to to after a piece has been put </s>
funcom_train/17362367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnChangeP() { if (btnChangeP == null) { btnChangeP = new JButton(); btnChangeP.setBounds(new Rectangle(143, 97, 111, 29)); btnChangeP.setText("Change"); btnChangeP.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { showChangeDirDialog(lblSongPathV); } }); } return btnChangeP; } COM: <s> this method initializes btn change p </s>
funcom_train/141026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void load(File seqfile) { FileInputStream fistr = null; try { fistr = new FileInputStream(seqfile); load(fistr, seqfile.getName()); } catch (Exception e) { Reporter.report("Couldn't read file: " + e.getMessage(), e, false, false, true); } finally { GeneralUtils.safeClose(fistr); } } COM: <s> loads the path selected in the path browser </s>
funcom_train/26282573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printStackTrace(PrintWriter w) { super.printStackTrace(w); if(chained != null) { w.print("------------ CHAINED ------------------"); chained.printStackTrace(w); } } COM: <s> print a stack trace to a print writer recursing any chained exceptions </s>
funcom_train/2844789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getAnnotationsFromFile(AnnotationFile af) { super.getAnnotationsFromFile(af); frame.refreshFrames(); if (firstRelationInChunk != null) { if (firstRelationInChunk.getAnchor() != null) firstAnchorIndex = view.getSortedAnnotations().indexOf(firstRelationInChunk.getAnchor()); } } COM: <s> overrides this function to fresh the frames list and select the first relation </s>
funcom_train/23284818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void snoozeAlarm(long duration) throws IOException, UPNPResponseException { ActionMessage message = messageFactory.getMessage("SnoozeAlarm"); message.setInputParameter("InstanceID", 0); message.setInputParameter("Duration", TimeUtilities.convertLongToISO8601Duration(duration)); message.service(); } COM: <s> delays alarm detonation by the given duration </s>
funcom_train/44137043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OSMPage getSummaryPage() { if(this.m_SummaryPage == null) { this.m_SummaryPage = new OSMSlide(m_Document.getSummaryTitleElement()); this.m_SummaryPage.setType(OSMSlide.SUMMARY); m_Document.getSummaryTitleElement().setPage(this.m_SummaryPage); } return m_SummaryPage; } COM: <s> to get the summary page </s>
funcom_train/22370489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toShortString() { return new StringBuilder().append(majorNumber).append(".").append(minorNumber).append(".").append(revisionNumber).append(" ").append(versionType != VersionType.FINAL ? versionType : "").toString(); } COM: <s> returns short version in string format </s>
funcom_train/23216882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addContractTemplateNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ContractTemplate_contractTemplateName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ContractTemplate_contractTemplateName_feature", "_UI_ContractTemplate_type"), ContractPackage.Literals.CONTRACT_TEMPLATE__CONTRACT_TEMPLATE_NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the contract template name feature </s>
funcom_train/51591133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void focusLost(FocusEvent e) { this.focusLostTemporarly = e.isTemporary(); // System.out.println("lost focus temporarly ? " + this.focusLostTemporarly); if ( ! this.focusLostTemporarly ) { if ( e.getComponent() instanceof JTextComponent ) { this.applyValue( ((JTextComponent)e.getComponent()), ((JTextComponent)e.getComponent()).getText() ); } } } COM: <s> invoked when a component loses the keyboard focus </s>
funcom_train/44386389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renameLocationX(String oldLocationX, String newLocationX) { int promptIndex = myLocationX.indexOf(oldLocationX); if (promptIndex >= 0) { myLocationX.removeElementAt(promptIndex); myLocationX.insertElementAt(newLocationX, promptIndex); } } COM: <s> rename an location x with a given name if the location x exists </s>
funcom_train/32752549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getIndexOfNextHost() { final int hostCount = AVAILABLE_HOSTS.size(); if ( AVAILABLE_HOSTS == null || hostCount == 0 ) { return -1; } else if ( _lastHostIndex < 0 ) { return hostCount > 0 ? new Random().nextInt( hostCount ) : 0; } else { final int lastIndex = _lastHostIndex; return lastIndex < hostCount - 1 ? lastIndex + 1 : 0; } } COM: <s> get the index of the next host </s>
funcom_train/35844308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JComponent getOwnerSelector() { if (ownerSelector == null) { ownerSelector = new Box(BoxLayout.X_AXIS); ownerSelector.add(new UMLComboBoxNavigator( Translator.localize("label.owner.navigate.tooltip"), new UMLComboBox2(ownerComboBoxModel, new ActionSetTagDefinitionOwner()) )); } return ownerSelector; } COM: <s> returns the stereotype selecter </s>
funcom_train/16976016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBotVoltar() { if (botVoltar == null) { botVoltar = new JButton(); botVoltar.setBounds(new Rectangle(260, 20, 100, 20)); botVoltar.setText("Voltar"); botVoltar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { telaPrincipal.setContentPane(new PanelPrincipalObrigatorio(telaPrincipal)); } }); } return botVoltar; } COM: <s> this method initializes bot voltar </s>
funcom_train/35677851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testToHostCharset() { toHost(FRENCH_HOST_CHARSET, 43, false, "ça c'est un problème élémentaire à résoudre", "e08140837d85a2a340a495409799968293d0948540c093c0948595a381899985407c4099c0a296a4849985"); toHost(US_HOST_CHARSET, 43, false, "ça c'est un problème élémentaire à résoudre", "488140837d85a2a340a49540979996829354948540519351948595a3818999854044409951a296a4849985"); } COM: <s> test character set </s>
funcom_train/32979798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean saveAsTxtFile(String oTxtFileName) { /* saveAsTxtFile */ /* Write the file */ boolean flag= mae.fio.writeFileToDisk(oTxtFileName, textReport); if(flag) Util.showMsg("Saved as ["+oTxtFileName+"]"); return(flag); } /* saveAsTxtFile */ COM: <s> save as txt file save text report data in </s>
funcom_train/29836997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { Selection selection = getSelection(); // useful to check if the selection isn't empty // before an edit is build. if (!selection.isEmpty()) { GraphElementsDeletionEdit edit = new GraphElementsDeletionEdit(selection.getElements(), getGraph(), MainFrame.getInstance().getActiveEditorSession().getGraphElementsMap()); edit.execute(); MainFrame.getInstance().getUndoSupport().postEdit(edit); } } COM: <s> executes this action </s>
funcom_train/26336334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeItem( int x, int y, String id ) { if( x < 0 || x >= this.width || y < 0 || y >= this.height ) return; if( this.items[x][y] == null ) return; this.items[x][y].removeItem( id ); if( this.items[x][y].size() == 0 ) this.items[x][y] = null; } COM: <s> remove an item from coordinate by item id </s>
funcom_train/33852172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void reportMissingClass(ClassNotFoundException e) { if (e == null) throw new NullPointerException("argument is null"); String missing = AbstractBugReporter.getMissingClassName(e); if (skipReportingMissingClass(missing)) return; RepositoryLookupFailureCallback lookupFailureCallback = getCurrentLookupFailureCallback(); if (lookupFailureCallback != null) lookupFailureCallback.reportMissingClass(e); } COM: <s> file a class not found exception with the lookup failure callback </s>
funcom_train/4865242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Rectangle applyFilters(LWJGLImage texture, int x, int y, int width, int height) { this.filterRect.setBounds(0, 0, width, height); if ( texture.isMirrored() ) { this.filterRect.setX(width); this.filterRect.setWidth(x); } if ( texture.isFlipped() ) { this.filterRect.setY(height); this.filterRect.setHeight(y); } return this.filterRect; } COM: <s> apply transform filters to the image </s>
funcom_train/95834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int addString(String value) { CONSTANT_Utf8_info sutf = addUtf8Entry(value); int valueIndex = sutf.setAsString(); if (valueIndex == 0) { // string is already being used as code valueIndex = addExtraUtf8(value).getIndex(); sutf.setAlternative(valueIndex); } return addIndexReference(VMDescriptor.CONSTANT_String, valueIndex, 0); } COM: <s> add a string entry </s>
funcom_train/38307715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setTextRise(Phrase item) { @SuppressWarnings("rawtypes") List chunks = item.getChunks(); int numChunks = chunks.size(); for (int i = 0; i < numChunks; i++) { Chunk chunk = (Chunk) chunks.get(i); chunk.setTextRise(this.textRise); } } COM: <s> sets the text rise for all chunks of the given phrase </s>
funcom_train/1719073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLatitudeString(boolean useNegativeValues) { if (mSouth) { if(useNegativeValues) { return "-" + mLatitude; } else { return mLatitude + "S"; } } else { if(useNegativeValues) { return new Integer(mLatitude).toString(); } else { return mLatitude + "N"; } } } COM: <s> returns the current latitude as a string to account for negative zero </s>
funcom_train/12074743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void callForDeclare(ICombatant combatant) { // 1. Declare terrain rolls. Roll them. (TN5 (multiple opponents), TN8 (stand // up), TN7 (draw weapon).) combatant.callForTerrainRolls(); if (combatant.getTerrainRolls() != null) { for (ITerrainRoll r : combatant.getTerrainRolls()) { informAll(r.roll()); } } combatant.callForManeuver(); } COM: <s> the icombatant is requested to declare his terrain rolls and maneuver </s>
funcom_train/3420713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pushContext() { super.pushContext(); if (fCurrentContext + 1 == fValidContext.length) { boolean[] contextarray = new boolean[fValidContext.length * 2]; System.arraycopy(fValidContext, 0, contextarray, 0, fValidContext.length); fValidContext = contextarray; } fValidContext[fCurrentContext] = true; } COM: <s> pushes a new context onto the stack </s>
funcom_train/43244977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSession() throws Exception { System.out.println("getSession"); String sessionId = ""; SessionManager instance = new SessionManager(); Session expResult = null; Session result = instance.getSession(sessionId); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get session method of class org </s>
funcom_train/2332752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pairsSortedByKey(final FloatArrayList keyList, final LongArrayList valueList) { keys(keyList); keyList.sort(); valueList.setSize(keyList.size()); for (int i = keyList.size(); --i >= 0;) { valueList.setQuick(i, get(keyList.getQuick(i))); } } COM: <s> fills all keys and values i sorted ascending by key i into the </s>
funcom_train/2911199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getAllBoards() { try { if (allBoards == null) { BoardFilter filter = new BoardFilter(); filter.setTopicId(getTopicId()); BoardManager mgr = new BoardManager(WebFactory.getDataSource(request), user); allBoards = DTO2ModelFactory.getBoardModels( request, mgr.findByFilter(filter).getResult()); } return allBoards; } catch (Throwable t) { cat.debug("getAllBoards", t); throw new ModelException(t); } } COM: <s> returns all the boards in this topic </s>
funcom_train/49349978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getFastaFileButton() { if (fastaFileButton == null) { fastaFileButton = new JRadioButton(); fastaFileButton.setText(resource.getString("fastaFormat")); fastaFileButton.setSelected(false); fastaFileButton.setEnabled(true); fastaFileButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { NewGraphicWizardController.instance().resetGenomes(); } }); } return fastaFileButton; } COM: <s> this method initializes fasta file button </s>
funcom_train/47611051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnMFile() { if (btnMFile == null) { btnMFile = new JButton(); btnMFile.setText("..."); btnMFile.setPreferredSize(new Dimension(22, 22)); btnMFile.setMargin(new Insets(0, 0, 0, 0)); btnMFile.addActionListener(this); } return btnMFile; } COM: <s> this method initializes btn mfile </s>
funcom_train/34636549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleCheckStateChange(final CheckStateChangedEvent event) { BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() { public void run() { Fragment resource = (Fragment) event.getElement(); tree.setGrayed(resource, false); validateInput(); } }); } COM: <s> called when the checked state of a tree item changes </s>
funcom_train/30006546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getIdPanel() { if (this.idPanel == null) { this.idPanel = new JPanel(); this.idPanel.setLayout(new BorderLayout()); this.idPanel.add(this.getIdLabel(), BorderLayout.WEST); this.idPanel.add(this.getIdEntry(), BorderLayout.CENTER); } return this.idPanel; } COM: <s> gets the id panel </s>
funcom_train/7300248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testRejectInvalidColumnSpecEncodings(Locale locale) { Locale oldDefault = Locale.getDefault(); Locale.setDefault(locale); try { assertRejects("karsten"); assertRejects("d:a:b:"); assertRejects("top:default:grow"); assertRejects("bottom:10px"); } finally { Locale.setDefault(oldDefault); } } COM: <s> tests that the column spec parser rejects invalid encodings for a given locale </s>
funcom_train/25563978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean sortVertices(Vertex[] v){ if(v[0].x==v[1].x){ if(v[1].y!=v[2].y){ if(v[0].y!=v[2].y)return false; exchange(v, 0, 1);//1.y=2.y after that } return true; }else if(v[0].x==v[2].x){ exchange(v, 1, 2); return sortVertices(v);//calls the first if }else if(v[1].x==v[2].x){ exchange(v, 0, 2); return sortVertices(v);//calls the first if }else{ return false; } } COM: <s> for arbitrary triangles returns false </s>
funcom_train/40613791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefaultExpression(Session session, Expression defaultExpression) { // also to test that no column names are used if (defaultExpression != null) { defaultExpression = defaultExpression.optimize(session); if (defaultExpression.isConstant()) { defaultExpression = ValueExpression.get(defaultExpression.getValue(session)); } } this.defaultExpression = defaultExpression; } COM: <s> set the default expression </s>
funcom_train/35991475
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(Packet packet) { //allow loopback Object obj = packet.getProperty(MessageConstant.PONG); String from = packet.getFrom(); String id = packet.getPacketID(); if (Log.DEBUG) { Log.log(this, " accepting id: " + id + " from: " + from + " to: " + packet.getTo()); } return (obj != null && from != null && id != null); } COM: <s> only accept pong packet </s>
funcom_train/14332184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setProgramClass(Class programClass) { this.programClass = programClass; // Check if program is a workmanager if (!WorkManager.class.isAssignableFrom(programClass)) { throw new RuntimeException("Program " + programClass.getName() + " does not implement Workmanager"); } setPostprocJob(WorkManagerPostProc.class.isAssignableFrom(programClass)); } COM: <s> setter method for program class </s>
funcom_train/23030231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void closeStack(Window window) { Stack<Window> theOne = null; for (Stack<Window> stack : windowStacksModel.stacks) { for (Window w : stack) { if (w == window) { theOne = stack; break; } } } if (theOne == null) { // Nothing to close } closeStack(theOne); } COM: <s> completely removes the stack the given window is part of </s>
funcom_train/16082527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnected(Messenger messenger, Identity identity) { identity.setStatus(MessagingConstants.STATUS_OFFLINE); if (log.isDebugEnabled()) { log.debug(identity.getUsername() + "." + identity.getMessenger() + "." + identity.getSignin() + " disconnected."); } } COM: <s> disconnected from messenger service </s>
funcom_train/38335648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStrategy(String strategyName) throws EvaluationException { try { // set new strategy: strategy = ConflictResolutionStrategy.getStrategy(strategyName); Collection<Agenda> ags = agendas.values(); for (Agenda agenda : ags) agenda.setConflictResolutionStrategy(strategy); } catch (InstantiationException e) { throw new EvaluationException( "Error while setting the strategy to " + strategyName, e); } catch (IllegalAccessException e) { throw new EvaluationException( "Error while setting the strategy to " + strategyName, e); } } COM: <s> this globally sets the conflict resolution strategy by a string </s>
funcom_train/12150229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Reference getReference() { Reference ref = new Reference(BindableRepository.class.getName(), SAMRepositoryFactory.class.getName(), null); // no classpath defined ref.add(new StringRefAddr(CONFIGFILEPATH_ADDRTYPE, configFilePath)); ref.add(new StringRefAddr(REPHOMEDIR_ADDRTYPE, repHomeDir)); return ref; } COM: <s> creates a jndi reference for this content repository </s>
funcom_train/24920924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextPane getJInfoTextPane() { if (jInfoTextPane == null) { jInfoTextPane = new JTextPane(); jInfoTextPane.setBounds(new Rectangle(1, 1, 390, 150)); jInfoTextPane.setEditable(false); jInfoTextPane.setEnabled(true); jInfoTextPane.setBackground(SystemColor.control); jInfoTextPane.setForeground(Color.blue); jInfoTextPane.setContentType("text/html"); } return jInfoTextPane; } COM: <s> this method initializes j info text pane </s>
funcom_train/46715441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init(int withCapacity) { cacheCapacity = withCapacity; //The LRU structure. mapByKeyFld = new LinkedHashMap(cacheCapacity, 0.75f, true) { protected boolean removeEldestEntry(Map.Entry entry) { return (size() > cacheCapacity); } }; //Reset statistics. resetStats(); } COM: <s> initializer with capacity </s>
funcom_train/48069140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* private void saveThreadingSettings() { // assumes that THREADING_SHOW_ROOTS is the last check box index boolean[] selected = new boolean[SortForm.THREADING_ENABLED_CHACKBOX + 1]; //sortForm.threadingGroup.getSelectedFlags( selected );//Adithya threading = selected[SortForm.THREADING_ENABLED_CHACKBOX]; }*/ COM: <s> saves settings for threading whether the threading is enabled and when </s>
funcom_train/28739051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OrderLocal getOrderEntity(Integer orderId) throws OrderingException { OrderLocal oLocal = null; try { oLocal = orderCRUD.getOrderLocalById(orderId); } catch (Exception ex) { throw new OrderingException("Exception in OrderControllerEJB: " + ex.toString()); } return oLocal; } COM: <s> private method that takes a primary key and retrieves order entity </s>
funcom_train/1655255
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printHeaderList() { printStatusLine("215 Header list follows"); // We allow querying any header (:) as well as byte and line counts printTextResponseLine(":"); printTextResponseLine(":bytes"); printTextResponseLine(":lines"); endTextResponse(); } COM: <s> handle the list headers command </s>
funcom_train/42134768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleEndOfStream(StreamArchive streamArch) { logger.debug("Record_Archive_Manager::endOfStream: got finished for " + "ssrc " + streamArch.getSsrc()); synchronized (streamMap) { streamMap.remove(new Long(streamArch.getSsrc())); } } COM: <s> handle notification that the stream is finished </s>
funcom_train/25374436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAllowed(Class c, String displayName) { HashSet<String> list; // retrieve list list = (HashSet<String>) m_Allowed.get(c); if (list == null) { list = new HashSet<String>(); m_Allowed.put(c, list); } // add property list.add(displayName); } COM: <s> adds the given property display name to the list of allowed properties </s>
funcom_train/3428396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean compile(URL url) { try { // Open input stream from URL and wrap inside InputSource final InputStream stream = url.openStream(); final InputSource input = new InputSource(stream); input.setSystemId(url.toString()); return compile(input, _className); } catch (IOException e) { _parser.reportError(Constants.FATAL, new ErrorMsg(e)); return false; } } COM: <s> compiles an xsl stylesheet pointed to by a url </s>
funcom_train/23779360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IContainer getOutputContainer() { IContainer ret = _slinkProject.getContainer(); // default to project folder String outputFolder = _outputFolderPanel.getText(); if (outputFolder != null && outputFolder.length() > 0) { IPath path = ret.getProjectRelativePath().append(outputFolder); ret = ret.getFolder(path); } return ret; } COM: <s> retrieves the output container from the input </s>
funcom_train/40873670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Point getCoord(Object o) { Point p = null; if(coord != null && coord.size() > 0 && coord.get(o) != null) { p = coord.get(o).getFirstPoint(); } else { p = new Point(x, y); x += 150; if(x > 800) { y += 100; x = 10; } } return p; } COM: <s> return coordinates for the given object if they exists </s>
funcom_train/43245544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetRegistrationDate() { System.out.println("setRegistrationDate"); Calendar registrationDate = null; ApplicationObject instance = new ApplicationObject(); instance.setRegistrationDate(registrationDate); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set registration date method of class org </s>
funcom_train/25026030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireStateChange(Cause cause) { if (cause == Cause.TERMINATION && !(this instanceof TerminatableDevice) || cause == Cause.INITIALIZATION && !(this instanceof InitializationReportingDevice) || cause == Cause.OTHER && !(this instanceof GettableDevice)) { throw new IllegalArgumentException ("Caus not applicable to this kind of device"); } firePropertyChange("state", null, cause); } COM: <s> inform all listeners about a change of the devices info </s>
funcom_train/18662164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopLoading() { logger.fine( "SourcePicture.stopLoading(): called" ); abortFlag = true; if ( ( pictureStatusCode == LOADING ) && ( reader != null ) ) { reader.abort(); setStatus( ERROR, "Image loading cancelled." ); try { finalize(); } catch ( Throwable x ) { } } } COM: <s> this method can be invoked to stop the current reader </s>
funcom_train/25841231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getURL(Calendar cal) { //get yearstring String yearString = (cal.get(Calendar.YEAR) - 1980) + ""; //get semester string String semString = cal.get(Calendar.MONTH) > 6 ? "20" : "10"; //get dateString String dateString = "&dt=" + dateFormat.format(cal.getTime()); return TIMETABLE_URL + yearString + semString + dateString; } COM: <s> constructs a url given a specific date </s>
funcom_train/25187341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPatternProperty() throws Exception { System.out.println("getPatternProperty"); JSchema instance = new JSchema(); assertNull(instance.getPatternProperties()); instance.setPatternProperty("test", new JSchema()); assertNotNull(instance.getPatternProperties()); assertEquals(new JSchema(), instance.getPatternProperty("test")); } COM: <s> test of get pattern property method of class jschema </s>
funcom_train/39564709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void screenToGraphPoint(JPowerGraphPoint point, Point2D graphPoint) { graphPoint.setLocation(point.x-getWidth()/2,point.y-getHeight()/2); if (m_lens!=null){ m_lens.undoLens(this, graphPoint); } } COM: <s> converts a given screen point into a point on the graph </s>
funcom_train/7291820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateLineNumber(int lineNumber, boolean strict) { formatToLineNumber(lineNumber); int maxNumber = lineIndexToNumber(fLTSize); if (strict == STRICT) { maxNumber -= 1; } if (lineNumber > maxNumber+1 || (lineNumber == maxNumber+1 && !emptyParagraphAtEndOfText())) { throw new IllegalArgumentException("Invalid line number: " + lineNumber); } } COM: <s> insure that at least line number lines exist doing </s>
funcom_train/1537514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initLabels(String[] labels) { if(cons.isSuppressLabelsActive()){ //for redefine return; } if (labels == null || labels.length == 0) { labels = new String[1]; } setLabel(labels[0]); if (labels.length<3){ bottom.setLabel(null); if (top!=null) top.setLabel(null); side.setLabel(null); return; }else if (labels.length==3){ bottom.setLabel(labels[1]); side.setLabel(labels[2]); }else{ bottom.setLabel(labels[1]); top.setLabel(labels[2]); side.setLabel(labels[3]); } } COM: <s> inits the labels </s>
funcom_train/4014434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void launch(LaunchMethod launcher) { UrlComboEntry selectedUrl = (UrlComboEntry) urlCombo.getSelectedItem(); if (launcher == null || selectedUrl == null) { // Shouldn't happen - should we log anything? return; } URL url = selectedUrl.getUrl(); launcher.launchUrl(url); } COM: <s> launch the selected url with the selected launch method </s>