__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/41164821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(OpenResponse2 entity) { EntityManagerHelper.log("saving OpenResponse2 instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved open response2 entity </s>
funcom_train/17670413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAbsPath() { String fnChunk = fileName; String abp = ""; abp = lastParentPath + "/" + fnChunk; abp = normalizeSlashes(prefix) + "/" + normalizeSlashes(abp); abp = abp.replaceAll("/+", "/"); return abp; } COM: <s> try to build the full absolute path </s>
funcom_train/25841601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRequestUrl() { String stringParams = (mParameters.isEmpty()) ? "" : (urlParameters(mParameters) + "&"); String requestUrl = FB.REST_URI + stringParams + "sig=" + FBMethod.signature(mMd5, mParameters, mSecret); return requestUrl; } COM: <s> generate the full url to be used to execute this method </s>
funcom_train/46860953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String md5(byte[] data) { try { MessageDigest hash = MessageDigest.getInstance("MD5"); hash.update(data); return String.format("%032x", new BigInteger(1, hash.digest())); // as hex string } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); // won't happen } } COM: <s> calculate md5 hash </s>
funcom_train/14244695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteReception(Integer index) { Object target = getTarget(); if (target instanceof MSignal) { MSignal signal = (MSignal)target; MReception reception = (MReception)UMLModelElementListModel.elementAtUtil(signal.getReceptions(), index.intValue(), null); signal.removeReception(reception); } } COM: <s> deletes the reception at index from the list with receptions </s>
funcom_train/14077995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLabels() { loadFileCheckBox.setText(Application.getLocalizedString("dialog.preference.pane.filedir.open_at_start")); setLoadfileButton.setText(Application.getLocalizedString("dialog.preference.pane.general.choose_button")); loadfileTextField.setText(Application.getLocalizedString("dialog.preference.pane.filedir.none")); } COM: <s> set the labels using internationalized strings </s>
funcom_train/31100166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readString() throws IOException { InputStreamReader reader = new InputStreamReader(in, "ISO-8859-1"); StringBuffer buf = new StringBuffer(); int ch = reader.read(); while (ch != 0) { buf.append((char)ch); ch = reader.read(); } return buf.toString(); } COM: <s> parses a zero terminated string out of the stream </s>
funcom_train/26595316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getColumnValues(_Reference columnReferences) throws DException { int index = getIndexFromMapping( ( (ColumnDetails) columnReferences).getTable()); return index != -1 ? iterators[tableDetailsMapping[index][1].hashCode()].getColumnValues(columnReferences) : getColumnValueFromAll(columnReferences); } COM: <s> this method is used to retrieve the values of passed reference </s>
funcom_train/13952786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NSTimestamp workStartDate() { Calendar cal = Calendar.getInstance(); cal.setTime(myStartDate); cal.set(Calendar.HOUR_OF_DAY, 9); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MILLISECOND, 0); NSTimestamp workStart = new NSTimestamp(cal.getTime()); return workStart; } COM: <s> returns the timestamp representing 9am on this day </s>
funcom_train/47947932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLonAxisMaxValueAsString() { CoordinateAxis axis = getLonAxis(); if (axis == null) { return null; } MAMath.MinMax minMax = NetCdfWriter.getMinMaxSkipMissingData(axis, null); return NetCdfReader.getStandardLonAsString(minMax.max); } COM: <s> gets the maximum value of the longitude axis </s>
funcom_train/25639409
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Content getNavLinkClassIndex() { Content allClassesContent = getHyperLink(relativePath + AllClassesFrameWriter.OUTPUT_FILE_NAME_NOFRAMES, "", allclassesLabel, "", ""); Content li = HtmlTree.LI(allClassesContent); return li; } COM: <s> get link for generated index </s>
funcom_train/45077702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHL72DateWithTimeZone() { Date dd = ISODate.HL72Date("20021225123015CET"); Calendar cc = Calendar.getInstance(); cc.setTime(dd); int i = cc.compareTo(c); assertEquals(0,i); // assertEquals(c.toString(), cc.toString()); } COM: <s> method test hl72 date with time zone </s>
funcom_train/41842918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColorMap(ColorMap cm) { // if a new colormap was selected, change it and repaint visualization area if (this.cm == null) // no colormap assigned before this.cm = cm; else { // colormap already assigned if (!(this.cm.getClass() == cm.getClass())) { // a new colormap is assigned this.cm = cm; // force repaint to apply the new colormap this.setLoadBufferedImage(false); } } } COM: <s> sets the colormap for the visualizations </s>
funcom_train/37648630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHashCode2() { Property p1 = new Property(); p1.setName("p1"); p1.setValue("value1"); Property p2 = new Property(); p2.setName("p2"); p2.setValue("value1"); assertFalse("2 different properties should have different hashCodes", p1.hashCode() == p2.hashCode()); } COM: <s> 2 different properties must have the different hash codes </s>
funcom_train/17789103
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkPassword(String userName, String userPassword) { boolean userIndentification = false; SQLExecuter Ex = new SQLExecuter(); String sql = "SELECT UserPassword FROM User WHERE UserName='" + userName + "'"; ResultSet rs = Ex.executeQuery(sql); try { userIndentification = rs.getString("UserPassword").equals( userPassword); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return userIndentification; } COM: <s> is not used </s>
funcom_train/46457904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if(column==0) { setHorizontalAlignment(SwingConstants.RIGHT); } else { setHorizontalAlignment(SwingConstants.CENTER); } setText(value.toString()); setPreferredSize(new Dimension(20, 18)); return this; } COM: <s> returns a label for the specified cell </s>
funcom_train/14159078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean propertiesAreValid() { for (int row = propertiesModel.getRowCount() - 1; row >= 0; --row) { Object name = propertiesModel.getValueAt(row, PROPERTY_NAME_COLUMN); Object value = propertiesModel.getValueAt(row, PROPERTY_VALUE_COLUMN); if (isBlank((String) name) && !isBlank((String) value)) { return false; } } return true; } COM: <s> validates current properties values </s>
funcom_train/51299730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getGoodsIdASMenuSpecificationId(int g_id) { String sql = "SELECT id FROM menu_tree WHERE ref_goods = " + g_id; ResultSet res = null; try { res = DBAccessor.getInstance().makeSelect(sql); if (res.next()) { return res.getInt("id"); } } catch (SQLException ex) { ex.printStackTrace(); } finally { DBAccessor.getInstance().releaseConnection(res); } return 0; } COM: <s> retrieve menu items good id by link to a good </s>
funcom_train/35195136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CharArray with(final char newChar) { final char[] newChars = new char[chars.length + 1]; System.arraycopy(chars, 0, newChars, 0, chars.length); newChars[chars.length] = newChar; return new CharArray(newChars); } COM: <s> creates a code char array code with an appended code char code </s>
funcom_train/925987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeExternal(DataOutput out) throws IOException { super.writeExternal(out); int blockHashCount = blockHashes == null ? 0 : blockHashes.length; out.writeInt(blockHashCount); for(int i=0; i<blockHashCount; i++) { blockHashes[i].writeExternal(out); } } COM: <s> writes this code file hash code to the given output </s>
funcom_train/26402174
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getUploadLocation() { if (uploadLocation == null) { String initParm = getServletConfig().getServletContext().getInitParameter(UPLOAD_TEMP_DIR); File f = new File(initParm); if (f.isDirectory()) { uploadLocation = f; } else { uploadLocation = new File(System.getProperty("user.dir")); } } return uploadLocation; } COM: <s> retrieve the location i </s>
funcom_train/19223956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(ComponentContext cc) throws ComponentExecutionException, ComponentContextException { String str1 = cc.getDataComponentFromInput(DATA_INPUT_1).toString(); _logger.info("Got String1: " + str1); String str2 = cc.getDataComponentFromInput(DATA_INPUT_2).toString(); _logger.info("Got String2: " + str2); _logger.info("Pushing out: " + str1+str2); cc.pushDataComponentToOutput(DATA_OUTPUT_1,str1+str2); } COM: <s> this method just pushes a concatenated version of the entry to the </s>
funcom_train/44851514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JoinedObjectDef createJoinedObjectDef(String inDefinitionString) throws SAXException { try { StringReader lReader = new StringReader(inDefinitionString); InputSource lInputSource = new InputSource(lReader); parser().parse(lInputSource); } catch (Throwable t) { DefaultExceptionWriter.printOut(this, t, true); } return objectDef; } COM: <s> creates a joined object def from a definition string </s>
funcom_train/38852272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getAboutContentPane() { if (aboutContentPane == null) { aboutContentPane = new JPanel(); aboutContentPane.setLayout(new BorderLayout()); aboutContentPane.add(getAboutVersionLabel(), BorderLayout.NORTH); aboutContentPane.add(getJTextPane(), BorderLayout.CENTER); aboutContentPane.add(getJTextPane1(), BorderLayout.SOUTH); } return aboutContentPane; } COM: <s> this method initializes about content pane </s>
funcom_train/5342004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setupTable() { TABLE.setRowHeight(TABLE.getRowHeight() + 1); TABLE.setShowGrid(false); TABLE.setIntercellSpacing(ZERO_DIMENSION); TABLE.setColumnSelectionAllowed(false); TABLE.setTableSettings(SETTINGS); TABLE.getTableHeader().addMouseListener(new FlexibleColumnResizeAdapter()); } COM: <s> sets row heights a little larger than normal turns off </s>
funcom_train/23322876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(int progress) { if ((progress < 0) || (progress > total)) throw new IllegalArgumentException("Progress must be within [0;total]"); if (progress == total) { // make sure the monitors always display the magical "100%" even // if it doesn't fall into the stepsize updateMonitors(1); } else if ((progress % stepsize) == 0) { final float prct = progress / (float) total; updateMonitors(prct); } } COM: <s> inform all monitors that a progress update has occurred </s>
funcom_train/44706253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int numberTasksForUser(BigDecimal userId) { DataQuery query = SessionManager.getSession().retrieveQuery ("com.arsdigita.cms.workflow.getEnabledUserTasks"); query.setParameter("userId", userId); return (new Long(query.size())).intValue(); } COM: <s> returns the number of enabled tasks for the specified user id </s>
funcom_train/3652934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getStylesheetPath(Vocabulary requestProperties) { synchronized(evaluator) { for (int ii = 0; ii < ruleList.size(); ii++) { RuleStylesheetCombo tmplRule = (RuleStylesheetCombo)ruleList.get(ii); if (evaluator.matches(tmplRule.getRule(), requestProperties)) { return tmplRule.getStylesheetPath(); } } } return null; } COM: <s> tries to find a rule that matches the request properties and </s>
funcom_train/50865836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addColorToMineralConcentrationArray(int index, Color color, double concentration) { int concentrationInt = (int) (255 * (concentration / 100D)); int concentrationColor = (concentrationInt << 24) | (color.getRGB() & 0x00FFFFFF); int currentColor = mineralConcentrationArray[index]; mineralConcentrationArray[index] = currentColor | concentrationColor; } COM: <s> adds a color to the mineral concentration array </s>
funcom_train/46701653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o1, Object o2) { if (o1==o2) { return true; } if (o1==null || o2==null) { return false; } if (o1.getClass().isArray()) { return equalsArray(o1, o2); } return o1.equals(o2); } COM: <s> test if object o1 equals ujo o2 </s>
funcom_train/31018233
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point snap(Point p) { if (gridEnabled && p != null) { p.x += gridSize / 2; p.y += gridSize / 2; p.x = (int) Math.round(Math.round(p.x / gridSize) * gridSize); p.y = (int) Math.round(Math.round(p.y / gridSize) * gridSize); } return p; } COM: <s> returns the given point applied to the grid </s>
funcom_train/16411028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension calculateDefaultViewportSize(){ Dimension viewportSize; double aspectRatio = viewbox.getWidth()/viewbox.getHeight(); Dimension desktopSize = Viewer.getViewer().getDesktop().getSize(); double height = desktopSize.width/aspectRatio; if(height <= desktopSize.height){ viewportSize = new Dimension(desktopSize.width, (int)height); } else{ double width = desktopSize.height * aspectRatio; viewportSize = new Dimension((int)width, desktopSize.height); } return viewportSize; } COM: <s> calculate the default viewport size considering available screen size and aspect ratio </s>
funcom_train/18183743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testCreateManagedConnection() throws ResourceException { ManagedConnection managedConnection = managedConnectionFactoryImpl.createManagedConnection(null, connectionRequestInfoImpl); assertThat(managedConnection, is(instanceOf(ManagedConnectionImpl.class))); ManagedConnectionImpl managedConnectionImpl = (ManagedConnectionImpl) managedConnection; assertThat(managedConnectionImpl.getManagedConnectionFactoryImpl(), is(equalTo(managedConnectionFactoryImpl))); } COM: <s> general test of create managed connection method </s>
funcom_train/20827315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(final Metrics other) { int result = getCoverage() - other.getCoverage(); if (result == 0) { result = getStatements() - other.getStatements(); if (result == 0) { result = getNcloc() - other.getNcloc(); } } return result; } COM: <s> compares two metrics for sorting purposes </s>
funcom_train/18241532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void performLayout() { JViewport viewport = new JViewport(); viewport.setView(this.innerPanel); this.scrollPane.setViewport(viewport); this.removeAll(); this.add(this.consensusPanel, BorderLayout.NORTH); this.add(this.scrollPane, BorderLayout.CENTER); this.repaint(); } COM: <s> describe code perform layout code method here </s>
funcom_train/3641036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ServiceProvider getServiceProvider(final String serviceSignature) { ServiceProvider sp = spMap.get(serviceSignature); if (sp == null) { // VT: FIXME: Actually, have to create one throw new IllegalStateException("Don't have a service provider for '" + serviceSignature + "'"); } return sp; } COM: <s> get a service provider for a service </s>
funcom_train/47733548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(boolean printEdgeLength) { String s = ""; if (!isLeaf()) { s += "("; for (Node<T> nodeChild : this.nodeChildren) { s += nodeChild.toString(printEdgeLength) + ","; } s = s.substring(0, s.length() - 1); s += ")"; } if (name != null) { s += name; } if (printEdgeLength) s += ":" + incomingEdgeLength; return s; } COM: <s> parses the object stored in a tt node tt to string </s>
funcom_train/21913192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addStateMachinePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StateMachineFolder_stateMachine_feature"), getString("_UI_PropertyDescriptor_description", "_UI_StateMachineFolder_stateMachine_feature", "_UI_StateMachineFolder_type"), UIMPackage.Literals.STATE_MACHINE_FOLDER__STATE_MACHINE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the state machine feature </s>
funcom_train/20051715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PresidentFilter getPresidentFilter(Limit limit) { PresidentFilter presidentFilter = new PresidentFilter(); FilterSet filterSet = limit.getFilterSet(); Collection<Filter> filters = filterSet.getFilters(); for (Filter filter : filters) { String property = filter.getProperty(); String value = filter.getValue(); presidentFilter.addFilter(property, value); } return presidentFilter; } COM: <s> a very custom way to filter the items </s>
funcom_train/40091513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createICATLoginLinks(EventPipeLine eventPipeLine,ArrayList<TFacility> facilities) { verticalPanel.removeAll(); listFacilityLogin.clear(); for(TFacility facility: facilities) { //create a link which opens the login widget LoginInfoPanel infoPanel = new LoginInfoPanel(); infoPanel.setFacility(facility); infoPanel.setEventPipeLine(eventPipeLine); listFacilityLogin.put(facility.getName(),infoPanel); verticalPanel.add(infoPanel); } verticalPanel.layout(); } COM: <s> creates the login info panel for each facility and added to the widget </s>
funcom_train/9709721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void applyPolicy(Policy policy) throws AxisFault { // sets AxisDescription policy getPolicySubject().clear(); getPolicySubject().attachPolicy(policy); /* * now we try to engage appropriate modules based on the merged policy * of axis description object and the corresponding axis binding * description object. */ applyPolicy(); } COM: <s> this method sets the policy as the default of this axis description instance </s>
funcom_train/37238215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertType(String fieldName, String type) { String s = table.getFieldType(fieldName); if (s == null) { throw ( new IllegalArgumentException( "Field \"" + fieldName + "\" does not exist in table \"" + table.getName())); } if (table.getFieldType(fieldName) != type) { throw ( new IllegalArgumentException( "Field \"" + fieldName + "\" is not of type " + type + " in table \"" + table.getName() + "\"")); } } COM: <s> ensures that the specified field name is of the expected type </s>
funcom_train/13196331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializePieceList(PieceFactory factory, PieceConfiguration configuration, List list) { for (Iterator iter = configuration.getIterator(); iter.hasNext();) { PieceConfiguration.ConfigurationElement element = (PieceConfiguration.ConfigurationElement) iter.next(); Piece piece = factory.createPiece(Player.GOLD, element.getPieceType(), element.getStartLocation()); list.add(piece); } } COM: <s> initializes a piece list by calling upon the factory to create the pieces </s>
funcom_train/7409703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String readStream(InputStream input) throws IOException { StringBuffer stringBuffer = new StringBuffer(); Reader reader = new BufferedReader(new InputStreamReader(input, "UTF8")); int ch; while ((ch = reader.read()) > -1) { stringBuffer.append((char)ch); } reader.close(); input.close(); return stringBuffer.toString(); } COM: <s> reads stream into string </s>
funcom_train/124348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print() { Thread printer = new Thread(new Runnable() { public void run() { PrinterJob printJob = PrinterJob.getPrinterJob(); printJob.setPageable(makeBook()); if (printJob.printDialog()) { try { printJob.print(); } catch (PrinterException ex) { log.error("Printing error", ex); } } } }); printer.start(); } COM: <s> prints the text in the text area in a new printer thread </s>
funcom_train/17570932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addChapter(String chapter, String shortTitle) { chapter = chapter.trim(); shortTitle = shortTitle.trim(); if (shortTitle.equals(chapter)) { shortTitle = ""; } String filename = Util.toSafeFilename(chapter); this.chapters.add(new String[]{filename, chapter, shortTitle}); } COM: <s> adds a chapter to the chapter list </s>
funcom_train/18195745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dragOver(DropTargetDragEvent dtde) { Point cursorPosition = dtde.getLocation(); TreePath currentPath = getPathForLocation(cursorPosition.x, cursorPosition.y); if (currentPath != null) { dtde.acceptDrag(DnDConstants.ACTION_MOVE); } else { dtde.rejectDrag(); } } COM: <s> accepting or rejecting the drag </s>
funcom_train/4800066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintFrameHighscores() { drawString(highscore_title, viewWidth()/2,viewHeight()/7,0,highscore_title_font, highscore_title_color); double yinc = 0.7*viewHeight()/highscores.length; double ypos = 0.6*viewHeight() - yinc*(highscores.length/2.0); for (int i=0; i<highscores.length; i++) { drawString(""+highscores[i].score, 0.35*viewWidth(), ypos + i*yinc, 1,highscore_font,highscore_color); drawString(highscores[i].name, 0.6*viewWidth(), ypos + i*yinc, 0,highscore_font,highscore_color); } } COM: <s> default displays the highscore list </s>
funcom_train/14069742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CommandInterface getCommandSender() throws UninitializedException { if (rpcSender == null) { rpcSender = new CommandSender(); try { rpcSender.setChannel(new JChannel()); } catch (ChannelException e) { throw new UninitializedException("Cannot start communications.",e); } rpcSender.setGroup(COMMAND_CHANNEL); rpcSender.init(); } return rpcSender.getProxy(); } COM: <s> get an object that will handle sending rpc calls and </s>
funcom_train/45038603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MDRepository createRepository( String name ) { String storageClass = System.getProperty(Constants.DEFAULT_STORAGE_MECHANISM, Constants.MEMORY_STORAGE); String storageLocation = System.getProperty(Constants.BTREE_STORAGE_LOCATION, ""); Map parameters = new HashMap(); parameters.put("storage", storageClass); parameters.put(BtreeFactory.STORAGE_FILE_NAME, storageLocation + "/" + name); return new NBMDRepositoryImpl(parameters); } COM: <s> create a new metadata repository on disk </s>
funcom_train/41842167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String parsesabstr(String text) throws ParserException{ Parser parser = new Parser(text); NodeList nl = parser.parse(null); TagNameFilter tg = new TagNameFilter(UtilityConstants.divTag); NodeList nla = nl.extractAllNodesThatMatch(tg,true); for(int i=0; i<nla.size();i++){ Node n = nla.elementAt(i); text = "<br><abstr>"+n.toPlainTextString()+"</abstr><br>"; } return text; } COM: <s> get the abstract text from the result string </s>
funcom_train/2326182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int slice, int row, int column, float value) { if (slice < 0 || slice >= slices || row < 0 || row >= rows || column < 0 || column >= columns) throw new IndexOutOfBoundsException("slice:" + slice + ", row:" + row + ", column:" + column); setQuick(slice, row, column, value); } COM: <s> sets the matrix cell at coordinate tt slice row column tt to the </s>
funcom_train/22349688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModel(SimpleComboBoxModel aModel) { SimpleComboBoxModel oldModel = dataModel; if (oldModel != null) { oldModel.removeDataListener(this); } dataModel = aModel; dataModel.addDataListener(this); // set the current selected item. selectedItemReminder = dataModel.getSelectedItem(); firePropertyChange( "model", oldModel, dataModel); } COM: <s> sets the data model that the code jcombo box code uses to obtain </s>
funcom_train/17868468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean modifyPr(String s,long prop,String repl){ int n=searchEl(s); if (n==-1){ //System.out.println("The word you want to modify is not in the list"); return false; } modifyPrAt(n,prop,repl); return true; } COM: <s> modifies propreties by name </s>
funcom_train/23323113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initToolTip(JComponent c, int row, int column) { String toolTipText = null; if (c.getPreferredSize().width > getCellRect(row, column, false).width) { toolTipText = getValueAt(row, column).toString(); } c.setToolTipText(toolTipText); } COM: <s> sets the components tool tip if the component is being rendered smaller </s>
funcom_train/7275875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected long getMPEGHMS(byte[] b) { long low4Bytes = (((b[0] & 0xff) >> 1) & 0x03) << 30 | (b[1] & 0xff) << 22 | ((b[2] & 0xff) >> 1) << 15 | (b[3] & 0xff) << 7 | (b[4] & 0xff) >> 1; return low4Bytes / 90000; } COM: <s> gets the hour minute second in seconds of mpeg 1 </s>
funcom_train/14093041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCalculateSouthWest() { MyTestClass myClass = new MyTestClass(); myClass.setPosition(SOUTH_WEST); Point l = myClass.calculatePoint(new Rectangle(0, 0, 7, 7)); Point v = new Point(0, 7); assertEquals("SouthWest:", v, l); } COM: <s> test calculation of southwest position </s>
funcom_train/49995291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveSetting(Measure measure) { ParticipationParameters param = new ParticipationParameters(); param.setFrequencyPercentage(frequencyPercentage); param.setMemberPercentage(memberPercentage); param.setThresoldValue(thresholdValue); param.setScaleWithGranularity(this.scaleWithGranularity); measure.setParticipationParameters(param); } COM: <s> save classifiers setting into the given </s>
funcom_train/13958730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WOComponent databaseConsoleAction() { WOComponent result=null; if (canPerformActionWithPasswordKey("er.extensions.ERXDatabaseConsolePassword")) { result=pageWithName("ERXDatabaseConsole"); session().setObjectForKey(Boolean.TRUE, "ERXDatabaseConsole.enabled"); } return result; } COM: <s> action used for accessing the database console </s>
funcom_train/22400722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public boolean applyLayout() { boolean done = true; if (!reset) { // if reset is still true then graph size <= 1 done = qGraph.relax(); NodeList nodes = getRoot().getNodes(); for (Node n : nodes) { Point3f p = new Point3f(((MultiScaleNodeLayout) n.getLayout()).position); p.scale(scale); p.add(getRoot().getPosition()); n.setPosition(p); } reset = done; } return done; } COM: <s> apply the changes calculated by </s>
funcom_train/31545051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setState(final int nState) { if (LOG.isDebugEnabled()) { LOG.debug("STATE CHANGE: " + states[nCurrentState] + " to " + states[nState]); } nLastState = nCurrentState; nCurrentState = nState; currentState = states[nCurrentState]; } COM: <s> sets the current state </s>
funcom_train/7617604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLayerInset(int index, int l, int t, int r, int b) { ChildDrawable childDrawable = mLayerState.mChildren[index]; childDrawable.mInsetL = l; childDrawable.mInsetT = t; childDrawable.mInsetR = r; childDrawable.mInsetB = b; } COM: <s> specify modifiers to the bounds for the drawable index </s>
funcom_train/28669793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MutableString insert(int offset, char str[]) { if ((offset < 0) || (offset > length())) throw new StringIndexOutOfBoundsException(offset); int len = str.length; int newCount = count + len; if (newCount > value.length) expandCapacity(newCount); System.arraycopy(value, offset, value, offset + len, count - offset); System.arraycopy(str, 0, value, offset, len); count = newCount; return this; } COM: <s> inserts the string representation of the code char code array </s>
funcom_train/48713840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int calcSpos(double factor){ int spos = midpos; if(factor > 1.0) spos = (int) ((upperLimitFactor - factor) * (double)midpos/(upperLimitFactor - 1.0)); else if (factor < 1.0) spos = (int) ((1.0 - factor)*(double)midpos/(1.0 - lowerLimitFactor) + midpos); return spos; } COM: <s> for a given zoom factor calculate the slider thumb position </s>
funcom_train/8357935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getRadioTrain() { if (radioTrain == null) { radioTrain = new JRadioButton(); radioTrain.setSelected(true); radioTrain.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { radioModel.setSelected(false); cmbDataModel.setEnabled(true); btnOpen.setEnabled(false); radioTrain.setSelected(true); } }); } return radioTrain; } COM: <s> this method initializes radio train </s>
funcom_train/4464553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set findAnnotations(URI about) throws AnnoteaException { OWLOntology annotOnt = findAnnotationsOnt(about); Set descriptionSet = new HashSet(); try { Iterator iter = annotOnt.getIndividuals().iterator(); while (iter.hasNext()) { OWLIndividual descInd = (OWLIndividual) iter.next(); if (descInd.getTypes(annotOnt).size()>0) descriptionSet.add(parseIndividual(annotOnt, descInd)); } } catch (OWLException e) { e.printStackTrace(); } return descriptionSet; } COM: <s> returns a set of description objects defined as instances in the </s>
funcom_train/8354735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void disposeEncoder(IoSession session) { ProtocolEncoder encoder = (ProtocolEncoder) session .removeAttribute(ENCODER); if (encoder == null) { return; } try { encoder.dispose(session); } catch (Throwable t) { LOGGER.warn( "Failed to dispose: " + encoder.getClass().getName() + " (" + encoder + ')'); } } COM: <s> dispose the encoder removing its instance from the </s>
funcom_train/43607526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void prettyPrint(CodeWriter w, PrettyPrinter tr) { if (!targetImplicit) { // explicit target. if (target instanceof Expr) { printSubExpr((Expr) target, w, tr); } else if (target instanceof TypeNode || target instanceof AmbReceiver) { print(target, w, tr); } w.write("."); } w.write(name); } COM: <s> write the field to an output file </s>
funcom_train/20889590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LayerState getState() { PhysicalLayerParameter param = new PhysicalLayerParameter( this.signalStrength, this.minSignalStrength, this.maxSignalStrength, this.channelCount, this.minFrequency, this.maxFrequency); return new PhysicalLayerState(this.timings, param, this.radioState, 0, this.signalStrength); } COM: <s> used to obtain information about the current state settings of the physical layer </s>
funcom_train/26020832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeCancelledPresenceInvitation(String contact){ // Remove entry from rich address book provider ctx.getContentResolver().delete(RichAddressBookData.CONTENT_URI, RichAddressBookData.KEY_CONTACT_NUMBER +"=?" + " AND " + RichAddressBookData.KEY_PRESENCE_SHARING_STATUS + "=?", new String[]{contact, Integer.toString(ContactInfo.RCS_CANCELLED)}); } COM: <s> remove a cancelled invitation in the rich address book provider </s>
funcom_train/29922351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void expungeMessages(){ try { folder.expunge(); } catch (MethodNotSupportedException mnse){ try { folder.close(true); folder.open(Folder.READ_WRITE); } catch (MessagingException ex) { ex.printStackTrace(); } } catch (MessagingException ex) { ex.printStackTrace(); } } COM: <s> expunge read emails </s>
funcom_train/2876866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void screen_newChar(KeyEvent ke) { screen.setCaretPosition(screen.getText().length()); char key = ke.getKeyChar(); //out.print(key); try { printKey.print(key); } catch (Exception ex) { if (sfLog().isErrorEnabled()) { sfLog().error("Error printing key: " + ex.toString(), ex); } } } COM: <s> prints the char corresponding to key </s>
funcom_train/41302817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { // Talk about a fun time reverse engineering this one! long l = java.lang.Double.doubleToLongBits(getY()); l = l * 31 ^ java.lang.Double.doubleToLongBits(getX()); return (int) ((l >> 32) ^ l); } COM: <s> return the hashcode for this point </s>
funcom_train/12551629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initMap(HashMap<String, String> map, int rounds){ map.put("s", "--"); map.put("key", "--"); map.put("plaintext", "--"); map.put("rounds", "--"); map.put("ciphertext", "--"); map.put("round", "--"); map.put("block", "--"); map.put("row", "--"); map.put("column", "--"); } COM: <s> sets all pseudocode variables in the hash map to </s>
funcom_train/37581676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof Schema)) return false; Schema schema = (Schema) obj; return name.equals(schema.name) && (catalog == schema.catalog || (catalog != null && schema.catalog != null && catalog.name.equals(schema.catalog.name))) && database.equals(schema.database); // ignore the tables since two schemas with the same name inside the same catalog should not exist // && (tables == schema.tables || tables != null && tables.equals(schema.tables)); } COM: <s> returns true if the other object is a code schema code </s>
funcom_train/28420371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visitEnd() { if (getClassMetaInfo().getClassSerialVersionUid() == null) { super.visitField(Opcodes.ACC_PRIVATE + Opcodes.ACC_FINAL + Opcodes.ACC_STATIC, SerializableInspectorAdapter.FIELDNAME_SERIAL_VERSION_UID, Type.LONG_TYPE.getDescriptor(), null, newSerialVersionUid); getClassMetaInfo().setClassSerialVersionUid(newSerialVersionUid); } } COM: <s> adds the private final static access modifier to the serial version uid field </s>
funcom_train/4358347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeResourceLink(String name) { entries.remove(name); ContextResourceLink resourceLink = null; synchronized (resourceLinks) { resourceLink = (ContextResourceLink) resourceLinks.remove(name); } if (resourceLink != null) { support.firePropertyChange("resourceLink", resourceLink, null); resourceLink.setNamingResources(null); } } COM: <s> remove any resource link with the specified name </s>
funcom_train/49760501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane getJTabbedPaneOutputProcesses() { if (jTabbedPaneOutputProcesses == null) { jTabbedPaneOutputProcesses = new JTabbedPane(); jTabbedPaneOutputProcesses.setBounds(new Rectangle(0, 0, 700, 286)); //jTabbedPaneOutputProcesses.addTab(null, null, getJTextArea(), null); } return jTabbedPaneOutputProcesses; } COM: <s> this method initializes j tabbed pane output processes </s>
funcom_train/29507554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initIfNeeded() throws ServletException { if (pagesToIgnore == null){ Common.checkIfConfigured(filterConfig.getServletContext()); pagesToIgnore = getPagesToIgnore(); pagesToProtect = getPagesToProtect(); log.info("Pages to ignore: " + pagesToIgnore); log.info("Pages to protect: " + pagesToProtect); } } COM: <s> initialize the filter if not initialized </s>
funcom_train/10834811
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lock(final Session session, final String path) throws RepositoryException { if ( this.mode != LockMode.none ) { session.getWorkspace().getLockManager().lock(path, false, this.mode == LockMode.session, Long.MAX_VALUE, OWNER_PREFIX + Environment.APPLICATION_ID); } } COM: <s> lock the node at the given path </s>
funcom_train/36189576
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void check(Element element) throws PSSConfigurationException { m_classname = element.getAttribute("classname"); if (m_classname == null) { throw new PSSConfigurationException("A component needs a class name : " + element); } m_manipulation = new PSSPojoMetadata(m_componentMetadata); } COM: <s> allows a factory to check if the given element is well formed </s>
funcom_train/8088113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAllowed(Class c, String displayName) { HashSet list; // retrieve list list = (HashSet) m_Allowed.get(c); if (list == null) { list = new HashSet(); m_Allowed.put(c, list); } // add property list.add(displayName); } COM: <s> adds the given property display name to the list of allowed properties </s>
funcom_train/44851572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeByElementID(String inElementID, String inLanguage) throws CodeNotFoundException { try { CodeListHome.instance().getCodeList(getCodeID(), inLanguage).existElementID(inElementID); } catch (CodeListNotFoundException ex) { throw new CodeNotFoundException(ex.getMessage()); } elementID = inElementID; } COM: <s> change the content of this code by the specified element id </s>
funcom_train/12181050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void establishPartitioner(IDocument document) { if (document == null) { throw new IllegalArgumentException("Cannot be null: document"); //$NON-NLS-1$ } IDocumentPartitioner partitioner = new DefaultPartitioner( new XMLPartitionScanner(), new String[]{ XMLPartitionScanner.XML_TAG, XMLPartitionScanner.XML_COMMENT}); partitioner.connect(document); document.setDocumentPartitioner(partitioner); } COM: <s> establish document partitioner for this document provider </s>
funcom_train/3382867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void activateBlockerThread() { Thread thread = new Thread(this, "AWT-Shutdown"); thread.setDaemon(false); blockerThread = thread; thread.start(); try { /* Wait for the blocker thread to start. */ mainLock.wait(); } catch (InterruptedException e) { System.err.println("AWT blocker activation interrupted:"); e.printStackTrace(); } } COM: <s> creates and starts a new blocker thread </s>
funcom_train/22359183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Region addVoid(CoordinateID c) { if (regionView().containsKey(c) || wrappers().containsKey(c)) throw new IllegalArgumentException("there is a region at " + c); Region aVoid = MagellanFactory.createVoid(c, this); voids.put(c, aVoid); return aVoid; } COM: <s> adds a void region at code c code </s>
funcom_train/20656869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEdited(boolean edited) { if (edited) { if (list.size() - 1 == undoRedoPosition) { list.insertElementAt(getCopyList(), undoRedoPosition); undoRedoPosition++; } else { while (list.size() - 1 > undoRedoPosition) { list.remove(undoRedoPosition + 1); } list.insertElementAt(getCopyList(), undoRedoPosition); undoRedoPosition++; } } this.edited = edited; } COM: <s> set the edited status </s>
funcom_train/39788693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConflict() { ServiceRegistry services = new ServiceRegistry(); NullService alpha = new NullService("alpha"); services.add(alpha); NullService anotherAlpha = new NullService("alpha"); try { services.add(anotherAlpha); fail(); } catch (IllegalArgumentException ex) { // Expected. } } COM: <s> ensure that two services may not be added with the same service id </s>
funcom_train/19418272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MapperRecord readRecord() throws MapperException { String record = null; try { if ((record = reader.readLine()) != null) { return transformLine(record); } else { return null; } } catch (Exception e) { e.printStackTrace(); throw new MapperException("error reading from file entity: " + fileMapName); } } COM: <s> reads record from buffered reader and returns a mapper record </s>
funcom_train/45077374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteElement(PersistentObject obj) throws DBException { // if (obj == null) { // cat.debug("deleteElement: Object is null!"); // } // try { // broker.delete(obj); // } catch (Exception jr) { // cat.error("deleteElement: '" + obj + "', error: " + jr); // throw new DBException(); // } } COM: <s> delete object completely </s>
funcom_train/18383181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public ResourceBundle getBundle(final Locale locale) { if (basename == null) { LOGGER.warn("Empty (default) resource being used"); //$NON-NLS-1$ return emptyBundle; } ResourceBundle result = null; Locale thisLocale = locale; if (locale == null) { thisLocale = Locale.getDefault(); } result = bundleCache.get(thisLocale); if (result == null) { result = ResourceBundle.getBundle(basename, thisLocale); if (result != null) { bundleCache.put(thisLocale, result); } } return result; } COM: <s> return the resource bundle for the specified locale </s>
funcom_train/11735369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doVersionRecovery() throws RepositoryException { // JCR-2551: Recovery from a lost version history if (Boolean.getBoolean("org.apache.jackrabbit.version.recovery")) { RepositoryChecker checker = new RepositoryChecker( persistMgr, context.getInternalVersionManager()); checker.check(ROOT_NODE_ID, true); checker.fix(); } } COM: <s> if necessary recover from a lost version history </s>
funcom_train/12146838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notify(String to, String subject, String body) throws Exception { mLogger.info("Sending email notification: " + "\n\t " + to + "\n\t " + subject); mailer.sendMessage(to, subject, body); mLogger.info("Email sent successfully."); } COM: <s> sends the email message using the mailhost and sender of this instance </s>
funcom_train/18781139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeIndents(int indent) { // Write the indents for (int i = 0; i < indent; i++) { // Write the spaces per indent for (int j = 0; j < this.numberOfSpacesPerIndent; j++) { // Write the space this.writer.print(" "); } } } COM: <s> writes code indent code number of indents </s>
funcom_train/45801378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveSystemTopicMap(TopicMapIF systemtm) { try { LocatorIF base = systemtm.getStore().getBaseAddress(); File file = URIUtils.getURIFile(base); FileOutputStream stream = new FileOutputStream(file); new LTMTopicMapWriter(stream).write(systemtm); stream.close(); } catch (IOException e) { throw new OntopiaRuntimeException(e); } } COM: <s> internal saves the system topic map to disk </s>
funcom_train/22405154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onSuccess(Object result) { if (result != null) { // Clone the current test case object GWTTestCase testCase = outer.getNewTestCase(); // Tell it what method name to run testCase.setName((String) result); // Launch it testCase.impl.runTest(); } } COM: <s> a call to junit host succeeded run the next test case </s>
funcom_train/32709593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkParameters(File lexFile) throws MojoExecutionException { if (lexFile == null) { throw new MojoExecutionException( "<lexDefinition> is empty. Please define input file with <lexDefinition>input.jflex</lexDefinition>"); } assert lexFile.isAbsolute() : lexFile; if (!lexFile.isFile()) { throw new MojoExecutionException("Input file does not exist: " + lexFile); } } COM: <s> check parameter lex file </s>
funcom_train/17202865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (isPhysical()) { return PhysicalRegisterSet.getName(number); } // Set s to descriptive letter for register type String s = isLocal() ? "l" : "t"; s = s + getNumber() + (spansBasicBlock() ? "p" : "") + (isSSA() ? "s" : "") + typeName(); return s; } COM: <s> returns the string representation of this register </s>
funcom_train/36061999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDatabaseVersion() throws SQLException, NoDatabaseConnectionException{ if( connectionBroker != null ){ Connection connection = null; try{ connection = connectionBroker.getConnection(); if( connection == null ) throw new NoDatabaseConnectionException(); DatabaseMetaData metaData = connection.getMetaData(); return metaData.getDriverVersion(); } finally{ if( connection != null ) connection.close(); } } //We should not have gotten here unless an exception occurred that prevented us from getting the database information throw new NoDatabaseConnectionException(); } COM: <s> get the version of the database driver that is being used </s>
funcom_train/37831353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void open(final RPEntity user) { attending = user; chestSynchronizer = new SyncContent(); SingletonRepository.getTurnNotifier().notifyInTurns(0, chestSynchronizer); final RPSlot content = getSlot("content"); content.clear(); for (final RPObject item : getBankSlot()) { try { content.addPreservingId(cloneItem(item)); } catch (final Exception e) { LOGGER.error("Cannot clone item " + item, e); } } super.open(); } COM: <s> open the chest for an attending user </s>