__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/46734803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCustomControllerRef(DisplayModel customControllerRef) { if (Converter.isDifferent(this.customControllerRef, customControllerRef)) { DisplayModel oldcustomControllerRef= new DisplayModel(this); oldcustomControllerRef.copyAllFrom(this.customControllerRef); this.customControllerRef.copyAllFrom(customControllerRef); setModified("customControllerRef"); firePropertyChange(String.valueOf(RECORDITEMS_CUSTOMCONTROLLERREFID), oldcustomControllerRef, customControllerRef); } } COM: <s> foreign key to refs on custom controller class </s>
funcom_train/47686007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List convert2List(ResultSet rs) throws SQLException { List list = new ArrayList(); ResultSetMetaData md = rs.getMetaData(); Map rowData; int columnCount = md.getColumnCount(); while (rs.next()) { rowData = new HashMap(); for (int i = 1; i <= columnCount; i++) { rowData.put(md.getColumnName(i).toUpperCase(), rs.getObject(i)); } list.add(rowData); } return list; } COM: <s> result set list </s>
funcom_train/22208673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void load() { m_providerName.setText(m_model.getName()); m_providerClassName.setText(m_model.getClassName()); PropertiesTableModel tm = (PropertiesTableModel) m_providerProps.getModel(); tm.setProperties(m_model.getProperties()); } COM: <s> initialises the panel fields from the current model </s>
funcom_train/12102591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayMessage(GLAutoDrawable drawable) { GL gl = drawable.getGL(); gl.glColor3f(fontColor.r, fontColor.g, fontColor.b); int leftPosition = (drawable.getWidth() - glut.glutBitmapLength(font, message))/2; int bottomPosition = 20; gl.glRasterPos3f(leftPosition, bottomPosition, 0); glut.glutBitmapString(font, message); } COM: <s> displays hud text at the bottom center of the game world </s>
funcom_train/28983353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkAlertPreventEmptySettings () { if (okAlertPreventEmptySettings == null) {//GEN-END:|90-getter|0|90-preInit // write pre-init user code here okAlertPreventEmptySettings = new Command ("Ok", Command.OK, 0);//GEN-LINE:|90-getter|1|90-postInit // write post-init user code here }//GEN-BEGIN:|90-getter|2| return okAlertPreventEmptySettings; } COM: <s> returns an initiliazed instance of ok alert prevent empty settings component </s>
funcom_train/36439719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static enum Direction { UP_LEFT { public boolean isUp() { return true; } }, UP_RIGHT { public boolean isUp() { return true; } }, DOWN_LEFT { public boolean isUp() { return false; } }, DOWN_RIGHT { public boolean isUp() { return false; } }; public abstract boolean isUp(); public boolean isDown() { return !isUp(); } } COM: <s> enumeration identifying the different diagonal directions that </s>
funcom_train/23271552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getRequiredNumberOfColumns() { String[] rows = file.read().split("\n"); int result = Integer.MIN_VALUE; for (String row : rows) { if (row.split(getDelimiter()).length > result) { result = row.split(getDelimiter()).length; } } return result; } COM: <s> gets the required number of columns needed to hold the data </s>
funcom_train/40722876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setFieldValue(String fieldName, Object value) { List<FieldInfo<?>> fields = getFieldInfo(fieldName); if (fields == null) return false; boolean result = false; for (FieldInfo<?> field : fields) { result = field.setValue(value); if (result) break; } return result; } COM: <s> sets the specified value of the field with the given name and returns </s>
funcom_train/37609452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeNodes() { String outline; for (int kkk = 0; kkk < xtrn.size(); kkk++) { outline = (xtrn.elementAt(kkk)).getOutLine(ccc.get().isMetric()); try { flayout.write(outline, 0, outline.length()); } catch (IOException e) { gxport.setXError(true, e.getClass().getName() + ": "+ e.getMessage()); } } } // end writeNodes() COM: <s> write the nodes to the layout file </s>
funcom_train/17678638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendWhereParam(CharBuf s, JdbcColumn c) { switch (c.jdbcType) { case Types.NUMERIC: s.append("CAST(? as numeric)"); break; case Types.REAL: s.append("CAST(? as real)"); break; default: super.appendWhereParam(s, c); }; } COM: <s> append a replacable parameter part of a where clause for the column </s>
funcom_train/18121339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void genSql(boolean spec) throws PositionedError { try { PLChecker spp; spp = new PLChecker(ref.getFile(), spec); spp.printCUnit(elems); spp.close(); } catch (IOException ioe) { ioe.printStackTrace(); System.err.println("cannot write: " + ref.getFile()); } } COM: <s> generate the code in pure java form </s>
funcom_train/20799111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean setCurrentVoice(FreeTTSVoice voice) { com.sun.speech.freetts.Voice freettsVoice = voice.getVoice(); boolean ok = false; // Load the voice if it is not loaded. if (!freettsVoice.isLoaded()) { freettsVoice.allocate(); freettsVoice.setAudioPlayer(audioPlayer); } if (freettsVoice.isLoaded()) { curVoice = voice; ok = true; } return ok; } COM: <s> sets the given voice to be the current voice </s>
funcom_train/33968311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSubmissionDate() { Calendar nextDay = Calendar.getInstance(); nextDay.add(Calendar.DAY_OF_YEAR, 1); nextDay.set(Calendar.HOUR_OF_DAY, 0); nextDay.set(Calendar.MINUTE, 0); nextDay.set(Calendar.SECOND, 0); long value = nextDay.getTimeInMillis(); String locale = mAppController.getContext().getString( R.string.language_short); mUserDataController.updateUserSubmissionDate(mUser, locale, value); } COM: <s> set the date when a user can submit a new fml </s>
funcom_train/3526775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeProperty getProperty(String resourceUri, String propertyName, String propertyNamespace) throws SlideException { updateDescriptors(resourceUri); try { return propertyHelper.getProperty(propertyName, revisionDescriptors, revisionDescriptor, contextPath, servletPath); } catch (JDOMException e) { throw new SlideException("ComputedPropertyProvider.getProperty(): " + e.getMessage()); } } COM: <s> if the property specified by code property namespace code and </s>
funcom_train/47929180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(User o) { Collator collator = Collator.getInstance(LocaleContextHolder.getLocale()); int result = collator.compare(getSurname(),o.getSurname()); if(result == 0){ result = collator.compare(getName(),o.getName()); } return result; } COM: <s> compares this user to another by surname and name lexicographically </s>
funcom_train/31452836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showMenu(Point pt) { TreePath path = tree.getPathForLocation(pt.x, pt.y); if (path == null) { path = new TreePath(((BookmarkNode)tree.getModel().getRoot()).getPath()); } else { tree.setSelectionPath(path); } createMenu(path).show(tree, pt.x, pt.y); } COM: <s> shows a popup menu at the current mouse position </s>
funcom_train/49045323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getJRadioButtonH_PAS() { if (buttH_PAS == null) { buttH_PAS = new JRadioButtonMenuItem(); buttH_PAS.setText("H PAS"); buttH_PAS.setToolTipText("H PAS"); buttH_PAS.addActionListener(this); buttH_PAS.setActionCommand("parameter"); buttH_PAS.setEnabled(true); } return buttH_PAS; } COM: <s> this method initializes the option h pas </s>
funcom_train/13916665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getRequiredTagsMessage(String group) { if (this.getRequiredTags(group) == null) { return "Step is missing getRequiredTags(), coding error, please report bug"; } String msg = ""; for (int i = 0; i < this.getRequiredTags(group).length; i++) { String str = this.getRequiredTags(group)[i]; msg = msg + "\t" + str + "\n"; } return msg; } COM: <s> gets the required tags message </s>
funcom_train/168465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void calculate(double t) { //set alias double L_ = L.getValue(); X_ = X.getValue(); factorCB = A * (TCaCB.getValue() + TCB.getValue()); if (false) L_ = solve_by_modified_bisection(L_); else L_ = solve_by_Secant(L_); L.setValue(L_); super.calculate(t); } COM: <s> set force equilibrated length </s>
funcom_train/37080225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List extractValues(Node node) { String text = getTextNodeValue(node); StringTokenizer tokenizer = new StringTokenizer(text, ", "); List list = new ArrayList(tokenizer.countTokens()); while (tokenizer.hasMoreTokens()) list.add(tokenizer.nextToken()); //db.setChromosomes(list); return list; } COM: <s> parses comma delimited node text into a list </s>
funcom_train/13956612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBatchSize(int batchSize) { if (batchSize <= 0) throw new RuntimeException("Attempting to set a batch size of negative value."); if (batchSize > DefaultBatchSize) log.warn("Batches larger than the the default batch size of " + DefaultBatchSize + " might cause JDBC issues."); this.batchSize = batchSize; } COM: <s> sets the batch size </s>
funcom_train/19398706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_checksum02() { byte[] data = new byte[100]; r.nextBytes(data); Adler32 adler32 = new Adler32(); adler32.update(data, 10, 90); final int expectedChecksum = (int) adler32.getValue(); assertEquals(expectedChecksum, chk.checksum(ByteBuffer.wrap(data), 10, data.length)); } COM: <s> test verifies that only the specified region of the buffer is used to </s>
funcom_train/43797890
/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 ("WSAverbarSoap".equals(portName)) { setWSAverbarSoapEndpointAddress(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/5593190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void privmsg(String source, String message) { Object[] args; if (prefs.coloredNicks()) { args = new Object[] { SwingUtility.colorizeNick(source), message }; } else { args = new Object[] { source, message }; } String resource = "privmsg_template"; addLine(getMessage(resource, args)); } COM: <s> describe code privmsg code method here </s>
funcom_train/19436860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPath() { // -- create the result object String result = ""; // -- add the delimiter handler.addReplacement("delimiter", "\\" + File.separator); // -- parse the content result = parser.parse(content.toString()); // -- append raw data result += raw; // -- return the result return result; } COM: <s> get the resource as a path </s>
funcom_train/36635851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void exportMeshData(HashMap materialsMap, PrintWriter pw, Matrix4f mat) { if(children != null ) { for (Iterator iter = children.iterator(); iter.hasNext();) { SceneNode currNode = (SceneNode) iter.next(); currNode.exportMeshData(materialsMap, pw, new Matrix4f(mat)); } } } COM: <s> exports this nodes mesh data </s>
funcom_train/1903621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void harvest() { HarvestSiteSchedule harvestSiteSchedule; for (int i = 0; i < harvestSiteScheduleList.size(); i++) { harvestSiteSchedule = (HarvestSiteSchedule)harvestSiteScheduleList.get(i); if (Harvester.schemaLocation != null) { harvestSiteSchedule.setSchemaLocation(Harvester.schemaLocation); } harvestSiteSchedule.harvestDocumentList(); } } COM: <s> for every harvest site schedule in the database harvest the </s>
funcom_train/10609741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkConnect(String host, int port, Object context) { if (port > 0) { checkPermission(new SocketPermission(host + ':' + port, "connect"), //$NON-NLS-1$ context); } else { checkPermission(new SocketPermission(host, "resolve"), context); //$NON-NLS-1$ } } COM: <s> checks whether the given security context is allowed to establish socket </s>
funcom_train/29722280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getLang() { if (lang == null) { Vector<Locale> locs = Bundle.getAvailableLocales(); lang = new JComboBox(locs); lang.setRenderer(new LocaleRenderer()); lang.setBounds(new Rectangle(280, 20, 80, 20)); OptionsParser op = new OptionsParser(); lang.setSelectedItem(new Locale(op.getLocale().getLanguage())); } return lang; } COM: <s> this method creates the jcombo box for the language </s>
funcom_train/19073073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllOutputs() { if (outputPatternListeners != null) { Vector tempVect = (Vector) outputPatternListeners.clone(); for (int i = 0; i < tempVect.size(); ++i){ this.removeOutputSynapse( (OutputPatternListener) tempVect.elementAt(i)); } outputPatternListeners = null; } } COM: <s> remove all the output listeners of the layer </s>
funcom_train/29618796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getJActionBox() { if (jActionBox == null) { Vector actionOptions = new Vector(); actionOptions.add(AppTextsDAO.get("LABEL_VIEW")); actionOptions.add(AppTextsDAO.get("LABEL_EXPORT")); actionOptions.add(AppTextsDAO.get("LABEL_PRINT")); jActionBox = new JComboBox(actionOptions); jActionBox.setBounds(new java.awt.Rectangle(274,59,108,24)); jActionBox.setFont(MgisLabel.m_font.deriveFont(java.awt.Font.BOLD)); } return jActionBox; } COM: <s> this method initializes j action box </s>
funcom_train/43876161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void testListheader( final int index ) { for ( Phase phase : Phase.values() ) { final List<WebElement> listheaders = parentElement.findElement( By.className( "z-listhead" ) ).findElements( By.className( "z-listheader" ) ); sortListheader( listheaders.get( index ) ); } } COM: <s> executes full test on single listheader </s>
funcom_train/47270501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateLabelAddresses() { if (listOfLabelsForSymbolTable != null) { for (int i=0; i<listOfLabelsForSymbolTable.size(); i++) { ((LabelsForSymbolTable)listOfLabelsForSymbolTable.get(i)).updateLabelAddresses(); } } } COM: <s> method to update display of label addresses </s>
funcom_train/9683247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onEnter(Object o) { //System.err.println("Entering: " + o + ", range: " + rangeMember); if (Assert.enabled) { Assert.must(o instanceof LocationAware, o.getClass().getName() + " is not LocationAware"); } testRange((LocationAware) o); } COM: <s> on enter will be called on visiting before starting to traverse children </s>
funcom_train/38494531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LocalVariable createLocalParameter(String name, TypeDesc type) { LocalVariable var = new LocalVariableImpl (mLocalVariables.size(), name, type, mNextFixedVariableNumber); mLocalVariables.add(var); mNextFixedVariableNumber += type.isDoubleWord() ? 2 : 1; return var; } COM: <s> all parameters must be defined before adding instructions </s>
funcom_train/927827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private DefaultCategoryDataset createServiceDataset() { DefaultCategoryDataset dcd = new DefaultCategoryDataset(); Iterator iter = m_Display.getGraph().getNodeSequence(); while (iter.hasNext()) { ASDNNode n = (ASDNNode)iter.next(); double value = NumberUtil.getDoubleAttribute(n, "service"); String row = n.getString("label"); dcd.addValue(value, ASDNResources.getString("ge.service.series"), row); } return dcd; } COM: <s> creates a dataset of nodes service attribute </s>
funcom_train/45692467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNumSamplesMonoEmptyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EsxFile_numSamplesMonoEmpty_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EsxFile_numSamplesMonoEmpty_feature", "_UI_EsxFile_type"), EsxPackage.Literals.ESX_FILE__NUM_SAMPLES_MONO_EMPTY, false, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the num samples mono empty feature </s>
funcom_train/46190318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstruction() { BlogEntry blogEntry = new BlogEntry(blog); event = new BlogEntryEvent(blogEntry, BlogEntryEvent.BLOG_ENTRY_ADDED); assertEquals(blogEntry, event.getSource()); assertEquals(blogEntry, event.getBlogEntry()); assertEquals(BlogEntryEvent.BLOG_ENTRY_ADDED, event.getType()); } COM: <s> tests that a blog entry event instance is correctly constructed </s>
funcom_train/45116333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private String toXmlString(){ // Source source = new DOMSource(doc); // StringWriter writer = new StringWriter(); // Result strResult = new StreamResult(writer); // Transformer xformer; // try { // xformer = TransformerFactory.newInstance().newTransformer(); // xformer.transform(source, strResult); // return writer.toString(); // } catch (Exception e) { // log.log(Level.WARNING, "Fail while generating data to xml String", e); // return null; // } // } COM: <s> turn doc into xml string </s>
funcom_train/22115244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateOption(CrispoOption o, String val) { if (val == null || val.matches("^\\s*$")) { getCrispoOptionDAO().remove(o); Collection opts = o.getCrispo().getOptsSet(); opts.remove(o); } else { o.setValue(val); getCrispoOptionDAO().save(o); } } COM: <s> update the given crispo option with the given value </s>
funcom_train/19064458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertBreak() { try { int caretPos = this.getCaretPosition(); htmlKit.insertHTML(htmlDoc, caretPos, "<br>", 0, 0, HTML.Tag.BR); this.setCaretPosition(caretPos + 1); } catch (BadLocationException e) { LOG.severe("Error inserting br tag: " + e.getMessage()); } catch (IOException e) { LOG.severe("Error inserting br tag: " + e.getMessage()); } } COM: <s> method for inserting a line break br tag </s>
funcom_train/31874448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void figureRequestUpdate(FigureChangeEvent e) { if (this.fListeners != null) { for (int i = 0; i < this.fListeners.size(); i++) { DrawingChangeListener l = (DrawingChangeListener) this.fListeners.elementAt(i); l.drawingRequestUpdate(new DrawingChangeEvent(this, null)); } } } COM: <s> forces an update </s>
funcom_train/11372254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disableAndReportErrorOnJournals(List<JournalAndStream> badJournals) { if (badJournals == null || badJournals.isEmpty()) { return; // nothing to do } for (JournalAndStream j : badJournals) { LOG.error("Disabling journal " + j); j.abort(); j.setDisabled(true); } } COM: <s> called when some journals experience an error in some operation </s>
funcom_train/10589581
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValidationError(ValidationError error) { if (this.valueState >= VALUE_VALIDATED) { this.valueState = VALUE_DISPLAY_VALIDATION; } if (!ObjectUtils.equals(this.validationError, error)) { this.validationError = error; getForm().addWidgetUpdate(this); } } COM: <s> set a validation error on this field </s>
funcom_train/25201515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(FixedGlue glue) { length.add(glue.getLength()); FixedGlueComponent s = glue.getStretch(); stretch[s.getOrder()] += s.getValue(); s = glue.getShrink(); shrink[s.getOrder()] += s.getValue(); } COM: <s> add some more glue to this one </s>
funcom_train/33705585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHeaderValue(String header, String value) { if (!value.equals(this.configuration.getProperty(header))) { if (value.equals("")) { this.configuration.remove(header); } else { this.configuration.setProperty(header, value); } fireChangeEvent(); } } COM: <s> sets a value for the given header </s>
funcom_train/18730969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JPopupMenu makeSpaceMenu(String type) { if (type.equals("bar")) { return seperatorPopup(); } else if (type.equals("front") || type.equals("back")) { return spacePopup(type); } else { log.warn("\"" + type + "\" is not a recognized type of popup"); return null; } } COM: <s> creates the correct type popup menu </s>
funcom_train/15624574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEnabled() { assert oUT != null; oUT.setEnabled(false); assert oUT != null; assertFalse(oUT.isEnabled()); assert oUT != null; oUT.setEnabled(true); assert oUT != null; assertTrue(oUT.isEnabled()); } COM: <s> test case for </s>
funcom_train/47803979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void evaluateDo(Object selection) { if (null == _General || null == _Specific) return; for (Feature f : _Specific.getFeatures()) moveFeature(f, _General); for (Relationship r : _Specific.getRelationships()) { if (isTheGeneralization(r)) continue; else try { moveRelationships(r); } catch (Exception e) { e.printStackTrace(); System.err.println("general and specific problems"); } } } COM: <s> take two objects and make one </s>
funcom_train/44556690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean saveAsFits(String path) { if (!FileSaver.okForFits(imp)) return false; ImagePlus tempImage = WindowManager.getTempCurrentImage(); WindowManager.setTempCurrentImage(imp); IJ.runPlugIn("net.sf.ext.ij.plugin.FITS_Writer", path); WindowManager.setTempCurrentImage(tempImage); return true; } COM: <s> save the image in fits format using the specified path </s>
funcom_train/11012595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHeaderHas16bitCharacter() { HSSFWorkbook b = new HSSFWorkbook(); HSSFSheet s = b.createSheet("Test"); HSSFHeader h = s.getHeader(); h.setLeft("\u0391"); h.setCenter("\u0392"); h.setRight("\u0393"); HSSFWorkbook b2 = HSSFTestDataSamples.writeOutAndReadBack(b); HSSFHeader h2 = b2.getSheet("Test").getHeader(); assertEquals(h2.getLeft(),"\u0391"); assertEquals(h2.getCenter(),"\u0392"); assertEquals(h2.getRight(),"\u0393"); } COM: <s> testcase for bug 17039 hssfheader does not support dbcs </s>
funcom_train/5402974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Font getSWTFont(Font baseFont, String name){ Font font = (Font) swtFontCache.get(name); if(font==null){ font = createFont(baseFont, getDisplay(), name); swtFontCache.put(name, font); } return font; } COM: <s> gets a font by its name </s>
funcom_train/39395411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDependencyByClient(TcoObject client, Dependency dependency) { TcoObject supplier = findSupplier(dependency); // unlink dependency supplier.getClientId().remove(dependency); client.getSupplierId().remove(dependency); // => MUST BE DONE BY CALLER! // unlink client/supplier // dependency.setSupplierId(null); => (DbState=DELETED already!!!) // dependency.setClientId(null); } COM: <s> a dependency is an n n association between a client and a </s>
funcom_train/6439794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { isUnix = (File.separatorChar == '/') && (File.pathSeparatorChar == ':'); isWindows = (File.separatorChar == '\\') && (File.pathSeparatorChar == ';'); osName = System.getProperties().getProperty("os.name").toLowerCase(); } COM: <s> helper function for the constructors to figure out operating system </s>
funcom_train/36376594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTenant(Integer tenantId) { RemoteTenant r = remoteTenantDAO.get(tenantId); if (r != null) { itemDAO.removeItems(r.getId()); remoteTenantDAO.remove(r.getOperatorId(), r.getStringId()); } } COM: <s> removes a tenant with all its dependencies items actions </s>
funcom_train/46727223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveChanges(ISEvent event, Object value) throws Exception { try { getDialogModel().validateControls(); getDefaultBaseModel().validateDataModel(); // since we are modifying a copy, copy changes back // apply changes original.copyAllFrom(getDefaultBaseModel()); long itemId = ClinicalService.store(original); original.setId(itemId); // forward to parent mediator } catch (ISValidateControlException validateException) { super.warning(validateException); throw validateException; } } COM: <s> save the form model displaying any validation errors </s>
funcom_train/26625761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Remove(long seqno) { Entry e; synchronized(msgs) { for(int i = 0; i < msgs.size(); i++) { e = (Entry)msgs.elementAt(i); synchronized(e) { if(seqno < e.low || seqno > e.high) continue; e.remove(seqno); if (e.low > e.high) { e.cancel(); msgs.removeElementAt(i); } } break; } } } COM: <s> remove the given sequence number from the list of seqnos eligible </s>
funcom_train/9489924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateCursor3D() { // Application.debug("hits ="+getHits().toString()); if (hasMouse) getEuclidianController().updateNewPoint(true, getHits().getTopHits(), true, true, true, false, // TODO doSingleHighlighting = false ? false); } COM: <s> update the 3 d cursor with current hits </s>
funcom_train/21995965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL getHomeContentUrl() throws BusException { try { SiteRec rec = (SiteRec)getDB().getRec(Site.SITE_HOME, null); return rec.getContentURL(); } catch (DatabaseException e) { throw new BusException("db-problem obtaining home content address", e); } } COM: <s> obtain the home content address null if not set </s>
funcom_train/15922816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Package findPackage(QName name) throws SemanticException { Package p = cachedPackages.get(name); if (p == null) { if (inner == null) { throw new SemanticException("Package with name "+name+" not found"); } return inner.findPackage(name); } return p; } COM: <s> find a package by name </s>
funcom_train/43269026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLinkName(String linkName) { // Error handiling to match database schema if ((linkName != null) && (linkName.length() > 50)) { linkName = linkName.substring(0, 50); System.err.println( "WARNING: Truncating linkName to 50 characters"); } rebuildStringValue = true; // Need to rebuild the value used for hashing. this.linkName = linkName; } COM: <s> sets the code link template code link name attribute </s>
funcom_train/32144227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showTableReport(UjoTable table, String title) { try { TableReport report = new TableReport(applContext, null); String content = report.printTable(table.getStringModelArray(true), title, true); applContext.showReport(content); } catch (Throwable e) { super.showMessage("Can't open report", e); } } COM: <s> show an info dialog result to clibpoard is finished </s>
funcom_train/1649063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public USKRetriever subscribeContent(USK origUSK, USKRetrieverCallback cb, boolean runBackgroundFetch, FetchContext fctx, short prio, RequestClient client) { USKRetriever ret = new USKRetriever(fctx, prio, client, cb, origUSK); subscribe(origUSK, ret, runBackgroundFetch, client); return ret; } COM: <s> subscribe to a usk </s>
funcom_train/1799060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAttribute(AttributeKey<?> attKey, Attribute attribute) { throwExceptionIfLocked(); if (state.attributes == null) { state.attributes = new LinkedHashMap<QName, Attribute>(); } state.attributes.put(attKey.getId(), attribute); } COM: <s> puts an attribute into the attribute map creating the map if needed </s>
funcom_train/24570026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int CountDiffers(PlayerEx p1, IPlayerInfo pinfo) { int rtv = 0; if (!pinfo.getEmailAddress().equals(p1.getEmail())) rtv++; if (pinfo.getHandicap() != p1.getHandicap()) rtv++; if (!pinfo.getHandicapType().toString().equals(p1.gethandicapType())) rtv++; return rtv; } COM: <s> reports the number of differences between the two players information </s>
funcom_train/43875140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Sequence getSequence() { SequenceBuilder sequenceBuilder = LinearSequence.newBuilder(); sequenceBuilder.add(Phase.ENTER, new EntryStep()); //if control, create a new builder for inner //sequence if(control!=null) { SequenceBuilder innerBuilder = control.getBuilder(); addSteps(innerBuilder); //add inner control sequence to builder sequenceBuilder.add(innerBuilder.build()); } else { addSteps(sequenceBuilder); } sequenceBuilder.add(Phase.LEAVE, new ExitStep()); return sequenceBuilder.build(); } COM: <s> returns the process sequence </s>
funcom_train/16851569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String save(){ if( page != null ){ PageDao dao = new PageDao(); try { log.debug("saving page with isPublic = " + page.getIsPublic() ); Page newObj = dao.save( page ); ServletActionContext.getRequest().setAttribute(Constants.ATTRIB_USER, newObj ); log.debug("save user completed; returning SUCCESS."); return SUCCESS; } catch (Exception e) { e.printStackTrace(); } return ERROR; } return "RETRY"; } COM: <s> save the page </s>
funcom_train/18466565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadImages() { int listSize = pictures.size(); for (int i = index - POSTLOADED; i < index + PRELOADED; i++) { if (i >= 0 && i < listSize) { PictureInterface pic = pictures.get(i); // check if this picture is loaded if (!imageMap.containsKey(pic)) { Image img = loadImage(pic); synchronized (imageMap) { imageMap.put(pic, img); } } } } } COM: <s> loops through the set window and loads images which are within this </s>
funcom_train/17944300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateIcon() { String icon = Main.isSilent() ? silentIcon : normalIcon; Image image = Toolkit.getDefaultToolkit().getImage( ClassLoader.getSystemClassLoader().getResource(icon)) .getScaledInstance(16, 16, Image.SCALE_SMOOTH); trayIcon.setImage(image); } COM: <s> reloads tray icon </s>
funcom_train/36454414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Page findByCriteriaCascade(Class<?> clazz,Page page,String[] alias, Criterion... criterions) throws DaoException{ Assert.notNull(page); Criteria c = getSession().createCriteria(clazz); if(null!=alias && alias.length>0){ for(String alia : alias){ String[] arr = alia.split(","); String org = arr[0];//原名 String dest = arr[1];//别名 c.createAlias(org, dest);//创建查询对象别名 } } for (Criterion criterion : criterions) { c.add(criterion); } this.findByCriteriaCommon(page, c); return page; } COM: <s> criterion user u </s>
funcom_train/37034203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send( Ajp13Packet msg ) throws IOException { if (debug > 0) { logger.log("send()"); } msg.end(); // Write the packet header byte b[] = msg.getBuff(); int len = msg.getLen(); if (debug > 5 ) logger.log("send() " + len + " " + b[0] ); out.write( b, 0, len ); } COM: <s> send a packet to the web server </s>
funcom_train/29913690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object PALO_ELEVEL(String servdb, String dimensionName, String elementName) { try { Element element = getElement(servdb, dimensionName, elementName); if ( element == null ) return null; return new Double(element.getLevel()); } catch( Exception e ) { return null; } } COM: <s> returns the level of a certain element within the consolidation hierachy </s>
funcom_train/17475009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected FilterInvocation getRequestedResource(String url) { MockHttpServletRequest request = new MockHttpServletRequest(pageContext .getServletContext()); request.setServletPath(url); FilterChain filterchain = new FilterChain() { public void doFilter(ServletRequest arg0, ServletResponse arg1) throws IOException, ServletException { } }; FilterInvocation object = new FilterInvocation(request, pageContext .getResponse(), filterchain); return object; } COM: <s> get filter invocation from the url </s>
funcom_train/18469082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PreparedStatement getPreparedStatement(Connection connection) { try { buildWhereClauses(); String sql = getQuery() + prepareStatementWhereClause + getOrderByClause(); System.out.println("sql = " + sql); PreparedStatement preparedStatement = connection.prepareStatement(sql); fillPreparedStatement(preparedStatement); return preparedStatement; } catch (SQLException e) { e.printStackTrace(); } return null; } COM: <s> this is used only for search </s>
funcom_train/45715309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeYtemByIndex(CellOJ cell, int ytemIndex) { cell.removeYtemByIndex(ytemIndex); if (cell.getYtemsCount() == 0) { removeCell(cell); } qualifyCell(cell); OJ.getEventProcessor().fireYtemChangedEvent(); } COM: <s> removes one ytem in a cell and removes cell if it becomes empty </s>
funcom_train/9920782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cards getCards(){ Cards temp = new Cards(totalPlayers, false); temp.makeSharedCards(cards.SharedCards); temp.makeYourHand(toBet.getAIsHand().FirstCard, toBet.getAIsHand().SecondCard); return temp; } COM: <s> returns a code cards code object indicating the cards that have </s>
funcom_train/37646247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean allowClientMode() { //if is a supernode, and have other connections (client or ultrapeer), //or the supernode status is forced, dont change mode int connections=getNumInitializedConnections() +getNumInitializedClientConnections(); if (_settings.getForceSupernodeMode() || (isSupernode() && connections > 0)) return false; else return true; } COM: <s> returns true if this can safely switch from supernode to leaf mode </s>
funcom_train/31745821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LegalEntity getAnonymousLegalEntity(String[] fetchGroups, int maxFetchDepth, ProgressMonitor monitor) { anonymousAnchorID = AnchorID.create( SecurityReflector.getUserDescriptor().getOrganisationID(), LegalEntity.ANCHOR_TYPE_ID_LEGAL_ENTITY, LegalEntity.ANCHOR_ID_ANONYMOUS ); return getJDOObject(null, anonymousAnchorID, fetchGroups, maxFetchDepth, monitor); } COM: <s> returns the anonymous legal entity for the organisation of the currently </s>
funcom_train/5463278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reinfer(URI baseGraph) throws SailException { if (infsail.hasView(baseGraph)) { for (View view : infsail.getViews(baseGraph)) { Reasoner r = new Reasoner(); r.applyAxioms(this, view.base, view); r.applyRules(this, view.base, baseGraph, view); } } } COM: <s> pretend the triples in base graph were just re added </s>
funcom_train/4014202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyLabelReplaceText(HashMap<Label,String> labelReplaceText){ Iterator<Entry<Label,String>> iterator = labelReplaceText.entrySet().iterator(); while(iterator.hasNext()){ Entry<Label,String> entry = iterator.next(); this.labelReplaceText.put(entry.getKey(), entry.getValue()); } } COM: <s> copies from a given label replace text map to our class level one </s>
funcom_train/22564900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void exportModelEntity(final ICompetenceMap competenceMap) throws Exception { final ServiceContext ctx = PortletUtils.getServiceContext(); competence = CompetenceFactory.createCompetence(competenceMap.getPrimaryKey(), ctx); competence.setDescription(getDescription() == null ? "geen" : getDescription()); competence.setTitle(getTitle()); competence.setType(getCompetenceType()); competence.save(); for (ColoCompetenceLevel level : getLevels()) { ((ColoCompetenceLevel) level).exportModelEntity(competence); } } COM: <s> export model entity to liferay tencompetence model </s>
funcom_train/13754317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHeaderText() { HeaderStories hs = new HeaderStories(doc); StringBuffer ret = new StringBuffer(); if(hs.getFirstHeader() != null) { appendHeaderFooter(hs.getFirstHeader(), ret); } if(hs.getEvenHeader() != null) { appendHeaderFooter(hs.getEvenHeader(), ret); } if(hs.getOddHeader() != null) { appendHeaderFooter(hs.getOddHeader(), ret); } return ret.toString(); } COM: <s> grab the text from the headers </s>
funcom_train/39314497
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFlipInt(){ System.out.println("testFlipInt"); byte flip [] = new byte[2]; flip[0] = 1; flip[1] = 1; short expected = convert.flipInt(flip); assertEquals(257,expected); System.out.println("Done testFlipInt"); } COM: <s> test of flip int method of class converter </s>
funcom_train/7505315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isFirstResultParameter(int parameterIndex, Class<?>[] parameterTypes, Annotation[][] parameterAnnotations) { boolean result = false; for (Annotation annotation : parameterAnnotations[parameterIndex]) { if (annotation instanceof FirstResult && int.class.isAssignableFrom(parameterTypes[parameterIndex])) { result = true; break; } } return result; } COM: <s> check if a parameter is for the first result value for the query </s>
funcom_train/44890513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean hasStatementPlaceholders(SimpleNode pattern) { for (int i = 0; i < pattern.getNumChildren(); i++) { if (this.isStatementPlaceholderNode(pattern.getChild(i)) || this.isStatementListPlaceholderNode(pattern.getChild(i))) return true; } return false; } COM: <s> precondition is statement list node pattern </s>
funcom_train/48868855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToggleButton getUseCaseButton() { if (useCaseButton == null) { useCaseButton = new JToggleButton("UseCase",new ImageIcon("resources/images/useCase.png")); useCaseButton.setToolTipText("UseCase"); group.add(useCaseButton); useCaseButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setSelectedButton(USE_CASE); } }); } return useCaseButton; } COM: <s> this method initializes use case button </s>
funcom_train/14158800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getValid() { int selected=0; if(data!=null){ for(int i=0;i<data.length;i++){ if( data[i][INTF_SELECTED]!=null && ((DescInfo)data[i][INTF_DESC_VALID]).isValid()){ selected++; } } } return selected; } COM: <s> return the number of interfaces selected for the creation with valid params </s>
funcom_train/20307854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rule cloneRule() { if (getNumVars() > 0) { HashMap vmap = new HashMap(); return new Rule(name, cloneClauseArray(head, vmap, null), cloneClauseArray(body, vmap, null)); } else { return this; } } COM: <s> clone a rule cloning any embedded variables </s>
funcom_train/44166284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkHighScore() { HashMap<String, String> results = loadMap("highScore"); return (askHandling(new TrivialMessage("checkHighScore"), null, results) && results.get("highScore") != null) ? Boolean.parseBoolean(results.get("highScore")) : false; } COM: <s> server query response for checking the high score </s>
funcom_train/12178129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flushRemoteCache(String path) { Group group = policyCache.getRemotePartitionGroup(path); if (group == null) { // No group exists so maybe the path relates to a specific policy // so try and flush it. policyCache.flushRemotePolicy(path); } else { group.flush(null); } } COM: <s> flushes the remote cache </s>
funcom_train/27899293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertFormElementEmpty(String formElementName) { assertFormElementPresent(formElementName); assertEquals("", getTestingEngine().getElementAttributByXPath( "//input[@name='" + formElementName + "']", "value")); } COM: <s> assert that a form element had no value is empty </s>
funcom_train/23227996
/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 ("ContractStoreAgent".equals(portName)) { setContractStoreAgentEndpointAddress(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/12187270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String convertQName(String qName, String convertedLocalName) { String convertedQName = convertedLocalName; int index = qName.indexOf(':'); if (index != -1) { convertedQName = qName.substring(0, index + 1) + convertedLocalName; } return convertedQName; } COM: <s> convert the q name to uppercase or lowercase whilst preserving the </s>
funcom_train/22110162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object processElement ( Object objIn, Object jobData ) { if (jobData == null) { return objIn; } AppdefPagerFilter[] filters = (AppdefPagerFilter[]) jobData; for (int i=0; i<filters.length; i++) { if ( filters[i].isCaught( objIn ) ) { return null; } } return objIn; } COM: <s> process the element according to our filter list and return the </s>
funcom_train/11387238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getCountQuery() { if(dbConf.getInputCountQuery() != null) { return dbConf.getInputCountQuery(); } StringBuilder query = new StringBuilder(); query.append("SELECT COUNT(*) FROM " + tableName); if (conditions != null && conditions.length() > 0) query.append(" WHERE " + conditions); return query.toString(); } COM: <s> returns the query for getting the total number of rows </s>
funcom_train/10602065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Machine getMachine() { Machine machine = null; Identifiable[] _identifiables = getIdentifiables(); int i = 0; while (machine == null && i < _identifiables.length) { if (_identifiables[i] instanceof Machine) { machine = (Machine) _identifiables[i]; } i++; } return machine; } COM: <s> returns the machine of this identity </s>
funcom_train/29986603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MethodDoc getMethodDoc(final MethodDoc originalDoc) { if (originalDoc == null) { return null; } Object found = get(originalDoc); if (found == null) { found = this.factory.createMethodDoc(originalDoc); put(originalDoc, found); } return (MethodDoc) found; } COM: <s> returns a wrapped instance of the supplied method doc object </s>
funcom_train/22360473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CoordinateID getRelatedCoordinate(CoordinateID c) { if (c == null) return null; if (c.getZ() != fromLevel) return null; return CoordinateID.create(c.getX() * scaleX + getX(), c.getY() * scaleY + getY(), getZ()); } COM: <s> translates a coordinate in </s>
funcom_train/47889049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getFileMenu() { if (fileMenu == null) { final String path = CcCommons.language.getMenuSubDirectory(); Point p = CcCommons.language.getMenuFileLocation(); fileMenu = new TuxButton(path +"file.png", new Rectangle(p.x, p.y, 50, 24)); this.constructFileMenu(); } return fileMenu; } COM: <s> this function initializes file menu </s>
funcom_train/12551051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void highlightNodeToggle(char c) { //Get the node's index int my_index = translateCharIndex(c); //If the node isn't activated, we shouldn't change it. if(!my_nodeset[my_index].isActivated()) return; //Toggle the node's highlighting my_nodeset[my_index].toggleHighlighted(); } COM: <s> function highlight node toggle </s>