__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/4865369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurrentState(Class<?> stateClass) { ModelDirections md = this.modelStates.getState(stateClass); if ( md != null ) { this.currentModelDir = md; setCurrentDirection(this.currentDirection, true); } //else { // throw new IllegalArgumentException("Invalid State: " + stateClass.getName()); //} } COM: <s> set the current </s>
funcom_train/23279371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findPosition(List<LaunchFile> files, long fileId){ int position = -1; for (int i = 0; i < files.size(); i++) { if (files.get(i).getId() == fileId) { position = i; break; } } if (position == -1) throw new ARISException("Invalid File for the Launch Object"); return position; } COM: <s> used for remove file methods and update file methods </s>
funcom_train/37520926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ItemDescriptor getKey(String keyName){ ItemDescriptor item = null; for(int i = 0; i < primaryKeys.size(); i++){ item = (ItemDescriptor)primaryKeys.get(i); if(item.getPropertyName().equals(keyName)) break; } return item; } COM: <s> return primary key specified in key name param </s>
funcom_train/15867105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validateTitle(Object obj, Errors errors) { String method = "validateTitle(obj, errors)"; if (logger.isDebugEnabled()) { logger.debug("BEGIN " + method); } ValidationUtils.rejectIfEmptyOrWhitespace(errors, "recipe.title", "required", "*"); if (logger.isDebugEnabled()) { logger.debug(errors.getErrorCount() + "errors found"); logger.debug("END " + method); } } COM: <s> validates the title of the new recipe </s>
funcom_train/31729535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void makeJumpMenu() { jump_menu.removeAll(); SortedSet heads = new TreeSet(family.getFamilyHeads()); class PersonMenuItem extends JMenuItem implements ActionListener { Person p; PersonMenuItem(Person p) { super(p.toString()); this.p=p; addActionListener(this); } public void actionPerformed(ActionEvent e) { personSelected(p); } } for(Iterator i=heads.iterator(); i.hasNext();) jump_menu.add(new PersonMenuItem((Person)i.next())); } COM: <s> create the menu that selects particularly important people that </s>
funcom_train/32611474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rotateVisualisationEnvironmentYAxisAbsolute(double angle) { Transform3D origionalTransform = new Transform3D(); mouseContolsTransformGroup.getTransform(origionalTransform); Matrix3f rotationScaleMatrix = new Matrix3f(); origionalTransform.getRotationScale(rotationScaleMatrix); rotationScaleMatrix.rotY((float) Math.toRadians(angle)); origionalTransform.setRotation(rotationScaleMatrix); mouseContolsTransformGroup.setTransform(origionalTransform); } COM: <s> rotates the visualisation environment this rotation is not accumlative </s>
funcom_train/23644444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getBondOrder() { double order = 1; switch (m_bondType) { case 'A': order = 1.5; break; case 'D': order = 2; break; case 0: case 'S': order = 1; break; case 'T': order = 3; break; } return order; } COM: <s> associated the letter of the bond type with a number bond order </s>
funcom_train/23069087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String schedule() { List workflows = workflow.getWorkflowInStep(55); for (Iterator iter = workflows.iterator(); iter.hasNext();) { WorkflowEntry wf = (WorkflowEntry) iter.next(); try { workflowManager.doAction(wf, new Integer(990), null); } catch (Exception e) { log.error("exception while processing action for: " + wf, e); } } return "success"; } COM: <s> find all in scheduled status </s>
funcom_train/2897900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCacheSize() { // TODO make better implementation ByteArrayOutputStream baos = null; try { baos = new ByteArrayOutputStream(); ObjectOutputStream os = new ObjectOutputStream(baos); os.writeObject(this); os.flush(); } catch (IOException e) { } return baos.size() - 4; } COM: <s> returns the current size in bytes of the cache </s>
funcom_train/48526310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTopics(Collection<Topic> accepted) { // ArrayList<Topic> ret = new ArrayList<Topic>(); topics.removeAll(accepted); if (topics.isEmpty()) { topic = null; } else { topic = topics.get(0); } // System.out.println(this+".removeTopics("+accepted+")"); } COM: <s> call this when you accept topics in the list </s>
funcom_train/21611061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testContextFunction() throws InterpreterException { Value v = interpreter.process("Context();"); String context = v.asString().getNativeValue(); System.out.println("Context: " + context); String[] functions = context.split("\n"); assertTrue("Unespected number of functions.", functions.length > 10); } COM: <s> tests context function </s>
funcom_train/26313231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void autoSave() { String fileName = "autosave"; if (PreferenceManager.getClientPreferences().stampFilenames()) { fileName = StringUtil.addDateTimeStamp(fileName); } saveGame(fileName, game.getOptions().booleanOption("autosave_msg")); } COM: <s> automatically save the game </s>
funcom_train/39533844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectAllElements(){ //clearing the selected elements selectedElements.clear(); orderedSelectedElements.clear(); Set<Element> elementsToSelect=new HashSet<Element>(); //computing the set of the elements to be selected for(Node node=parentElement.getFirstChild(); node!=null; node=node.getNextSibling()){ if(node instanceof Element && EditorToolkit.isElementAShape((Element)node)){ elementsToSelect.add((Element)node); } } handleSelection(elementsToSelect, true, true); } COM: <s> selects all the elements that could be selected </s>
funcom_train/23453341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCodePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ServiceCategory_code_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ServiceCategory_code_feature", "_UI_ServiceCategory_type"), ProfilePackage.Literals.SERVICE_CATEGORY__CODE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the code feature </s>
funcom_train/4918016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPropertiesFromFile() throws Throwable { // Flag expected parameters MockConsoleFactory.expectedEnvironment.put("one", "A"); MockConsoleFactory.expectedEnvironment.put("two", "B"); // Run with properties in file this.runMain("PropertiesFromFile", true, ""); // Ensure run this.assertOut("run"); this.assertErr(); } COM: <s> ensure loads properties from file </s>
funcom_train/11293406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printTree() { if( isEmpty() ) { System.out.println( "Tree is empty" ); return; } getRoot().setDepth( 0 ); System.out.println( getRoot() ); visit( getRoot().getRight(), getRoot() ); visit( getRoot().getLeft(), getRoot() ); } COM: <s> prints the contents of splay tree in pretty format </s>
funcom_train/14177686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { if (players == null) { players = new ArrayList<Player>(); } playerIds = new String(""); for (int count = 0; count < players.size(); count++) { playerIds += players.get(count).getPlayerId() + ","; } Session session = HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); session.update(this); session.getTransaction().commit(); } COM: <s> updates this game in db </s>
funcom_train/21320018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pauseScroll() { if (null == mSlr) return; if (mPaused) return; mPaused = true; // abortAnimation sets the current X to be the final X, // and sets isFinished to be true // so current position shall be saved mXPaused = mSlr.getCurrX(); mSlr.abortAnimation(); } COM: <s> pause scrolling the text </s>
funcom_train/24116972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unmapTask(Task task){ // parameter checks if(task==null) throw new NullPointerException("task does not exist"); appResourceMap.remove(task.getIdent()); task.getMappedTo().unmapSchedElem(task); task.setMappedTo(null); } COM: <s> removes the mapping of a task </s>
funcom_train/44009920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readVirtualMemoryString(int vaddr, int maxLength) { Lib.assertit(maxLength >= 0); byte[] bytes = new byte[maxLength + 1]; int bytesRead = readVirtualMemory(vaddr, bytes); for (int length = 0; length < bytesRead; length++) { if (bytes[length] == 0) return new String(bytes, 0, length); } return null; } COM: <s> read a null terminated string from this processs virtual memory </s>
funcom_train/19973599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onProviderDisabled(String provider) { try { Log.i(TAG, "Provider disabled: " + provider); synchronized (this) { if (provider.equals(LocationManager.NETWORK_PROVIDER)) netElement.setStatus(msgDisabled); else if (provider.equals(LocationManager.GPS_PROVIDER)) { gpsElement.setStatus(msgDisabled); satElement.clearValues(); } } } catch (Exception e) { appContext.reportException(e); } } COM: <s> called when the provider is disabled by the user </s>
funcom_train/45692341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEventTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SongEvent_eventType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SongEvent_eventType_feature", "_UI_SongEvent_type"), EsxPackage.Literals.SONG_EVENT__EVENT_TYPE, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the event type feature </s>
funcom_train/24060866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load ( ) throws PurseStructuralException { if ( ! this.pretendFileExists ) throw new IllegalStateException( "load forbidden - purse " + this.filename + " does not exist" ); // minimum size will be validated in the superclass method... load( this.pretendFileContents, 0, this.pretendFileContents.length ); } COM: <s> load the contents of the encrypted purse from the file as raw bytes </s>
funcom_train/983487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void glutWireSphere (double radius, int slices, int stacks) { QUAD_OBJ_INIT(); JavaGLU.gluQuadricDrawStyle (quadObj, GLU.GLU_LINE); JavaGLU.gluQuadricNormals (quadObj, GLU.GLU_SMOOTH); /* If we ever changed/used the texture or orientation state of quadObj, we'd need to change it to the defaults here with gluQuadricTexture and/or gluQuadricOrientation. */ JavaGLU.gluSphere (quadObj, radius, slices, stacks); } COM: <s> void glut wire sphere gldouble radius glint slices glint stacks </s>
funcom_train/25838260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNextImagePath(boolean random) { int next; if (random) { next = new java.util.Random().nextInt(imagePaths.size()); curIndex = next; } else { curIndex++; if (curIndex > imagePaths.size()) { curIndex = 0; } next = curIndex; } return imagePaths.elementAt(next); } COM: <s> determines the path to the next image for the widget </s>
funcom_train/42901963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void decodeBlocks(int channels, byte[] inBuffer, int[][] outBuffers, int length) { for (int ch = 0; ch < channels; ch++) { decode(ch, channels, inBuffer, outBuffers[ch], 0, length, 1); } } COM: <s> outputs non interleaved samples into chan separate output buffers </s>
funcom_train/22370962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getButtonsPanel() { if (buttonsPanel == null) { buttonsPanel = new JPanel(); searchButton = new JButton(I18nUtils.getString("SEARCH")); cancelButton = new JButton(I18nUtils.getString("CANCEL")); buttonsPanel.add(searchButton); buttonsPanel.add(cancelButton); } return buttonsPanel; } COM: <s> gets the buttons panel </s>
funcom_train/18903231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getTuplesObject(int column) throws TuplesException { try { long localValue = this.tuples.getColumnValue(column); return this.session.globalize(localValue); } catch (StoreException storeException) { throw new TuplesException("Failed to get Object for column: " + column + ".", storeException); } } COM: <s> returns the globalized object from the tuples </s>
funcom_train/29505667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getComboFonte() { if (comboFonte == null) { comboFonte = new ComboFonte(); comboFonte.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); comboFonte.setEditable(false); comboFonte.setComponentOrientation(java.awt.ComponentOrientation.LEFT_TO_RIGHT); comboFonte.setName("comboFonte"); comboFonte.addItemListener(PrincipalActionFactory.makeSelectFontCommand(getOptions(),getFontText())); } return comboFonte; } COM: <s> this method initializes combo url </s>
funcom_train/6265432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection getConnection() { if (dataSource==null) { log.error("DataSource has not yet been looked up",null); return null; } try { return dataSource.getConnection(); } catch (SQLException e) { log.error("Could not retrieve Connection from DataSource",e); return null; } } COM: <s> get new connection from data source </s>
funcom_train/1573248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean canRenderObjectInContext(Object _object, WOContext _ctx) { if (this.jsonRenderer.canRenderObjectInContext(_object, _ctx)) return true; if (_object instanceof WOComponent || _object instanceof WOResponse || _object instanceof WOActionResults || _object instanceof WOElement || _object instanceof String || _object instanceof Exception || _object instanceof WOApplication || _object instanceof BufferedImage || _object instanceof Image) return true; return false; } COM: <s> checks whether the go default renderer can render the given object </s>
funcom_train/19844509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearGlyphs() { for (int i = 0; i < PAGES; i++) glyphs[i] = null; for (Iterator iter = glyphPages.iterator(); iter.hasNext();) { GlyphPage page = (GlyphPage) iter.next(); try { page.getImage().destroy(); } catch (SlickException ignored) { } } glyphPages.clear(); if (baseDisplayListID != -1) { GL.glDeleteLists(baseDisplayListID, displayLists.size()); baseDisplayListID = -1; } queuedGlyphs.clear(); missingGlyph = null; } COM: <s> clears all loaded and queued glyphs </s>
funcom_train/32157433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getPlotResultsMenuItem() { if (plotResultsMenuItem == null) { plotResultsMenuItem = new JMenuItem(); plotResultsMenuItem.setText("Plot graphs"); plotResultsMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { CardLayout cards = (CardLayout) getNorthPanel().getLayout(); cards.show(getNorthPanel(), RESULTS_PANEL); } }); } return plotResultsMenuItem; } COM: <s> this method initializes plot results menu item </s>
funcom_train/35197087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void tradeFixed() { final Trader trader = new Trader(res2trade, ratios); results = trader.tradeFixed(amount2trade, fixedResource, amount2fix); results[res2trade.ordinal()] = 0; results[fixedResource.ordinal()] = 0; showResults(); writeSummaryFixed(); } COM: <s> trades the specified amount in amount2trade field with the specified </s>
funcom_train/35164309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { // load settings from config file (display size, resolution, etc.) loadSettings(configFilename); initDisplay(); updateTimer(); // Do this once to init time values to something sane, otherwise the first game loop will report a huge secondsElapsedPerFrame } COM: <s> runs the application </s>
funcom_train/3903939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSelectCountPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RandomizationType_selectCount_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RandomizationType_selectCount_feature", "_UI_RandomizationType_type"), ImsssPackage.Literals.RANDOMIZATION_TYPE__SELECT_COUNT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the select count feature </s>
funcom_train/1479264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createGlobalItem(int id, int amt, int x, int y, int height) { if (id < 0 || amt < 0 || id >= maxListedItems) { return; } for (Player p : engine.players) { if (p == null) { continue; } frames.createGroundItem(p, id, amt, x, y, height); } } COM: <s> creates an item on the ground for everyone within distance </s>
funcom_train/9564901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean addToProperty(String propertyName, int propertyValue) { if(propertyName == null) return false; int value = ((Integer)properties.get(propertyName)).intValue(); if((value | propertyValue) == value) return true; value |= propertyValue; beforeChange(propertyName); properties.put(propertyName, new Integer(value)); afterChange(propertyName); setModified(propertyName, true); return true; } COM: <s> add the value of the property identified by the parameter </s>
funcom_train/39109200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkEmail(HTMLDiv messages) { if (email != null && email.length() > 0) { if (LusidUtils.isValidEmailAddr(email)) { return true; } else { messages.add(new HTMLParagraph("The supplied email address is not valid: "+email)); } } else { messages.add(new HTMLParagraph("An email address must be supplied.")); } return false; } COM: <s> checks that mail not null and that format is correct </s>
funcom_train/46857143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnCancel() { if (btnCancel == null) { btnCancel = new JButton(); btnCancel.setBounds(new Rectangle(283, 92, 73, 26)); btnCancel.setText("Cancel"); btnCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setVisible(false); } }); } return btnCancel; } COM: <s> this method initializes btn cancel </s>
funcom_train/2759459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPathSpec(String pathSpec) { _pathSpec = pathSpec; // create the REProgram StringBuffer sb = new StringBuffer(); for(int i = 0; i < pathSpec.length(); i++) { if(pathSpec.charAt(i) == '*') { sb.append('.'); } sb.append(pathSpec.charAt(i)); } pathSpec = "^" + sb.toString() + "$"; _pathPattern = Pattern.compile(pathSpec); } COM: <s> sets the path spec </s>
funcom_train/3413288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processFocusEvent(FocusEvent e) { FocusListener listener = focusListener; if (listener != null) { int id = e.getID(); switch(id) { case FocusEvent.FOCUS_GAINED: listener.focusGained(e); break; case FocusEvent.FOCUS_LOST: listener.focusLost(e); break; } } } COM: <s> processes focus events occurring on this component by </s>
funcom_train/39178939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doRemoveFeature(int rowIndex){ RowData rd = (RowData) tableModel.data.get(rowIndex); name2featureSchemaMap.put(rd.getFeatureSchema().getFeatureName(), rd.getFeatureSchema()); listModel.addElement(rd.getFeatureSchema().getFeatureName()); tableModel.data.remove(rowIndex); }// doRemoveFeature(); COM: <s> this removes the feature </s>
funcom_train/1956837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCouleurPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BlinkM_couleur_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BlinkM_couleur_feature", "_UI_BlinkM_type"), BlinkmPackage.Literals.BLINK_M__COULEUR, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the couleur feature </s>
funcom_train/4233751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyImage() { // get the displayed image Image displayedImage = getDisplayedImage(); if (displayedImage == null) { return; } // get the system clipboard Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); // create the transferable to transfer an image ImageSelection contents = new ImageSelection(displayedImage); // set the clipboard contents to the image transferable clipboard.setContents(contents, null); } COM: <s> copy the currently displayed image to the clipboard </s>
funcom_train/51119746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addField(Object propertyId, Field field) { if (propertyId != null && field != null) { this.dependsOn(field); field.dependsOn(this); fields.put(propertyId, field); propertyIds.addLast(propertyId); field.setReadThrough(readThrough); field.setWriteThrough(writeThrough); if (layout instanceof CustomLayout) ((CustomLayout) layout).addComponent( field, propertyId.toString()); else layout.addComponent(field); requestRepaint(); } } COM: <s> add field to form </s>
funcom_train/32941131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getEolCharsCount(byte [] bytes) { int count = 0; if (bytes != null && bytes.length >=1 && bytes[bytes.length - 1] == '\n') { count++; if (bytes.length >=2 && bytes[bytes.length -2] == '\r') { count++; } } return count; } COM: <s> borrowed copied from org </s>
funcom_train/26029277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean testConclusions(Graph conclusions, Graph result) { QueryHandler qh = result.queryHandler(); Query query = graphToQuery(conclusions); Iterator<Domain> i = qh.prepareBindings(query, new Node[] {}).executeBindings(); return i.hasNext(); } COM: <s> test a conclusions graph against a result graph </s>
funcom_train/18196069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getLocaleString(final String msg) { String ret = null; if (loadedLocale == null) { try { loadLanguage(); } catch (PropertiesNotLoadedException e) { throw new IllegalStateException( "A necessary language file could not be loaded!", e); } } ret = loadedLocale.getProperty(msg); return ret; } COM: <s> does the actual loading of the localized string </s>
funcom_train/51604879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hardwareRemove() { if (!jListHardwares.isSelectionEmpty()) { try { for (Object object: jListHardwares.getSelectedValues()) { Hardware hardware=(Hardware)object; culture.getHardwares().unstore(hardware); } } catch(ArrayIndexOutOfBoundsException e) {} catch(IOException e){Messages.showException(e);} catch(ClassNotFoundException e){Messages.showException(e);} hardwareShow(); jListHardwares.updateUI(); } } COM: <s> this method remove selected hardwares </s>
funcom_train/19099866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unCheckOut( String memberid, String tapeid, LibDate dateout ) throws DatabaseException { try { PreparedStatement ps = conn.prepareStatement( "DELETE FROM " + TABLE_HISTORY + " WHERE tapebarcode = ? AND memberbarcode = ? " + "AND dateout = ? AND datein = NULL" ); ps.setString( 2, tapeid ); ps.setString( 1, memberid ); ps.setDate( 3, dateout ); ps.executeUpdate( ); } catch ( SQLException e ) { throw new DatabaseException( e ); } } COM: <s> removes the record that corresponds to these three entries from the history </s>
funcom_train/25915327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startHorizontalLine(long now, float x, float y) { if (!canStartLineAt(x, y)) { throw new IllegalArgumentException( "can't start line with point (" + x + "," + y + ")"); } mAnimatingLine = new AnimatingLine(Direction.Horizontal, now, y, x, mLeft, mRight); } COM: <s> start a horizontal line at a point </s>
funcom_train/42950386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void cancelLogin() { progressMessageLabel.setText("Cancelling login, please wait....");//TODO i18n getActionMap().get(CANCEL_LOGIN_ACTION_COMMAND).setEnabled(false); loginService.cancelAuthentication(); setCursor(oldCursor); } COM: <s> cancels the login procedure </s>
funcom_train/8376907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInnerValue(int n) { JXMultiBoundedRangeModel m = getModel(); int oldValue = m.getInnerValue(); if (oldValue == n) { return; } m.setInnerValue(n); if (accessibleContext != null) { accessibleContext.firePropertyChange( AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, new Integer(oldValue), new Integer(m.getInnerValue())); } } COM: <s> sets the sliders current value to </s>
funcom_train/5446621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void serverHelp() { System.out.println("\n" + "Syntax: Amairgin.server.Server server_root [-dfh]\n" + "\n" + "\tserver_root\tfully-qualified server root path\n" + "\t-d\t\tenable DEBUG state\n" + "\t-h\t\tshow help screen\n" + "\t-f\t\tenable server filters\n" + "\n" + "For information, visit:\n" + "http://www.jos.org/ topic AmairginHTTPd"); System.exit(EXIT_HELP); } COM: <s> displays server help screen invoked using h command line parameter </s>
funcom_train/15920299
/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) { w.write("async "); if (clocks != null && ! clocks.isEmpty()) { w.write("clocked ("); w.begin(0); for (Iterator<Expr> i = clocks.iterator(); i.hasNext(); ) { Expr e = i.next(); print(e, w, tr); if (i.hasNext()) { w.write(","); w.allowBreak(0, " "); } } w.end(); w.write(")"); } printSubStmt(body, w, tr); } COM: <s> write the statement to an output file </s>
funcom_train/46429790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildBTTracePanel() { saveBTT = new JButton(); saveBTT.addMouseListener(bh); clearBTT = new JButton(); clearBTT.addMouseListener(bh); bttPanel = new JPanel(); bttPanel.setLayout(new GridLayout(1, 0)); btt = new JEditorPane(); btt.setEditable(false); btt.setContentType("text/html"); clearBttPanel = new JPanel(); clearBttPanel.setLayout(new BorderLayout()); clearBttPanel.add(saveBTT, BorderLayout.NORTH); clearBttPanel.add(clearBTT, BorderLayout.SOUTH); } COM: <s> create the bluetooth trace log </s>
funcom_train/21101020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getChildCount(Object node) { if(node.equals(this)){ return rosterEles.size(); }else if(node instanceof RosterElement){ Vector<RosterElement>children = ((RosterElement)node).getChildren(); return children == null?0:children.size(); } throw new IllegalStateException("Child count on non-object"); } COM: <s> returns the number of chilren an object </s>
funcom_train/50805201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean process(String input, User user) { String[] args = decompose(input); if (args.length == 0) return false; CommandBase processor = (CommandBase)_processors.get(args[0]); if (processor == null) { unknownCommandProcessor.process(user, args, myServer); } else { return processor.process(user, args, myServer); } return false; } COM: <s> process a raw message from the client </s>
funcom_train/7689140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMinorTickCount(int majorTickIndex) { if (!isCalibrated) calibrate(); if (majorTickIndex == majorTickCount-1) return (int)((maxAxis-maxTick)/minorTick); else if (majorTickIndex==-1) return (int)((minTick-minAxis)/minorTick); else return minorTickCount; } COM: <s> returns the number of minor tick marks within each major one </s>
funcom_train/12163552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Volantis getVolantis() { Volantis volantis = new Volantis(); ProtocolsConfiguration config = new ProtocolsConfiguration(); config.setWmlPreferredOutputFormat("wmlc"); volantis.setProtocolsConfiguration(config); try { PrivateAccessor.setField(volantis, "pageURLRewriter", new RuntimePageURLRewriter(null, null)); } catch (Exception e) { throw new UndeclaredThrowableException(e); } return volantis; } COM: <s> return an instance of volantis with the protocols </s>
funcom_train/27756916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked( MouseEvent e ) { JLabel day = (JLabel)e.getSource(); if ( !day.getText().equals(" ") ) { if (e.getClickCount() > 1) { calendar.set( Calendar.DATE, getSelectedDay() ); occupyDay( calendar ); } else setSelected( day ); } fireChangeEvent(); daysGrid.requestFocus(); } COM: <s> called when the mouse is clicked on a day in the </s>
funcom_train/6289189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mainMenu() { disposeMailForm(); //#ifdef MUJMAIL_NEOI splashScreen.cleanSplashScreen(); //#endif getMenu().setSelectedTab(getMenu().getSelectedTab()); getMenu().refresh(getMenu().getSelectedTab(), true); } COM: <s> shows main menu on display </s>
funcom_train/13915530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setCancelJob(boolean bCancel) { // Cannot change the cancel flag if we're already completed... if (this.isCompleted() == true) { return false; } // Only set the flag if it's a new value... if (bCancel != this.bCancelJob) { ResourcePool.LogMessage(this, ResourcePool.INFO_MESSAGE, "Cancelling job " + this.getJobID()); this.bCancelJob = bCancel; return true; } return false; } COM: <s> sets cancel flag for job if possible </s>
funcom_train/34339595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Ticker getTicker() { if (ticker == null) {//GEN-END:|23-getter|0|23-preInit // write pre-init user code here ticker = new Ticker("Pod\u00E9s enviar tu mensaje...");//GEN-LINE:|23-getter|1|23-postInit // write post-init user code here }//GEN-BEGIN:|23-getter|2| return ticker; } COM: <s> returns an initiliazed instance of ticker component </s>
funcom_train/25792758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MouseWheelEvent createMouseWheelEvent(Component sourceComponent, int scrollType, int scrollAmount) { return new MouseWheelEvent(sourceComponent, MouseEvent.MOUSE_WHEEL, System.currentTimeMillis(), InputEvent.META_MASK, 0, 0, 0, false, scrollType, scrollAmount, 1); } COM: <s> create a mouse wheel event with the given properties </s>
funcom_train/28339840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public R3 fieldCartesian(R3 pt) throws GridException { R3 vecRes = super.getGridResolution(); R3 vecGrad = super.interpolateGradient(pt); vecGrad.set1( -vecGrad.get1()/vecRes.get1() ); vecGrad.set2( -vecGrad.get2()/vecRes.get2() ); vecGrad.set3( -vecGrad.get3()/vecRes.get3() ); return vecGrad; } COM: <s> compute and return the field in cartesian coordinates at point pt as generated </s>
funcom_train/8928051
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBase64Text(byte[] bytes) { if (bytes != null) { Text t = XMLUtils.ignoreLineBreaks() ? this._doc.createTextNode(Base64.encode(bytes)) : this._doc.createTextNode("\n" + Base64.encode(bytes) + "\n"); this._constructionElement.appendChild(t); } } COM: <s> method add base64 text </s>
funcom_train/2762952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Changes readChanges(MavenProject project, String changeLog) throws IOException { File changeLogFile = new File(project.getBasedir(), changeLog); if(false == changeLogFile.exists()) { return null; } Changes changes = (Changes) CHANGES_STORE_S.create(Changes.class); HtmlParser htmlParser = new HtmlParser(); getLog().info("Reading changes for project("+project.getArtifactId()+")."); htmlParser.parse(changeLogFile, changes,DefaultMender.getInstance()); return changes; } COM: <s> reads the changes for the supplied project </s>
funcom_train/12116989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC34(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end this.impegniModificaJButton_ActionPerformed(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c34 impegni modifica jbutton </s>
funcom_train/35499850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long getCandidateTestSetTotalQuestionMark(Integer candidateTestSetId) { try { String queryString = "select sum(model.questionMark) from CandidateAnswer model " + " where model.candidateTestSetId = :candidateTestSetId"; Query query = entityManager.createQuery(queryString); query.setParameter("candidateTestSetId", candidateTestSetId); return (Long) query.getSingleResult(); } catch (RuntimeException re) { throw re; } } COM: <s> get total question mark of a candidate test set </s>
funcom_train/14353601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRegisterUser() throws Exception { // Try with not existing user: exception expected! UserVO userData = new UserVO(); userData.setUserid("USERID"); userData.setDescription("Description"); userData.setEmail("email"); userData.setPassword("top secret password"); // 1st try should be successful passwordService.registerUser(userData); // 2nd try should fail with duplicate key try { passwordService.registerUser(userData); fail("Expected a RegistrationServiceException"); } catch (RegistrationServiceException e) { // Ok, exptected exception } } COM: <s> test registration of new user </s>
funcom_train/46825986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNewRating (int rating, int opponentRating, int resultType) { switch (resultType) { case IGameOver.WIN: return getNewRating (rating, opponentRating, WIN); case IGameOver.LOSE: return getNewRating (rating, opponentRating, LOSS); case IGameOver.DRAW: return getNewRating (rating, opponentRating, DRAW); } return -1; // no score this time. } COM: <s> convience overloaded version of get new rating int int double </s>
funcom_train/42982131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeUnitCourse() { Unit selUnit = (Unit) frame.cbUnit.getSelectedItem(); Node node = (Node) frame.cbUnitCpRemove.getSelectedItem(); engine.removeUnitCourse(selUnit.getId(), node.getId()); fillUnitData(); } COM: <s> removes a node from the units course list </s>
funcom_train/4573881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setupStrategies() { addStrategy(Constants.URL_PROTOCOL_FILE, new FileSystemStrategy()); addStrategy(Constants.URL_PROTOCOL_JAR, new JarFileStrategy()); addStrategy(Constants.URL_PROTOCOL_WSJAR, new JarFileStrategy()); addStrategy(Constants.URL_PROTOCOL_ZIP, new ZipFileStrategy()); addStrategy(Constants.URL_PROTOCOL_VFSZIP, new VfsZipFileStrategy()); addStrategy(Constants.URL_PROTOCOL_CODE_SOURCE, new CodeSourceFileStrategy()); } COM: <s> setting up basic strategies </s>
funcom_train/29416693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMenuBarVisible(boolean bVisible) { try { bMenuBarVisible = setToolVisible("MenuBarVisible", "private:resource/menubar/menubar", bMenuBarVisible, bVisible); } catch (java.lang.InterruptedException aExc) { logger.fine("setMenuBarVisible.\n" + aExc.getStackTrace()); bMenuBarVisible = bVisible; } } COM: <s> sets the visibility of the menu bar </s>
funcom_train/49200448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addComeFromScenePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_OverviewMap_comeFromScene_feature"), getString("_UI_PropertyDescriptor_description", "_UI_OverviewMap_comeFromScene_feature", "_UI_OverviewMap_type"), TransformedPackage.Literals.OVERVIEW_MAP__COME_FROM_SCENE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the come from scene feature </s>
funcom_train/25148440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doSynchronization(Map<String, Object> filter) throws Exception { List<String> ids = fetchIds(filter); for (String id: ids) { String itemURL = URLUtils.createURL(getType(), id); Content content = getContent(itemURL); if (content != null){ if (!msecp.isExistingContentForJob(itemURL)) { msecp.addContentForJob(content); } else { msecp.updateContentForJob(content); } } } } COM: <s> synchronize data source with content provider repository </s>
funcom_train/48146061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void Y2Table(String[] raw_y, int row_count){ int columnCount =1; rowNumber = row_count; columnNumber = columnCount; example = new String[rowNumber][columnNumber]; columnNames = new String[columnNumber]; columnNames[0]="Data"; for (int i=0; i<rowNumber; i++){ example[i][0] = raw_y[i]; } dataTable = new JTable(example, columnNames); return; } COM: <s> for qq use data from one array to fill a jtable </s>
funcom_train/11651738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void buildDocument() throws ParserConfigurationException, IOException, SAXException { try { DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docbuild = dbfactory.newDocumentBuilder(); WSDLDOC = docbuild.parse(CONN.getInputStream()); } catch (ParserConfigurationException exception) { throw exception; } catch (IOException exception) { throw exception; } catch (SAXException exception) { throw exception; } } COM: <s> method is used internally to parse the input stream and build the document </s>
funcom_train/4661506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean receive(Facet stimmer, List<Object> inboundValues) { inPort.get(stimmer).addAll(inboundValues); boolean ready = true; // for all source facets // if they ALL have a queue size > 0 of values waiting in the dock... we're good for (Facet f : sources) { Queue<Object> inBoundFromSrc = inPort.get(f); if (inBoundFromSrc.size() == 0) { ready = false; } } return ready; } COM: <s> accepts the values from another facet to the port </s>
funcom_train/46457565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getAssociates(Class type) { Collection c = new ArrayList(); Iterator it = associates.keySet().iterator(); while(it.hasNext()) { Object obj = it.next(); if(associates.get(obj).equals(type)) { c.add(obj); } } return c; } COM: <s> gets objects associated with the specified class </s>
funcom_train/31056575
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector listCells( Agent sender ) { myCell.noteAgentMessage( this, "listCells", sender, this ); // wait until the crucial part of doBehavior is done while( !isReady() ) synchronized( this ) { try { wait(); } catch( InterruptedException error ) { } } myCell.noteAgentMessage( this, "listCells reply", this, sender ); return otherCells; } COM: <s> return a list of all of the servers this agent knows about </s>
funcom_train/38251984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(){ System.out.print("FamilyID\tIndividualID\tDadID\tMomID\tGender\tAffected\tLibility\t"); System.out.println("Markers"); Enumeration enu = this._contents.elements(); while(enu.hasMoreElements()){ PedFileEntry entry = (PedFileEntry)enu.nextElement(); entry.print(); } } COM: <s> prints out the ped file data as the original pedigree file format </s>
funcom_train/29869834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJComboBoxPanel() { if (jComboBoxPanel == null) { GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.fill = GridBagConstraints.VERTICAL; gridBagConstraints.weightx = 1.0; jComboBoxPanel = new JPanel(); jComboBoxPanel.setLayout(new GridBagLayout()); jComboBoxPanel.add(jLabelEvents, new GridBagConstraints()); jComboBoxPanel.add(getJComboBoxViewSelect(), gridBagConstraints); } return jComboBoxPanel; } COM: <s> this method initializes j combo box panel </s>
funcom_train/43327349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void kludgeChainID() { if (name==null) return; int l = name.length(); if ((l==8) && (name.charAt(5)=='.')) chainID = Character.toUpperCase(name.charAt(7)); else if (l==7) chainID = Character.toUpperCase(name.charAt(5)); else if (l > 4) chainID = Character.toUpperCase(name.charAt(4)); if (chainID == '_') chainID = ' '; } COM: <s> kludge chain id from the name assuming the name is pdb style </s>
funcom_train/25877740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getDateHeader() { TimeZone tz = TimeZone.getTimeZone("GMT"); l4j.debug("TZ: " + tz); HEADER_FORMAT.setTimeZone(tz); String dateHeader = HEADER_FORMAT.format(new Date()); l4j.debug("Date: " + dateHeader); return dateHeader; } COM: <s> gets the current time formatted for http headers </s>
funcom_train/10274098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { // do faster tests first if (this == obj) { return true; } else if (obj != null && obj instanceof LockFile) { LockFile that = (LockFile) obj; return (f == null) ? that.f == null : f.equals(that.f); } else { return false; } } COM: <s> tests whether some other object is equal to this one </s>
funcom_train/3750611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void show() { // Work out how many rows there *really* are. int rows = 0; Enumeration e = new StringTokenizer(text.getText(), "\n"); while (e.hasMoreElements()) { e.nextElement(); rows++; } text.setRows(rows); text.setCaretPosition(0); getRootPane().setDefaultButton(okButton); setLocationRelativeTo(getParent()); super.show(); } COM: <s> overwrite show method to make ok button the default one and to </s>
funcom_train/18551101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getExtension(JarEntry pFile) { String ext = ""; String s = pFile.getName(); int i = s.lastIndexOf('.'); if (i > 0 && i < s.length() - 1) { ext = s.substring(i + 1).toLowerCase(); } return ext; } COM: <s> gets the file extension </s>
funcom_train/8878203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CustBO create() { String ID=null; try { ID = GUID.generate(); } catch (Exception ex) { ex.printStackTrace(); } CustBO cb = new CustBO(ID); Cache c = Cache.getInstance(); c.put(cb.getID(), cb); return cb; } COM: <s> this method creates a new customer bo object </s>
funcom_train/33282935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String jsxGet_internalSubset() { final String subset = ((DomDocumentType) getDomNodeOrDie()).getInternalSubset(); if (StringUtils.isNotEmpty(subset)) { return subset; } if (getBrowserVersion().hasFeature(BrowserVersionFeatures.JS_DOCTYPE_INTERNALSUBSET_EMPTY_STRING)) { return ""; } return null; } COM: <s> returns the internal subset </s>
funcom_train/1057258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int DetermineResultSize(int w, int h) { double scaleH, scaleV; scaleH = (double) w / (double) width; scaleV = (double) h / (double) height; // does it need to zoom out? if (scaleH >= 1.0 && scaleV >= 1.0) { return 1; } return 0; } COM: <s> determine the size of picture </s>
funcom_train/13913927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateFolderURLEncodedIndex (String oldURLEncodedName, ProxyFolderBean theFolder) { //remove the proxyFolder form the index using its unique urlEncodedName this.proxyFoldersByURLEncodedName.remove(oldURLEncodedName); //readd the folder to the index using the new unique urlEncodedName this.proxyFoldersByURLEncodedName.put(theFolder.getURLEncodedFolderName(), theFolder); } COM: <s> updates context urlencoded indexes </s>
funcom_train/10961522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String findExtension(String url) { int dotPos = url.lastIndexOf('.'); int slashPos = url.lastIndexOf('/'); if (dotPos > slashPos && dotPos > -1) { return url.substring(dotPos+1); } return defaultExtension; } COM: <s> finds the extension in the url </s>
funcom_train/34181549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateCollisionTree(int type, Spatial object, boolean protect) { if (object instanceof Node) { Node n = (Node) object; for (int i = n.getQuantity() - 1; i >= 0; i--) { generateCollisionTree(type, n.getChild(i), protect); } } else if (object instanceof TriMesh) { generateCollisionTree(type, (TriMesh) object, protect); } } COM: <s> creates a new collision tree for the provided spatial </s>
funcom_train/13805098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int loadBeanDefinitions(Resource resource) throws BeanDefinitionStoreException { try { InputStream inputStream = resource.getInputStream(); try { InputSource inputSource = new InputSource(inputStream); return doLoadBeanDefinitions(inputSource, resource); } finally { inputStream.close(); } } catch (IOException ex) { throw new BeanDefinitionStoreException("IOException parsing XML document from " + resource, ex); } } COM: <s> this method manages the code input stream code instance on an </s>
funcom_train/42795665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Path getOutline (String name, float width) { // first find the index of this name int index = getNameIndex (name); // now find the glyph with that name for (int i = 0; i < glyphnames.length; i++) { if (glyphnames[i] == index) { return readGlyph (charstringbase, i); } } // not found -- return the unknown glyph return readGlyph (charstringbase, 0); } COM: <s> get a glyph outline by name </s>
funcom_train/32947964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write( Document document, OutputStream stream ) throws TransformerConfigurationException, TransformerException { Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty( OutputKeys.INDENT, "yes" ); Source source = new DOMSource( document.getDocumentElement() ); Result result = new StreamResult( stream ); transformer.transform( source, result ); } COM: <s> writes an xml algorithm document to an output stream </s>
funcom_train/10482427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Folder getFolder(String name) throws MessagingException { // The root folder is a dummy one. Any getFolder() request starting // at the root will use the request name for the full name. The separator // used in that folder's namespace will be determined when the folder is // first opened. return new IMAPFolder((IMAPStore)store, name, UNDETERMINED); } COM: <s> get the folder determined by the supplied name if the name is relative </s>