__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/10204902
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMOppositePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MReference_mOpposite_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MReference_mOpposite_feature", "_UI_MReference_type"), ClassDiagramPackage.Literals.MREFERENCE__MOPPOSITE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the mopposite feature </s>
funcom_train/34347635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createSimpleDCSQuery(SparqlQueryParameter p, String s) { StringBuilder builder = new StringBuilder(); // create prefixes builder.append(PREFIX_ONTOLOGY_DCS); builder.append("\n"); builder.append(PREFIX_ONTOLOGY_CORE); builder.append("\n"); builder.append("PREFIX pref:"); builder.append(p.getPrefix()); builder.append("\n"); builder.append("SELECT ?value "); builder.append("WHERE { pref:"); builder.append(p.getValue()); builder.append(" "); builder.append(s); builder.append(" ?value}"); return builder.toString(); } COM: <s> create simple select query with custom ontology </s>
funcom_train/2036592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initSensorFiled() { ListStore<ModelData> sensorStore = sensorField.getStore(); sensorStore.removeAll(); for (Sensor sensor : device.getSensors()) { ComboBoxDataModel<Sensor> sensorRefSelector = new ComboBoxDataModel<Sensor>(sensor.getName(), sensor); sensorStore.add(sensorRefSelector); } } COM: <s> inits the sensor filed added the devices sensors into a combobox for selection </s>
funcom_train/12694142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh() { menuBar.removeAll(); menuBar.add(plugins.get(mainPane.getSelectedIndex()).getMainMenu()); for(JMenu menu : plugins.get(mainPane.getSelectedIndex()).getMenuList()){ menuBar.add(menu); } //this.remove(menuBar); this.setJMenuBar(menuBar); } COM: <s> refreshes the window plugin tabs menu bars </s>
funcom_train/2037622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMaxTrackImageUploaded() { if (maxTrackImage != null && !maxTrackImage.isEmpty()) { String imageURL = maxTrackImage.getSrc(); return !(DEFAULT_HORIZONTAL_MAXTRACK_IMAGE.equals(imageURL) || DEFAULT_VERTICAL_MAXTRACK_IMAGE.equals(imageURL)); } return false; } COM: <s> not upload the default max track image </s>
funcom_train/29561760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNonIndexString(int attrId, String value){ if (nonIndexAttrs == null) { nonIndexAttrs = new TIntObjectHashMap<String>(4, 1.0f); // high load factor to get compact map } nonIndexAttrs.put(attrId, value); } COM: <s> add a non index string to this object e </s>
funcom_train/20608956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getJLPassword() { if (jLPassword == null) { jLPassword = new JLabel(); jLPassword.setText("Password :"); jLPassword.setLocation(new Point(15, 131)); jLPassword.setHorizontalAlignment(SwingConstants.CENTER); jLPassword.setHorizontalTextPosition(SwingConstants.CENTER); jLPassword.setSize(new Dimension(80, 27)); } return jLPassword; } COM: <s> this method initializes j lpassword </s>
funcom_train/45253350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createHeapStatus(Composite parent) { heapStatus = new HeapStatus(parent, PrefUtil .getInternalPreferenceStore()); // Subclass the trim to allow closing... heapStatusTrim = new WindowTrimProxy(heapStatus, "org.eclipse.ui.internal.HeapStatus", //$NON-NLS-1$ WorkbenchMessages.TrimCommon_HeapStatus_TrimName, SWT.BOTTOM | SWT.TOP) { public void handleClose() { getControl().dispose(); } public boolean isCloseable() { return true; } }; } COM: <s> creates the controls for the heap status indicator </s>
funcom_train/2445392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putKeyValuePair(String keyValuePair, String keyValueSeparator) { if (keyValuePair == null || keyValueSeparator == null) { return; } int index = keyValuePair.indexOf(keyValueSeparator); if (index > 0) { String key = keyValuePair.substring(0, index); String value = keyValuePair.substring(index + 1); putString(key, value); } } COM: <s> put the key value pair defined by the string </s>
funcom_train/23235623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init(boolean initialDownload) { String updatePropertiesFile = ClientGameConfiguration.get("UPDATE_SERVER_FOLDER") + "/update.properties"; if (bootProp != null) { serverFolder = bootProp.getProperty("server.folder", ClientGameConfiguration.get("UPDATE_SERVER_FOLDER")) + "/"; updatePropertiesFile = bootProp.getProperty("server.update-prop", serverFolder + "update.properties"); } HttpClient httpClient = new HttpClient(updatePropertiesFile, initialDownload); updateProp = httpClient.fetchProperties(); } COM: <s> connects to the server and loads a property object which contains </s>
funcom_train/5375403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkUndoLimit(IUndoableOperation operation) { IUndoContext[] contexts = operation.getContexts(); for (int i = 0; i < contexts.length; i++) { int limit = getLimit(contexts[i]); if (limit > 0) { forceUndoLimit(contexts[i], limit - 1); } else { // this context has a 0 limit operation.removeContext(contexts[i]); } } return operation.getContexts().length > 0; } COM: <s> check the undo limit before adding an operation </s>
funcom_train/28761221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCsslcopysize(String newVal) { if ((newVal != null && this.csslcopysize != null && (newVal.compareTo(this.csslcopysize) == 0)) || (newVal == null && this.csslcopysize == null && csslcopysize_is_initialized)) { return; } this.csslcopysize = newVal; csslcopysize_is_modified = true; csslcopysize_is_initialized = true; } COM: <s> setter method for csslcopysize </s>
funcom_train/25936586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String detectEncoding() { try { ensureHasLocalCopy(); InputStream is = new BufferedInputStream(localDocumentSource.openInputStream()); String encoding = this.encoderDetector.guessEncoding(is); is.close(); return encoding; } catch (Exception e) { throw new RuntimeException("An error occurred while trying to detect the input encoding.", e); } } COM: <s> detects the encoding of the local document source input stream </s>
funcom_train/315704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeSelectedOrders() { List selectedRecords =getSelection(); java.util.Iterator it = selectedRecords.iterator(); Orders selectedOrder = null; while (it.hasNext()) { selectedOrder = (Orders)it.next(); try { selectedOrder.setInvoices(null); selectedOrder.save(); } catch(Exception e) { e.printStackTrace(); } } } COM: <s> remove selected orders from the invoice </s>
funcom_train/9204794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(GL2 gl) { RenderUtilities.pushTransform(gl); RenderUtilities.applyTransform(gl, transform); int fSize = this.fixtures.size(); for (int i = 0; i < fSize; i++) { BodyFixture bodyFixture = this.getFixture(i); Convex convex = bodyFixture.getShape(); // render RenderUtilities.drawShape(gl, convex, false); } RenderUtilities.popTransform(gl); } COM: <s> outlines the body only </s>
funcom_train/2023758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openProject() { int retVal; if (!saveChanges()) return; retVal = fileChooser.showOpenDialog(this); if (retVal != FileChooser.APPROVE_OPTION) return; clear(); filename = fileChooser.getSelectedFile().getAbsolutePath(); setFrameTitle(); setConfirm(); open(filename); } COM: <s> opens an existing project </s>
funcom_train/40677852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static Registry getDefault() { // Need to handle the return value here, as it is a persistent object // i.e. the java proxy should not dispose of the underlying object when finalized return GstObject.objectFor(gst.gst_registry_get_default(), Registry.class, false, false); } COM: <s> retrieves the default registry </s>
funcom_train/41516946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String toBinaryString() { Number num = (Number) toObject(); if (num instanceof BigInteger) { return ((BigInteger) num).toString(2); } else if (num instanceof Long) { return Long.toBinaryString(num.longValue()); } else { return Integer.toBinaryString(num.intValue()); } } COM: <s> returns a binary representation of this value </s>
funcom_train/19388265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceAndFind(String search, String replace, boolean ignoreCase) { find(true, m_view.getTextArea().getCaretPosition(), search, replace, ignoreCase); }//}}} //{{{ findNext() COM: <s> initiates a replace and find action on the text area where the current </s>
funcom_train/50912406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRows() { int rows = 0; if (this.getRowsAttribute() != null) { rows = super.getRows(); } else { CMLArrayList arrayList = (CMLArrayList) this.getFirstCMLChild(CMLArrayList.TAG); if (arrayList != null) { rows = arrayList.getRowCount(); } } return rows; } COM: <s> gets the row count </s>
funcom_train/37819941
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Repetition getFirstParentRepetition() { SynDiaElem tempPosition = position; SynDiaElem oldPosition = null; while (tempPosition != null) { oldPosition = tempPosition; tempPosition = tempPosition.getParent(); // If a position is found checkout, if the actual position // is in the right concatenation if (tempPosition instanceof Repetition) { Repetition tempRepetition = (Repetition) tempPosition; if (oldPosition == tempRepetition.getRight()) { return tempRepetition; } } } return null; } COM: <s> this mehtod returns the first repetition which is around the actual </s>
funcom_train/27727569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Quaternion tilt2quat(VectorN tilts) { tilts.checkVectorDimensions(3); if (tilts.mag() == 0.0) { Quaternion out = new Quaternion(); return out; } else { Matrix Q = this.qMatrix(); Q = Q.times(-1.0); VectorN temp = Q.times(tilts); Quaternion out = new Quaternion(temp); return out; } } COM: <s> compute the perturbation quaternion from 3 tilts performed on the true </s>
funcom_train/45248014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNumberFloatField getJNumberFloatFieldTaxaDCMut() { if (jNumberFloatFieldTaxaDCMut == null) { jNumberFloatFieldTaxaDCMut = new JNumberFloatField(); jNumberFloatFieldTaxaDCMut.setLocation(new Point(345, 186)); jNumberFloatFieldTaxaDCMut.setSize(new Dimension(65, 20)); } return jNumberFloatFieldTaxaDCMut; } COM: <s> this method initializes j number float field taxa dcmut </s>
funcom_train/581097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String replaceEvery( String command, String find, String replace ) { String upCommand = command.toUpperCase(); String upFind = find.toUpperCase(); int pos = 0; while( ( pos = upCommand.indexOf( upFind, pos + 1 ) ) != -1 ){ command = command.substring( 0, pos ) + replace + command.substring( pos + find.length() ); upCommand = command.toUpperCase(); } return command; } COM: <s> replace into command the string find with the string replace </s>
funcom_train/20741270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ScmEntryTO getParentEntry() { ScmEntryTO result = new ScmEntryTO(); result.setKind(ScmEntryTO.KIND_DIR); result.setName(".."); result.setPath(FilenameUtils.getFullPath(getPathWithoutEndSeparator())); return result; } COM: <s> creates a parent entry </s>
funcom_train/43245023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetState() { System.out.println("setState"); String state = ""; ZipCodeObject instance = new ZipCodeObject(); instance.setState(state); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set state method of class org </s>
funcom_train/42279733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getInsertedUserId() { beginAt("/app/users"); assertTablePresent("userList"); assertTextInTable("userList", "Spring"); String[][] sparseTableCellValues = getDialog().getSparseTableBySummaryOrId("userList"); return sparseTableCellValues[sparseTableCellValues.length - 1][0]; } COM: <s> convenience method to get the id of the inserted user </s>
funcom_train/5374221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getEditable () { checkWidget (); // int bits = OS.GetWindowLong (handle, OS.GWL_STYLE); // return (bits & OS.ES_READONLY) == 0; String editableClass = "text-editable"; if (handle.className != null) { int idx = handle.className.indexOf(editableClass); if (idx != -1) { return true; } } return false; } COM: <s> returns the editable state </s>
funcom_train/19064097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToken(Token token) { if (map.containsKey(token)) { // token was added before Integer count = (Integer) map.get(token); int c = count.intValue(); c++; // add increased count to map map.put(token, new Integer(c)); } else { // this is the first this token is added map.put(token, new Integer(1)); } } COM: <s> add token to map </s>
funcom_train/2582326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() throws CloneNotSupportedException { HistogramDataset clone = (HistogramDataset) super.clone(); int seriesCount = getSeriesCount(); clone.list = new java.util.ArrayList(seriesCount); for (int i = 0; i < seriesCount; i++) { clone.list.add(new HashMap((Map) this.list.get(i))); } return clone; } COM: <s> returns a clone of the dataset </s>
funcom_train/46771214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeError(String msg, boolean serious) throws IOException { log.debug("Sending error message '" + msg + "' to client (serious=" + serious + ")"); pipeIn.write(serious ? 2 : 1); pipeIn.write(msg.getBytes()); if (!msg.endsWith("\n")) { pipeIn.write('\n'); } pipeIn.flush(); } COM: <s> send error message to client </s>
funcom_train/34079604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void lowpass(double freq) { int a; // Adjust poles freq *= TWOPI; for (a = 0; a < n_pol; a++) { pol[a] *= freq; } // Add zeros n_zer = n_pol; for (a = 0; a < n_zer; a++) { zer[a] = Double.MIN_VALUE; zertyp[a] = 1; } } COM: <s> adjust raw poles to lp filter </s>
funcom_train/22432849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int transferTo(InputStream in, OutputStream out) { int i,bufRead; byte[] buf = new byte[1024*8]; for (i=0; true; i++) { try { bufRead=in.read(buf); } catch (Exception e) { mylogger.severe("read from in "+e.toString()); break; } if (bufRead<=0) break; try { out.write(buf,0,bufRead); } catch (Exception e) { mylogger.severe("write to out "+e.toString()); break; } } return i; } COM: <s> transfer an input stream to an output stream </s>
funcom_train/50273794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NetServerSocket createNetServerSocket(Map<String,Object> properties, NetAddress localListenAddress) throws IOException { SwitchingNetServerSocket result = new SwitchingNetServerSocket(this, lowerNetLayer.createNetServerSocket(properties, localListenAddress)); addToLayer(result); return result; } COM: <s> create a server connection </s>
funcom_train/24933792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(final Object object1, final Object object2) { final int positionOfClass1 = ((MClassInvariant) object1).getPositionInModel(); final int positionOfClass2 = ((MClassInvariant) object2).getPositionInModel(); return compareUtil.compareInt(positionOfClass1, positionOfClass2); } COM: <s> compares two invariants by the order the use file provides </s>
funcom_train/5597520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setToHref() { if (abstractFeature != null) { this.href = abstractFeature.getName(); hiddenFeature = abstractFeature; abstractFeature = null; } else if (samplingPoint != null) { this.href = samplingPoint.getName(); hiddenFeature = samplingPoint; samplingPoint = null; } } COM: <s> set the feature into href mode </s>
funcom_train/29274051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeExternal(ObjectOutput out) throws IOException { out.writeObject(this.getID()); out.writeUTF(this.getPath()); out.writeObject(this.getSize()); out.writeObject(this.getDateAdded()); out.writeObject(this.getDateAccessed()); } COM: <s> writes a string representation of a code document code to an object </s>
funcom_train/51294980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleTableSelectionChange(int[] selectedRows) { if (selectedRows == null) return; if (checkActionIsAvailable(EDIT)) getWrappingAction(EDIT).setEnabled(selectedRows.length == 1); if (checkActionIsAvailable(DEL)) getWrappingAction(DEL).setEnabled(selectedRows.length > 0); if (checkActionIsAvailable(COPY)) { getWrappingAction(COPY).setEnabled(selectedRows.length == 1); } } COM: <s> table selection handler sets menu events availability </s>
funcom_train/33515718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Scan addColumn(byte[] familyAndQualifier) { byte [][] fq = KeyValue.parseColumn(familyAndQualifier); if (fq.length > 1 && fq[1] != null && fq[1].length > 0) { addColumn(fq[0], fq[1]); } else { addFamily(fq[0]); } return this; } COM: <s> parses a combined family and qualifier and adds either both or just the </s>
funcom_train/1952162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getTaxonomyMap( final PhylogenyNode node, final Map<PhylogenyNode, List<String>> map ) { // node is leaf if ( node.isExternal() ) { return; } map.put( node, getSubNodeTaxonomy( node ) ); getTaxonomyMap( node.getChildNode1(), map ); getTaxonomyMap( node.getChildNode2(), map ); } COM: <s> create a map phylogeny node list string the list contains the </s>
funcom_train/21190066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCommandLineUpdate() { fake("accurev_update.txt", 0); AccurevCommandline update; update = AccurevCommand.UPDATE.create(getMockRunner()); assertFalse(update.isSuccess()); update = AccurevCommand.UPDATE.create(getMockRunner()); update.run(); assertTrue(update.isSuccess()); } COM: <s> runs accurev update in the default workspace </s>
funcom_train/28983036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void forwardPacket(Packet packet, long destination) { System.out.println("ForwardEngine/forwardPacket :"); packet.decTTL(); packet.incHopCount(); this.nbHops = packet.getHopCount(); output.getOutputQueue().put(new SentPacket(packet, destination)); } COM: <s> forwards a packet </s>
funcom_train/32751031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean closeDocument() { if ( warnUserOfUnsavedChangesWhenClosing() && hasChanges() ) { if ( !_mainWindow.userPermitsCloseWithUnsavedChanges() ) return false; } _documentListenerProxy.documentWillClose( this ); willClose(); _documentListenerProxy.documentHasClosed( this ); freeResources(); return true; } COM: <s> this method is a request to close a document </s>
funcom_train/42372219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ StringBuffer b = new StringBuffer(); b.append(ontology); b.append(":"); b.append(oClass); if (null!= oIdentifier) { b.append("."); b.append(oIdentifier); } return b.toString(); } COM: <s> returns a string representation of this term </s>
funcom_train/12281058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long skip(long n) { if (this.input == null) throw new IllegalStateException("Closed"); try { return input.skip(n); } catch (IOException e) { throw new DAVException(403, "Can't skip over", e, this.resource); } } COM: <s> p skip a specified amount of data reading from this </s>
funcom_train/31361431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveBoardAbs(int shiftX, int shiftY) { this.shiftX = shiftX; this.shiftY = shiftY; //move boardPane! boardPane.setBounds(shiftX - boundX / 2, shiftY - boundY / 2, boundX, boundY); //no need to redraw boardPane Layers } COM: <s> method move board abs </s>
funcom_train/6435293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean notKilledRule(HashMap<String,String> rule) { if (rule.containsKey("filter")) { if (rule.get("filter").equals("kill") || rule.get("filter").equals("die")) { return false; } } return true; } COM: <s> applies to the at d false alarm rules </s>
funcom_train/48713082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Composite createFilterControls(Composite parent) { createFilterText(parent); if (useNewLook) createClearTextNew(parent); else createClearTextOld(parent); if (clearButtonControl != null) { // initially there is no text to clear clearButtonControl.setVisible(false); } if (filterToolBar != null) { filterToolBar.update(false); // initially there is no text to clear filterToolBar.getControl().setVisible(false); } return parent; } COM: <s> create the filter controls </s>
funcom_train/40943821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Property getContainerProperty(Object itemId, Object propertyId) { if (itemId instanceof Integer) { int pos = ((Integer) itemId).intValue(); if (pos >= 0 && pos < items.size()) { Item item = (Item) items.get(pos); // The BeanItem provides the property objects for the items. return item.getItemProperty(propertyId); } } return null; } COM: <s> the table will call this method to get the property objects for the </s>
funcom_train/18037467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startPipeline() throws FilterException { textNodeBuffer = new StringBuffer(); try { cwbWriter = new BufferedWriter( new OutputStreamWriter( new FileOutputStream(filename), encodage ) ); } catch (IOException e) { throw new FilterException("Error while creating the file: " + e.getMessage(), e ); } super.startPipeline(); } COM: <s> create the file </s>
funcom_train/7673983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void verifyValidExitPredecessor(SsaBasicBlock b) { ArrayList<SsaInsn> insns = b.getInsns(); SsaInsn lastInsn = insns.get(insns.size() - 1); Rop opcode = lastInsn.getOpcode(); if (opcode.getBranchingness() != Rop.BRANCH_RETURN && opcode != Rops.THROW) { throw new RuntimeException("Exit predecessor must end" + " in valid exit statement."); } } COM: <s> validates that a basic block is a valid end predecessor </s>
funcom_train/28133656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createAdapterFacadeEnablingControls(Composite composite, int nColumns) { LayoutUtil.setHorizontalSpan(fFacadeAdapterEnabledCheckbox.getLabelControl(composite), 1); Control control = fFacadeAdapterEnabledCheckbox.getSelectionButtonsGroup(composite); GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); gd.horizontalSpan = nColumns - 2; control.setLayoutData(gd); DialogField.createEmptySpace(composite); } COM: <s> creates the controls for adapter facade creation </s>
funcom_train/13779344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getDefaultValue() { if (defaultValue == null) { if (defaultValueAsString != null) { IString2DataConvertor convertor = String2DataConvertorFactory.getConvertor(getType()); defaultValue = convertor.parse(defaultValueAsString, null, null); } } return defaultValue; } COM: <s> gets the default value for current field </s>
funcom_train/14028994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp() throws Exception { super.setUp(); _replaySyncPoints = new long[REPLAY_SIZE]; _replayWaitArray = new Monitor[REPLAY_SIZE/COMPACT_RECORD_SIZE]; _replayIndex = 0; _replayWaitIndex = 0; _replaying = true; _replayBufferLoaded = false; _baos = new ByteArrayOutputStream(); _writer = new PrintWriter(_baos, true); } COM: <s> sets up the fixture for example open a network connection </s>
funcom_train/3905248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMixedType() { if (!(getXMLType() instanceof XSDComplexTypeDefinition)) { return false; } else { XSDComplexTypeDefinition ctd = (XSDComplexTypeDefinition) getXMLType(); XSDContentTypeCategory contCat = ctd.getContentTypeCategory(); if(contCat.equals(XSDContentTypeCategory.MIXED_LITERAL)){ return true; } } return false; } COM: <s> return whether this element is mixed type can have text and element as </s>
funcom_train/38514831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(ContenderAttribute contenderAttribute) { boolean matches; if (this.matches(contenderAttribute)) { value = value + contenderAttribute.getValue(); matches = true; } else { matches = false; } //System.out.println("CA.add: " + matches + "," + value); return matches; } COM: <s> adds one contender attributes value to this ones and returns true </s>
funcom_train/10512310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validate() throws BuildException { if (null == destFile) { throw new BuildException("Destfile attribute not specified."); } if (destFile.exists() && !destFile.isFile()) { throw new BuildException(destFile + " is not a file."); } } COM: <s> validate the tasks parameters </s>
funcom_train/34441461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator getMIARatings(long low, long high) { ArrayList mias = new ArrayList(); Iterator all = rdvStats.keySet().iterator(); while (all.hasNext()) { String key = (String) all.next(); long rating = getMIARating(key); if (rating >= low && rating <= high) { mias.add(key); } } return mias.iterator(); } COM: <s> return all those that have an mia rating above the threshold like 10 </s>
funcom_train/28368365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEntity(final SituatedEntity e) { final Species species = e.getSpecies(); if (!entities.containsKey(species)) { entities.put(species, new HashSet<SituatedEntity>()); } entities.get(species).add(e); e.setPlace(this); } COM: <s> adds the entity to the place </s>
funcom_train/11729591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstraintViolation() throws RepositoryException { try { Node rootNode = superuser.getRootNode(); String propPath = testPath + "/" + jcrPrimaryType; rootNode.addNode(propPath + "/" + nodeName1, testNodeType); fail("Expected ConstraintViolationException."); } catch (ConstraintViolationException e) { // correct. } } COM: <s> tests if a constraint violation exception is thrown when one attempts </s>
funcom_train/18995301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearOperationResultBitmap(int value) // @E3A { // @E3A if ((operationResultBitmap_ & value) != 0) { // @E3A operationResultBitmap_ ^= value; // @E3A set32bit(operationResultBitmap_, 20); // @E3A } // @E3A } // @E3A COM: <s> clears an operation result from the operation result bitmap </s>
funcom_train/2309683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rebootstrapMemory(Memory memory) { synchronized (memory) { Network network = memory.newMemory(); Vertex language = network.createVertex(new Primitive(Language.class.getName())); Collection<Relationship> states = language.getRelationships(Primitive.STATE); if (states != null) { states = new ArrayList<Relationship>(language.getRelationships(Primitive.STATE)); for (Relationship relationship : states) { relationship.getTarget().unpinDescendants(); relationship.getSource().internalRemoveRelationship(relationship); network.removeRelationship(relationship); } network.save(); } englishNetwork(network); stateMachineNetwork(network); network.save(); } } COM: <s> re initialize the language state machines </s>
funcom_train/9909072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object retriveBusinessEntityObject(String id) throws PojoActionException { CodeTableService service = this.getService(); try { if (id != null && id.length() != 0) { return service.getCodeMap(id); } else { return new CodeMap(); } } catch (CodeTableException e) { throw new UIException(e.getErrorCode(), e); } } COM: <s> retrive code map </s>
funcom_train/35157512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int readInt(Chunk c) throws IOException { DataInputStream in = dataInputStream; c.bytesRead += 4; return (int)(in.read() + (in.read() << 8) + (in.read() << 16) + (in.read() << 24)); } COM: <s> reads an int 32 bit value from the input file </s>
funcom_train/28446302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ASTEnumeration findAllPartial(AST sub) { Vector roots = new Vector(10); AST sibling; // the empty tree cannot result in an enumeration if (sub == null) { return null; } doWorkForFindAll(this, roots, sub, true); // find all matches recursively return new ASTEnumerator(roots); } COM: <s> walk the tree looking for all subtrees </s>
funcom_train/23011248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Layer getLayerByName(String name) { int count = getLayerCount(); if(name!=null) for (int i=0;i<count;i++) { Layer lyr = (Layer)layers.elementAt(i); if(name.equalsIgnoreCase(lyr.getName())) return lyr; } return null; } COM: <s> searches for layer with a specified name </s>
funcom_train/7309036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getComponent() { if (fList == null) { fList= new JList(new StackTraceListModel()); fList.setFont(new Font("Dialog", Font.PLAIN, 12)); fList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); fList.setVisibleRowCount(5); fList.setCellRenderer(new StackEntryRenderer()); } return fList; } COM: <s> returns the component used to present the trace </s>
funcom_train/5853999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canIAbstract(Event e) { if (metadata_I_want == null) { if (data_ids_I_want == null) return true; else return e.isDataIncluded(data_ids_I_want); } else if (data_ids_I_want == null) { return e.areAnyMetadataIncluded(this.getAllMetadata()); } else { return ((e.areAnyMetadataIncluded(this.getAllMetadata())) && (e.isDataIncluded(data_ids_I_want))); } } COM: <s> compares the given metadata items to this abstractors metadata </s>
funcom_train/8934612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JFreeChart getSiteHistory(int siteId,int hours) { try { return monitor.getSiteHistory(siteId,hours); } catch (RemoteException ex) { ex.printStackTrace(); Logger.getLogger(MonitorClient.class.getName()).log(Level.SEVERE, null, ex); } return null; } COM: <s> get site history chart </s>
funcom_train/49410431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(java.io.InputStream stream) throws LANLDIDLException { try { DIDLDeserializerType deserializer = env.getDIDLDeSerializer(); DIDLType didl = (DIDLType) deserializer.read(stream); parse(didl); } catch (Exception ex) { throw new LANLDIDLException("error in parse DIDL", ex); } } COM: <s> initializes an adore didl instance from a input stream stream must be </s>
funcom_train/39117077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDirectoryAsFirstRoot() { try { Enumeration rootsEnum = FileSystemRegistry.listRoots(); if (rootsEnum.hasMoreElements()) { directory = (String) rootsEnum.nextElement(); } else { System.err.println("No root directory is found."); } } catch (SecurityException e) { System.err.println("Not allowed to list the roots. " + e); } } COM: <s> set the code directory code member variable to the first directory </s>
funcom_train/26432842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintTextLayoutTest( Graphics g ) { g.drawImage( this.allImages[ (this.paintTestFontIndex * this.TESTABLE_FONTS) + testState ], this.dim.width/2, 0, this ); paintQuery( this.textLayoutTest_query, g ); } COM: <s> paints the screen that the user is presented with </s>
funcom_train/4785946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSubTaskPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Task_subTask_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Task_subTask_feature", "_UI_Task_type"), ModelPackage.Literals.TASK__SUB_TASK, false, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the sub task feature </s>
funcom_train/46511181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void month_computeDate () { int old, ne; old = currentDate.get(Calendar.MONTH); currentDate.set(Calendar.MONTH, month.getSelectedIndex()); ne = currentDate.get(Calendar.MONTH); firePropertyChange("Change Month", old, ne); } COM: <s> refreshes the current date variable and fires a </s>
funcom_train/8231607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPopularityClassSize(int popClass) { if (Consts_1st.ePB_UNINIT == k) { return Consts_1st.ePB_UNINIT; } if (popClass >= k+1 || 0 > popClass) { return Consts_1st.eINVALID; } return moviesList[popClass] - ((0 == popClass)? 0 : moviesList[popClass-1]); } COM: <s> returns number of members in the desired popularity class </s>
funcom_train/1563892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void injectMessageBundles(MessageBundle bundle, Node scriptTag) throws GadgetException { String msgs = bundle.toJSONString(); Text text = scriptTag.getOwnerDocument().createTextNode("gadgets.Prefs.setMessages_("); text.appendData(msgs); text.appendData(");"); scriptTag.appendChild(text); } COM: <s> injects message bundles into the gadget output </s>
funcom_train/26206152
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setClassLoader(ClassLoader classLoader) { if (classLoader == null) { classLoader = Thread.currentThread().getContextClassLoader(); if (classLoader == null) { classLoader = getClass().getClassLoader(); } } this.classLoader = classLoader; } COM: <s> sets the class loader </s>
funcom_train/26225641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processWindowEvent(WindowEvent e) { if ( !_isClosed && e.getID() == WindowEvent.WINDOW_CLOSING ) { this.setVisible(true); return; } if ( _isClosed ) PropertyManager.getInstance().addPropertyChangeListener( ".user.gui.ConversationFrame", this ); super.processWindowEvent(e); } COM: <s> this is stupid </s>
funcom_train/4530690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCapacity(int new_cap) { if (new_cap != getCapacity()) { byte[] new_data = new byte[new_cap]; if (new_cap < size) { size = new_cap; } if (size != 0) { System.arraycopy(bytes, 0, new_data, 0, size); } bytes = new_data; } } COM: <s> change the capacity of the backing storage </s>
funcom_train/31095968
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCellNumberAtPixel(int screenX, int screenY) { int cellX = (screenX - getX()) / getCellWidth(); int cellY = (screenY - getY()) / getCellHeight(); if (cellX < getColumns() && cellX >= 0 && cellY >= 0 && cellY < getRows()) return getCellNumber(cellX, cellY); else return -1; } COM: <s> get the cellnumber for the cell found at the specified screen </s>
funcom_train/44221470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getNotebookPageCount() { ViewInstance vi = this.get_plugin().get_vsm().get_currentViewInstance(); int pgCount = 0; try { AttributeInstance ai = vi.getAttributeInstance(this.ADDR_NOTEBOOK_PAGES, 0); pgCount = Integer.parseInt(ai.getValueString()); } catch (Exception ex) { ex.printStackTrace(); } return pgCount; } COM: <s> p get the page count from the notebook view </s>
funcom_train/29396982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addJSRInfo(BasicBlock entry, BasicBlock exit, boolean[] locals) { if (jsrInfo == null) { jsrInfo = new HashMap<BasicBlock, JSRInfo>(); } JSRInfo nfo = new JSRInfo(entry, exit, locals); jsrInfo.put(entry, nfo); jsrInfo.put(exit, nfo); } COM: <s> add info about a jsr subroutine </s>
funcom_train/3907082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setElement(DataElement dataElement) { /* * Because a focus lost event happens *after* a new component selection, * it's possible this can be set to a new component before we've finished editing. */ if(isEditing()) { finishEdit(); } _dataElement = dataElement; Element element = _dataElement.getElement(); if(element != null) { Attribute att = element.getAttribute("identifier"); if(att != null) { setText(att.getValue()); } else { setText(""); } } } COM: <s> set the parent element of the identifier attribute to be edited </s>
funcom_train/14329787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_unpackProperties_invalidIntegerProperty() { assertSQLExceptionForBadWholeNumberProperty(Driver.PORTNUMBER); assertSQLExceptionForBadWholeNumberProperty(Driver.SERVERTYPE); assertSQLExceptionForBadWholeNumberProperty(Driver.PREPARESQL); assertSQLExceptionForBadWholeNumberProperty(Driver.PACKETSIZE); assertSQLExceptionForBadWholeNumberProperty(Driver.LOGINTIMEOUT); assertSQLExceptionForBadWholeNumberProperty(Driver.LOBBUFFER); } COM: <s> test that an </s>
funcom_train/2306266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkValidityOfShare(String str) throws Exception { Logging.loggerRef.info("METHOD CALLED :checkValidityOfShare :"+str); boolean inValid = false; /*Invalid keywords*/ str = str.trim(); /*Trim is important here*/ String invalidKeywords[] = new String[]{"global","profiles","netlogon","printers","c","homes"}; for (int k = 0; k < invalidKeywords.length;k++) { if (str.equalsIgnoreCase(invalidKeywords[k])) { inValid = true; return inValid; } } return inValid; } COM: <s> function bypasses some share which does not needs to be modified </s>
funcom_train/12901314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Annotation getAnnotation(Object modelObject) { if (modelObject == null) return null; if (modelObject instanceof EObject) { EObject mo = (EObject) modelObject; AnnotationEMF.ParentAdapter a = (AnnotationEMF.ParentAdapter) EcoreUtil.getExistingAdapter(mo, AnnotationEMF.ParentAdapter.PARENT_ANNOTATION_ADAPTER_KEY); return a != null ? a.getParentAnnotation() : null; } else { // Get it from the generic implementer. return getAnnotationFromGeneric(modelObject); } } COM: <s> return the annotation for this model object if any </s>
funcom_train/46837160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getJRadioButtonExample1() { if (jRadioButtonExample1 == null) { jRadioButtonExample1 = new JRadioButton(); jRadioButtonExample1.setOpaque(false); jRadioButtonExample1.setBounds(new java.awt.Rectangle(135, 50, 110, 22)); jRadioButtonExample1.setText("Radiobutton 1"); } return jRadioButtonExample1; } COM: <s> this method initializes j radio button example1 </s>
funcom_train/19754035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SerialClob getClob(String csColName) throws TechnicalException { if(m_resultSet != null) { try { Clob blVal = m_resultSet.getClob(csColName); SerialClob sb = new SerialClob(blVal); return sb; } catch (SQLException e) { forceCloseOnExceptionCatched(); ProgrammingException.throwException(ProgrammingException.DB_ERROR_RESULT_SET_COL_ACCESS_STRING+csColName, m_csQuery, e); } } return null; } COM: <s> added by jilali raki </s>
funcom_train/50575450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int row, int col) { switch(col) { case 0: return ((MusicDevice)musicDevices.get(row)).getName(); case 1: return ((MusicDevice)musicDevices.get(row)).getType(); case 2: return ((MusicDevice)musicDevices.get(row)).getDevice(); default: return null; } } COM: <s> returns data for the table </s>
funcom_train/1957948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateComponent(NwComponent c) { if (c instanceof PCNode) { try { //todo: add context menu for traceroute c.addContextMenu(new PortscanAction((PCNode)c)); c.addContextMenuSeparator(); //Context menu for configuration parser by Geraldine Antener c.addContextMenu(new ParserAction((PCNode)c)); } catch (VerinecException e) { LogUtil.logException(e, getClass().getName(), "updateComponent", "Failed to create a context action"); } } } COM: <s> adds context menues depending on the types </s>
funcom_train/32733673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doEnterPatientCreator() { patient = new EDPatient(); if (criticalCondition.generateInt() == 1) patient.setBeginCritCare(true); waitDelay("ExitPatientCreator", 0.0, Priority.HIGH, patient); firePropertyChange("createCount", ++createCount); } COM: <s> event method for create event </s>
funcom_train/11774218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayLinks() { if(nodeTable.isEmpty()){ System.out.println("There is currently no links within the simulation"); }else{ Enumeration keys = linkTable.keys(); String str; Link tempLink; System.out.println("Links within the Simulation:"); while (keys.hasMoreElements()) { str = (String) keys.nextElement(); tempLink = (Link) linkTable.get(str); tempLink.displayDetails(); } } System.out.println(); } COM: <s> displays info about links within simulations link table via system </s>
funcom_train/37444371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() throws CreateException { setUpdateCount(Long.valueOf(0)); try { setObjectID(Long.valueOf(ObjectIDDispenser.getInstance().getNextObjectID())); } catch (final SequentialIDGeneratorException exception) { throw new CreateException(exception.getMessage()); } } COM: <s> initializes this instance </s>
funcom_train/5343975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isActivelyDownloading() { ManagedDownloader md = getMyDownloader(); if(md == null) return false; switch(md.getState()) { case Downloader.QUEUED: case Downloader.BUSY: case Downloader.ABORTED: case Downloader.GAVE_UP: case Downloader.DISK_PROBLEM: case Downloader.CORRUPT_FILE: case Downloader.REMOTE_QUEUED: case Downloader.WAITING_FOR_USER: return false; default: return true; } } COM: <s> returns whether or not we are actively downloading this file </s>
funcom_train/10660838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNameQu_5() throws Exception { String dn = "CN=\"A\\\\\", C=B"; X500Principal principal = new X500Principal(dn); String s = principal.getName(X500Principal.RFC1779); assertEquals("CN=\"A\\\\\", C=B", s); } COM: <s> inits x500 principal with the string with special characters cn a c b </s>
funcom_train/14462897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateRecord(){ setOpcode(XLSConstants.FORMAT); byte[] data= ByteTools.shortToLEBytes(ifmt); try { data= ByteTools.append(strbytes, data); } catch (Exception e) { Logger.logWarn("ERROR Format.updateRecord: decoding formula string failed: " + e);} this.setData(data); } COM: <s> update the record byte array with the modified values </s>
funcom_train/28984260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getCbSommerAussen() { if (cbVegRuheAussen == null) { cbVegRuheAussen = new JCheckBox(); cbVegRuheAussen.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { farbenAussen[1] = new Filling(labelVegRuheAussen.getBackground(), cbVegRuheAussen.isSelected()); } }); } return cbVegRuheAussen; } COM: <s> this method initializes cb sommer aussen </s>
funcom_train/29618087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MgisNotesButton getJButtonLossNotes() { if (jButtonLossNotes == null) { jButtonLossNotes = new MgisNotesButton(m_pdf.getRootPane()); jButtonLossNotes.setText(AppTextsDAO.get("LABEL_NOTES")); jButtonLossNotes.setBounds(90, 45, 70, 19); } return jButtonLossNotes; } COM: <s> this method initializes j button loss notes </s>
funcom_train/43246137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetConfAddrFromDate() { System.out.println("getConfAddrFromDate"); AddlDemographicsObject instance = new AddlDemographicsObject(); Calendar expResult = null; Calendar result = instance.getConfAddrFromDate(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get conf addr from date method of class org </s>
funcom_train/11012648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testarraycopy() { byte[] bytes = new byte[] { 0x01, 0x02, 0x03, 0x04 }; // Test copy whole thing byte[] dest = new byte[4]; ArrayUtil.arraycopy(bytes, 0, dest, 0, 4); assertEquals(dest.length, bytes.length); for(int i=0; i<dest.length; i++) { assertEquals(bytes[i], dest[i]); } // ToDo - test exceptions are as expected } COM: <s> test to ensure that our own arraycopy behaves as it should do </s>