__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/38529474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addAllHists() { final Set<AbstractHistogram> histSet = new HashSet<AbstractHistogram>(); CollectionsUtil.getSingletonInstance().addConditional( AbstractHistogram.getHistogramList(), histSet, HIST_COND_1D); lstHists.setListData(histSet.toArray()); } COM: <s> add all 1 d histograms to the list </s>
funcom_train/42709866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonAddArticle() { if (jButtonAddArticle == null) { jButtonAddArticle = new JButton(); jButtonAddArticle.setBounds(new Rectangle(10, 240, 121, 21)); jButtonAddArticle.setText("Add"); jButtonAddArticle.setActionCommand("AddArticle"); } return jButtonAddArticle; } COM: <s> this method initializes j button add article </s>
funcom_train/51115827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize() { if(initCount++ == 0) { // overwrite exisiting instances // of pool and tasks collections pool = new Vector(this.initialPoolSize); tasks = QueueFactory.instance(); for(int i = 0; i < this.initialPoolSize; i++){ Thread worker = new TaskThread(tasks); pool.addElement(worker); worker.start(); } } } COM: <s> constructs a new thread pool </s>
funcom_train/26343770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object convertToJavaValue(Property property) { try { PropertyDefinition definition = property.getDefinition(); if (definition.isMultiple()) { return getMultipleValue(property); } else { return getSingleValue(property); } } catch (RepositoryException e) { throw new JacumCmsException("Repository error on retrieving property definition", e); } } COM: <s> convert jcr property to java value </s>
funcom_train/44466021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private AuthorizationContext getNoSubscriptionsContext() throws IllegalAuthorizationException { String userGUID = ""; String productID = ""; String accountID = ""; List<String> subs = new ArrayList<String>(); List<String> roles = new ArrayList<String>(); roles.add("manager"); return new DefaultAuthorizationContext(accountID, productID, subs, userGUID, roles); } COM: <s> creates an authorization context object for an account with no subscriptions </s>
funcom_train/35693439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getClientId(FacesContext context) { if (context == null) { throw new NullPointerException(); } String baseClientId = super.getClientId(context); if (index >= 0) { return (baseClientId + NamingContainer.SEPARATOR_CHAR + index++); } else { return (baseClientId); } } COM: <s> p return the value of the code client id code property </s>
funcom_train/12807140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void SetOptions(int fillOrder, int compression, int t4Options, int t6Options) { this.fillOrder = fillOrder; this.compression = compression; this.t4Options = t4Options; this.t6Options = t6Options; this.oneD = (int) (t4Options & 0x01); this.uncompressedMode = (int) ((t4Options & 0x02) >> 1); this.fillBits = (int) ((t4Options & 0x04) >> 2); } COM: <s> invokes the superclass method and then sets instance variables on </s>
funcom_train/10670905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Result testConstructor() throws Exception { Expression expression = new Expression(Methods.class, "new", new Object[] { "abcde", new Integer(7) }); expression.execute(); assertTrue(Methods.constructor); if (expression.getValue() instanceof Methods) return passed(); return failed("getValue() returns not instance of Class1"); } COM: <s> verify that expression creates instance of class </s>
funcom_train/41163603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoUserExer1Group entity) { EntityManagerHelper.log("saving CoUserExer1Group instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co user exer1 group entity </s>
funcom_train/10280147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCompleted() { if (isEnabled()) { final SysTrayMenuIcon lCurrentIcon = menu.getIcon(); Thread lWait = new Thread(new Runnable() { public void run() { menu.setIcon(trayIcons[SYSTRAY_COMPLETE]); menu.setIcon(lCurrentIcon); } }); lWait.start(); } } COM: <s> change the system tray icon to completed </s>
funcom_train/18481304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCombineAlphaFunction0(CombineColorFunction combine_alpha_function0) { if (combine_alpha_function0 != this.combine_alpha_function0) { CombineColorFunction old = this.combine_alpha_function0 ; this.combine_alpha_function0 = combine_alpha_function0 ; notifyChanged(COMBINEALPHAFUNCTION0,old,combine_alpha_function0) ; } } COM: <s> sets the combinefunction for the alpha component for source 0 </s>
funcom_train/12662857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean containsHostnameKey() { boolean b = false; for (Iterator iter = properties.keySet().iterator(); iter.hasNext();) { String key = (String) iter.next(); if (key.matches("node\\..*\\.hostname")) return true; } return b; } COM: <s> checks if the properties contains a key pattern like </s>
funcom_train/8690216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean execute() throws BuildException { attributes.log("Using symantec java compiler", Project.MSG_VERBOSE); Commandline cmd = setupJavacCommand(); String exec = getJavac().getExecutable(); cmd.setExecutable(exec == null ? "sj" : exec); int firstFileName = cmd.size() - compileList.length; return executeExternalCompile(cmd.getCommandline(), firstFileName) == 0; } COM: <s> performs a compile using the sj compiler from symantec </s>
funcom_train/50939905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLabelDefaultUpdate(boolean labelDefaultUpdate) { if (this.labelDefaultUpdate != labelDefaultUpdate) { this.labelDefaultUpdate = labelDefaultUpdate; if (labelDefaultUpdate) { table.getModel().addTableModelListener(labelUpdateListener); } else { table.getModel().removeTableModelListener(labelUpdateListener); } labelUpdateListener.tableChanged(null); } } COM: <s> set whether the label is defaultly updated </s>
funcom_train/40843856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showHelp(){ parent.fill(0, 0, 0, 220); parent.stroke(0, 0, 0, 220); parent.rect(0, 0, width, height); float y = (height / 4); float x = (width / 4); parent.fill(250); parent.stroke(0, 0, 0); parent.textFont(style.fontOther); parent.text("" +help.getHelpInfo(), x, y ); } COM: <s> draws the help content of </s>
funcom_train/8097206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector loadFile(String filename) { Vector result; BufferedReader reader; String line; result = new Vector(); try { reader = new BufferedReader(new FileReader(filename)); while ((line = reader.readLine()) != null) result.add(line); } catch (Exception e) { e.printStackTrace(); } return result; } COM: <s> loads the file and returns the lines in a vector </s>
funcom_train/41266330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Proserie entity) { EntityManagerHelper.log("saving Proserie instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved proserie entity </s>
funcom_train/49789519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetVisibleOperationGenerated() throws Exception { Frame home = assertHasFrame(root, "Home"); Button set = assertHasButton(home, "set visibility"); // they have properties assertHasValue(set, "visible"); // no operation generated for 'set visibility' button yet Operation setVis = assertHasOperation(set, "set visible"); // it is a primitive operation assertInstanceOf(BuiltinOperation.class, setVis); assertGenerated(setVis); } COM: <s> since there is a value named visible in the button named set visibility </s>
funcom_train/15491136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRGB(byte[] R, byte[] G, byte[] B) { int c, r, g, b; for (int i=0; i < width*height; i++) pixels[i] = 0xff000000 | ((R[i]&0xff)<<16) | ((G[i]&0xff)<<8) | B[i]&0xff; } COM: <s> sets the current pixels from 3 byte arrays reg green blue </s>
funcom_train/4824585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public League createLeague(int year, String season, String title) { // Determine the next league objectID int nextID = LEAGUES_CACHE.size() + 1; // Create new league object League league = new League(nextID, year, season, title); // Store the league object storeLeague(league); // Record the league in the cache for easy retrieval LEAGUES_CACHE.add(league); return league; } COM: <s> this method adds a new league object </s>
funcom_train/3051028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAggressiveRelease() { if ( releaseMode == ConnectionReleaseMode.AFTER_STATEMENT ) { return true; } else if ( releaseMode == ConnectionReleaseMode.AFTER_TRANSACTION ) { boolean inAutoCommitState; try { inAutoCommitState = isAutoCommit()&& !callback.isTransactionInProgress(); } catch( SQLException e ) { // assume we are in an auto-commit state inAutoCommitState = true; } return inAutoCommitState; } return false; } COM: <s> will connections be released after each statement execution </s>
funcom_train/39371497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTape(Tape ta) throws ObjectAlreadyInsertedException { if (isTape(ta)) throw new ObjectAlreadyInsertedException( Turingmachine.class.getCanonicalName() + " / the passed tape is already part of this turingmachine / not inserting tape"); tapes.add(ta); // even though this is designed for non redo operation access // that means whenever this method is called undo/redo should be diabled if (undoRedo != null && undoEnabled) undoRedo.performedOperation(this, new Operation( Operation.opType.TAPE_ADD, new Object[]{ta})); } COM: <s> a tape is added to the machine </s>
funcom_train/3099021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DialogFsmEvent makeDialogFsmEvent (String eventName) { DialogFsmEvent dialogFsmEvent = (DialogFsmEvent) dialogFsmEventCache.get(eventName); if (dialogFsmEvent != null) return dialogFsmEvent; dialogFsmEvent = new DialogFsmEvent(eventName); dialogFsmEventCache.put(eventName, dialogFsmEvent); return dialogFsmEvent; } COM: <s> makes a new dialog fsm event object </s>
funcom_train/3464528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(ListSelectionEvent event) { this.setCursor(new Cursor(Cursor.WAIT_CURSOR)); String dirName = (String)folders.getSelectedValue(); ftp.changeDir(pwd.getText()+"/"+dirName, true); createList(); pwd.setText(ftp.getCurrentDir(true)); this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } COM: <s> this is for when they select something is the list </s>
funcom_train/23352375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringBuilder insert(int offset, char str[]) { synchronized (this) { if ((offset < 0) || (offset > count)) { throw new StringIndexOutOfBoundsException(); } int len = str.length; int newcount = count + len; if (newcount > value.length) { expandCapacity(newcount); } else if (shared) { copy(); } System.arraycopy(value, offset, value, offset + len, count - offset); System.arraycopy(str, 0, value, offset, len); count = newcount; return this; } } COM: <s> inserts the string representation of the code char code array </s>
funcom_train/46758848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ItemFormModel getItemForm(final long itemFormId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return MedData.getItemForm(itemFormId, chain, call); }}; return (ItemFormModel) call(method, call); } COM: <s> same transaction return the single item form model for the primary key </s>
funcom_train/37218378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean deletePasswordEntry(String alias) { try { // Delete the password entry and save the changes to the Keystore credManager.deleteEntry(CredentialManager.KEYSTORE, alias); credManager.saveKeystore(CredentialManager.KEYSTORE); return true; } catch (CMException cme) { logger.error("Credential Manager GUI: " + cme.getMessage()); return false; } catch (CMNotInitialisedException cmni) { // Should not realy happen - we have initialised the Credential Manager return false; } } COM: <s> lets the user delete a password entry from the keystore </s>
funcom_train/37835300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String buildItemListText(Set<String> items) { StringBuilder sb = new StringBuilder(); sb.append("I have offers for the following items: "); boolean first = true; for (String item : items) { if (first) { first = false; } else { sb.append(", "); } sb.append("#'show " + item + "'"); } return sb.toString(); } COM: <s> creates the response text based on the item set </s>
funcom_train/17209360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (isGenerated()) { return "(" + low + "," + high + "," + max + ")"; } if (isReadyToGenerate()) { return "{" + low + "," + max + "}"; } return "[" + low + "," + max + "]"; } COM: <s> returns a string representation of this bble </s>
funcom_train/2034987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveToPreferenceStore(IPreferenceStore store) { Debug.dbg("Saving to Preference Store...", this); List<String> parts = new ArrayList<String>(); for (Setting s : settings.values()) { parts.add(s.stringRepresentation()); } String value = StringUtils.stickTogether(parts, ";"); store.setValue(PREFERENCE_KEY, value); Debug.dbg("Saved to Preference Store.", this); } COM: <s> saves the settings to the specified preference store </s>
funcom_train/10792812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void syncOrderColumn(FieldMapping field) { if (field.getOrderColumn() != null) _orderCol = syncColumn(field, field.getOrderColumn(), 1, false, field.getTable(), null, null, false); else _orderCol = null; } COM: <s> synchronize internal order column information with the given field </s>
funcom_train/14053596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void merge(NodeType type, long[] nodes, long parentNode, String newNodeName, NodeType newType) throws uk.co.mullsoft.jean.dag.CycleException, JEANInvalidHandleException { merge(type,getNodesFromHandles(nodes),getNodeFromHandle(parentNode),newNodeName,newType); } COM: <s> merge the children of a set of nodes into one new node </s>
funcom_train/43665464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGPackagePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GClass_gPackage_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GClass_gPackage_feature", "_UI_GClass_type"), XmdlgenPackage.Literals.GCLASS__GPACKAGE, true, false, false, null, getString("_UI_GenerationModelPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the gpackage feature </s>
funcom_train/3373211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getAttribute(Object key) { if (key instanceof StyleConstants) { Object cssKey = css.styleConstantsKeyToCSSKey ((StyleConstants)key); if (cssKey != null) { Object value = super.getAttribute(cssKey); if (value != null) { return css.cssValueToStyleConstantsValue ((StyleConstants)key, value); } } } return super.getAttribute(key); } COM: <s> gets the value of an attribute </s>
funcom_train/29017916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMinimum (int value) { checkWidget (); int maximum = (int)/*64*/OS.SendMessage (handle, OS.TBM_GETRANGEMAX, 0, 0); if (0 <= value && value < maximum) { OS.SendMessage (handle, OS.TBM_SETRANGEMIN, 1, value); } } COM: <s> sets the minimum value that the receiver will allow </s>
funcom_train/25986573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RubyInteger convertToInteger(String convertMethod) { IRubyObject val = TypeConverter.convertToType(this, getRuntime().getInteger(), convertMethod, true); if (!(val instanceof RubyInteger)) throw getRuntime().newTypeError(getMetaClass().getName() + "#" + convertMethod + " should return Integer"); return (RubyInteger)val; } COM: <s> tries to convert this object to a ruby integer using the </s>
funcom_train/26522362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildClassifier(Instances data) throws Exception { clear(); // Convert Weka Instances to jBNC DatasetInt converter = new InstancesToDatasetDiscretizerAndConverter(); converter.buildConverter(data); DatasetInt trainSet = converter.convert(data); // Allocate bayesian network inducer TANInducer inducer = new TANInducer(); // Generate FrequencyCalc FrequencyCalc fc = new FrequencyCalc(trainSet); // Create Naive Bayes Network inducer.train(fc, true, alpha); bayesNet = inducer.getNetwork(); } COM: <s> generates a classifier </s>
funcom_train/1778807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void appendDescriptor(final int type, final String desc) { if (type == CLASS_SIGNATURE || type == FIELD_SIGNATURE || type == METHOD_SIGNATURE) { if (desc != null) { buf.append("// signature ").append(desc).append('\n'); } } else { buf.append(desc); } } COM: <s> appends an internal name a type descriptor or a type signature to </s>
funcom_train/5265189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sign(String keyName, PrivateKey privateKey) { try { byte[] data = asBytes(); Signature signature = CryptoUtils.getSignature(); signature.initSign(privateKey, CryptoUtils.getSecureRandom()); signature.update(data); setPropertyBytes(keyName, signature.sign()); } catch (Throwable ex) { Logger.getLogger("").log(Level.SEVERE, null, ex); assert false; } } COM: <s> sign this properties with the given key </s>
funcom_train/5376947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resolve() { if (Debug.DEBUG && Debug.DEBUG_GENERAL) { if ((state & (INSTALLED)) == 0) { Debug.println("Bundle.resolve called when state != INSTALLED: " + this); //$NON-NLS-1$ Debug.printStackTrace(new Exception("Stack trace")); //$NON-NLS-1$ } } if (state == INSTALLED) { state = RESOLVED; // Do not publish RESOLVED event here. This is done by caller // to resolve if appropriate. } } COM: <s> mark this bundle as resolved </s>
funcom_train/32187731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Deprecated public Object getCheckedValue() { if (!isCompatModeOn()) throw new IllegalStateException("this method is deprecated as of v1.2 and cannot be called unless compat mode is on. There is no direct equivalent, use another method to track values like this."); return checked == null ? "" : checked.getValue(); } COM: <s> returns get checked </s>
funcom_train/34282164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o2) { if (o2!=null && o2 instanceof IconGroup) { IconGroup ig2 = (IconGroup)o2; if (ig2.getName().equals(getName()) && separateLargeIcons==ig2.hasSeparateLargeIcons()) { if (separateLargeIcons) { if (!largeIconSubDir.equals(ig2.largeIconSubDir)) return false; } return path.equals(ig2.path); } // If we got here, separateLargeIcons values weren't equal. } return false; } COM: <s> returns whether two icon groups are equal </s>
funcom_train/39406032
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OSSpinner getJTextFieldVisus() { if (OSSpinnerVisus == null) { OSSpinnerVisus = new OSSpinner(0,0,3,0.01,2,false); OSSpinnerVisus.setEnabled(false); OSSpinnerVisus.setToolTipText(getMainFrame().getI18N().translate("Visus")); OSSpinnerVisus.addFocusListener(new FocusStyle()); OSSpinnerVisus.setBorder(new LineBorder(this.defaultLineColor, 1)); //OSSpinnerVisus.addFocusListener(ApplicationConstants.REFRACTION_STYLE_VISUS); //OSSpinnerVisus.addKeyListener(ApplicationConstants.REFRACTION_STYLE_VISUS); } return OSSpinnerVisus; } COM: <s> this method initializes osspinner visus </s>
funcom_train/18051787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getSvEditPreferencesMenuItem() { if (svEditPreferencesMenuItem == null) { svEditPreferencesMenuItem = new JMenuItem(); svEditPreferencesMenuItem.setText("Preferences..."); svEditPreferencesMenuItem .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { openPreferences(); } }); } return svEditPreferencesMenuItem; } COM: <s> this method initializes sv edit preferences menu item </s>
funcom_train/33404673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void propagateNewMaster (Host host, int maxSlaves) throws ScatterNetException { try { if (maxSlaves == -1){ maxSlaves = 7; } this.getScatternet().foundNewPiconet(this.engine.getScenarioParameter().getHostDescription(host.getID()), maxSlaves+1); } catch (ScatterNet_HostIsAlreadyMasterException e) { throw new ScatterNetException (e.getMessage()); } } COM: <s> used by gilded cage </s>
funcom_train/8405433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setDefaultValue(Object defaultValue) { useDefault = false; if (log().isDebugEnabled()) { log().debug("Setting default value: " + defaultValue); } if (defaultValue == null) { this.defaultValue = null; } else { this.defaultValue = convert(getDefaultType(), defaultValue); } useDefault = true; } COM: <s> set the default value converting as required </s>
funcom_train/18842131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInsertOverwrite(int t) { // if (t == OVERWRITE) { // currentInsertOverwrite = overwrite; // } else { // currentInsertOverwrite = insert; // } // if (SwingUtilities.isEventDispatchThread()) { // insertOverwriteToggler.run(); // } else { // SwingUtilities.invokeLater(insertOverwriteToggler); // } } COM: <s> toggle insert overwrite </s>
funcom_train/7511675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemClose() { if (jMenuItemClose == null) { jMenuItemClose = new JMenuItem(); jMenuItemClose.setText(Messages.getString("MainFrame.menu.close")); //$NON-NLS-1$ jMenuItemClose.setEnabled(false); registerAction(jMenuItemClose, Actions.CLOSE); } return jMenuItemClose; } COM: <s> this method initializes j menu item close </s>
funcom_train/8685196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void characters(char[] buf, int start, int count) { String text = new String(buf, start, count); String currentDescription = helperImpl.project.getDescription(); if (currentDescription == null) { helperImpl.project.setDescription(text); } else { helperImpl.project.setDescription(currentDescription + text); } } COM: <s> adds the text as description to the project </s>
funcom_train/44452088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeCall(Call call) { int index = calls.indexOf(call); call = calls.get(index); if (call.canBeRemoved()) { calls.remove(call); call.getRule().references.remove(call); return true; } else { return false; } } COM: <s> removes call from this rule </s>
funcom_train/5082019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Command getResizeCommand(ChangeBoundsRequest request) { ChangeBoundsRequest req = new ChangeBoundsRequest(REQ_RESIZE_CHILDREN); req.setEditParts(getHost()); req.setMoveDelta(request.getMoveDelta()); req.setSizeDelta(request.getSizeDelta()); req.setLocation(request.getLocation()); req.setExtendedData(request.getExtendedData()); req.setResizeDirection(request.getResizeDirection()); return getHost().getParent().getCommand(req); } COM: <s> returns the command contribution for the given resize request </s>
funcom_train/20837513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ClassLoader getClassLoaderForBuild() { if (classpathLoader != null) { return classpathLoader; } Path combinedClasspath = getCombinedClasspath(); // only generate a new ClassLoader if we have a classpath if (combinedClasspath == null) { classpathLoader = getClass().getClassLoader(); } else { classpathLoader = getTask().getProject().createClassLoader(combinedClasspath); } return classpathLoader; } COM: <s> returns a classloader object which parses the passed in generic ejb jar classpath </s>
funcom_train/43387838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void componentResized(ComponentEvent e) { Dimension d = DragDropPanel.this.getSize(); relMiddle.x = d.width / 2; relMiddle.y = d.height / 2; if (Debug.DEBUG) { System.out.println("resized, middle is: " + relMiddle); } } COM: <s> p recalculate the point in the middle of a rectangle p </s>
funcom_train/29804548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateDisplayOnChange(rKiveItem item) { // create a new search criteria searchcriteria.limit(); // get the vector of items items = database.getItems(searchcriteria); // find the item in the vector int i = findItem(item); // update both details and display to the vector and selected item updateBoth(i); } COM: <s> updates the display and details panels </s>
funcom_train/47140906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getAWTControl() { Container c = (Container) super.getAWTControl(); Component[] caComponents = c.getComponents(); for (int i = 0; i < caComponents.length; i++) { if (caComponents[i] instanceof TextField) { ((TextField) caComponents[i]).setEchoChar ('*'); break; } } return c; } COM: <s> create and return an awt control for this form sheet item </s>
funcom_train/49330686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUserThrustCurveFiles(List<File> files) { if (files == null) { putString(USER_THRUST_CURVES_KEY, null); return; } String str = ""; for (File file : files) { if (str.length() > 0) { str += SPLIT_CHARACTER; } str += file.getAbsolutePath(); } putString(USER_THRUST_CURVES_KEY, str); } COM: <s> set the list of files directories to be loaded as custom thrust curves </s>
funcom_train/43213247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean setIsSSL(boolean ssl) { if (((SSL_BIT & getFlags()) != 0) != ssl) { if (ssl) { setFlags(getFlags() | SSL_BIT); } else { setFlags(getFlags() & (DATA_STORE_BIT | ONLINE_BIT | CAN_READ_BIT | CAN_WRITE_BIT)); } return true; } return false; } COM: <s> p sets whether the server communicates over ssl </s>
funcom_train/37558003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData(MedicalValue mv) { glucose = (Glucose)mv; glucose.getInstant().setConvertCode("yyyy-MM-dd HH:mm"); System.out.println(glucose.getInstant().getInstant()); date.setDate(glucose.getInstant().getInstant()); glucoseValueTextField.setText(glucose.getValue()); } COM: <s> sets data according to parameter glucose </s>
funcom_train/7690126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Traceback next(Traceback tb) { TracebackAffine tb3 = (TracebackAffine)tb; //traceback has reached the origin, therefore stop. if(tb3.i + tb3.j + B[tb3.k][tb3.i][tb3.j].i + B[tb3.k][tb3.i][tb3.j].j == 0) return null; else return B[tb3.k][tb3.i][tb3.j]; } COM: <s> get the next state in the traceback </s>
funcom_train/49026703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBModifica() { if (bModifica == null) { bModifica = new JButton(); bModifica.setText("Modifica"); bModifica.setIcon(new ImageIcon(getClass().getResource("/icone/comment-edit-icon.png"))); bModifica.setEnabled(false); bModifica.setMnemonic(KeyEvent.VK_UNDEFINED); bModifica.addActionListener(this); bModifica.setFont(new Font("Dialog", Font.BOLD, 12)); } return bModifica; } COM: <s> this method initializes j button2 </s>
funcom_train/17699120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Button getCmd_newEntry() { if (cmd_newEntry == null) { cmd_newEntry = new Button("New Entry"); cmd_newEntry.setFont(new Font(null, Font.BOLD, 30)); cmd_newEntry.setForeground(java.awt.Color.RED); cmd_newEntry.setBounds(new Rectangle(817, 48, 166, 91)); cmd_newEntry.setEnabled(false); cmd_newEntry.setVisible(false); } return cmd_newEntry; } COM: <s> this method initializes cmd new entry </s>
funcom_train/50603928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Method getWriteMethod(String paramName) throws SOAPException { for (int i = 0; i < properties.length;i++) { if (properties[i].getName().equals(paramName)) return properties[i].getWriteMethod(); } throw new SOAPException("Could not find the write method for param '" + paramName + "'"); } COM: <s> get the write method for a parameter name </s>
funcom_train/39788202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveAll() { NullComponent c = new NullComponent(); c.add(new NullComponent()); c.add(new NullComponent()); c.add(new NullComponent()); assertEquals(3, c.getComponentCount()); c.removeAll(); assertEquals(0, c.getComponentCount()); } COM: <s> test code remove all code method </s>
funcom_train/119443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireValueChanged(GraphSelectionEvent e) { // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); // Process the listeners last to first, notifying // those that are interested in this event for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == GraphSelectionListener.class) { ((GraphSelectionListener) listeners[i + 1]).valueChanged(e); } } } COM: <s> notifies all listeners that have registered interest for </s>
funcom_train/13261230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void analyzeResponseTime(JobClass jobClass, Measure Measure) { if (jobClass != null) { // If array is not initialized, initialize it if (responseTimePerClass == null) { responseTimePerClass = new Measure[numClass]; } // Sets measure responseTimePerClass[jobClass.getId()] = Measure; } else { responseTime = Measure; } } COM: <s> analyzes system response time for a specific job class or for every class </s>
funcom_train/42824441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawString(String s, int x, int y, boolean isSelected) { if (s != null && s.length() > 0) TBSGraphics.drawCenteredString(g2, s, x, y, 0, TBSGraphics.textHeight + 4, isSelected ? TBSGraphics.selectedPromptTextColor : Color.BLACK); } COM: <s> calls the draw centered string method from </s>
funcom_train/7601719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Button getJBStop() { if (jBStop == null) { jBStop = new Button(); jBStop.setLabel("Stop"); jBStop.setMinimumSize(new Dimension(50, 30)); jBStop.setName("jBStop"); jBStop.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { stop(); } }); } return jBStop; } COM: <s> this method initializes j bstop </s>
funcom_train/7520245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void peekReadOnly(MsgBuffer mbuf) { if (first == null) { mbuf.data = null; mbuf.off = 0; mbuf.len = 0; return; } if (first.refs < 2) { if (ro_mode) { first.off=ro_off; first.len=ro_len; ro_mode=false; ro_off=0; ro_len=0; } peek(mbuf); return; } if (ro_mode) { if (mbuf.len > ro_len) { peek(mbuf); return; } mbuf.data = first.buf; mbuf.off = ro_off; } else { if (mbuf.len > first.len) { peek(mbuf); return; } mbuf.data = first.buf; mbuf.off = first.off; ro_off = first.off; ro_len = first.len; ro_mode = true; } } COM: <s> peeks the requested number of bytes without copying these bytes </s>
funcom_train/28751979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSamplepairid(Long newVal) { if ((newVal != null && this.samplepairid != null && (newVal.compareTo(this.samplepairid) == 0)) || (newVal == null && this.samplepairid == null && samplepairid_is_initialized)) { return; } this.samplepairid = newVal; samplepairid_is_modified = true; samplepairid_is_initialized = true; } COM: <s> setter method for samplepairid </s>
funcom_train/19622064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean tryPlaceBomb(int playerID) { //all synchronization of such actions as Move, PlaceBomb etc must be provided by Model if (!started) { return false; } boolean placed = false; ModelPlayer player = model.getPlayer(playerID); placed = model.tryPlaceBomb(player);//will call fireGameMapChange if need return placed; } COM: <s> tryes to place bomb </s>
funcom_train/27841447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDefaultPage2() throws Exception { DummyHTTPRequest request = new DummyHTTPRequest(new String[][]{ {"view", "NONSENSE"}, {"action", "Test1Control"}, }); DummyHTTPResponse response = servlet.handlePost(request); assertEquals("TestModel", response.getContent()); assertTrue(AppController.doneTest1Control); assertTrue(!SubController.doneTest2Control); } COM: <s> route a test1 control to viewid nonsense should find app controller as </s>
funcom_train/807308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getImage() { Image image; try { URL url = Platform.asLocalURL(Platform.getBundle("net.bioclipse").getEntry("/icons/mol200x75.gif")); ImageDescriptor i = ImageDescriptor.createFromURL(url); image = i.createImage(); // image = SWTX.loadImageResource(Display.getCurrent(), // "/icons/"+ "mol150x75" +".gif"); } catch (Exception e) { // TODO Auto-generated catch block image =new Image(Display.getCurrent(),1,150); } return image; } COM: <s> should return an 2 d image if possible to construct from the resource </s>
funcom_train/34109873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show(String html, int originPanel){ this.originPanel = originPanel; DOM.addEventPreview(eventPreview); DOM.setCapture(floater.getElement()); floater.setHTML(html); // Initialize values // dragged=false; dragged=true; selectedTreeItem = null; lastSelectedTreeItem = null; timer = new Timer() { public void run() { // dragged=true; dropEnabled=true; } }; timer.scheduleRepeating(1500); // 1,5 seconds } COM: <s> sets the html value to floater </s>
funcom_train/51107582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMultiObjRelFetch() throws Exception { createTestData("testPaintings"); SelectQuery q = new SelectQuery("Painting"); q.andQualifier(ExpressionFactory.matchExp("toArtist.artistName", "artist2")); q.orQualifier(ExpressionFactory.matchExp("toArtist.artistName", "artist4")); List results = context.performQuery(q); assertEquals(2, results.size()); } COM: <s> test fetching query with multiple relationship paths between the same 2 entities </s>
funcom_train/38536409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getPrecision() { // determine minimum precision double precision = Double.POSITIVE_INFINITY; for (int i=0; i<exprs.length; i++) { precision = Math.min(exprs[i].getPrecision(), precision); if (precision <= DoubleUtil.DEFAULT_PRECISION) break; } precision = Math.max(precision, DoubleUtil.DEFAULT_PRECISION); return precision; } COM: <s> returns precision associated with this domain </s>
funcom_train/2885179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMissingDatabase() throws Throwable { if (mysqlEnabled) { TestCompletedEvent event = expectAbnormalTestRun(BASE, "MissingDatabaseTest", true, null); Throwable cause = event.getCause(); //see SFOS-383 if (cause != null && cause.getMessage().contains("Table 'mysql.proc' doesn't exist")) { throw cause; } } } COM: <s> test that this raises an exception that we can marshall </s>
funcom_train/29618350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MgisRadioButton getJRadioTotalDuplication() { if (jRadioTotalDuplication == null) { jRadioTotalDuplication = new MgisRadioButton(); jRadioTotalDuplication.setText(AppTextsDAO.get("LABEL_TOTAL")); jRadioTotalDuplication.setValue("1"); m_duplicationType.add(jRadioTotalDuplication, true); jRadioTotalDuplication.setBounds(84, 90, 97, 19); } return jRadioTotalDuplication; } COM: <s> this method initializes j radio total duplication </s>
funcom_train/1238940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void verifyStringProperty(String name, Object value) { if (!(value instanceof String)) { throw new JAXRPCException( Messages.getMessage("badProp00", new String[] {name, "java.lang.String", value.getClass().getName()})); } } COM: <s> verify that the type of the object is a string and throw </s>
funcom_train/46877232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("Test".equals(portName)) { setTestEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/5463082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawlUrlProperty(Property property, Resource parentNode, RDFContainer rdfContainer) { Node propertyValue = getRdfPropertyValue(rdfContainer, property, IcalDataType.URI); addStatement(rdfContainer, parentNode, NCAL.url, propertyValue); } COM: <s> crawls the url property </s>
funcom_train/29572694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean checkStructure(List<String> lines) { Matcher m = null, m2 = null; boolean result = true; for (String s:lines) { m = tlp.matcher(s.trim()); m2 = slp.matcher(s.trim()); result = result && (m.matches() || m2.matches()); if (!(m.matches() || m2.matches())) { JWOZ.getLogger().warn(System.currentTimeMillis()+"\t"+ConstAndOpts.SYNTAX_ERROR + s); } } return result; } COM: <s> check the structurre of the given lines of text </s>
funcom_train/3613239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLinkToDirectory() { final VersionedFile file = new VersionedFile("test/file", dirTest); file.addInitialRevision("1.1", author, date1, "message1", 0, null); assertEquals(dirTest, file.getDirectory()); assertTrue(dirTest.getFiles().contains(file)); } COM: <s> test if files are added to their directorys file list </s>
funcom_train/14227838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FreeTerminalConnection getLazyTermConn(FreeTerminal t) { // look for existing one FreeTerminalConnection tc = (FreeTerminalConnection)this.terminalConnections.get(t.getName()); if (tc != null) { return tc; } // No terminal connection found -- create a new one if (t instanceof MediaTerminal) { tc = new FreeMediaTerminalConnection(this, (MediaTerminal)t); } else { tc = new FreeTerminalConnection(this, t); } return tc; } COM: <s> find or create a terminal connection associated with a terminal </s>
funcom_train/14163508
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void saveServiceObjects(ServiceObjectContainer pContainer, Environment pEnv) { Iterator iter = pContainer.getServiceObjectNames(); if(iter.hasNext()){ XmlElement serviceList = new XmlElement("service_object_list"); openElement(serviceList); String alias; AbstractServiceObject serviceObject; XmlElement serviceElement = new XmlElement("service_object"); while (iter.hasNext()) { alias = (String) iter.next(); serviceObject = pContainer.getServiceObject(alias); saveOneServiceObject(serviceObject, alias, serviceElement, pEnv); } closeElement(serviceList); } } COM: <s> saving a list of service objects </s>
funcom_train/35361461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void captureNewData() { if (newData != null) { throw new IllegalStateException("Already captured new data"); } newData = new double[oldData.length][oldData[0].length]; capture(newData); if (Arrays.deepEquals(oldData, newData)) { logger.fine("Captured new data == old data!"); } } COM: <s> copies the current contents of the same clip region that was captured </s>
funcom_train/35276681
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int findClosestHeightIndex(Vector3f position, TerrainPatch patch) { int x = (int) position.x; int z = (int) position.z; if (x < 0 || x >= patch.getSize() - 1) { return -1; } if (z < 0 || z >= patch.getSize() - 1) { return -1; } return z * patch.getSize() + x; } COM: <s> finds the closest height point to a position </s>
funcom_train/31986748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTraceReceiver(MessageReceiver msgRec) { if ( msgRec==null) { sendWarning ( "Can not remove receiver to experiment! Command ignored.", "Experiment '"+getName()+"', Method 'void removeTraceReceiver"+ "(MessageReceiver msgRec)'", "The parameter 'msgRec' passed was a null reference.", "Make sure to give a valid MessageReciever reference before removing it "+ "from the experiment's messaging system."); return; // do nothing } messMan.deRegister(msgRec, tracenote); } COM: <s> removes a messagereceiver for tracenotes from the </s>
funcom_train/32794369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OclType oclType() { if (!(instance.getType() instanceof MetaAny)) { String msg = "getType used but MetaAny not implmented in the reflection facade"; return new OclType(0, msg); } MetaAny any = (MetaAny)instance.getType(); return InstanceOclType.getOclTypeFor(any.getName(), mf); } COM: <s> this property is no longer present in ocl 1 </s>
funcom_train/31081248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean paramsMatch(BCMethod meth, String[] params) { String[] mparams = meth.getParamNames(); if (mparams.length != params.length) return false; for (int i = 0; i < params.length; i++) { if (!mparams[i].equals(_project.getNameCache(). getExternalForm(params[i], false))) return false; } return true; } COM: <s> return true iff the given methods parameters match code params code </s>
funcom_train/38417307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveOriginalState(SimulationMap map, Page startPage) { mStartPage = startPage; this.mOriginalMapTransform = map.getMap().getTransform(SatinConstants.COORD_ABS); Iterator it = map.getMap().getAllEntityViews().iterator(); while(it.hasNext()) { GraphicalObject gob = (GraphicalObject)it.next(); if(gob instanceof PersonView || gob instanceof ThingView) { this.mOriginalPosition.put( ((EntityView)gob).getName(), gob.getLocation2D(SatinConstants.COORD_REL)); } } startstamp = System.currentTimeMillis(); } COM: <s> save original states </s>
funcom_train/2286553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildDeck() { //Build a deck of cards to randomly assign deck = new ArrayList<Card>(); int c = 0; for ( int ii = 1; ii < 14; ii++ ) { for( int jj = 1; jj < 5; jj++ ) { deck.add( new Card( ii, jj ) ); c++; } } } COM: <s> this method is used to build a deck of 52 cards </s>
funcom_train/2969589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFilterValue(int col, Object value){ if (filterColumnModel != null && isFilterHeaderDisplayed){ filterColumnModel.getFilterCellEditor(col).setValue(value); } else { ( (FilterModel) getModel()).setFilter(col, value); Rectangle r = getCellRect(0, 0, false); scrollRectToVisible(r); } } COM: <s> sets a filter on a filter column header </s>
funcom_train/4928271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void order(Class<? extends ComponentPanel> componentType) { java.awt.Component[] components = getComponents(); for (java.awt.Component component: components) { if (componentType.isAssignableFrom(component.getClass())) { setComponentZOrder(component, new Integer(getComponentCount() - 1)); return; } } } COM: <s> orders a component and makes it drawn first </s>
funcom_train/35838490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUserDescription(String sUserDes) { if (sUserDes.equals(sUserDescription)) return ; String oldValue = setUserDescriptionLocal(sUserDes); // call UserService to update the db /* IUserService us = Model.getUserService(); us.setUserDescription(oSession, sId, oldValue, sUserDescription); */ } COM: <s> sets the user description currently in the local data only </s>
funcom_train/22655102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addChildPreference (Preference preference) { if (null == childPreferences) { childPreferences = new HashMap(); } if (childPreferences.containsKey(preference.getId())) { return false; } else { childPreferences.put(preference.getId(), preference); preference.setParent(this); if (null != preferenceModelManager) { preference .registerPreferenceModelManager(preferenceModelManager); // Send notification preferenceModelManager.childPreferenceChanged(this .getCompleteId(), preference.getId(), PreferenceModelManager.OPERATION_CHILD_PREF_ADDED); } return true; } } COM: <s> adds a child preference to this preference </s>
funcom_train/37425825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMsgNumber(long pTopic) throws ClassNotFoundException, SQLException { Statement tQuery = cConnect.createStatement(); String tSql ="Select count(*) from message where id_topic = "+pTopic; ResultSet tRs = tQuery.executeQuery(tSql); int msg_num = 0; if(tRs.next()) msg_num = tRs.getInt("count(*)"); tRs.close(); return msg_num; } COM: <s> count the messages asssociated to a topic </s>
funcom_train/25732333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChartColor(int chartIndex, Paint color) { if (chartIndex < 0 || chartIndex > 1) { throw new IllegalArgumentException(chartIndex + ": bad chart index, " + "cannot set color " + color + " of unknown chart type index (only 0 or 1)."); } renderer.setChartColor(chartIndex, color); } COM: <s> set the color of the peaks </s>
funcom_train/43895293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected FeatureLocking createFeatureLocking() { return new AbstractFeatureLocking() { public DataStore getDataStore() { return parent; } public void addFeatureListener(FeatureListener listener) { listenerManager.addFeatureListener(this, listener); } public void removeFeatureListener(FeatureListener listener) { listenerManager.removeFeatureListener(this, listener); } public FeatureType getSchema() { return schema; } }; } COM: <s> create the feature locking override for your own custom implementation </s>
funcom_train/14059308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void uncaughtException(final Thread t, final Throwable e) { try { this.handleError((t != null) ? t : Thread.currentThread(), e); } catch (final Throwable tt) { if (this != ErrorUtils.ERROR_UTILS) { ErrorUtils.ERROR_UTILS.handleError(tt); } } } COM: <s> this method is for the compatibility with the uncaught exception </s>
funcom_train/39558837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testWrite2DB() { try { XincoCoreGroupServer instance = new XincoCoreGroupServer(0, "Test", 1); assertTrue(instance.write2DB() > 0); XincoCoreGroupServer.deleteFromDB(instance); } catch (XincoException ex) { Logger.getLogger(XincoCoreGroupServerTest.class.getSimpleName()).log(Level.SEVERE, null, ex); fail(); } } COM: <s> test of write2 db method of class xinco core group server </s>