__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/20220919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperties(final Map<String, String> newProperties) { orderedNames.clear(); properties.clear(); if (newProperties != null) { properties.putAll(newProperties); orderedNames.addAll(newProperties.keySet()); Collections.sort(orderedNames); } fireTableDataChanged(); } COM: <s> set the current properties in the table </s>
funcom_train/46494903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelDialogButtons() { if (jPanelDialogButtons == null) { jPanelDialogButtons = new JPanel(); jPanelDialogButtons.setLayout(new FlowLayout(FlowLayout.RIGHT)); jPanelDialogButtons.add(getJButtonDialogButtonsSave()); jPanelDialogButtons.add(getJButtonDialogButtonsCancel()); jPanelDialogButtons.add(getJButtonDialogButtonsImport()); jPanelDialogButtons.add(getJButtonDialogButtonsExport()); } return jPanelDialogButtons; } COM: <s> this method initializes j panel dialog buttons </s>
funcom_train/9098873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRoll(String rollName) { String input = rollName.toLowerCase().replaceAll("\\s", ""); String prefix = "1d20+"; String rollOutput = ""; JTextField box; if (modLookup.containsKey(input)) { box = modLookup.get(input); } else if (aliasLookup.containsKey(input)) { input = aliasLookup.get(input); box = modLookup.get(input); } else return ""; if (input.contains("dmg")) prefix = ""; rollOutput = prefix + box.getText(); return rollOutput; } COM: <s> returns the appropriate roll text for further parsing by chat engine </s>
funcom_train/25771429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeDatetimeAttribute(PrintWriter pw, long timestamp, Date d) { if ( timestamp > 0) { d.setTime(timestamp); } pw.write(AttributeName.datetime.toString()); pw.write("=\""); pw.write(timestamp > 0 ? getDateFormatter().format(d) : XmlValue.NaN.name()); pw.write("\" "); } COM: <s> write a datetime attribute with value na n if timestamp is 1 </s>
funcom_train/12841528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Image createImage(String resource) { ImageDescriptor desc = getImageDescriptor(resource); Image image = null; if (desc != null) { image = desc.createImage(); // dont add the missing image descriptor image to the image // registry if (!desc.equals(ImageDescriptor.getMissingImageDescriptor())) { getImageRegistry().put(resource, image); } } return image; } COM: <s> creates an image from the given resource and adds the image to the </s>
funcom_train/30075688
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ModelAndView onSubmit(Object command) throws ServletException { // the edited object Contact contact = (Contact) command; // delegate the update to the Business layer getGpir().storeContact(contact); return new ModelAndView(getSuccessView(), "contactId", Integer.toString(contact.getId())); } COM: <s> method updates an existing code contact code when the form is committed </s>
funcom_train/32985808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Connection dbCon) throws TorqueException { super.save(dbCon); if (coords2 != null) { coords2.setDBAtom(this); coords2.save(dbCon); } if (coords3 != null) { coords3.setDBAtom(this); coords3.save(dbCon); } } COM: <s> saves this object incl </s>
funcom_train/40925146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleJsonResponse(JavaScriptObject jso) { if (jso == null) { this.handleFailure(new Exception("Cannot parse json")); return; } DSResponseManager<D> man = new DSResponseManager<D>(); DSResponse<D> result = man.eval(jso); try{ if(result.getStatus() == 0){ this.handleSuccess(result.getData()); }else{ DSError errors = result.getErrors(); this.handleErrors(errors); } }catch(Exception e){ this.handleFailure(e); } } COM: <s> handle the response to the request for stock data from a remote server </s>
funcom_train/7264539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSameBuffer() throws Exception { ByteBuffer buf = CACHE.getHeap(100); int hashCode = System.identityHashCode(buf); CACHE.release(buf); assertEquals(100, CACHE.getHeapCacheSize()); buf = CACHE.getHeap(100); assertEquals(hashCode, System.identityHashCode(buf)); assertEquals(0, CACHE.getHeapCacheSize()); } COM: <s> tests that requesting a buffer releasing it and then requesting </s>
funcom_train/18574633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MessageDigest getDigest() { if (this.digest == null) { synchronized (this) { if (this.digest == null) { try { this.digest = MessageDigest.getInstance(this.algorithm); } catch (NoSuchAlgorithmException e) { try { this.digest = MessageDigest .getInstance(DEFAULT_ALGORITHM); } catch (NoSuchAlgorithmException f) { this.digest = null; } } } } } return (this.digest); } COM: <s> return the message digest object to be used for calculating session </s>
funcom_train/12553761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setTakingQuiz(boolean aFlag) { quizModeMenuItem.setEnabled(!aFlag); loginMenuItem.setEnabled(!aFlag); showAnswersModeMenuItem.setEnabled(!aFlag); mainGUI.getComponentAt(SETUP_TAB_POSITION).setEnabled(!aFlag); isTakingQuiz = aFlag; if(aFlag) showAnswers = false; } COM: <s> sets if the student is currently taking a quiz </s>
funcom_train/18831589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readFile(File filename) { StringBuffer buffer = new StringBuffer(); try { FileReader fileReader = new FileReader(filename); BufferedReader input = new BufferedReader(fileReader); int character; while ((character = input.read()) != -1) { buffer.append((char) character); } input.close(); } catch (IOException e) { System.out.println("Could not read file"); } return buffer.toString(); } COM: <s> reads the content of file filename into a string </s>
funcom_train/46165921
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public void actionPerformed(ActionEvent e){ fileChooser.setSelectedFile(getFile()); if(fileChooser.showOpenDialog(panel) == JFileChooser.APPROVE_OPTION){ File f = fileChooser.getSelectedFile(); String filename = f.getName(); String filepath = f.getPath().replace(filename, ""); if(!filename.toLowerCase().endsWith(".jar")){ filename = filename+ ".jar"; } filenameField.setText(filename); filepathField.setText(filepath); } } COM: <s> when clicked the browse </s>
funcom_train/32779521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkAndLog(Command c){ this.logWriter.println(c.toString()); this.logWriter.flush(); try { //macht Syntax Check c.syntaxCheck(); //macht Semantik Check (noch nicht Vollstaendig) c.execute(this.model); } catch (CommandException e) { // TODO Auto-generated catch block e.printStackTrace(); e.printStackTrace(this.logWriter); this.logWriter.flush(); System.exit(1); } catch (ModelException e) { // TODO Auto-generated catch block e.printStackTrace(); e.printStackTrace(this.logWriter); this.logWriter.flush(); System.exit(1); } } COM: <s> checks a command c by syntax c </s>
funcom_train/32986322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasAnyIdentifier() throws Exception { DBAtom[] atoms = DBMolecule.getAtomsAsArrayInMdlOrder(getMoleculeId(), null); for (int i = 0; i < atoms.length; i++) { if (!atoms[i].getIdentifier(this).equals("")) { return (true); } } return (false); } COM: <s> tells if there is any atom identifier for this spectrum </s>
funcom_train/25921206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setListModel(ListModel listModel) throws GUIException { if (m_scrollArea == null || m_scrollArea.getContent() == null) { throw new GUIException("ScrollArea or ListBox is NULL"); } m_listBox.setListModel(listModel); if (m_listBox.getSelected() < 0) { m_listBox.setSelected(0); } adjustHeight(); } COM: <s> sets the list model to be used </s>
funcom_train/48045306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(DateTimeField otherPeriod) { // there are no isGreaterThan/isLessThan methods as they don't make sense int cmp = rule.compareTo(otherPeriod.rule); if (cmp != 0) { return cmp; } return MathUtils.safeCompare(value, otherPeriod.value); } COM: <s> compares this field to the specified field </s>
funcom_train/8640857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void determineExplicitEmbeddingLevels() { embeddings = processEmbeddings(resultTypes, paragraphEmbeddingLevel); for (int i = 0; i < textLength; ++i) { byte level = embeddings[i]; if ((level & 0x80) != 0) { level &= 0x7f; resultTypes[i] = typeForLevel(level); } resultLevels[i] = level; } } COM: <s> process embedding format codes </s>
funcom_train/25637952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildSerializedFormSummaries(XMLNode node, Content serializedTree) { Content serializedSummariesTree = writer.getSerializedSummariesHeader(); PackageDoc[] packages = configuration.packages; for (int i = 0; i < packages.length; i++) { currentPackage = packages[i]; buildChildren(node, serializedSummariesTree); } serializedTree.addContent(writer.getSerializedContent( serializedSummariesTree)); } COM: <s> build the serialized form summaries </s>
funcom_train/17932573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsPathROOT(LinkedList<Long> PCPath) { if (responses.size() == 0) { return true; } for (ResultDetectorEntry resultDetectorEntry : responses) { if (PCPath.size() >= resultDetectorEntry.getPCPath().size()) { if (PCPath.containsAll(resultDetectorEntry.getPCPath())) return true; } else { if (resultDetectorEntry.getPCPath().containsAll(PCPath)) return true; } } return false; } COM: <s> checks if the given pc path was detected </s>
funcom_train/14373826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkAllBounds() { SplitLine current = root; if (size != 0 && current == null) { print("Size is not 0 but root is NULL!"); Exception e = new Exception(); e.printStackTrace(); System.exit(-21); } if ( current == null) return; if (current.getOpBound() != null) { print("Root's op bound isn't null!"); } checkAllBoundsRecursive(current.getLeftChild()); checkAllBoundsRecursive(current.getRightChild()); } COM: <s> verify that the split axis structure is valid </s>
funcom_train/20333814
/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 (obj instanceof Location) { Location cmp=(Location)obj; if (getInstanceName()!=cmp.getInstanceName() && (getInstanceName()==null || !getInstanceName().equals(cmp.getInstanceName())) ) return false; return true; } return false; } COM: <s> test the equality of this code location code </s>
funcom_train/35056989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean codeExists(String code) { boolean exists = false; try { String sql = "select code from invite where code=?"; PreparedStatement pStmt = conn.prepareStatement(sql); pStmt.setString(1,code); ResultSet rs = pStmt.executeQuery(); if ( rs.next() ) { exists = true; } rs.close(); pStmt.close(); } catch (Exception e) { e.printStackTrace(); } return exists; } COM: <s> returns true if the given invite code exists false otherwise </s>
funcom_train/39478264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displaySurvey() { String course = ""; try { course = courseList.getSelectedValue().toString(); } catch (Exception e) { } SurveyGUI f = new SurveyGUI(course); try { Toolkit tk = Toolkit.getDefaultToolkit(); //these lines center the window to the screen Dimension screen = tk.getScreenSize(); f.setLocation(screen.width/2 - WINDOW_W/2, screen.height/2 - WINDOW_H/2); f.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } COM: <s> display a survey </s>
funcom_train/22891038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCellEditable(int row, int column) { try { DBEntityColumn col = getDBEntityColumn(column); if (col.isAutoIncrement()) { return false; } else if (!SQLEngine.isSupportedEditableType(col.getType())) { return false; } else if (deletedRows.get(new Integer(row)) != null) { return false; } } catch (Exception e) { return true; } return true; } COM: <s> returns whether or not this scell is editable </s>
funcom_train/51571851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void includeFile(String file) { String toInclude = replaceTilde(stripQuotes(replaceTokens(file))); if (checkFileName(toInclude)) { currentNamespace.getCurrentFileSet().include(new File(toInclude)); log.log(Level.FINER, "include file " + toInclude); } } COM: <s> include a file in the current file set </s>
funcom_train/10907339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Property getEnumProperty(int enumValue, String text) { if (enums == null) { enums = new Property[ENUM_COUNT + 1]; } if (enums[enumValue] == null) { enums[enumValue] = EnumProperty.getInstance(enumValue, text); } return enums[enumValue]; } COM: <s> return a possibly cached enum property based in the enum value </s>
funcom_train/119620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getToolTipText(MouseEvent event) { if (linkHandler.isHoveringOverHyperlink() && (linkHandler.getHoveredURL() != null)) { // have to manually toggle tooltip enabled status to prevent empty // tooltip from appearing when not hovering over url ToolTipManager.sharedInstance().setEnabled(true); return linkHandler.getHoveredURL(); } else { ToolTipManager.sharedInstance().setEnabled(false); return null; } } COM: <s> override tool tip method to display url </s>
funcom_train/39189384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearSysDateCache () { // for all projects: clear cache int pSize = theProjectList.size(); for ( int pIndex = 0; pIndex < pSize; pIndex ++ ) { UserProject currentProj = (UserProject) theProjectList.get( pIndex); currentProj.setSysDate( null ); } } COM: <s> clears all sysdate caches </s>
funcom_train/46739868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInputTypeRef(DisplayModel inputTypeRef) { if (Converter.isDifferent(this.inputTypeRef, inputTypeRef)) { DisplayModel oldinputTypeRef= new DisplayModel(this); oldinputTypeRef.copyAllFrom(this.inputTypeRef); this.inputTypeRef.copyAllFrom(inputTypeRef); setModified("inputTypeRef"); firePropertyChange(String.valueOf(RULEMAPS_INPUTTYPEREFID), oldinputTypeRef, inputTypeRef); } } COM: <s> type of input to filter </s>
funcom_train/37859956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IndexInfo validateXMLResource(Txn transaction, DBBroker broker, XmldbURI docUri, String data) throws EXistException, PermissionDeniedException, TriggerException, SAXException, LockException, IOException { return validateXMLResource(transaction, broker, docUri, new InputSource(new StringReader(data))); } COM: <s> validates an xml document et prepares it for further storage </s>
funcom_train/28774601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Gauge getGauge2() { if (gauge2 == null) {//GEN-END:|131-getter|0|131-preInit // write pre-init user code here gauge2 = new Gauge("Misc", false, 100, 50);//GEN-LINE:|131-getter|1|131-postInit // write post-init user code here }//GEN-BEGIN:|131-getter|2| return gauge2; } COM: <s> returns an initiliazed instance of gauge2 component </s>
funcom_train/15906746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseExtensionPointSchema(PrintStream log) { String schema = this.propertyValue(PROFILE_EXTENSIONPOINT_SCHEMA); if (schema == null || schema.isEmpty()) { UmlCom.trace("<b>Error: no content for extension: " + name()); } else { ArrayList<String> requiredClasses = parseSchema(schema, log); handleRequiredClasses(log, requiredClasses); } } COM: <s> generate an extension point component with id and schema properties </s>
funcom_train/42710818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SpatialStatistic createCopy() { Match m = new Match(); m.goalMap = goalMap; m.goalSelect = goalSelect; m.goalSet = goalSet; m.attribName = attribName; m.attribSelect = attribSelect; m.attribSet = attribSet; m.spread = spread; return m; } COM: <s> build clone of this instance </s>
funcom_train/9055087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetchAllRestEntries() { return mDb.query(REST_DATABASE_TABLE, new String[] {KEY_REST_ROWID, KEY_REST_TABLEID, KEY_REST_LEVEL_BEFORE, KEY_REST_LAST_ACTUAL_TIME, KEY_REST_LEVEL_AFTER}, null, null, null, null, null); } COM: <s> return a cursor over the list of all rest entries in the database </s>
funcom_train/18847037
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createMessageNotFoundException(String tscToken, String messageID) { PropertyMap propertyMap = new PropertyMap(); DiagnosticsListCreator edg; edg = new DiagnosticsListCreator(); String severityType = DiagnosticsCodes.getErrorDiagnosticsCode(); String exceptionID = "80302"; propertyMap.addPropertyValuePair("messageID", messageID); String serExMsg = edg.constructErrorDocOneItemParam(tscToken, componentID, severityType, subSystemCode, exceptionID, propertyMap); return serExMsg; } COM: <s> construct event related message not found exception message </s>
funcom_train/33942923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getStreetName (String streetWithNo) { String s = streetWithNo.trim(); int indexNo = 0; // Search for the number Matcher matcher = Pattern.compile( "\\d+" ).matcher( s ); if ( matcher.find() ) { indexNo = matcher.start(); } // Extract the Number if (indexNo > 0) return s.substring(0, indexNo).trim(); else return ""; } COM: <s> returns the street name without the number </s>
funcom_train/19398274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_close() { IRawStore store = getStore(); assertTrue(store.isOpen()); store.close(); assertFalse(store.isOpen()); try { store.close(); fail("Expecting: "+IllegalStateException.class); } catch(IllegalStateException ex) { System.err.println("Ignoring expected exception: "+ex); } } COM: <s> note this will leave a test file around each time since we can </s>
funcom_train/25423685
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean cancel(RequestContext context, String uuid) { LOGGER.log(Level.FINER, "[SYNCHRONIZER] Canceled resource: {0}", uuid); // drop resource already being harvested boolean dropped = pool != null? pool.drop(uuid): false; // withdraw from the queue boolean canceled = taskQueue != null? taskQueue.cancel(context, uuid): false; // exit with status return canceled || dropped; } COM: <s> cancels pending tasks for given repository </s>
funcom_train/43813424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double max(double a, double b) { if (a != a) return a; // a is NaN if ((a == 0.0d) && (b == 0.0d) && (Double.doubleToLongBits(a) == negativeZeroDoubleBits)) { return b; } return (a >= b) ? a : b; } COM: <s> returns the greater of two code double code values </s>
funcom_train/23789211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String ret = new String("[Input object]"+System.getProperty("line.separator")+ " Name: "+name+System.getProperty("line.separator")+ " Type: "+type+System.getProperty("line.separator")+ " Field: "+fieldname+System.getProperty("line.separator")+ " Options: "+System.getProperty("line.separator")); for(Option o : options) { ret += o.toString()+System.getProperty("line.separator"); } return ret.substring(0, ret.length()-1); } COM: <s> gets a textual representation of this input object </s>
funcom_train/48905870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StoreProductBO create() throws DataException { String id = null; try{ id = GUID.generate(); } catch (Exception e) { throw new DataException("Could not generate new StoreProduct", e); } StoreProductBO sp = new StoreProductBO(id); Cache c = Cache.getInstance(); c.put(sp.getSpguid(), sp); return sp; } COM: <s> this method is used to create a business object of type store product </s>
funcom_train/47832924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addToSlatRepo(final SLATemplate slat) { System.err.println("Add slat " + slat.getUuid().getValue() + " Hashcode " + String.valueOf(Math.abs(slat.getUuid().hashCode()))); FbkRCGSlatRepository.addSlat(slat.getUuid().getValue(), slat); } COM: <s> add the slat to the internal repository </s>
funcom_train/34339716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getDireccion() { if (Direccion == null) {//GEN-END:|26-getter|0|26-preInit // write pre-init user code here Direccion = new TextField("Direcci\u00F3n", null, 32, TextField.ANY);//GEN-LINE:|26-getter|1|26-postInit // write post-init user code here }//GEN-BEGIN:|26-getter|2| return Direccion; } COM: <s> returns an initiliazed instance of direccion component </s>
funcom_train/31660358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAttributeByID(String id, String attribute) { if (id == null) { return null; } Attributes searchAttributes = null; try { DirContext ctx = connect(); searchAttributes = getAttributesOfUser(id, ctx); return searchAttributes.get(attribute).get().toString(); } catch (Exception e) { } return ""; } COM: <s> get an ldap attribute by its name </s>
funcom_train/1440484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FileData createFileData(Connection connection, FileObject file, FileType fileType) { return new FileData(file.getFullName(), connection.getSession().getUser().getName(), DateUtils.getISO8601Date(System.currentTimeMillis()), fileType); } COM: <s> create printable information about file for web interface </s>
funcom_train/36108927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ProgramBridge getCommandLineDataChannelBridge() { Iterator dataChannelBridges = inputChannelList.iterator(); while (dataChannelBridges.hasNext()) { DataChannelBridge element = (DataChannelBridge) dataChannelBridges.next(); Data channelModel = element.getDataChannelModel(); if (channelModel.getInt(DATA_CHANNEL_TYPE) == TYPE_PROGRAM_COMMAND_LINE && element instanceof ProgramBridge) return (ProgramBridge)element; } return null; } COM: <s> getting command line bridge </s>
funcom_train/24540375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disposeFreeFormHost() { if (freeFormHost != null && --freeFormHostRefCount <= 0) { final Shell ffh = freeFormHost; freeFormHost = null; display.asyncExec(new Runnable() { public void run() { if (freeFormHostRefCount <= 0) { // Still want dispose, nobody came along and asked for it. freeFormHostRefCount = 0; Composite parent = ffh.getParent(); ffh.dispose(); parent.dispose(); } } }); } } COM: <s> dispose the free form host </s>
funcom_train/33665727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate() throws XacmlException{ for(int i=0;i<RuleCombAlg.MANDATORY_RULE_COMB_ALGS.length;i++){ if(!ruleCombAlgs.containsKey(RuleCombAlg.MANDATORY_RULE_COMB_ALGS[i])){ log.severe("Not loaded mandatory Alg urn:"+RuleCombAlg.MANDATORY_RULE_COMB_ALGS[i]); } } } COM: <s> this method validates function set </s>
funcom_train/44458900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFunctionResultConstructor1() throws Throwable { FunctionResult fr = new FunctionResult(); assertEquals(null, fr.getErrorCode()); assertEquals(0, fr.getParameters().size()); assertEquals(null, fr.getParameter("")); assertEquals(null, fr.getParameter("a")); } COM: <s> tests the code function result code constructor that takes no </s>
funcom_train/26095861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public State getInitialState() { if (initialState != null && initialState.eIsProxy()) { InternalEObject oldInitialState = (InternalEObject)initialState; initialState = (State)eResolveProxy(oldInitialState); if (initialState != oldInitialState) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, LTSPackage.LTS__INITIAL_STATE, oldInitialState, initialState)); } } return initialState; } COM: <s> returns the value of the em b initial state b em reference </s>
funcom_train/25510736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea createSolverReportPane() { JTextArea pane = new JTextArea(); pane.setEditable(false); pane.setText(""); pane.setAlignmentX(JComponent.LEFT_ALIGNMENT); pane.setBorder(msgBorder("Solver Report")); messagePanel.add(pane); return pane; } COM: <s> adds a solver report editor pane to the message tab </s>
funcom_train/49822124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Term copy(AbstractMap vMap, int idExecCtx) { Term tt = getTerm(); if (tt == this) { Var v = (Var)(vMap.get(this)); if (v == null) { //No occurence of v before v = new Var(name,idExecCtx,0,timestamp); vMap.put(this,v); } return v; } else { return tt.copy(vMap, idExecCtx); } } COM: <s> gets a copy of this variable </s>
funcom_train/40485400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean visible() { /** * There might be an issue around this to do with how many views the widget is embedded down * into. This will examine the visibility of the client div and the parent but if you were * to put a parent view inside yet another view and stick that inside a tab, you might get * into trouble. */ Element clientElement = getClientElement(); Element containerElement = getElement(); boolean client = UIObject.isVisible(clientElement); boolean container = UIObject.isVisible(containerElement); return (client && container); } COM: <s> is timeline visible within containing view </s>
funcom_train/48406717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSectionNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Section_sectionName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Section_sectionName_feature", "_UI_Section_type"), SpemxtcompletePackage.eINSTANCE.getSection_SectionName(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the section name feature </s>
funcom_train/47075224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CPF queryMarginal(BeliefNode bnode){ CPF marginal_cpf = new CPF(); for(int i = 0; i < nodes_formarginals.length; i++){ //System.out.println("node: " + i + " " + nodes_formarginals[i] ); if(bnode.getName().equals(nodes_formarginals[i].getName())){ marginal_cpf = nodes_formarginals[i].getCPF(); } else{} } return marginal_cpf; } COM: <s> after running query a marginal for a node </s>
funcom_train/28123266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() { try { FileOutputStream out = new FileOutputStream(recentlyUsedItemsFile); XMLEncoder encoder = new XMLEncoder(out); encoder.writeObject(recentlyUsed); encoder.close(); out.close(); } catch (Exception e) { System.out.println("Unable to save list of recently used projects: " + e.toString()); } } COM: <s> save list of recently used items </s>
funcom_train/42445657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ActiveXComponent getTestFactory(final String pPath) throws QcException { checkFolder(pPath); try { // Getting the node passing the path return getNode(pPath).getPropertyAsComponent("testFactory"); } catch (ComException e) { throw new QcException("Error getting test factory for path " + pPath); } } COM: <s> returns the test factory for a given path </s>
funcom_train/18860240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDebugPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ControllerType_debug_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ControllerType_debug_feature", "_UI_ControllerType_type"), StrutsConfig11Package.eINSTANCE.getControllerType_Debug(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the debug feature </s>
funcom_train/11023436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNullProperty() { // Check the property & value doesn't exist assertNull("Check Property doesn't exist", dynaClass.getDynaProperty(testProperty)); assertNull("Check Value is null", bean.get(testProperty)); // Set a new property to null bean.set(testProperty, null); assertNull("Check Value is still null", bean.get(testProperty)); } COM: <s> test getting setting a null property </s>
funcom_train/19765335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand() { if (exitCommand == null) {//GEN-END:|18-getter|0|18-preInit // write pre-init user code here exitCommand = new Command("\u9000\u51FA", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit // write post-init user code here }//GEN-BEGIN:|18-getter|2| return exitCommand; } COM: <s> returns an initiliazed instance of exit command component </s>
funcom_train/9369654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Builder withValues(ContentValues values) { if (mType != TYPE_INSERT && mType != TYPE_UPDATE && mType != TYPE_ASSERT) { throw new IllegalArgumentException( "only inserts, updates, and asserts can have values"); } if (mValues == null) { mValues = new ContentValues(); } mValues.putAll(values); return this; } COM: <s> the content values to use </s>
funcom_train/43141480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateAfterSwap() { if (list != null) { if (previous == null) { list.head = this; } else { previous.next = this; } if (next == null) { list.tail = this; } else { next.previous = this; } list.modCount++; } } COM: <s> after a node has been swapped updates the head tail previous nodes </s>
funcom_train/45933667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LastChangeResponseObjectType getLastChange(LastChangeRequest parameters) { LastChangeResponseObject lastChangeResponseObject = vocabularyService.getLastChange(IdentificationSdoHelper.fromIdentificationType(parameters.getIdentification()), parameters.getRequestId(), parameters.getNamespace()); return ResponseObjectSdoHelper.toLastChangeRepsonseObjectType(lastChangeResponseObject); } COM: <s> interface to get vocabulary in vocabulary service </s>
funcom_train/13258631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String FormatNumber(double d) { DecimalFormat nf = new DecimalFormat(); String ret; // If module of number is greater than 1e4 or lesser than 1e-4 uses exponential notation if (Math.abs(d) >= 1e-4 && Math.abs(d) <= 1e4 || d == 0) { nf.applyPattern("#.####"); ret = nf.format(d); if (ret.length() > 7) { ret = ret.substring(0, 6); } } else { nf.applyPattern("0.00E00"); ret = nf.format(d); } return ret; } COM: <s> helper method used to formats given number into string according to default rules </s>
funcom_train/8803747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read3() throws java.io.IOException { if ( 3 <= available()){ int ch = buf[rc++]&0xff, ch2; ch <<= 16; ch2 = buf[rc++]&0xff; ch2 <<= 8; ch |= ch2; ch |= buf[rc++]&0xff; return ch; } else throw new java.io.IOException("Unable to read three bytes."); } COM: <s> read three bytes into an int using network byte order big endian </s>
funcom_train/13219997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MenuItem addItem(MenuItem item) { // Check the type of command object if (item.getCommand() != null && !(item.getCommand() instanceof ContextMenuCommand)) { item.setCommand(new ContextMenuCommand(this, item.getCommand())); } super.addItem(item); return item; } COM: <s> adds an item to the menu bar </s>
funcom_train/12179835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printValue(CommandLine cmd, String name) { if (logger.isDebugEnabled()) { if (cmd.hasOption(name)) { logger.debug("The " + name + " option was found with value: " + cmd.getOptionValue(name)); } else { logger.debug("The " + name + " option was not found"); } } } COM: <s> print out the value of a command option to the debug log </s>
funcom_train/40441593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerName(GinjectorBindings bindings, String name) { Preconditions.checkState(!numberOfAppearances.containsKey(bindings.getModule().getSimpleName()), "Can only register names for ginjectors that haven't been used yet."); numberOfAppearances.put(bindings.getModule().getSimpleName(), 1); nameCache.put(bindings, name); } COM: <s> register a specific name for use with the given ginjector </s>
funcom_train/16411498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRevealerLocation(Point p){ Point loc = p; if(orientation == SwingConstants.WEST){ loc = new Point(p.x + (initialBounds.width - getWidth()), p.y); } else if(orientation == SwingConstants.SOUTH){ loc = new Point(p.x, p.y + (initialBounds.height - getHeight())); } setLocation(loc); currentBounds.setLocation(loc); if(initialBounds == null) initialBounds = new Rectangle(); initialBounds.setLocation(p); } COM: <s> user this method for setting the location of revealer </s>
funcom_train/50702957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateConstraints() { SpringLayout layout = (SpringLayout) getLayout(); SpringUtilities.alignVTop(layout, Spring.constant(0), Spring .constant(0), this); SpringUtilities.alignHDistr(layout, Spring.constant(0), Spring .constant(10), Spring.constant(0), this); } COM: <s> update the constraints for the springlayout of this hi graph panel </s>
funcom_train/15867555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toStringFormat2() { String sMin = "0"; if (min != defaultValue.getMin()) { sMin = min+""; } String sMax = "*"; if (max != defaultValue.getMax()) { sMax = max+""; } return sMin+".."+sMax; } COM: <s> returns cardinality in format min </s>
funcom_train/34042862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initAttributesList() { try { URL shapeURL = file_.toURI().toURL(); if (shapeURL == null) return; // get feature results ShapefileDataStore store = new ShapefileDataStore(shapeURL); attrs_ = store.getSchema().getTypes(); } catch (Exception ex) { ex.printStackTrace(); } } COM: <s> scans the currently selected shapefiles attribute table and stores a list </s>
funcom_train/46836841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setShowHeaders(boolean showHeaders) { if (!showHeaders) { // set preferred size to (0,0) to hide the header getTableHeader().setPreferredSize(new Dimension(0, 0)); } else { // to show the header the preferred size is recalculated from the actual header data/renderers getTableHeader().setPreferredSize(getPreferredTableHeaderSize()); } } COM: <s> sets whether the table draws headers for its columns </s>
funcom_train/32056602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testActionPerformed() { System.out.println("testActionPerformed"); ActionEvent e = new ActionEvent(new Object(),ActionEvent.ACTION_PERFORMED,"command"); GPGraphpad gp = new GPGraphpad(); FileLibrarySaveAs fs = new FileLibrarySaveAs(gp); fs.actionPerformed(e); } COM: <s> tests action performed method of class file library save as </s>
funcom_train/22573915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getXml() throws Exception { if (xml == null) throw new Exception("XmlFormatterBean: getXml: xml is null"); XmlFormatter f = new XmlFormatter(xml); f.xmlHeader = isXmlHeader(); f.useHtmlEscapes = isUseHtmlEscapes(); f.diagOn = isDiag(); f.uriPrefix = getUriPrefix(); return f.run(); } COM: <s> getter for property xml </s>
funcom_train/17917778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close() { if (!isClosed) { isClosed = true; setActive(false); if (result.getErrors() + result.getWarnings() >= logLimit) { result.addMessage("INFO",new Date().getTime(),"... and "+linesOmitted+" more lines. The complete log can be found in ./logs/etlserver.log."); } LogManager.getInstance().removeAppender(this); } //super.close(); } COM: <s> closes this appender and removes it from the </s>
funcom_train/18660697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JFormattedTextField getTextField(JSpinner spinner) { JComponent editor = spinner.getEditor(); if (editor instanceof JSpinner.DefaultEditor) { return ((JSpinner.DefaultEditor)editor).getTextField(); } else { System.err.println("Unexpected editor type: " + spinner.getEditor().getClass() + " isn't a descendant of DefaultEditor"); return null; } } COM: <s> return the formatted text field used by the editor or </s>
funcom_train/17202842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PhysicalRegisterEnumeration enumerateNonvolatileGPRs() { Register[] r = new Register[NUM_NONVOLATILE_GPRS]; for (int i = 0; i < NUM_NONVOLATILE_GPRS; i++) { r[i] = getGPR(NONVOLATILE_GPRS[i]); } return new PhysicalRegisterEnumeration(r); } COM: <s> enumerate all the nonvolatile gprs in this set </s>
funcom_train/7674161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensureCapacity(int value) { if (value >= Bits.getMax(bits)) { int[] newBits = Bits.makeBitSet( Math.max(value + 1, 2 * Bits.getMax(bits))); System.arraycopy(bits, 0, newBits, 0, bits.length); bits = newBits; } } COM: <s> ensures that the bit set has the capacity to represent the given value </s>
funcom_train/10383884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProcessExpiresFrequency(int processExpiresFrequency) { if (processExpiresFrequency <= 0) { return; } int oldProcessExpiresFrequency = this.processExpiresFrequency; this.processExpiresFrequency = processExpiresFrequency; support.firePropertyChange("processExpiresFrequency", Integer.valueOf(oldProcessExpiresFrequency), Integer.valueOf(this.processExpiresFrequency)); } COM: <s> set the manager checks frequency </s>
funcom_train/171182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void merge(LocalVariables lv){ if (this.locals.length != lv.locals.length){ throw new AssertionViolatedException("Merging LocalVariables of different size?!? From different methods or what?!?"); } for (int i=0; i<locals.length; i++){ merge(lv, i); } } COM: <s> merges two local variables sets as described in the java virtual machine specification </s>
funcom_train/51703318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object validate(Object value) throws IllegalArgumentException { //Things to check: Class, Nillable if (value != null){ checkObjectClass(value); return value; } else {//Value is null if (this.isNillable) return null; if (this.defaultValue != null) return this.defaultValue; else throw new IllegalArgumentException( "Null values not permitted for column " + this.name); } } COM: <s> checks if an object is suitable to be inserted into this columnn </s>
funcom_train/11641466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNullDouble() throws SQLException { assertEquals(0.0, rs2.getNullDouble(), 0.0); // Set what gets returned to something other than the default double d = 10.0; rs2.setNullDouble(d); assertEquals(d, rs.getDouble(1), 0.0); assertEquals(d, rs.getDouble("column"), 0.0); } COM: <s> tests the set null double implementation </s>
funcom_train/47434310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMapping(TemplateElement template, int begin, int end) { if (begin > -1 && end > -1) { // Mapping pos2TemplateElement Int2 newPos = new Int2(begin, end); if (!pos2TemplateElement.containsKey(newPos)) { pos2TemplateElement.put(newPos, template); } // Mapping template2Pos List templatePositions = (List) template2Positions.get(template); if (templatePositions == null) { templatePositions = new ArrayList(); template2Positions.put(template, templatePositions); } add(templatePositions, begin, end); } } COM: <s> adds a mapping between the template and the text begins at the specified </s>
funcom_train/46456457
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getDatasetIndex(String yColumnName) { for (int i = 0; i < datasets.size(); i++) { String name = ((Dataset)datasets.get(i)).getYColumnName(); if (name.equals(yColumnName)) return i; } return -1; } COM: <s> returns the index of the first dataset with the specified y column name </s>
funcom_train/39909621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { if(tableCards == null) { tableCards = new ArrayList<Card>(); } else { tableCards.clear(); } if(playingOrder == null) { playingOrder = new ArrayList<Player>(); } else { playingOrder.clear(); } potMoney = 0; currentPhase = 0; currentSmallBlind = 0; currentBigBlind = 0; } COM: <s> reset the working memory </s>
funcom_train/30159217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPerception(int perception) { int oldPerception = getPerception(); if (oldPerception != perception) { postUndoEdit(MSG_PERCEPTION_UNDO, ID_PERCEPTION, new Integer(oldPerception), new Integer(perception)); updatePerceptionInfo(perception - (mPerceptionBonus + (SheetPreferences.areOptionalIQRulesUsed() ? 10 : getIntelligence())), mPerceptionBonus); } } COM: <s> sets the perception </s>
funcom_train/2951978
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addDecl(String name, LexicalUnit value, boolean important) { Iterator iter = this.currentRules.iterator(); while (iter.hasNext()) { Rule rule = (Rule) iter.next(); rule.add(new PropertyDecl(rule, name, value, important)); } } COM: <s> adds a property decl to the current set of rules </s>
funcom_train/887121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyImage(File odtResult, String xtractedImage, String srcImage) { try { // e.g. images/bla.gif File imageFile = new File(odtResult.getParentFile() .getAbsolutePath(), xtractedImage); // create dirs imageFile.getParentFile().mkdirs(); FileUtilities.copyFile(new File(srcImage), imageFile); logger.info("Copied referenced image: " + srcImage); } catch (IOException e) { logger.warn("Xtractor image not found: " + srcImage); } } COM: <s> copies one referenced image to the destination folder </s>
funcom_train/47603723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Spacer getSpacer4() { if (spacer4 == null) {//GEN-END:|90-getter|0|90-preInit // write pre-init user code here spacer4 = new Spacer(16, 1);//GEN-LINE:|90-getter|1|90-postInit // write post-init user code here }//GEN-BEGIN:|90-getter|2| return spacer4; } COM: <s> returns an initiliazed instance of spacer4 component </s>
funcom_train/24503615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Intent i = new Intent(); i.setAction(Intent.ACTION_VIEW); i.setData(RssReader.RssFeed.CONTENT_URI); startActivity(i); finish(); } COM: <s> called when the activity is first created </s>
funcom_train/14120771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GWTMailFolder createFolder(String mailFolderName) { log.debug("createFolder..."); try { User user = getLoggedInUser(); if (user != null) { return GWTServiceHelper.createFolder(system, user, mailFolderName); } } catch (ServiceException e) { e.printStackTrace(); } return null; } COM: <s> creates new mail folder </s>
funcom_train/2854930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File hexFileName (byte[] hash) { StringBuffer sb = new StringBuffer(targetName); if (cDirStruc != FLAT) throw new UnsupportedOperationException( "don't know how to build file name for strategy " + cDirStruc); return new File(sb .append(org.xlattice.util.StringLib.byteArrayToHex(hash)) .toString()); } COM: <s> get the name of the target file corresponding to this source </s>
funcom_train/19176788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(int rowIndex, int columnIndex) { if (songs == null) { System.out.println("songs == null"); return ""; } if (searched == null) { return (getColumnObject((Song) songs.get(rowIndex), columnIndex)); } else { return (getColumnObject((Song) searched.get(rowIndex), columnIndex)); } } COM: <s> gets the value at attribute of the song table model object </s>
funcom_train/5276197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void workoutTypesSelectionChanged(Object selection) { log4j.debug("workoutTypeSelectionChanged"); if (selection != null) { SelectableWorkoutType selectableWorkoutType = (SelectableWorkoutType) selection; workoutTypeModel.setSelectableWorkoutType(selectableWorkoutType.getWorkoutType()); workoutTypeModel.findWorkoutSubTypes(); sendApplicationEvent(new YApplicationEvent( UiConstants.WORKOUTTYPE_SELECTED, selection)); } } COM: <s> executed when selection in selectable workout types table is changed </s>
funcom_train/26025139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MouseEvent cloneMouseEvent(MouseEvent e) { MouseEvent clone = new MouseEvent(e.getComponent(), e.getID(), e.getWhen(), e.getModifiers(), e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger()); return clone; } COM: <s> clones a mouse event </s>
funcom_train/33705739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPriority(int priority) { LOGGER.entering("UserStory", "setPriority", priority); if (priority < 0) { throw new IllegalArgumentException("Priority should be positive"); } this.priority = priority; LOGGER.exiting("UserStory", "setPriority", this.priority); } COM: <s> changes the priority of this </s>
funcom_train/5075938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData(int index, ByteBuffer data) { if (index >= 0) { while (this.data.size() <= index) { this.data.add(null); } this.data.set(index, data); } else { throw new IllegalArgumentException("index must be greater than or equal to 0."); } } COM: <s> sets the data </s>
funcom_train/34527859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enableProjectMenus() { if ( project != null ) { MenuBar menuBar = ( MenuBar )project.getAppFrame().getMenuBar(); for ( int i = 0; i < menuBar.getMenuCount(); i++ ) { Menu menu = ( Menu )menuBar.getMenu( i ); if ( menu instanceof Menu ) { iterateComps( menu ); } } toolbarPage.enableButtons(); } } COM: <s> called when a project is created or re opened </s>