__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/38346080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSymbol(String name, Object symbol) { Main.debug(this + ": defining " + name + " to be " + symbol.getClass() + ":" + symbol); Object o = symbolTable.put(name, symbol); if (o != null) throw new SemanticError(name + " is already defined in this scope"); } COM: <s> set this symbol but throw semantic exception is symbol was already </s>
funcom_train/25192280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WeatherAgent (String agentName, LegacyWeatherService ws) throws IOException, ClassNotFoundException { super (agentName); this.name = agentName; this.weatherService = ws; addMessageListener (this); Advertisement[] ads = new Advertisement[] { new Ontology ("weather"), }; addAdvertisements (ads); addAdvertisement (new AgentUIAdvertisement (messages)); register (); } COM: <s> demonstrates wrapping a legacy system </s>
funcom_train/450702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasAction (Creature creature, String action) { //Loop through the creature's behaviors, looking for the given action. Iterator behaviors = creature.behaviorIterator(); while (behaviors.hasNext()) { Behavior behavior = (Behavior) behaviors.next(); Iterator actions = behavior.actionIterator(); while (actions.hasNext()) { Class currentClass = actions.next().getClass(); if (currentClass.getName().endsWith(action)) {return true;} } } return false; } COM: <s> check for a given action type </s>
funcom_train/30009186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddPublisher() { System.out.println("addPublisher"); Publisher publisher = null; Document instance = new Document(); int expResult = 0; int result = instance.addPublisher(publisher); 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 add publisher method of class papyrus </s>
funcom_train/42707989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void reparseEntireFile(long cur) { KlangProgressWindow prog = new KlangProgressWindow(this); prog.openKlangFile(this.getCurrentFile().getFile(), this, cur); if (!(prog.getErrMsg().equals(""))) { JOptionPane.showMessageDialog(this, prog.getErrMsg(), KlangConstants.ERROR_TITLE, JOptionPane.ERROR_MESSAGE); } } COM: <s> reopen the currently open file </s>
funcom_train/329100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String getChannelList(int channelMap) { String str = null; if (channelMap == 0) return ""; for (int iBit = 0; iBit < PamConstants.MAX_CHANNELS; iBit++) { if ((1<<iBit & channelMap) != 0) { if (str == null) { str = String.format("%d", iBit); } else { str += String.format(", %d", iBit); } } } return str; } COM: <s> create a string of channel numbers in the channel </s>
funcom_train/44136588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyImgMediaSet(OSMElement elt) { for(int i = 0;i < m_ClientList.size();i++) { OSMElementEventListener lster = (OSMElementEventListener)m_ClientList.get(i); lster.onImgMediaSet(new OSMElementEvent(elt)); } } COM: <s> to notify the set of an image media </s>
funcom_train/51195061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ejbCreate( ){ try{ // reads the context from the environment and gets the privacy ontology initialContext = (Context)new InitialContext().lookup("java:comp/env"); }catch(Exception e){ System.out.println("exception"); e.printStackTrace(); } }//ejbCreate COM: <s> lookup environment variables create connection factories and configure document builder </s>
funcom_train/40616693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() throws SQLException { debugCodeCall("close"); Connection lastHandle = handleConn; if (lastHandle != null) { listeners.clear(); lastHandle.close(); } if (physicalConn != null) { try { physicalConn.close(); } finally { physicalConn = null; } } } COM: <s> close the physical connection </s>
funcom_train/3175741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void link(PropertyXRef target) { if (this.target!=null) throw new IllegalArgumentException("can't link while target!=null"); if (target==null) throw new IllegalArgumentException("can't link to targe null"); this.target = target; target.target = this; propagateXRefLinked(this, target); } COM: <s> links to other xref </s>
funcom_train/36203007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean startsWith(TermIdentifier identifier) { if (identifier.pathElements.length > this.pathElements.length) return false; for (int i = 0; i < identifier.pathElements.length; i++) { if (!identifier.pathElements[i].equalsIgnoreCase(this.pathElements[i])) return false; } return true; } COM: <s> returns whether this </s>
funcom_train/44011414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetWageRate() { System.out.println("getWageRate"); EmployeeBO instance = new EmployeeBO(); double expResult = 0.0; double result = instance.getWageRate(); 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 wage rate method of class edu </s>
funcom_train/42440990
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TransactionStatus startTransaction() { TransactionStatus transactionStatus = null; if (this.transactionManager != null) { DefaultTransactionDefinition transactionDefinition = new DefaultTransactionDefinition(); transactionDefinition.setName("TX_" + this); transactionDefinition.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED); transactionDefinition.setIsolationLevel(TransactionDefinition.ISOLATION_REPEATABLE_READ); transactionStatus = this.transactionManager.getTransaction(transactionDefinition); } return transactionStatus; } COM: <s> start a transaction </s>
funcom_train/3887979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsvisiblePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_LearningActivityType_isvisible_feature"), getString("_UI_PropertyDescriptor_description", "_UI_LearningActivityType_isvisible_feature", "_UI_LearningActivityType_type"), ImsldV1p0Package.Literals.LEARNING_ACTIVITY_TYPE__ISVISIBLE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the isvisible feature </s>
funcom_train/18009147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer res = new StringBuffer(); Enumeration it = getPropertyNames(); while (it.hasMoreElements()) { String name = (String) it.nextElement(); res.append(name).append('=').append(getProperty(name)).append(' '); } if (res.length() > 0) { //cut of last space res.setLength(res.length() - 1); } return res.toString(); } COM: <s> p returns a string representation of the properties contained by this </s>
funcom_train/28125948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetString() { assertEquals("Test Value", _utilities.getString(Strings.UNIT_TEST_STRING)); assertEquals("Test Value:", _utilities.getFieldLabel(Strings.UNIT_TEST_STRING)); assertEquals("[MISSING: doesnotexist]", _utilities.getString("doesnotexist")); } COM: <s> tests the get string method and family </s>
funcom_train/2853954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toXml() { StringBuffer sb = new StringBuffer("<?xml version=\"" + version + "\" encoding=\"" + encoding + "\"?>\n"); for (int i = 0; i < nodes.size(); i++) sb.append( ((Node)nodes.get(i)).toXml() ); return sb.toString(); } COM: <s> generate the xml document in string form </s>
funcom_train/33872945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String unEscapeSpaceString(String fp){ StringBuffer theFP = new StringBuffer(fp); while(theFP.lastIndexOf("*")!=-1) { theFP.setCharAt(theFP.lastIndexOf("*"), ' '); } return theFP.toString(); } COM: <s> replaces any spaces in path names with </s>
funcom_train/4424641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void computeActorOutputPortFanout(Network network) { for (Instance instance : network.getInstances()) { Map<Port, List<Connection>> map = instance.getOutgoingPortMap(); for (List<Connection> values : map.values()) { int cp = 0; for (Connection connection : values) { networkPortConnectionFanout.put(connection, cp++); } } } } COM: <s> count the fanout of the actors output port </s>
funcom_train/50091033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IAtomType getAtomType(String ID) throws NoSuchAtomTypeException { IAtomType at = null; for (int i = 0; i < atomTypes.size(); i++) { at = (IAtomType) atomTypes.get(i); if (at.getAtomTypeName().equals(ID)) { return at; } } throw new NoSuchAtomTypeException("AtomType " + ID + " could not be found"); } COM: <s> find the atom type for a id </s>
funcom_train/46787089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDeadlinePropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Task_deadline_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Task_deadline_feature", "_UI_Task_type"), EZRealtimePackage.Literals.TASK__DEADLINE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the deadline feature </s>
funcom_train/1430445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateServerChallenge() { // Generate a large random number. Random rnd = new Random(); long rndNum = rnd.nextLong(); // Also append the time to this challenge. This will slightly improve the // chances that we do not pass the same challenge twice. long time = Calendar.getInstance().getTimeInMillis(); return Long.toString(time) + Long.toString(rndNum); } COM: <s> generates a unique challenge that the client will have to respond to </s>
funcom_train/44622821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JCLiteral makeDuplicateLiteral(int pos, JCLiteral lit) { // Note that that.typetag can be different from that.type.tag - e.g for null values return factory.at(pos).Literal(lit.typetag, lit.value).setType(lit.type.constType(lit.value)); } COM: <s> makes an attributed ast that is a copy of a given literal ast </s>
funcom_train/10633428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemove_simple() throws NamingException { int count = 5; Person[] persons = new Person[count]; for (int i = 0; i < count; i++) { persons[i] = Person.getInstance(); unorderedAttribute.add(persons[i]); } assertEquals(persons[0], unorderedAttribute.remove(0)); for (int i = 0; i < count - 1; i++) { assertSame(persons[i + 1], unorderedAttribute.get(i)); } } COM: <s> object remove int i </s>
funcom_train/2490738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getCounterVal( ) throws Exception{ OMElement curValOM = wsConn.invoke(serviceName,"getVal",getValOM); assertTrue("getCounterVal", (""+curValOM).startsWith("<get-val-response") ); int val = Integer.parseInt( getCounterValue(curValOM) ); return val; } COM: <s> ask the service for the current vlaure of the counter </s>
funcom_train/43792615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean doesLoopMatch(Cf cf, String[] tokens) { if (cf.getSegment().equals(tokens[0])) { if (null == cf.getSegmentQualPos()) { return true; } else { for (String qual : cf.getSegmentQuals()) { if (qual.equals(tokens[cf.getSegmentQualPos()])) { return true; } } } } return false; } COM: <s> checks if the segment or line read matches to current loop </s>
funcom_train/21469525
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void formatYear(StringBuffer buf, int count, Date date) { int value = date.getYear() + JS_START_YEAR; if (value < 0) { value = -value; } switch (count) { case 1: // no padding buf.append(value); break; case 2: // last 2 digits of year, zero-padded zeroPaddingNumber(buf, value % 100, 2); break; default: // anything else is zero-padded zeroPaddingNumber(buf, value, count); break; } } COM: <s> formats year field according to pattern specified </s>
funcom_train/36762889
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasAvailableComponents(int[] components, int quantity, InventoryStatus inventory) { for(int j = 0, m = components.length; j < m; j++) { if(inventory.getInventoryQuantity(components[j]) < quantity) { return false; } } return true; } COM: <s> do we currently have all necessary components to produce a given order </s>
funcom_train/45860137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flushBase64() throws java.io.IOException { if (position > 0) { if (encode) { out.write(encode3to4(b4, buffer, position)); position = 0; } // end if: encoding else { throw new java.io.IOException("org.xmldap.util.Base64 input not properly padded."); } // end else: decoding } // end if: buffer partially full } // end flush COM: <s> method added by phil </s>
funcom_train/20270413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reportRemovedFunction(Node functionNode, Node declaringBlock) { // Depends when we were notified, functionNode.getParent might or might // not be null. We are going to force the user to tell us the parent // instead. if (removedFunctions.add(functionNode)) { hasChanged = true; removedFunctionToBlock.put(functionNode, declaringBlock); } } COM: <s> reports that a function has been removed </s>
funcom_train/1226155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeGroup(int index) { assert (index != 0); Group lGrp = (Group) groups.get(index); Group defaultGrp = (Group) groups.get(0); for (GraphVertex lCurrVertex : lGrp) { defaultGrp.addNode(lCurrVertex); } groups.remove(index); notifyAboutGroupsChange(new EventObject(this)); } COM: <s> remove the group at the specified index </s>
funcom_train/37571902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMethods() throws Exception { SimpleFileSystemLogger logger = new SimpleFileSystemLogger(); InternalLxmlFiling filing = getSampleInternalLxmlFiling(); logger.filingReceived(filing); SecurityViolation violation = new SecurityViolation("I feel violated."); logger.filingFailedSecurityCheck(filing, violation); } COM: <s> test the methods in class simple file system logger </s>
funcom_train/27805902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void bidCheckListener(){ if(bidCheck.isSelected()){ isActivated = true; System.out.println("Abstract "+abs.getPaperTitle()+"("+abs.getPaperId()+") selected for bidding."); } else{ System.out.println("#NEW#Abstract "+abs.getPaperTitle()+"("+abs.getPaperId()+") de-selected for bidding."); } } COM: <s> checks if a paper is selected for bidding </s>
funcom_train/8609244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void storeLegionAnnouncements(Legion legion) { for (int i = 0; i < (legion.getAnnouncementList().size() - 7); i++) { removeAnnouncement(legion.getLegionId(), legion.getAnnouncementList().firstEntry().getKey()); legion.removeFirstEntry(); } } COM: <s> this method stores all legion announcements </s>
funcom_train/12183816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFullRead() throws Exception { ByteArrayInputStream testIS = new ByteArrayInputStream( "test data".getBytes() ); BrokenInputStream bis = new BrokenInputStream( testIS, 11 ); byte[] buf = new byte[ 16 ]; assertEquals( 9, bis.read( buf ) ); assertEquals( "test data", new String( buf, 0, 9 ) ); } COM: <s> test that reading the correct amount of data from a broken </s>
funcom_train/29774765
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStringOutputType(final String stringOutputType) { if (this.encryptorSet) { throw new EncryptionInitializationException( "An encryptor has been already set: no " + "further configuration possible on hibernate wrapper"); } final StandardPBEStringEncryptor standardPBEStringEncryptor = (StandardPBEStringEncryptor) this.encryptor; standardPBEStringEncryptor.setStringOutputType(stringOutputType); } COM: <s> sets the type of string output base64 default hexadecimal to </s>
funcom_train/50054614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onClick(Widget sender) { if (sender.equals(this.clearButton)) { RootPanel.get(CompositeWidget.CHART_HEADER_ELEMENT_ID).clear(); RootPanel.get(CompositeWidget.CHART_ELEMENT_ID).clear(); RootPanel.get("help").setVisible(false); } } COM: <s> this method responds to user clicks on listener registered ui elements </s>
funcom_train/18734861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResolvedMember lookupMemberNoSupers(Member member) { ResolvedMember ret = lookupDirectlyDeclaredMemberNoSupers(member); if (ret == null && interTypeMungers != null) { for (Iterator i = interTypeMungers.iterator(); i.hasNext();) { ConcreteTypeMunger tm = (ConcreteTypeMunger) i.next(); if (matches(tm.getSignature(), member)) { return tm.getSignature(); } } } return ret; } COM: <s> look up a member takes into account any itds on this type </s>
funcom_train/51813419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JobResult getJobResult(long wait) throws InterruptedException { if ( log.isDebugEnabled() ) log.debug( "wait="+wait ); JobResult ret = (JobResult) doneJobs.pull( wait ); if ( ret != null ) super.getJobResult( wait ); return ret; } COM: <s> get a job result </s>
funcom_train/23843977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildVisualizationViewer() { Layout<DMLTable, DMLComplete> layout = new TreeLayout<DMLTable, DMLComplete>(getGraph()); final VisualizationViewer<DMLTable, DMLComplete> vv = new VisualizationViewer<DMLTable, DMLComplete>(layout, new Dimension(myOpts.getGraphHeight(),myOpts.getGraphWidth())); setEdgeShapes(vv); setEdgeShapes(vv); setNodeTexts(vv); setNodeColors(vv); setNodeShapes(vv); setMouseFunctionality(vv); setViewer(vv); } COM: <s> main building method that incrementally builds the contained </s>
funcom_train/32831175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDifference_notEqualsInnerDifferentValues() { Difference result = reflectionComparator.getDifference(primitivesInnerA, primitivesInnerDifferentValue); Difference difference2 = getInnerDifference("intValue2", getInnerDifference("inner", result)); assertEquals(2, difference2.getLeftValue()); assertEquals(9999, difference2.getRightValue()); } COM: <s> test for objects with inner primitives that contain different values </s>
funcom_train/19746485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String computePostfix(boolean noExtension) { String mappingPostfix = Constants.ACTION_MAPPING; if (mappingPostfix.startsWith("*.")) { mappingPostfix = mappingPostfix.substring("*.".length()); } return (noExtension || GenericValidator.isBlankOrNull(mappingPostfix)) ? "" : "." + mappingPostfix; } COM: <s> computes a postfix for uri </s>
funcom_train/9218504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBatch(RequestScope request, Connection conn, String sql, Object[] parameters) throws SQLException { Batch batch = (Batch) request.getSession().getBatch(); if (batch == null) { batch = new Batch(); request.getSession().setBatch(batch); } batch.addBatch(request, conn, sql, parameters); } COM: <s> adds a statement to a batch </s>
funcom_train/23172977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillDataInXYSeries (XYSeries sLeft, XYSeries sRight, double valueBottom, Number valueLeft, Number valueRight) { sLeft.add (valueBottom, valueLeft); if (sRight != null) { sRight.add (valueBottom, valueRight); } } COM: <s> fills the specified data to the left and right xy series </s>
funcom_train/4716242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GMenu addMenu(GMenu menu) { MenuBarItem item = provider.createMenuBarItem(menu); GComponent view = item.getView(); addComponent(view); view.addMouseListener(this); menu.addActionListener(this); menuItems.put(view, item); return menu; } COM: <s> adds menu to the menu bar </s>
funcom_train/2582003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RegularTimePeriod previous() { Minute result; if (this.minute != FIRST_MINUTE_IN_HOUR) { result = new Minute(this.minute - 1, getHour()); } else { Hour h = (Hour) getHour().previous(); if (h != null) { result = new Minute(LAST_MINUTE_IN_HOUR, h); } else { result = null; } } return result; } COM: <s> returns the minute preceding this one </s>
funcom_train/2421077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveDeletedItemsInformation() throws XmlSavingException { IntegrationProjectLock.ensureLockHeld(); File deletedFile = new File(rootDirectory, projectFile.getProperty(ProjectFile.DELETED_INFO)); try { KongaIoUtils.createAndWrite(deletedFile, createDeletedItemsXml()); } catch (IOException e) { throw new XmlSavingException(e); } } COM: <s> saves information on what code integration entities code have been deleted from the </s>
funcom_train/8436697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addIntegerArgument(String name, boolean necessary) { if(arguments.containsKey(name) || !name.matches("\\w+")) throw new IllegalArgumentException("Argument " + name + " already exists or is not valid"); arguments.put(name, new DirectArgument(DirectArgument.ARG_INT)); if(necessary) necessaryArguments.add(name); } COM: <s> register an integer argument specifiable by name n </s>
funcom_train/8085239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getFlow() throws Exception { Vector v = new Vector(); Vector beans = BeanInstance.getBeanInstances(); Vector connections = BeanConnection.getConnections(); detachFromLayout(beans); v.add(beans); v.add(connections); SerializedObject so = new SerializedObject(v); Vector copy = (Vector)so.getObject(); // tempWrite(beans, connections); integrateFlow(beans, connections); return copy; } COM: <s> gets the current flow being edited </s>
funcom_train/5861778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public boolean remove(Object val) { final List l = new LinkedList(); boolean found = false; for (int j = 0; j < _ary.length; ++j) if (found || !Objects.equals(val, _ary[j])) l.add(_ary[j]); else found = true; if (found) _ary = (Object[])l.toArray((Object[]) Array.newInstance(_ary.getClass().getComponentType(), l.size())); return found; } COM: <s> removes an object </s>
funcom_train/36984312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public int blend(int c1, int c2, int mode) { switch (mode) { case BLEND: return blend_multiply(c1, c2); case ADD: return blend_add_pin(c1, c2); case SUBTRACT: return blend_sub_pin(c1, c2); case LIGHTEST: return blend_lightest(c1, c2); case DARKEST: return blend_darkest(c1, c2); case REPLACE: return c2; } return 0; } COM: <s> blend a two colors based on a particular mode </s>
funcom_train/10299312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireHelpSetAdded(Object source, HelpSet helpset){ Object[] listeners = listenerList.getListenerList(); HelpSetEvent e = null; for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == HelpSetListener.class) { if (e == null) { e = new HelpSetEvent(this, helpset, HelpSetEvent.HELPSET_ADDED); } ((HelpSetListener)listeners[i+1]).helpSetAdded(e); } } } COM: <s> fires a help set added event </s>
funcom_train/1731456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeScene(Node scene,OutputStream bin) throws IOException { myOut=new DataOutputStream(bin); sharedObjects.clear(); entireScene.clear(); totalShared=0; writeHeader(); findDuplicates(scene); entireScene.clear(); writeSpatial(scene); writeClosing(); myOut.close(); } COM: <s> converts a given node to j mes binary format </s>
funcom_train/18481267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCombineAlphaSource2(CombineColorSource combine_alpha_source2) { if (combine_alpha_source2 != this.combine_alpha_source2) { CombineColorSource old = this.combine_alpha_source2 ; this.combine_alpha_source2 = combine_alpha_source2 ; notifyChanged(COMBINEALPHASOURCE2,old,combine_alpha_source2) ; } } COM: <s> sets the combinesource for the alpha component for source 2 </s>
funcom_train/36615672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Table getFirstTable(Control control) { Table table = null; if (control != null) { if (control instanceof Composite) { if (((Composite) control).getChildren() != null && ((Composite) control).getChildren().length > 0) { SashForm form = (SashForm) ((Composite) control) .getChildren()[0]; if (form != null) table = (Table) form.getChildren()[0]; } } } return table; } COM: <s> the first table in result window </s>
funcom_train/894630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getThreadsPanel() { if (threadsPanel == null) { threadsPanel = new JPanel(); threadsPanel.setLayout(new BorderLayout()); threadsPanel.setBorder(BorderFactory.createTitledBorder(null, "Threads", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51))); threadsPanel.add(getThreadScrollPane(), BorderLayout.CENTER); } return threadsPanel; } COM: <s> this method initializes threads panel </s>
funcom_train/18743239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String parseText(String text) { String result; if (this.parsed) { try { result = parse(text); getErrorLabel().setText(null); } catch (FormatException e) { getErrorLabel().setText(e.getMessage()); result = null; } } else { result = text; } return result; } COM: <s> attempts to parse the given text </s>
funcom_train/46161888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getActualWidth() { // Calculate the size of the label text rendered with the specified font TextLayout layout = new TextLayout(getText(), drawFont, fontRenderContext); Rectangle2D b = layout.getBounds(); // Calculate the width of the label return (int) (b.getWidth()); } COM: <s> get the actual width of this text with respect to the current draw </s>
funcom_train/9765797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseEntered(MouseEvent e) { //System.out.println("Got focus"); if (e.getSource() == homePageLabel) { homePageLabel.setForeground(Color.BLUE); } else if (e.getSource() == emailLabel) { emailLabel.setForeground(Color.BLUE); } } COM: <s> invoked when the mouse enters a component </s>
funcom_train/15954380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAppendBoolean() throws BMLException{ String lsValue = "Good"; DataString ldString = new DataString(fBlank); ldString.setString(lsValue); boolean lBoolean = true; ldString.append(lBoolean); assertEquals("Goodtrue",ldString.toString()); } COM: <s> test of append method using boolean </s>
funcom_train/7607443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object first, Object second) { SortableIntersection one = (SortableIntersection) first; SortableIntersection other = (SortableIntersection) second; if ( one.edgeA < other.edgeA ) { return -1; } else if ( one.edgeA == other.edgeA ) { if ( one.distFromVertA < other.distFromVertA ) return -1; else if ( one.distFromVertA == other.distFromVertA && one.isIngoing ) return -1; } return 1; } COM: <s> compares two intersections </s>
funcom_train/45076694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTrait(Trait trait) { //cat.debug("Trait; name: \"" + trait.getName() + "\" value: \"" // + trait.getValue() + "\""); if (currentId != null) { addTrait(currentId, trait); } else { cat.error("currentId is not set to add trait to"); } } COM: <s> add trait to current id locally in prepration for storing </s>
funcom_train/22606024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void logError(IConfigurationElement element, String text) { IExtension extension = element.getDeclaringExtension(); StringBuffer buf = new StringBuffer(); buf .append("Plugin " + extension.getContributor().getName() + ", extension " + extension.getExtensionPointUniqueIdentifier());//$NON-NLS-2$//$NON-NLS-1$ buf.append("\n" + text);//$NON-NLS-1$ LogUtils.logError(getNamespace(), buf.toString(), null); } COM: <s> logs the error in the workbench log using the provided text and the </s>
funcom_train/44325513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object handleGetter(String paramName, Class returnType) { if ("currentstate".equals(paramName)) return fFsm.getCurrentState(); if ("rootstate".equals(paramName)) return fFsm.getRootState(); return super.handleGetter(paramName, returnType); } COM: <s> this method treats the following built in methods </s>
funcom_train/40621829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDateFormat(DateTimeFormat format) { if (format != formatter) { formatter = format; String cur = box.getText(); if (cur != null && cur.length() != 0) { try { box.setText(formatter.format(picker.getSelectedDate())); } catch (IllegalArgumentException e) { box.setText(""); } } } } COM: <s> sets the date format to the given format </s>
funcom_train/29282222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkResponseCode(Context context, long requestId, int responseCodeIndex) { Intent intent = new Intent(Common.ACTION_RESPONSE_CODE); intent.setClass(context, BillingService.class); intent.putExtra(Common.INAPP_REQUEST_ID, requestId); intent.putExtra(Common.INAPP_RESPONSE_CODE, responseCodeIndex); context.startService(intent); } COM: <s> this is called when android market sends a server response code </s>
funcom_train/3521641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { bar.setIndeterminate(true); bar.setStringPainted(true); bar.setStringPainted(true); //get space for the string bar.setString(""); bar.setValue(0); bar.setVisible(true); running = true; Container container = dialog.getContentPane(); container.setLayout(new BorderLayout()); container.add(new JLabel(displayText), BorderLayout.NORTH); container.add(bar, BorderLayout.SOUTH); dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); dialog.pack(); dialog.setLocationRelativeTo(parent); dialog.setVisible(true); } COM: <s> starts the animations </s>
funcom_train/1589265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPeriod(ReadableInstant start, ReadableInstant end) { if (start == end) { setPeriod(0L); } else { long startMillis = DateTimeUtils.getInstantMillis(start); long endMillis = DateTimeUtils.getInstantMillis(end); Chronology chrono = DateTimeUtils.getIntervalChronology(start, end); setPeriod(startMillis, endMillis, chrono); } } COM: <s> sets all the fields in one go from two instants representing an interval </s>
funcom_train/5433315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public short getDamage(Weapon w,boolean b) { for(int i=0;i<theDesign.theWeapons.length;i++) { if(theDesign.theWeapons[i].equals(w)) { short damage=w.damage; if(ammoLeft[i]>0 && theDesign.theAmmo[i].damage>damage) { damage=theDesign.theAmmo[i].damage; if(b) ammoLeft[i]--; } return damage; } } return 0; } COM: <s> find the damage done with the given weapon </s>
funcom_train/50152290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PopupOptionsView(String remtimes, String appointmentName, PopupOptionsListener popupOptionsListener) { super(); this.popupOptionsListener = popupOptionsListener; reminderTimesOnOffArray = remtimes.toCharArray(); initialize(appointmentName); // escape key closes window getRootPane().registerKeyboardAction(new ActionListener() { @Override public final void actionPerformed(ActionEvent e) { dispose(); } }, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); this.setTitle("Popup_Times"); pack(); this.setModal(true); } COM: <s> instantiates a new popup options view </s>
funcom_train/20844531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Service setService(LocalService service, HostedMData hosted) { Service oldService = this.service; this.service = service; if (service != null) { this.hosted = hosted; if (location == LOCATION_UNKNOWN) { location = LOCATION_LOCAL; // we know now, that the service is not remote DeviceServiceRegistry.removeServiceReferenceFromCache(this); } } else { announceServiceDisposed(this); } return oldService; } COM: <s> set local service replaces present service </s>
funcom_train/21437333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public ResidueType createSubstituent(String _name) { ResidueType ret = new ResidueType(); ret.name = _name; ret.superclass = "Substituent"; ret.is_cleavable = true; ret.nlinkages = 1; ret.linkage_pos = new char[] {'1'}; ret.can_redend = false; ret.can_parent = false; ret.description = _name; return ret; } COM: <s> create a generic substituent type with unspecified mass and name </s>
funcom_train/41594858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCellspacingPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StrucDocTable_cellspacing_feature"), getString("_UI_PropertyDescriptor_description", "_UI_StrucDocTable_cellspacing_feature", "_UI_StrucDocTable_type"), V3Package.eINSTANCE.getStrucDocTable_Cellspacing(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the cellspacing feature </s>
funcom_train/51763838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToExtractorList(IValueExtractor extractor, String filePath) { extractors.put(extractor.getName(), new ExtractorInfo( extractor, StringUtils.replace( StringUtils.replace(filePath, "${maven.build.dir}", mavenBuildDir), "${maven.docs.dest}", mavenDocsDest))); } COM: <s> helper method to add an extractor in the internal map </s>
funcom_train/41621246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTransform(int index, float value) { switch(index) { case 0: this.translation.setX(value); break; case 1: this.translation.setY(value); break; case 2: this.translation.setZ(value); break; case 3: this.orientation.x = value; break; case 4: this.orientation.y = value; break; case 5: this.orientation.z = value; this.processOrientation(); break; default: break; } } COM: <s> set one of the 6 transform values </s>
funcom_train/41612806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector match(Vector in) { if (preAssembler != null) { Enumeration e = in.elements(); while (e.hasMoreElements()) { preAssembler.workOn((Assembly) e.nextElement()); } } Vector out = elementClone(in); Vector s = in; // a working state while (!s.isEmpty()) { s = subparser.matchAndAssemble(s); add(out, s); } return out; } COM: <s> given a set of assemblies this method applies a preassembler </s>
funcom_train/44341767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOutcomeEdges(ArrayList vedges) { this.outcomeVEdges = vedges; ArrayList edges = new ArrayList(); VisualEdge vedge; for (Iterator i = vedges.iterator(); i.hasNext();) { vedge = (VisualEdge) i.next(); edges.add(vedge.getEdge()); } this.getNode().setOutcomeEdges(edges); } COM: <s> set the outcome visual edges linked to the current visual node </s>
funcom_train/20828522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createToolbar(){ JPanel panel = new JPanel(new BorderLayout()); panel.add(BorderLayout.CENTER, createStandardToolbar()); /* JLabel logoLabel = new JLabel(logo); logoLabel.setBorder(BorderFactory.createEmptyBorder(0,0,0,2)); panel.add(BorderLayout.EAST, logoLabel);*/ this.getContentPane().add(BorderLayout.NORTH, panel); } COM: <s> the panel for the toolbars </s>
funcom_train/17174814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFileContent(String arq) { String out = new String(); try { BufferedReader in = new BufferedReader(new FileReader(arq)); String line = in.readLine(); while ( line != null ) { line += "\n"; out += line; line = in.readLine(); } } catch (FileNotFoundException e) { fail("File not Found: " + arq); } catch (IOException e) { fail("I/O Error: " + arq); } return out; } COM: <s> this method returns a string representation of a file content </s>
funcom_train/10788293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean adjust(N x) { if (x == null) return false; if (x.doubleValue() < min.doubleValue()) { min = x; return true; } if (x.doubleValue() > max.doubleValue()) { max = x; return true; } return false; } COM: <s> adjusts this range by the given number </s>
funcom_train/37740341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String suspend () throws RemoteException { try { activity().suspend(); } catch (InvalidKeyException e) { logger.debug ("Referenced activity does not exist (ignored):" + e.getMessage()); } catch (InvalidControlOperationException e) { JSFUtil.addMessage (FacesMessage.SEVERITY_ERROR, L10N_MSGS, "cannotChangeState", null, e); } return null; } COM: <s> suspend the activity </s>
funcom_train/40336916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { final Button button = new Button("Click me!"); button.addClickListener(new ClickListener(){ public void onClick(Widget w) { handleClickOne(); } }); RootPanel.get().add(button); RootPanel.get().add(label); } COM: <s> the entry point method called automatically by loading a module </s>
funcom_train/10240620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String readFile(File file) throws IOException { FileReader fr = new FileReader(file); BufferedReader br = new BufferedReader(fr); StringBuffer buf = new StringBuffer(); String line = null; while ((line = br.readLine()) != null) { buf.append(line); } br.close(); return buf.toString(); } COM: <s> utility method to read the content of a file in a string </s>
funcom_train/3275910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setLoginVars () { //sendCommand("iset block 1"); //isBlockMode = true; sendCommand("set prompt", false); sendCommand("set style 12", false); sendCommand("iset ms 1", false); sendCommand("set interface " + INTERFACE_NAME, false); sendCommand("set bell 0", false); } COM: <s> sets variables this connection will use </s>
funcom_train/215191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void locateOnScreen(Component component) { Dimension paneSize = component.getSize(); Dimension screenSize = component.getToolkit().getScreenSize(); component.setLocation( (screenSize.width - paneSize.width) / 2, (screenSize.height - paneSize.height) / 2); } COM: <s> locates the given component on the screens center </s>
funcom_train/23999945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIterator() { Bag<String> instance = new Bag<String>(); instance.add("x"); Iterator<String> result = instance.iterator(); assertTrue(result.hasNext()); assertEquals("x",result.next()); assertFalse(result.hasNext()); } COM: <s> test of iterator method of class bag </s>
funcom_train/43479458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initDevices() { addDevice(PrototypeFactory.polar); addDevice(PrototypeFactory.elevation); if(new File(path).exists()){ try { File file = new File(path); FileInputStream fi = new FileInputStream(file); found.load(fi); fi.close(); Enumeration<Object> keys = found.keys(); while(keys.hasMoreElements()){ String dev = (String) keys.nextElement(); addDevice(dev); } System.out.println("found " + found.getProperty((String) selected)); deviceList.setSelectedItem(found.get(selected)); } catch (Exception e) { constants.error(e.getMessage(), this); } } } COM: <s> add devices that require com port mapping not searching </s>
funcom_train/5016609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printHelp() { CLIHelpFormatter formatter = new CLIHelpFormatter(); formatter.defaultSyntaxPrefix = I18N.translate("Usage")+": "; PrintWriter pw = new PrintWriter(out); formatter.printHelp(pw, 10000, appName, options, 4, 12); //formatter.printHelp(pw, HelpFormatter.DEFAULT_WIDTH, appName, "", options, 4, 8, "", true); pw.flush(); } COM: <s> print to output help usage text </s>
funcom_train/31357448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Set verifyDependencies(Set available) { // Variables Set waitSet; Iterator iterator; String capability; // Process Each Dependency waitSet = new HashSet(); iterator = dependencies.iterator(); while (iterator.hasNext() == true) { capability = (String) iterator.next(); if (available.contains(capability) == false) { waitSet.add(capability); } // if } // while // Finished, everything is available return waitSet; } // verifyDependencies() COM: <s> verify that a set of dependencies are available </s>
funcom_train/34709059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelWest() { if (jPanelWest == null) { jPanelWest = new JPanel(); jPanelWest.setLayout(new BorderLayout()); jPanelWest.setBorder(BorderFactory .createBevelBorder(BevelBorder.RAISED)); jPanelWest.add(getJPanelWestNorth(), BorderLayout.NORTH); jPanelWest.add(getJPanelWestCenter(), BorderLayout.CENTER); } return jPanelWest; } COM: <s> this method initializes j panel west </s>
funcom_train/41302417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration getRoots() { try { //#if applet //# return null; //#else return FileSystemRegistry.listRoots(); //#endif } catch (Exception e) { R.getErrorScreen().view(e, "FileSystem.getRoots", null); return null; } } COM: <s> return all root directories </s>
funcom_train/38735050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getItemsAsString(int itemType) { Map<String, ? extends FilteredItem> m = null; switch (itemType) { case FiltrableItems.NNSS: m = nnss; break; case FiltrableItems.LANG: m = languages; break; case FiltrableItems.ACTION: m = actions; break; case FiltrableItems.METHOD: m = methods; break; } return m.values().toString(); } COM: <s> gets a string resulting from the concatenation of the textual </s>
funcom_train/50490463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(final Rss rss) { synchronized (lock) { if (rss != null) { map.put(rss.getUrl(), rss); TimerTask serializeTask = new SerializeTask(); serializeTimer.schedule(serializeTask, RssConstants.PERSIST_DELAY_SECONDS * 1000); } } } COM: <s> places an rss object i the cache </s>
funcom_train/19544639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkParameters(List<Object> parameters) throws ParameterException { int pCount = parameters == null ? 0 : parameters.size(); if (pCount < minParameters || (maxParameters != UNLIMITED_PARAMETERS && parameters.size() > maxParameters)) throw new ParameterException(String.format("Invalid number of parameters %d, expected %s", pCount, formatExpectedParameterString())); } COM: <s> default implementation only checks count </s>
funcom_train/22929443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetOptionalString() { Command command = new Command("abc", array("123", "456")); assertEquals("123", "123", command.getOptionalString(0)); assertEquals("456", "456", command.getOptionalString(1)); assertEquals("null", null, command.getOptionalString(2)); } COM: <s> test the get optional string method </s>
funcom_train/46848666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void incrCount(Object key, double num) { normalized = false; WeightInfo wi = (WeightInfo) set.get(key); if (wi != null) { wi.count += num; } else { wi = new WeightInfo(num); } /* * update total by changing by the difference of the new count and old * count */ total += num; set.put(key, wi); } COM: <s> increment the count of a given key </s>
funcom_train/33914081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createPlayerScoreFrame() { setTitle("Spielstand"); setResizable(false); setLayout(null); mainPanel.setBackground(new Color(9, 5, 2)); this.add(mainPanel); this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); this.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent event) { frame.getGamePanel().hidePlayerScoreFrame(); } }); } COM: <s> create player score frame method which draws all the elements of the gui </s>
funcom_train/36012516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDefaultItemsTabContent(TabFolder folder) { TabItem defaultItemsTabItem = new TabItem(folder, SWT.NONE); String defaultItemsLabel = ReviewI18n .getString("ReviewIdEditDialog.label.tab.defaultItems"); defaultItemsTabItem.setText(defaultItemsLabel); defaultItemsTabItem.setControl(createDefaultItemsFolder(folder)); } COM: <s> creates the default items tab content in the code tab folder code </s>
funcom_train/28644581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object profile(ProceedingJoinPoint call) throws Throwable { StopWatch clock = new StopWatch(); try { clock.start(call.toLongString()); return call.proceed(); } finally { clock.stop(); logger.debug(getTarget(call) + " - " + clock.getTotalTimeSeconds() + " seconds"); } } COM: <s> performs profiling for a given joint point </s>
funcom_train/1342635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream out) throws HttpError, IOException { writeFirstLine(out); Iterator it = headers.values().iterator(); while (it.hasNext()) { HeaderItem item = (HeaderItem) it.next(); if (item != null) { out.write( (item.getKey() + ": " + item.getValue() + CR).getBytes()); } } // another CRLF for end of header out.write(CR.getBytes()); } COM: <s> writes http header to an output stream </s>