__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/14615406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean connectionOk() throws TemplateException { if( directoryRoot == null ) { throw new TemplateException( "Root directory is not defined" ); } if(!directoryRoot.isDirectory()) { throw new TemplateException( '\"' + directoryRoot.getAbsolutePath() + "\" is not a directory or does not exist" ); } return true; } COM: <s> corresponds to check cache dir for file system implementations </s>
funcom_train/3425371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset () { super.reset (); // get state of namespace-declarations parameter. fNamespaceDeclarations = fConfiguration.getFeature(Constants.DOM_NAMESPACE_DECLARATIONS); // DOM Filter if (fSkippedElemStack!=null) { fSkippedElemStack.removeAllElements (); } fSchemaLocations.clear (); fRejectedElement.clear (); fFilterReject = false; fSchemaType = null; } // reset() COM: <s> resets the parser state </s>
funcom_train/50176521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToSpace(Space space, Located obj) { Located first = space.getFirstInSpace(); if (first != null) { final Located prev = first.getPrevInSpace(); // last in list prev.setNextInSpace(obj); obj.setPrevInSpace(prev); } else { space.setFirstInSpace(obj); first = obj; } first.setPrevInSpace(obj); //backward list should be without nulls! obj.setNextInSpace(null); // forward list finished on null! obj.setLocation(space); } COM: <s> code snippet from relocate fn </s>
funcom_train/49535820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addParam(java.util.Date x) { Logger.debug(this, "db.addParam " + paramList.size() + " (date): " + x); HashMap<String, Object> param = new HashMap<String, Object>(); param.put(inputValueKey, new Timestamp(x.getTime())); paramList.add(paramList.size(), param); } COM: <s> adds a date parameter to the prepared sql statement </s>
funcom_train/9885132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getKruscalFunction() { String function = "kruskalFunction<-function(){\n"+ "options(warn=-1);\n"+ "numRows<-nrow(m); numCols<-ncol(m); result<-list();\n"+ "for(row in 1:numRows) {\n"+ "result[[row]]<-kruskal.test(m[row, ], groups);\n"+ "}\n"+ "return(result);\n"+ "}"; return function; } COM: <s> constructs an r expression to execute kruskal </s>
funcom_train/37080850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTranslationStartAndStop(Transcript trans, ChadoCds cds) { boolean calculateEnd = false; boolean retval = trans.setTranslationStart(cds.getStart(),calculateEnd); if (!retval) { logger.error("setTranslationStart(" + cds.getStart() + ", false) failed for " + trans); } trans.setTranslationEnd(cds.getTranslationEnd()); } COM: <s> explicitly set translation start and stop from cds </s>
funcom_train/31906278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void firePropertiesChangedEvent(Element target, int[] props) { CSSEngineListener[] ll = (CSSEngineListener[])listeners.toArray(LISTENER_ARRAY); int len = ll.length; if (len > 0) { CSSEngineEvent evt = new CSSEngineEvent(this, target, props); for (int i = 0; i < len; i++) { ll[i].propertiesChanged(evt); } } } COM: <s> fires a cssengine event given a list of modified properties </s>
funcom_train/19657965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Role getCurrentUserRole() { User currentUser = getCurrentUser(); if (null == currentUser) { return null; } Iterator<Role> it = currentUser.getRoles().iterator(); if (it.hasNext()) { return it.next(); } return null; } COM: <s> add by busfly 2009 4 10 0 05 31 </s>
funcom_train/50385501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addCryptoAttributes() { X509Certificate x509 = cert.getCert(); addAttribute("Subject DN", x509.getSubjectDN().getName(), defaultAttributeImg); addAttribute("Issuer DN", x509.getIssuerDN().getName(), defaultAttributeImg); addAttribute("signature algorithm", x509.getSigAlgName(), defaultAttributeImg); addAttribute("public key", getPublicKeyString(), defaultAttributeImg); } COM: <s> this method builds the version 1 fields for the table of the details </s>
funcom_train/37648748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddRule1() throws RuleSetNotFoundException { try { RuleSet rs = new RuleSet(); Rule rule = new Rule(); rule.setPmdRule(TestManager.getRule(0)); rs.addRule(rule); } catch (IllegalArgumentException e) { fail("adding any rule object is legal !"); } } COM: <s> adding a rule </s>
funcom_train/100752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initButtons() { // cancel == close cancel = Builder.makeButton("general.cancel"); cancel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { dispose(); } }); // ok == apply ok = Builder.makeButton("general.ok"); ok.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { // nothing to do? if (r.equals(s.getRange())) { dispose(); return; } if(applyTruncation()) dispose(); } }); } COM: <s> set up our button behaviors </s>
funcom_train/3175746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getForeignDisplayValue() { Entity entity = getEntity(); Property parent = getParent(); String by = parent!=entity ? entity.toString() + " - " + parent.getPropertyName() : entity.toString(); return resources.getString("foreign.xref", by); } COM: <s> returns a display value to be shown on the foreign end this </s>
funcom_train/7669995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInternationalCurrencySymbol(String value) { if (value == null) { currency = null; intlCurrencySymbol = null; return; } if (value.equals(intlCurrencySymbol)) { return; } try { currency = Currency.getInstance(value); currencySymbol = currency.getSymbol(locale); } catch (IllegalArgumentException e) { currency = null; } intlCurrencySymbol = value; } COM: <s> sets the international currency symbol </s>
funcom_train/17396266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DMAPParameter findParamByTag(String tag, boolean recurse) { tag = tag.toLowerCase(); for (DMAPParameter tmpParam : params) if (tmpParam.getTag().toLowerCase().equals(tag)) return tmpParam; else if ((recurse == true) && (tmpParam instanceof ParameterList)) if ((tmpParam = ((ParameterList) tmpParam) .findParamByTag(tag, true)) != null) return tmpParam; return null; } COM: <s> searches for the specified tag optionally recursively in the list </s>
funcom_train/7298516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getVolume() { try { CAMemoryObject propVal = new CAMemoryObject(4, true); dev.getOutputProperty(1, AHConstants.kAudioDevicePropertyVolumeScalar, propVal); return propVal.getFloatAt(0); } catch (Exception ex) { System.out.println("unable to get the volume"); System.out.println(ex.getMessage()); ex.printStackTrace(); return 0f; } } COM: <s> gets the volume attribute of the mac osxvolume object </s>
funcom_train/11433909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PolicyReference getPolicyReference(Element element) { if (!Constants.ELEM_POLICY_REF.equals(element.getLocalName())) { throw new PolicyException(new Message("NOT_A_POLICYREF_ELEMENT_EXC", BUNDLE)); } synchronized (element) { PolicyReference reference = new PolicyReference(); reference.setURI(element.getAttribute("URI")); return reference; } } COM: <s> creates a policy reference object from a dom element </s>
funcom_train/44869337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private WCMDrawGeometricBean getAveRect() { if (aveRect == null) { aveRect = new WCMDrawGeometricBean(); aveRect.setShape(WCMDrawGeometricBean.RECT_ABSOLUTE); aveRect.setFillColor(new Color(255, 0, 0, 100)); aveRect.setX1(getTStartInput()); aveRect.setX2(getEndingTInput()); aveRect.setY2(getAveValue()); aveRect.setY1(new Constant(0)); aveRect.setVisible(false); } return aveRect; } COM: <s> this method initializes ave rect </s>
funcom_train/27937062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putAll(Map<A,B> t) { Iterator<Map.Entry<A,B>> i = t.entrySet().iterator(); while (i.hasNext()) { Map.Entry<A,B> e = i.next(); put(e.getKey(), e.getValue()); } } COM: <s> copies all of the mappings from the specified map to this one </s>
funcom_train/19081791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean saveCurrentDeck() { if (isNew || Configuration.getString("decks.deck(0)", "").length() == 0 && MToolKit.getDeckFile(this, JFileChooser.SAVE_DIALOG) == null) { return false; } return MSaveDeck.saveDeck(Configuration.getString("decks.deck(0)"), rightListModel.getCards(), form); } COM: <s> save the current deck </s>
funcom_train/3102745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int indexOfRegex(final String text, final int begin, final int end, final String pattern) { Assertion.valid(text); Assertion.nonNegative(begin); Assertion.greater(end, begin - 1); Assertion.less(end, text.length() + 1); Assertion.valid(pattern); final int length= pattern.length(); final int max= end - length; for (int index= begin; index <= max; ++index) { if (regionMatches(text, index, pattern, 0, length)) { return index; } } return -1; } COM: <s> returns the index of the first occurrence of the wildcard pattern in the </s>
funcom_train/29691417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItem() { if (jMenuItem == null) { jMenuItem = new JMenuItem(); jMenuItem.setText("Alarm Config"); jMenuItem.setFont(new Font("Dialog", Font.PLAIN, 10)); jMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { chooseFile(ALARM_MUSIC_FILE); } }); } return jMenuItem; } COM: <s> this method initializes j menu item </s>
funcom_train/23327972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void _initWs() { cocoonService = (Rpc2ZipAsync) GWT.create(Rpc2Zip.class); ServiceDefTarget endpoint = (ServiceDefTarget) cocoonService; String moduleRelativeURL = GWT.getModuleBaseURL() + PropertyProvider.getInstance().getText("RPC2ZIP"); endpoint.setServiceEntryPoint(moduleRelativeURL); } COM: <s> init ws backend </s>
funcom_train/39180164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TypeData getTypeData(String setName, String type){ Map setMap = (Map)typeDataMap.get(setName); if(setMap != null) return (TypeData)setMap.get(type); else return null; }// protected TypeData getTypeData(String setName, String type) COM: <s> gets the data related to a given annotation type </s>
funcom_train/1879913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void windowMouse(GWinApplet appc, GWinData data, MouseEvent event){ MyWinData data2 = (MyWinData)data; switch(event.getID()){ case MouseEvent.MOUSE_PRESSED: data2.sx = data2.ex = appc.mouseX; data2.sy = data2.ey = appc.mouseY; data2.done = false; break; case MouseEvent.MOUSE_RELEASED: data2.ex = appc.mouseX; data2.ey = appc.mouseY; data2.done = true; break; case MouseEvent.MOUSE_DRAGGED: data2.ex = appc.mouseX; data2.ey = appc.mouseY; break; } } COM: <s> handles mouse events for all gwindow objects </s>
funcom_train/1720040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object call(String method, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) throws XMLRPCException { Object[] params = { p0, p1, p2, p3, p4, p5, }; return callXMLRPC(method, params); } COM: <s> convenience method call with six parameters </s>
funcom_train/25523458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processChatMessage(Message message) { // Ignore invalid messages. if(message.getMessage() == null || message.getMessage().length() <= 0) return; // Send the message to the public channel. getPublicChannel().receiveMessage(message); // Set the channel icon if it was not focused. mainWindow.setTabIconForChannel(getPublicChannel(), Resources.ICON_PENDING_MESSAGES, true); } COM: <s> process a public chat message </s>
funcom_train/3525075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDocument(Document newDoc) { if (getDocument() instanceof MDocument) ((MDocument)getDocument()).removeEnableListener(this); super.setDocument(newDoc); if (newDoc instanceof MDocument) ((MDocument)newDoc).addEnableListener(this); } COM: <s> binds this mtext field to the given document </s>
funcom_train/46190016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBlogForDay() { Day day = blog.getBlogForDay(2003, 7, 14); assertNotNull(day); assertEquals(2003, day.getMonth().getYear().getYear()); assertEquals(7, day.getMonth().getMonth()); assertEquals(14, day.getDay()); } COM: <s> tests that we can get a day instance </s>
funcom_train/48338245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate() throws TupleException { super.validate(); if (null == ident ) { throw new InvalidTupleException("Null ident for move request (" + this + ")"); } if (null == location) { throw new InvalidTupleException("Null location for move request (" + this + ")"); } } COM: <s> validate this move request </s>
funcom_train/22447837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent evt) { String cmd = evt.getActionCommand(); if( Settings.debug ){ System.out.println( "PrngControl <-- " + cmd ); } if( cmd.equalsIgnoreCase("bbs") || cmd.equalsIgnoreCase("random") || cmd.equalsIgnoreCase("securerandom") || cmd.equalsIgnoreCase("x917") ){ // selection of what PRNG to use prngModel.setPrngName( cmd ); } } COM: <s> executes the action specified by command </s>
funcom_train/51226168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDBSystemDir() { // Decide on the db system directory: <userhome>/.addressbook/ String userHomeDir = System.getProperty("user.home", "."); String systemDir = userHomeDir + "/.bassdb"; // Set the db system directory. System.setProperty("derby.system.home", systemDir); //System.out.println("Embedded DB System Directory Set."); ss.appendToLog("Embedded DB System Directory Set."); ss.increaseProgress(1000); } COM: <s> sets the directory for the embedded db </s>
funcom_train/25971442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseLine(String data) throws Exception { int indexOf = data.indexOf(':'); if (indexOf == -1) { throw new Exception("Not a proper line '" + data + "'"); } String header = data.substring(0, indexOf).trim(); String value = data.substring(indexOf + 1, data.length()).trim(); this.headers.put(header, value); } COM: <s> it parses the line based on the </s>
funcom_train/14273314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInstantmassengers(java.lang.String newValue[]) { long FLAG; for (int i = 0; i < MAX_INSTANTMESSENGERS; i++) { String tmpstr = null; if (i >= newValue.length) { tmpstr = null; } else { tmpstr = newValue[i]; } switch (i) { case 0: FLAG = IM1_FLAG; break; case 1: FLAG = IM2_FLAG; break; default: FLAG = IM1_FLAG; } setFlags(FLAG, tmpstr != null); this.instantmessengers[i] = tmpstr; } } // end-method COM: <s> set the instantmassenger data array to the specified value </s>
funcom_train/40680548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double totalCount() { if (currentModCount != cacheModCount) { double total = 0.0; for (Map.Entry<K, Counter<V>> entry : counterMap.entrySet()) { Counter<V> counter = entry.getValue(); total += counter.totalCount(); } cacheTotalCount = total; cacheModCount = currentModCount; } return cacheTotalCount; } COM: <s> returns the total of all counts in sub counters </s>
funcom_train/18453544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void putWord(String word) { totalWords++; String code = getCode(word); List<String> list = bytesToList(code); if (list != null) { list.add(word); } else { list = new Vector<String>(); list.add(word); mainDictionary.put(code, list); } } COM: <s> allocates a word in the dictionary </s>
funcom_train/14638483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(InputPort reader, Environment env) throws GleamException { // read Entity obj, val; while ((obj = reader.read()) != Eof.makeEof()) { // eval gleam.util.Log.record(4, "load: read object", obj); val = eval(obj, env); gleam.util.Log.record(4, "load: result is", val); } } COM: <s> loads and executes a gleam scheme program from a stream </s>
funcom_train/5419899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public int findWordId(Session s , String word ) throws HibernateException { String query = "SELECT w.wordId FROM Word w WHERE w.word = ?"; Iterator it = s.find( query , word , Hibernate.STRING ).iterator(); if( !it.hasNext() ) return -1; else return ((Integer)it.next()).intValue(); } COM: <s> search the identifier of a word </s>
funcom_train/22178519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void create() { super.create(); getShell().setText(I18nEditor.bind(I18nEditor.povray_doc_selector_dialog_title, keyword)); getShell().setImage(PovClipseEditorPlugin.getDefault().getImageRegistry().get(PovClipseEditorPlugin.IMAGE_LOGO_POVCLIPSE)); setDefaultImage(PovClipseEditorPlugin.getDefault().getImageRegistry().get(PovClipseEditorPlugin.IMAGE_LOGO_POVCLIPSE)); } COM: <s> sets the dialog title and image </s>
funcom_train/3839963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void roomChangedState(RoomGeneric rg) { String roomname = rg.getRoomInformation().getName(); RoomInformation.State newstate = rg.getRoomInformation().getState(); int i; String player; for (i = 0; i < _hallUsers.size(); i++) { player = _hallUsers.elementAt(i); _playername_clientchannel.get(player) .sendHallGameChangedState(rg); } _nlogger.debug("Room <" + roomname + "> -> " + newstate); } COM: <s> sends a notification to hall users that a game state changed </s>
funcom_train/50864733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ManufacturePanel getManufacturePanel(ManufactureProcess process) { ManufacturePanel result = null; for (int x = 0; x < processListPane.getComponentCount(); x++) { Component component = processListPane.getComponent(x); if (component instanceof ManufacturePanel) { ManufacturePanel panel = (ManufacturePanel) component; if (panel.getManufactureProcess().equals(process)) result = panel; } } return result; } COM: <s> gets the panel for a manufacture process </s>
funcom_train/3563128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDataSet(Long dataSetID) throws DbException { NVPair[] parms; parms = new NVPair[1]; parms[0] = new NVPair("dataSetID", dataSetID.toString()); simpleRequest(REMOVE_DATA_SET_PAGE, "Cannot remove data set", parms); } COM: <s> deletes a data set </s>
funcom_train/6406541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCamera(final Camera camera) { // Check that this isn't the same camera to avoid unnecessary work. if (camera == this.camera) return; if (camera instanceof JOGLCamera) { this.camera = (JOGLCamera) camera; // Update dimensions for the newly associated camera and apply the // changes. ((JOGLCamera) this.camera).resize(width, height, true); this.camera.apply(); } } COM: <s> code set camera code sets the camera this renderer is using </s>
funcom_train/11648696
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void assertAuthorized(MethodInvocation methodInvocation) throws AuthorizationException { //default implementation just ensures no deny votes are cast: Collection<AuthorizingAnnotationMethodInterceptor> aamis = getMethodInterceptors(); if (aamis != null && !aamis.isEmpty()) { for (AuthorizingAnnotationMethodInterceptor aami : aamis) { if (aami.supports(methodInvocation)) { aami.assertAuthorized(methodInvocation); } } } } COM: <s> iterates over the internal </s>
funcom_train/37830473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getMaximalAmount(final String productName, final Player player) { int maxAmount = Integer.MAX_VALUE; for (final Map.Entry<String, Integer> entry : getRequiredResourcesPerProduct(productName).entrySet()) { final int limitationByThisResource = player.getNumberOfEquipped(entry.getKey()) / entry.getValue(); maxAmount = Math.min(maxAmount, limitationByThisResource); } return maxAmount; } COM: <s> at the time the order is made </s>
funcom_train/28657333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setShowClock(int value) throws CameraException { if ((value >= 0) && (value < showclock.length)) { valueShowClock = value; } else { throw new CameraException( java.util.ResourceBundle.getBundle("lang/Languages").getString("invalid_image_parameter_selection")); } } COM: <s> sets the value for the showclock </s>
funcom_train/31529432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(Object pValue) { Object _oldValue = super.getValue(); if(pValue == _oldValue) return; if(pValue != null && _oldValue !=null && pValue.equals(_oldValue)) return; super.setValue(pValue); } COM: <s> set the value of this property </s>
funcom_train/16380253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDescriptionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new UnsettablePropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ComplexTaskDefType_description_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ComplexTaskDefType_description_feature", "_UI_ComplexTaskDefType_type"), CTEPackage.Literals.COMPLEX_TASK_DEF_TYPE__DESCRIPTION, true, true, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the description feature </s>
funcom_train/17203688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCellAppearancesToWorkList(DF_LatticeCell cell) { for (Enumeration<DF_Equation> e = getEquations(); e.hasMoreElements();) { DF_Equation eq = e.nextElement(); if (eq.hasCell(cell)) { addToWorkList(eq); } } } COM: <s> add all equations which contain a given cell to the work list </s>
funcom_train/5602034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PyObject nextElement(PyObject pyIter) { PyObject element = null; try { element = pyIter.__iternext__();//next(); } catch (PyException pyEx) { if (pyEx.match(Py.StopIteration)) { // store exception - will be used by PyIterator.next() stopException = pyEx; } else { throw pyEx; } } return element; } COM: <s> returns the next element from an iterator </s>
funcom_train/19305820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int countSpaces() { int spaceCount = 0; final CharSequence text = this.getText(); /* Cache the length to avoid recomputing it on every iteration. */ final int length = text.length(); for (int i = 0; i < length; i++) { final char c = text.charAt(i); if (wordSpacingApplies(c)) { spaceCount ++; } } return spaceCount; } COM: <s> counts the number of space like characters in this text that should be </s>
funcom_train/44596395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void safeResolve(ASTNode node) { try { node.accept(this); } catch (Throwable e) { // FIXME - we need location information here - and maybe a dialog for ui systems reportProblem(Problems.INTERNAL_EXCEPTION,"typechecking",e,Problems.exceptionStack(e)); } } COM: <s> the call that initiates the actual walking of the tree with a </s>
funcom_train/22968464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MetaProperty getMetaViewProperty(String name) throws XavaException { if (metaViewProperties == null) throw new ElementNotFoundException("view_property_not_found", name, getName(), getModelName()); MetaProperty p = (MetaProperty) metaViewProperties.get(name); if (p == null) throw new ElementNotFoundException("view_property_not_found", name, getName(), getModelName()); return p; } COM: <s> property only of the view not in model </s>
funcom_train/44713113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getUpdateCount() throws SQLException { if (!m_closeAfterUse) { return doGetUpdateCount(); } else { if (!m_lastUpdateCountCurrent) { m_lastUpdateCount = doGetUpdateCount(); m_lastUpdateCountCurrent = true; close(); } return m_lastUpdateCount; } } COM: <s> returns the current result as an update count if the result </s>
funcom_train/40409536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDownloadReport_nonGzNonexistent() throws IOException { try { new ReportUtils(reportService, -1).downloadReport(true, "test_data/output.xml.gz"); } catch (ApiException e) { assertEquals(e.getCode(), OBJECT_DOES_NOT_EXIST_CODE); } } COM: <s> tests downloading a nonexistent non gzipped report </s>
funcom_train/48184124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prepScorer(File tmpDir, int foldNum, File trainFile, File testFile) throws IOException { // write fold spec file writeFoldSpecFile(tmpDir, foldNum); // do rest much like standard n-gram scorers super.prepScorer(tmpDir, foldNum, trainFile, testFile); } COM: <s> prepares a scoring model from the training data </s>
funcom_train/22783271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show(FullScreenView fullScreen, int index, Point pos) { this.fullscreen = fullScreen; if (fullScreen.isVisible()) { ViewControl control = SwingClient.getInstance().getViewControl(); // set selection to current element ListSelectionModel model = control.getSelectionModel(); model.setSelectionInterval(index, index); // open popup show(fullscreen, pos.x, pos.y); } } COM: <s> this will show the context menu </s>
funcom_train/8805384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWiiButtonListener() { wiiDevice.addButtonListener(new ButtonListener() { public void buttonPressReceived(ButtonPressedEvent evt) { System.out.println("buttonPressed: "+evt.getButton()); } public void buttonReleaseReceived(ButtonReleasedEvent evt) { System.out.println("buttonReceived: "+evt.getButton()); }}); } COM: <s> this device listens to a wii button event </s>
funcom_train/7440514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAdvanceIndex() throws ServletException, IOException { assertEquals(AdvanceController.RETURN + ".index", invoke("/inters2/advance")); assertNull(request.getAttribute(SimpleInterceptor.AFTER_COMPLETION)); assertNull(request.getAttribute(AdvanceInterceptor.AFTER_COMPLETION)); } COM: <s> inters2 advance intercepted none </s>
funcom_train/24646013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean write(WriteOrUpdateCommand command) throws PersistenceException { try { Session session = this.connector.getSessionFactory().openSession(); Transaction tx = session.beginTransaction(); session.saveOrUpdate(command.getObject()); tx.commit(); this.sessionList.add(session); session.close(); return true; } catch (HibernateException e) { e.printStackTrace(); throw new PersistenceException("Problems while inserting new data to database.", e); } } COM: <s> performs a save or update operation on the db </s>
funcom_train/13514773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Lsn put(LogRecord data, int flags) throws ChaiDBException { Lsn result; if (flags == LOG_CHECKPOINT) { synchronized (this) { result = _putCheckPoint(data); }//sync } else { TransactionImpl txn = txnMgr.getTxn(data.getTxnId()); synchronized (this) { result = _put(flags, data, txn); }//sync } return result; } COM: <s> put a log record to log write buffer if buffer get into threshold </s>
funcom_train/43188825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean doConfigure() { if (!doConfigure1()) return false; // The indices to the connector names, tracks, and track controls // should all correspond to each other. String names[] = source.getOutputConnectorNames(); trackControls = new BasicTrackControl[tracks.length]; for (int i = 0; i < tracks.length; i++) { trackControls[i] = new PlayerTControl(this, tracks[i], source.getOutputConnector(names[i])); } return doConfigure2(); } COM: <s> configuring the engine </s>
funcom_train/21954495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getBackgroundSelectionColor() { MainPanel mp = Pooka.getMainPanel(); if (mp != null) { FolderPanel fp = mp.getFolderPanel(); if (fp != null) { javax.swing.plaf.metal.MetalTheme currentTheme = fp .getCurrentTheme(); if (currentTheme != null) { return currentTheme.getTextHighlightColor(); } } } return super.getBackgroundSelectionColor(); } COM: <s> returns the color to use for the background if node is selected </s>
funcom_train/14273730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GregorianCalendar readCalendarCell(JSCSVCell node) throws java.text.ParseException { DateFormat df = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.FULL); GregorianCalendar tmpcal = new GregorianCalendar(java.util.TimeZone.getDefault(), java.util.Locale.getDefault()); tmpcal.setTime(df.parse(node.getValue())); return tmpcal; } // end-method COM: <s> get gregorian calendar value of node jscsvcell object </s>
funcom_train/27746709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLineFont(GC gc, FontData currentFont, int style) { if (currentFont.getStyle() != style) { if (style == SWT.BOLD) { currentFont.setStyle(style); gc.setFont(boldFont); } else if (style == SWT.NORMAL) { currentFont.setStyle(style); gc.setFont(regularFont); } } } COM: <s> sets the font of the specified gc if it is not already set </s>
funcom_train/36109177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setID(int blockId){ this.blockID = blockId; if(getJavaModule() instanceof ParameterSolverJavaModule){ ParameterSolverJavaModule module = (ParameterSolverJavaModule)getJavaModule(); module.setBlockID(blockId); module.setAllParameters(getInputOutputParatemeters()[0]);//there "parameters" means only input parameters } } COM: <s> used only if java module </s>
funcom_train/25520798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream openInputStream() throws IOException { if (isClosed) { throw new IOException("RFCOMM Connection is already closed"); } else { if (in == null) { in = new BluetoothRFCommInputStream(this); return in; } else if (in.isClosed()) { throw new IOException("Stream cannot be reopened"); } else { throw new IOException("Another InputStream already opened"); } } } COM: <s> open and return an input stream for a connection </s>
funcom_train/8084763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Vector getIDsForBeanInstances(Vector beans) { Vector result; int i; int pos; result = new Vector(); for (i = 0; i < beans.size(); i++) { pos = m_BeanInstances.indexOf(beans.get(i)); result.add(m_BeanInstancesID.get(pos)); } return result; } COM: <s> returns the ids for the given bean instances i </s>
funcom_train/7644317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean get(int pos) { if (pos >= 0) { if (pos < bits.length * ELM_SIZE) { return (bits[pos / ELM_SIZE] & (1L << (pos % ELM_SIZE))) != 0; } return false; } throw new IndexOutOfBoundsException("Negative index specified"); } COM: <s> retrieve the bit at index pos </s>
funcom_train/20875045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearOnlineSectioningInfos() { for (Offering offering : iOfferings) { for (Config config : offering.getConfigs()) { for (Subpart subpart : config.getSubparts()) { for (Section section : subpart.getSections()) { section.setSpaceExpected(0); section.setSpaceHeld(0); } } } } } COM: <s> empty online student sectioning infos for all sections see </s>
funcom_train/15878431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopTransferProcessing( NetworkConnection peer_connection ) { if( peer_connection.isLANLocal() ) { lan_upload_processor.deregisterPeerConnection( peer_connection ); lan_download_processor.deregisterPeerConnection( peer_connection ); } else { upload_processor.deregisterPeerConnection( peer_connection ); download_processor.deregisterPeerConnection( peer_connection ); } } COM: <s> cancel network upload and download handling for the given connection </s>
funcom_train/8880899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isXSDConfigFile(String jarFileName, String fileName, JarFile jarFile, JarEntry jarEntry) { if (! fileName.endsWith(".xsd")) return false; Element rootElement = loadRootElementOfTheFile(jarFileName, fileName, jarFile, jarEntry); return rootElement.getName().equals("schema"); } COM: <s> checks whether the file is xml schema definition file </s>
funcom_train/10833366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTransform(String transformURI) throws TransformationException { try { if (log.isDebugEnabled()) { log.debug("Transforms.addTransform(" + transformURI + ")"); } Transform transform = new Transform(this.doc, transformURI); this.addTransform(transform); } catch (InvalidTransformException ex) { throw new TransformationException("empty", ex); } } COM: <s> adds the code transform code with the specified code transform </s>
funcom_train/44147241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void waitFor(double id){ //find a thread in a hashtable Double key = new Double(id); FinishThread thread = ((TableInfo) done_table.get(key)).thread; //if thread found then wait for it to die if(thread != null){ try{ thread.join(); }catch(InterruptedException ex){} done_table.remove(key); } return; } COM: <s> wait for a job with id to finish </s>
funcom_train/2760013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Converter createToEnumConverter(final Class fromType, final Class toType) { return new Converter() { public Class getFromClass() { return fromType; } public Class getToClass() { return toType; } public boolean init(net.sf.mapifier.core.conv.TypeConverter converter, Class fromType, Class toType) { return false; } public Object convert(Object enumValue) { return Enum.valueOf(toType, (String)enumValue); } }; } COM: <s> creates an enum converter that converts to the enum value from the </s>
funcom_train/28750643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setForgroup(Long newVal) { if ((newVal != null && this.forgroup != null && (newVal.compareTo(this.forgroup) == 0)) || (newVal == null && this.forgroup == null && forgroup_is_initialized)) { return; } this.forgroup = newVal; forgroup_is_modified = true; forgroup_is_initialized = true; } COM: <s> setter method for forgroup </s>
funcom_train/3168943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Heaper fetch() { throw new UnsupportedOperationException(); // MarkM.shouldImplement(); // return null // /* fodder */; /* udanax-top.st:55068:RealStepper methodsFor: 'operations'! {Heaper wimpy} fetch "If I am exhausted (i.e., if (!! this->hasValue())), then return NULL. Else return current element. I return wimpily since most items returned are held by collections. If I create a new object, I should cache it." MarkM shouldImplement. ^NULL "fodder"! */ } COM: <s> if i am exhausted i </s>
funcom_train/39314082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFamilies(){ GraphicsEnvironment env = GraphicsEnvironment. getLocalGraphicsEnvironment(); family_list = env.getAvailableFontFamilyNames(); /*FAULT:: family_list = new String[10]; */ for(int i = 0; i < family_list.length; i++){ families.addItem(family_list[i]); } } COM: <s> detects and adds all local platforms font families to families jcombo box </s>
funcom_train/50157951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getValidationReport () { String rpt = FindAndReplace.replace (validationReport, "\n", "<br>", false); String pattern = "NOT VALID:"; if (rpt.indexOf(pattern) == 0) rpt = "<b>" + pattern +"</b><br>" + rpt.substring(pattern.length()); return rpt; } COM: <s> format the validation report for browser display </s>
funcom_train/48407541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSubsettedPropertyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Property_subsettedProperty_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Property_subsettedProperty_feature", "_UI_Property_type"), SpemxtcompletePackage.eINSTANCE.getProperty_SubsettedProperty(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the subsetted property feature </s>
funcom_train/2730772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJOK() { if (jOK == null) { jOK = new JButton(); jOK.setBounds(new Rectangle(243, 169, 76, 31)); jOK.setEnabled(false); jOK.setText("OK"); jOK.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { onClickedOK(); } }); } return jOK; } COM: <s> this method initializes j ok </s>
funcom_train/9799627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fatalError(SAXParseException e) throws SAXException { String message = "** Parsing error" + ", line " + e.getLineNumber() + ", uri " + e.getSystemId() + "\n" + e.getMessage(); Exception err = new Exception(message); recordError(err); } COM: <s> sax callback for fatal errors </s>
funcom_train/22053385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void menuItemSimpleTableView_actionPerformed(ActionEvent e) { Misc.debug(this, "View the data in a table."); new org.jma.birmail.table.DataManagerTable(this, GetDataType(), BirMail. getDatabase().GetManager(GetDataType())). show(); } COM: <s> menu view the data in a table </s>
funcom_train/38628632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBounds(final int max, final int deadbandMax, final int center, final int deadbandMin, final int min) { m_maxPwm = max; m_deadbandMaxPwm = deadbandMax; m_centerPwm = center; m_deadbandMinPwm = deadbandMin; m_minPwm = min; } COM: <s> set the bounds on the pwm values </s>
funcom_train/19072847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isConvergence(Matrix aMatrix) { for(int r = 0; r < aMatrix.getM_rows(); r++) { for(int c = 0; c < aMatrix.getM_cols(); c++) { if(Math.abs(aMatrix.delta[r][c]) > size) { return false; } } } return true; } COM: <s> checks if the weights or biases have converged i </s>
funcom_train/2680729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTokenPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ComputationParameter_token_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ComputationParameter_token_feature", "_UI_ComputationParameter_type"), ModelPackage.Literals.COMPUTATION_PARAMETER__TOKEN, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the token feature </s>
funcom_train/39177541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { executor.shutdown(); while(!executor.isTerminated()) { try { executor.awaitTermination(60L, TimeUnit.SECONDS); } catch(InterruptedException e) { // just re-interrupt ourselves and give up Thread.currentThread().interrupt(); return; } } } COM: <s> stops this batch runner in an orderly fashion </s>
funcom_train/31041188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ISelection getSelection() { if (tableTree.getSelectionCount() == 0) return StructuredSelection.EMPTY; TableTreeItem[] sel = tableTree.getSelection(); List entries = new ArrayList(sel.length); for (int i = 0; i < sel.length; i++) { TableTreeItem ti = sel[i]; Object data = ti.getData(); if (data instanceof IPropertySheetEntry) entries.add(data); } return new StructuredSelection(entries); } COM: <s> the code property sheet viewer code implementation of this </s>
funcom_train/13859005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void visit(NodeItem n, NodeItem c, int doi, int ldist) { PrefuseLib.updateVisible(n, true); double localDOI = -ldist / Math.min(1000.0, m_divisor); n.setDOI(doi + localDOI); if (c != null) { EdgeItem e = (EdgeItem) c.getParentEdge(); e.setDOI(c.getDOI()); e.setEndVisible(true); e.setStartVisible(false); // PrefuseLib.updateVisible(e, true); } } COM: <s> visit a specific node and update its degree of interest </s>
funcom_train/1441345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DirectMessage destroyDirectMessage(long id) throws ApiException { requireCredentials(); String url = String.format( "http://twitter.com/direct_messages/destroy/%d.json", id); PostMethod method = new PostMethod(url); String response = execute(method); return DirectMessage.newFromJsonString(response); } COM: <s> destroys the direct message specified in the required id parameter </s>
funcom_train/46375935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void jTreeTreeExpanded(TreeExpansionEvent evt) { // Using the last path element, find the tree node and the user object // from that. Try to start a worker if one does not already exist. TreePath path = evt.getPath(); AsyncTreeNode node = (AsyncTreeNode)path.getLastPathComponent(); startWorker(node, null); } COM: <s> called when a node is expanded </s>
funcom_train/28973338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Scan getScan(double retentionTime, double precision) { initializeScanBrowser(0, getNumberOfScans()); for (int i = 0; i < getNumberOfScans(); i++) { Scan s = getNextScan(); double time = getScanTime(s.getScanNumber()); if ((retentionTime >= (time - precision)) && (retentionTime <= (time + precision))) { return s; } } return null; } COM: <s> returns all ions at the given time </s>
funcom_train/18454390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Annotation gotoAnnotation(boolean forward) { ISelectionProvider selectionProvider = getSelectionProvider(); if (selectionProvider == null) return null; ITextSelection selection= (ITextSelection) selectionProvider.getSelection(); Position position= new Position(0, 0); Annotation annotation= getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position); if (annotation != null) { selectAndReveal(position.getOffset(), position.getLength()); } return annotation; } COM: <s> jumps to the next enabled annotation according to the given direction </s>
funcom_train/19895296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean performGridActionOnJob(String action, PXJob job) { try { if(!action.toLowerCase().equals("delete")) { Boolean performed = this.xgrid_controller.performGridActionOnJob(action, job); return performed; } } catch (Exception ex) { ex.printStackTrace(); } return false; } COM: <s> performs an action on a grid job </s>
funcom_train/19418719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Hashtable getEnv(final String username, final String password) { final Hashtable userEnv = new Hashtable(env); // get authenticated dir context final String securityPrincipal = MessageFormat.format(userBinding, new String[]{username}); userEnv.put(Context.SECURITY_PRINCIPAL, securityPrincipal); userEnv.put(Context.SECURITY_CREDENTIALS, password); return userEnv; } COM: <s> returns a hashtable populated with the user appropriate dir context values </s>
funcom_train/21437448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EurocarbResizableIcon getResizableIcon(String id,ICON_SIZE iconSize) { EurocarbResizableIcon resizableIcon=null; for(ICON_PATH iconPath:iconPaths){ resizableIcon=iconPath.getResizableIcon(id, iconSize); if(resizableIcon!=null) break; } if(resizableIcon!=null){ return resizableIcon; }else{ //if(!id.contains("changeredend") && !id.contains("massoptstruct")) // System.exit(0); return ThemeManager.getResizableEmptyIcon(iconSize); } } COM: <s> get a eurocarb resizable icon by icon identifier and icon size enum </s>
funcom_train/50503629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() throws ValidationException { // to do desc.setTransactionRequirement(taBox.getTransactionType()); desc.setEnabled(enabledBox.isSelected()); if(securityIdEditor != null) { securityIdEditor.save(); } if(permissionsEditor != null) { permissionsEditor.save(); } desc.synchDoclets(); } COM: <s> saves the values from the gui into the deployment descriptor calls </s>
funcom_train/31016543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ParseStats getStats() throws SOAPException { // Specify function to call _call.setMethodName("stats"); _call.setParams(new Vector()); _call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC); return (ParseStats)performSOAPCall(_url, _call); } COM: <s> ask the tag parser server to return statistics for how </s>
funcom_train/36359926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem7() { if (stringItem7 == null) {//GEN-END:|72-getter|0|72-preInit // write pre-init user code here stringItem7 = new StringItem("Release Version", "1.0r");//GEN-LINE:|72-getter|1|72-postInit // write post-init user code here }//GEN-BEGIN:|72-getter|2| return stringItem7; } COM: <s> returns an initiliazed instance of string item7 component </s>
funcom_train/42787904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerEncoding(String encodingName, HLAArrayCodec newCodec) { HLACodec cd = (HLACodec) encodingMap.get(encodingName); if (cd != null && !(cd instanceof UnresolvedCodec) && cd != newCodec) { if (!encodingName.startsWith("HLA")) logger.debug(encodingName + " redefined."); } newCodec.setName(encodingName); encodingMap.put(encodingName, newCodec); } COM: <s> set the correct hlaarray codec for the given named encoding scheme </s>
funcom_train/36643200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double calculateLikelihood(MutableTree tree, String[] attributes, Contrastable[] mles, double kappa) { ContrastedTraitNode contrastNode = new ContrastedTraitNode(tree, tree.getRoot(), attributes); contrastNode.calculateContrasts(kappa); for (int i =0; i < mles.length; i++) { mles[i] = contrastNode.getTraitValue(i); } return calculateTraitsLikelihood(contrastNode); } COM: <s> calculates the likelihood of the traits on the given tree </s>