__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/29680302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshNode() { try { ApiFileSystem apiFileSystem = new ApiFileSystemRemote(serverConnection.getConnection()); FileInfo freshInfo = apiFileSystem.lsInfo(getPathName()); fileInfo = freshInfo; notifyNodeChanged(); } catch (RemoteException re) { GridExplorerUtils.showError(KernelException.fromRemoteException(re)); } } COM: <s> refresh the information of this node getting it from the server </s>
funcom_train/28292958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getAttemptLimitControl() { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - " + "getAttemptLimitControl"); System.out.println(" ::--> " + mMaxAttemptControl); System.out.println(" :: SeqActivity --> END - " + "getAttemptLimitControl"); } return mMaxAttemptControl; } COM: <s> retrieves the value of the limit condition </s>
funcom_train/3290245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean fileChange(String service,String subservice,String filename) { filename=URLEscape.unescapeurl(filename); log.debug("fileChange -> "+filename); // jump to correct subhandles based on the subservice if (subservice.equals("main")) { handleMainCheck(service,subservice,filename); } return true; } COM: <s> schedules a service request on a file </s>
funcom_train/50880963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRecords(ShapeFileRecord[] inRecords)throws Exception{ for (int i=0; i<inRecords.length; i++){ if (inRecords[i] != null){ int tempShapeType = getShapeType(inRecords[i].getShape()); myHeader.myShapeType = tempShapeType; break; } } myRecords=inRecords; } COM: <s> sets the records for the shape file </s>
funcom_train/5793489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File internalTempDir(File parent, String name) throws IOException { File f = new File(parent, name); assertFalse("temporary directory exists but it shouldn't: " + f.getAbsolutePath(), f.exists()); assertTrue("could not create temporary directory: " + f.getAbsolutePath(), f.mkdir()); m_deleteMe.add(f); return f; } COM: <s> non asserting version of temp dir that can be used in initialize </s>
funcom_train/33796868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UserRoleType read(Long userRoleTypeId) throws ServiceBeanException{ try{ log.debug("Inside :: UserRolePermissionServiceImpl:read()"); if(userRoleTypeId != null){ return userRoleTypeDao.read(userRoleTypeId); } else{ throw new ServiceBeanException(ErrorMessages.MANDATORY_PARAMETER_MISSING_EXCEPTION+" userRoleTypeId"); } } catch(DAOException ex){ log.error(UserManagementErrorMessage.ROLE_READ_EXCEPTION, ex); throw new EJBException(ex); } } COM: <s> this service reads a role from database based on the primary </s>
funcom_train/13815320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComponent getSliderLabel( String txt ) { if ( sliderLabelDimension == null ) { JLabel maxLabel = new JLabel( String.valueOf( 12000 ) ); sliderLabelDimension = maxLabel.getPreferredSize(); } JLabel l = new JLabel( txt, SwingConstants.CENTER ); l.setPreferredSize( sliderLabelDimension ); return l; } COM: <s> get a standard sized label for the sliders </s>
funcom_train/36259412
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(final ListSelectionEvent event) { if (event.getSource() != view.getListSelectionSource() || event.getValueIsAdjusting()) { return; } final Runnable task = new Runnable() { public void run() { updateDatabaseActions(); } }; SwingSynchronizer.runSynchronized(task); } COM: <s> event from the database list if the selection changes </s>
funcom_train/19326284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FoValue traitSpeak(final FObj fobj, final FoContext context) { final PdSpeak property = (PdSpeak) getProperty( FoProperty.SPEAK); if (property != null) { return property.getValue(context, fobj); } return PdSpeak.getValueNoInstance(context, fobj); } COM: <s> returns the speak property </s>
funcom_train/24493415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectComment(Comment c) { if (getFilteredComments().contains(c)) { viewer.setSelection(new StructuredSelection(c), true); } else { if (ViewControl.isOpen(DetailView.class)) { DetailView.getInstance().selectionChanged(new SelectionChangedEvent(viewer, new StructuredSelection(c))); } } } COM: <s> selects the given comment in the table </s>
funcom_train/33264832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData(Object data) { if (data != null) { if ( ((Boolean)data).booleanValue() ) { if (choice.getSelectedIndex() != 1) { choice.select(1); } } else { if (choice.getSelectedIndex() != 0) { choice.select(0); } } } else { edit.setText("false"); } } COM: <s> sets the data of the boolean control either true or false </s>
funcom_train/4921505
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPartialSetOfTagsProvided() { // Record loading with tags provided this.issues.addIssue(LocationType.OFFICE_FLOOR, "office-floor", AssetType.OFFICE_FLOOR, "OfficeFloor", "Property 'not.provided' must be specified"); this.record_officeFloorBuilder_addOffice("OFFICE"); // Missing properties only an issue this.compile(true, "provided", "tag available"); } COM: <s> ensure issue if only some tags provided </s>
funcom_train/450415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SelectionPanel createSelectionPanel () { //Create a selection panel. SelectionPanel panel = new SelectionPanel(); //Add selections for each available role. panel.addSelection("Selector"); panel.addSelection("Selectee"); panel.addSelection("Predator"); panel.addSelection("Prey"); //TODO: Add Launcher. //panel.addSelection("Launcher"); panel.addSelection("Female"); panel.addSelection("Chameleon"); panel.addSelection("Displayer"); panel.addSelection("Healer"); panel.addSelection("Tagger"); panel.addSelection("Age Selector"); panel.addSelection("Pusher"); panel.addSelection("Telekinetic"); return panel; } COM: <s> create a panel where user can select roles for new creatures </s>
funcom_train/16834274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPlayerHandicap(String playerId, String leagueId, String insertionDate, int handicap) throws LeagueDoesNotExistException, UserDoesNotExistException, ParseException { final League league = getLeagueService().getLeague(leagueId); final User user = getUserService().getUser(playerId); league.setPlayerHandicap(user, parseDate(insertionDate), handicap); } COM: <s> defines the handicap value for a player in a league </s>
funcom_train/19972105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void showCrew() { // If we didn't have any trouble retrieving the data, it is now // time to get at the stuff. if (crewCursor != null && crewCursor.moveToFirst()) { // Set up the editing fields. String name = crewCursor.getString(COLUMN_NAME); nameField.setText(name); } updateEditorControls(); } COM: <s> edit the indicated crew member </s>
funcom_train/10008415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send(String body) throws ConnectionException { SinkLog.log("sending "+body); try { message = schat.createMessage(); message.setBody(body); schat.sendMessage(message); } catch (XMPPException ex) { throw new ConnectionException("Error while sending message", ex); } } COM: <s> sends a message to the buddy </s>
funcom_train/23618078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPhrase(Phrase phrase){ // check the append status if(phrase.getAppend()) phrase.setStartTime(this.startTime); // check if the startTime is before the CPhrase start if (phrase.getStartTime() >= this.startTime) { phraseList.addElement(phrase); } else System.err.println("Phrase to added to CPhrase: Phrases added" + " to a CPhrase must have a start time at ot after the CPhrase start time."); } COM: <s> add a phrase to this cphrase </s>
funcom_train/5319121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(TreeSelectionEvent e) { if (ktm == null) return; if (e.getPath().getLastPathComponent() instanceof Key) { Key k = (Key) e.getPath().getLastPathComponent(); selectedKey = k; kp.setKey(k); } } COM: <s> called whenever the value of the selection changes </s>
funcom_train/20043970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _isAfterLast() { requiredMethod("afterLast()") ; boolean result = true ; try { result = oObj.isAfterLast() ; } catch (SQLException e) { log.println("Exception occured :") ; e.printStackTrace(log) ; result = false ; } tRes.tested("isAfterLast()", result) ; } COM: <s> the method is called immediatly after code after last code </s>
funcom_train/37590094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetToCurrent() { _setSelected(DrJava.getConfig().getSetting(OptionConstants.TOOLBAR_TEXT_ENABLED).booleanValue(), DrJava.getConfig().getSetting(OptionConstants.TOOLBAR_ICONS_ENABLED).booleanValue(), DrJava.getConfig().getSetting(OptionConstants.TOOLBAR_ENABLED).booleanValue()); } COM: <s> selects the radio button corresponding to the current config options </s>
funcom_train/3013153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initNDC() { invokeMethod("org.apache.log4j.NDC", "pop", null, null, null); invokeMethod("org.apache.log4j.NDC", "push", null, new Class[] { String.class }, new String[] { "[" + getName() + "] " }); } COM: <s> initializes log4 js ndc </s>
funcom_train/32776727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void constructHashtable() { // in Abhaengigkeit von der Anzahl der Knoten die Groesse // der Hashtable bestimmen if (this.nodelist.length == 0) { this.indices = new Hashtable(1); // Hashtable (0) geht nicht } else { this.indices = new Hashtable(this.nodelist.length); } // Hashtable aufbauen for (int i = 0; i < this.nodelist.length; i++) { this.indices.put(this.nodelist[i], new Integer(i)); } } COM: <s> helper method constructs the internal hashtable for the node indices </s>
funcom_train/25506129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getRankingBasedOnDate(long now, Transaction transaction) { // we will use a function between 0 (for very, very old ones) and 1 for // recent one. // Probably this function could be improved ... long time = Math.abs(transaction.getDate().getTime() - now) / MILLIS_PER_DAY; return 2 / Math.sqrt(time + 4); } COM: <s> gets the ranking of a transaction based on its date </s>
funcom_train/43416961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean readSaveGame(final FormChunk formChunk) { stackFrames.clear(); if (formChunk != null && "IFZS".equals(formChunk.getSubId())) { readIfhdChunk(formChunk); readStacksChunk(formChunk); readMemoryChunk(formChunk); return true; } return false; } COM: <s> initialize the state from an iff form </s>
funcom_train/21181071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IViolation findViolation() { IViolation[] violations = DemeterCopPlugin.getDefault().getViolationManager().getViolations(); for (int i = 0; i < violations.length; i++) { IViolation violation = violations[i]; if (markerAtViolation(violation)) { return violation; } } return null; } COM: <s> method find violation </s>
funcom_train/8805719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ITypeBinding resolveTypeBinding(ASType typeRef) { if (refToBinding.containsKey(typeRef)) { return (ITypeBinding) refToBinding.get(typeRef); } ITypeBinding binding = null; try { binding = (ITypeBinding) refToBinding.get(typeRef); } catch (RuntimeException e) { } if (binding == null) { log.warn("No binding found for " + typeRef.toString()); return null; } return binding; } COM: <s> resolves a type binding </s>
funcom_train/32628948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addImportedOntology( String uri ) { // assert the model we're importing addProperty( getVocabulary().imports(), getModel().createLiteral( uri ) ); // notify the knowledge store about the included model if (getDAMLModel().getLoader().getLoadImportedOntologies()) { getModel().read( uri ); } } COM: <s> add the given ontology to the list of ontologies managed by the </s>
funcom_train/18095562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelCombo() { if (jPanelCombo == null) { jPanelCombo = new JPanel(); HelperPanel.formatPanel(jPanelCombo); jPanelCombo.setLayout(new FlowLayout()); jPanelCombo.add(getJComboBoxSprachen(), null); jPanelCombo.add(getJComboBoxFonts(), null); } return jPanelCombo; } COM: <s> this method initializes j panel combo </s>
funcom_train/26415851
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeNarc(OutputStream stream) throws IllegalArgumentException { if (stream == null) { throw new IllegalArgumentException("stream is null"); } PrintWriter writer = new PrintWriter(stream); // store the narcs String master = getNarcMethods(generateFields()); // assemble the page master = getPackageLine() + getImportLine() + getCommentLine() + getClassDefinitionLine() + getConstructorLine() + master + "\n}"; COM: <s> this method writes the narc to the stream </s>
funcom_train/28750162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNeedqc(Long newVal) { if ((newVal != null && this.needqc != null && (newVal.compareTo(this.needqc) == 0)) || (newVal == null && this.needqc == null && needqc_is_initialized)) { return; } this.needqc = newVal; needqc_is_modified = true; needqc_is_initialized = true; } COM: <s> setter method for needqc </s>
funcom_train/32372038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initPilotInput() { if(playerKeyInput != null) input.removeFromAttachedHandlers(playerKeyInput); if(playerMouseInput != null) input.removeFromAttachedHandlers(playerMouseInput); rootNode.clearControllers(); playerKeyInput = new PilotKeyInput(currentPlayer.getHunter()); input.addToAttachedHandlers(playerKeyInput); playerMouseInput = new PilotMouseInput(); input.addToAttachedHandlers(playerMouseInput); } COM: <s> initializes the input of an pilot </s>
funcom_train/48670205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJWestPanel() { if (jWestPanel == null) { GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.fill = GridBagConstraints.BOTH; gridBagConstraints.weighty = 1.0; gridBagConstraints.weightx = 1.0; jWestPanel = new JPanel(); jWestPanel.setLayout(new GridBagLayout()); jWestPanel.add(getImProcTree(), gridBagConstraints); } return jWestPanel; } COM: <s> this method initializes j west panel </s>
funcom_train/19318004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMSConnectorService lookupConnectorService(Protocol protocol) { try { Object obj = InitialContextHelper.getInitialContext().lookup(ConnectorHelper.getConnectorJNDIName(protocol)); JMSConnectorService broker = (JMSConnectorService) javax.rmi.PortableRemoteObject.narrow(obj, JMSConnectorService.class); return broker; } catch(Exception e) { e.printStackTrace(); return null; } } COM: <s> lookup connector service from jndi </s>
funcom_train/15617024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int paragraphNewlineCount(JAMWikiLexer jamwikiLexer, String raw) { int newlineCount = 0; if (raw != null) { if (jamwikiLexer.isStartOfFile()) { // if the topic starts with blank lines that weren't automatically // trimmed then treat the file open as a blank line. newlineCount += 2; } newlineCount += StringUtils.countMatches(raw, "\n"); } return newlineCount; } COM: <s> paragraph syntax is dependent on newlines so determine how many </s>
funcom_train/14274975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void formatVFSVolume(MountParameters mountParams) throws ConduitHandlerException, NotConnectedException { try { jHotSync.formatVFSVolume((char)0, (byte)0, mountParams); } catch (DLPFunctionCallException e) { throw new ConduitHandlerException(e.toString(), e); } // end-catch } // end-method COM: <s> formats the specified vfs volume </s>
funcom_train/15720398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshNodeValues() { int clickedNode=-1; try{ // clickedNode=MainClass.gui.nodes.getSelectedNode(); // MainClass.gui.nodes.nodesValues.reloadVals(clickedNode); }catch (Exception e) {if (MainClass.DEBUG) {e.printStackTrace();System.out.println("clickedNode: "+clickedNode);}} } COM: <s> this method refreshes all values of a node with the given id </s>
funcom_train/49049211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMIMEType() { try { TILELom rscLom = new TILELom(combRepos.getMetadata(rscURN)); return (rscLom.getTechnicalFormat()); } catch (MissingMetadataException mme) { return (null); } catch (UnknownIdentifierException uie) { return (null); } } COM: <s> get the mime type for this media properties </s>
funcom_train/50429861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getNodeByName(String nodeName) { int length = nodeList.size(); for (int i = 0; i < length; i++){ Node node = (Node) nodeList.elementAt(i); if (node.getName().equals(nodeName)){ return node; } } return null; // throw new BBNE_NodeNotFound(); } COM: <s> get node by name will return the node object matching the specified string </s>
funcom_train/37831796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRequiredItemQuantity(final String name, final int index) { int amount = 1; if (!player.hasQuest(name)) { logger.error(player.getName() + " does not have quest " + name); return amount; } String questSubString = getQuest(name, index); final String[] elements = questSubString.split("="); if(elements.length > 1) { amount=MathHelper.parseIntDefault(elements[1], 1); } return amount; } COM: <s> gets the recorded item quantity stored in a substate of quest slot </s>
funcom_train/272950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private User injectDependencies(final User user) { // inject dependency for lazy loading if (user != null) { HashSet<Project> hashSetToReturn = new HashSet<Project>(); for (Project basicProject : user.getProjects()) { hashSetToReturn.add(basicProjectProxyUtil.injectDependencies(basicProject)); } user.setProjects(hashSetToReturn); } return user; } COM: <s> inject dependency for lazy loading </s>
funcom_train/7443096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeFirst(String name, boolean ignoreCase) { boolean changed = false; Parameter param = null; for (final Iterator<E> iter = iterator(); iter.hasNext() && !changed;) { param = iter.next(); if (equals(param.getName(), name, ignoreCase)) { iter.remove(); changed = true; } } return changed; } COM: <s> removes from this list the first entry whose name equals the specified </s>
funcom_train/16357004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initFileChooser(ModeController controller) { if (fileChooser == null) { Charset confluenceTargetCharset = PluginUtils.preselectCharset(controller, "confluence.targetCharset", "8859_1"); fileChooser = new CharsetFileChooser(confluenceTargetCharset); fileChooser.addChoosableFileFilter(new ImageFilter(CONFLUENCE_FILE_EXTENSION, null)); fileChooser.addAccessoryItem(getExportSettingsPanel()); } } COM: <s> initializes the confluence file chooser if necessary </s>
funcom_train/23411127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDependeeInPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Role_DependeeIn_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Role_DependeeIn_feature", "_UI_Role_type"), OMPackage.Literals.ROLE__DEPENDEE_IN, false, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the dependee in feature </s>
funcom_train/3998053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resumeTimer(BigInteger timestamp) { if (timestamp == null) { throw new NullPointerException(); } if (running) { throw new IllegalStateException("Can not resume at " + timestamp + ", the method " + classID + "." + methodID + " has already been executing since " + lastTimestamp + "."); } assert !exited; lastTimestamp = timestamp; running = true; } COM: <s> resumes the execution of the method </s>
funcom_train/32968935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton4() { if (jButton4 == null) { jButton4 = new JButton(); jButton4.setToolTipText("Fleets"); jButton4.setRolloverIcon(new ImageIcon(getClass().getResource("/buttons1/fleet2.gif"))); jButton4.setPressedIcon(new ImageIcon(getClass().getResource("/buttons1/fleet3.gif"))); jButton4.setIcon(new ImageIcon(getClass().getResource("/buttons1/fleet1.gif"))); jButton4.setBounds(new java.awt.Rectangle(152,36,34,34)); jButton4.setBorderPainted(false); jButton4.setDoubleBuffered(true); } return jButton4; } COM: <s> this method initializes j button4 </s>
funcom_train/41165239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(ToMsgChat entity) { EntityManagerHelper.log("saving ToMsgChat instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved to msg chat entity </s>
funcom_train/13274419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addColorListener(final ImportedFurnitureWizardController controller) { PropertyChangeListener colorChangeListener = new PropertyChangeListener () { public void propertyChange(PropertyChangeEvent ev) { setModelColor(controller.getColor()); } }; controller.addPropertyChangeListener(ImportedFurnitureWizardController.Property.COLOR, colorChangeListener); } COM: <s> adds listener to code controller code to update the color of the piece </s>
funcom_train/2489343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProgressRunning(boolean running) { if(!running){ pbCryptProgress.setIndeterminate(false); } pbCryptProgress.setStringPainted(running); btEncrypt.setEnabled(! running); btDecrypt.setEnabled(! running); btStop.setEnabled(running); SwingUtilities.invokeLater(new Runnable() { public void run() { pbCryptProgress.setValue(0); pbCryptProgress.repaint(); } }); } COM: <s> depending on whether there is a progress running some </s>
funcom_train/10204875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSourcePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MAnnotation_source_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MAnnotation_source_feature", "_UI_MAnnotation_type"), ClassDiagramPackage.Literals.MANNOTATION__SOURCE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the source feature </s>
funcom_train/18100798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFormattedName() { if(this.formattedName != null) { return this.formattedName; } else { if(this.contactName != null) { return this.contactName.getGivenName() + " " + this.contactName.getFamilyName() + " " + this.contactName.getOtherName(); } else { return ""; } } } COM: <s> returns formatted name </s>
funcom_train/13530385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeKinTerm(KinTerm kinterm) throws Exception { int i = toTerm.indexOf(kinterm); if (i != -1) { if (mapGenToTerms(generator.getKinTerm(i)).size() == 1) { ngen--; generators.removeElement(generator.elementAt(i)); } generator.removeElement(generator.elementAt(i)); toTerm.removeElement(kinterm); } } COM: <s> remove generator term mapping </s>
funcom_train/48149106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setText() { i = galtonBoard.getRow(); j = galtonBoard.getColumn(); getRecordTable().setText( "Bit String\t" + galtonBoard.getBitString() + "\nSubset\t" + galtonBoard.getSubset() + "\nC(" + i + ", " + j + ")\t " + (int) Distribution.comb(i, j)); } COM: <s> this method sets the text in the record table </s>
funcom_train/39024045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testClone() throws Exception { System.out.println("clone"); String testID="aaaID"; UID instance = new UID(testID); String expResult = ""+testID; Object result = instance.clone(); assertNotSame(expResult, result.toString()); assertNotSame(instance, result); } COM: <s> test of clone method of class uid </s>
funcom_train/36987849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(FacesContext context,UIComponent root) { Screen screen = new Screen(); screen.setId("testScreen"); screen.setTitle("Smile demo application..."); PageUtils.addChild(root,screen); HtmlLayout template = new HtmlLayout(); template.setResourceName("template.html"); PageUtils.addChild(screen,template); HtmlCommandButton designButton = new HtmlCommandButton(); designButton.setId("designButton"); designButton.setValue("design on/off"); designButton.addActionListener(this); PageUtils.addChild(template,designButton); UIComponent content = createContent(); PageUtils.addChild(template,content); } COM: <s> construct the common bahaviour layout etc </s>
funcom_train/1479275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getItemName(int itemId) { if (itemId == -1 || itemId >= maxListedItems) { return new String("Unarmed"); } if (itemLists[itemId] != null) { return (itemLists[itemId].itemName); } return new String("Item " + itemId); } COM: <s> returns the name of item id </s>
funcom_train/31723503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addGetCommand(String tag, String cmd, long p, boolean a) { Command c; if (tag != null && cmd != null) { c = new Command(tag, cmd, p, a); synchronized(getCmds) { getCmds.put(c.tag, c); } } } COM: <s> add a get command for this device </s>
funcom_train/22234279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCombineRgbScale() { if (isLiveOrCompiled()) { if (!this.getCapability(ALLOW_COMBINE_READ)) { throw new CapabilityNotSetException( J3dI18N.getString("TextureAttributes33")); } } return ((TextureAttributesRetained)this.retained).getCombineRgbScale(); } COM: <s> retrieves the scale factor for the rgb components of the output color </s>
funcom_train/13514594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeLock(String treeName) throws ChaiDBException { if (treeid2lock.containsKey(treeName)) { treeid2lock.remove(treeName); } else { throw new ChaiDBException(ErrorCode.LOCK_NO_HOLD, "The lock which should be removed by treeid don't be hold."); } } COM: <s> removes the lock associates with tree id </s>
funcom_train/2290675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CmsUser getUser(CmsUUID userId) { CmsDbContext dbc = m_dbContextFactory.getDbContext(); try { return m_driverManager.readUser(dbc, userId); } catch (CmsException e) { LOG.error(e.getLocalizedMessage(), e); } finally { dbc.clear(); } return null; } COM: <s> returns the user identified by the given id </s>
funcom_train/18798420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tab(JComponent target, String location){ if (location.equals("RT")){ tabPaneRT.addTab(target.getName(),target); } else if (location.equals("RB")){ tabPaneRB.addTab(target.getName(),target); } } COM: <s> tab teh pane into the frame </s>
funcom_train/7298269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getActionListByFileExt(String fileExt) { // Remove the leading '.' character from the file extension if exists. fileExt = AppUtility.removeDotFromFileExtension(fileExt); if (getMimeTypeByFileExt(fileExt) == null) { return null; } else { return getActionListByMimeType(getMimeTypeByFileExt(fileExt)); } } COM: <s> returns the action list associated with the given mime type </s>
funcom_train/23882716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3d getAlignment() { if (needUpdate()) { if (true) throw new IllegalStateException("" +"The positions of head and or neck has moved since the " +"alignment was calculated or set, but there is no " +"information available to recalculate the alignment, " +"hence it is stale and useless."); } return new Vector3d(alignment); } COM: <s> returns a copy of the alignment vector </s>
funcom_train/18566214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getCard2Panel() { if (card2Panel == null) { card2Panel = new JPanel(); card2Panel.setLayout(new BoxLayout(card2Panel, BoxLayout.Y_AXIS)); card2Panel.setName("card2Panel"); card2Panel.add(getLicensePanel(), null); card2Panel.add(getAgreePanel(), null); } return card2Panel; } COM: <s> this method initializes card2 panel </s>
funcom_train/43702347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCurrentUsername() throws IOException, ServiceException { try { UserProfileEntry profile = service.getEntry(new URL(USER_ENTRY_URL), UserProfileEntry.class); return profile.getUsername(); } catch (MalformedURLException e) { log.log(Level.WARNING, "", e); } return null; } COM: <s> gets the username for the authenticated user assumes that set token has </s>
funcom_train/32215779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean updatePasswordByID(Integer id, String password, String confirm) throws UsersException, SQLException { setPassword(password, confirm); if (MySQL.connection.createStatement().executeUpdate("UPDATE users SET username = '" + username + "' WHERE id = '" + id + "'") == 1) { needsUpdateExecution = false; return true; } else { needsUpdateExecution = true; return false; } } COM: <s> updates a password specified by id </s>
funcom_train/18717380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addModel(final MDRModel model, final int cvInterval) { final int attributeCount = model.getAttributes().size(); final MDRModel oldModel = getModel(attributeCount, cvInterval); if ((oldModel == null) || (model.compareTo(oldModel) < 0)) { models[attributeCount - cfg.getAttributeCountMin()][cvInterval] = model; } } COM: <s> present a model for consideration to the best models object </s>
funcom_train/48444524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startImport(String module) { if (importTask == null) { importAborted = false; OperationStatus operationStatus = Client.create(config).resource(HOSTURL + "/mediaimportmodules/" + module).post(OperationStatus.class); Boolean status = operationStatus.getSuccess(); if (status != null && status) { startImportProgressBar(); } } } COM: <s> start a media import </s>
funcom_train/9260535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFecha_rindio_cuentas(java.util.Date fecha_rindio_cuentas) { if (fecha_rindio_cuentas==null || fecha_rindio_cuentas instanceof LocalDate) this.fecha_rindio_cuentas = fecha_rindio_cuentas; else this.fecha_rindio_cuentas = new LocalDate(fecha_rindio_cuentas); } COM: <s> setter for property fecha rindio cuentas </s>
funcom_train/3594322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAvailableSegment(NOMElement newSegment, int index) { if ((newSegment.getStartTime()!=NOMElement.UNTIMED)&&(newSegment.getEndTime()!=NOMElement.UNTIMED)) { if (index >= 0) { availableSegments.add(index,newSegment); } else { availableSegments.add(newSegment); } } } COM: <s> arg a new nomelement at the given index 1 means at end </s>
funcom_train/32906350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void joinSecureGroup() { //System.out.println("### Joining to secure group... ###"); //groupMgr.joinSubGroup( secureGroup ); System.out.println("\n### Print Secure Creedential ###"); ((SCSecurityManagerImpl) secureGroup.getSecurityManager()).printCredential( null ); } COM: <s> join to secure group </s>
funcom_train/48338305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void acquired(LeaseEvent le) { Closure c = (Closure)le.closure; if (Constants.DEBUG_REP) { manager.log.log(manager, "Exporting " + c.descriptor); } respond(c, new BindingResponse(handler, null, c.descriptor, c.ref, le.handler, le.duration)); } COM: <s> handles a lease acquired event by </s>
funcom_train/16298256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addWebBrowserListener(WebBrowserListener listener) { listenerList.add(WebBrowserListener.class, listener); NativeWebBrowserListener nativeWebBrowserListener = new NativeWebBrowserListener(listener); webBrowserListenerToNativeWebBrowserListenerMap.put(listener, nativeWebBrowserListener); nativeWebBrowser.addWebBrowserListener(nativeWebBrowserListener); } COM: <s> add a web browser listener </s>
funcom_train/29422034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element constructElements(Element element, Document d) { AixmUtil.constructSingleElement(this.alongCourseGuidance, element, "alongCourseGuidance"); if (this.angleIndication != null) { element.add(this.angleIndication.createElement("AngleIndication", d)); } return element; } COM: <s> creates a dom4j element representing an aixm angle use </s>
funcom_train/48406700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReferencePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ExternalReference_reference_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ExternalReference_reference_feature", "_UI_ExternalReference_type"), SpemxtcompletePackage.eINSTANCE.getExternalReference_Reference(), true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the reference feature </s>
funcom_train/3087676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int _compareAsStrings(Object o1, Object o2) { String s1 = _toString(o1); String s2 = _toString(o2); if (s1 == null && s2 == null) { return 0; } else if (s1 == null) { // Define null less than everything. return -1; } else if (s2 == null) { return 1; } int result = s1.compareTo(s2); return result; } COM: <s> compares tow as objects as strings via their to string method </s>
funcom_train/14009159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(Object list, int index) { if (this.isArray(list)) { return this.getFromArray(list, index); } if (!this.isList(list)) { return null; } try { return ((List) list).get(index); } catch (IndexOutOfBoundsException e) { // The index was wrong. return null; } } COM: <s> gets the specified element of a list array </s>
funcom_train/25383465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ContactOperations addName(String firstName, String lastName) { mValues.clear(); if (!TextUtils.isEmpty(firstName)) { mValues.put(StructuredName.GIVEN_NAME, firstName); mValues.put(StructuredName.MIMETYPE, StructuredName.CONTENT_ITEM_TYPE); } if (!TextUtils.isEmpty(lastName)) { mValues.put(StructuredName.FAMILY_NAME, lastName); mValues.put(StructuredName.MIMETYPE, StructuredName.CONTENT_ITEM_TYPE); } if (mValues.size() > 0) { addInsertOp(); } return this; } COM: <s> adds a contact name </s>
funcom_train/14450357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUrl(URL url) { if (this.url == null || !this.url.equals(url)) { this.url = url; // If we change the URL, then reset the // polling characteristics associated with the channel this.lastModified = 0; this.lastETag = null; this.lastPolled = null; } } COM: <s> sets the url </s>
funcom_train/18653128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { RecursiveDepthCourse recDepth = new RecursiveDepthCourse(gograph, ((String)getValue(Action.NAME))); gograph.setAlgoThread(recDepth); gograph.getExecPanel().setTableModel(null); gograph.getActionMap().get("Next Step").setEnabled(true); } COM: <s> invoked when the action occurs </s>
funcom_train/28984751
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackDigitalSignatureForm () { if (backDigitalSignatureForm == null) {//GEN-END:|225-getter|0|225-preInit // write pre-init user code here backDigitalSignatureForm = new Command ("Back", Command.BACK, 0);//GEN-LINE:|225-getter|1|225-postInit // write post-init user code here }//GEN-BEGIN:|225-getter|2| return backDigitalSignatureForm; } COM: <s> returns an initiliazed instance of back digital signature form component </s>
funcom_train/49798410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExpected() throws Exception { String inputText = DefaultIACleaner.readFile(getInputFile()); assertNotNull(inputText); String outputText = DefaultIACleaner.readFile(getExpectedFile()); assertNotNull(outputText); // replace \r\n with \n outputText = outputText.replace("\r\n", "\n"); IACleaner c = AllTests.getCleaner(); String result = c.cleanScript(getInputFile()); assertStringEquals(outputText, result); // no warnings assertNoWarnings(c); } COM: <s> test that testcase ext after cleaning equals testcase expected ext exactly </s>
funcom_train/24059733
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double f(double v0, double t) { // f'(v0, t) = v0 - 0.004*t: if (Math.abs(v0) < t * 0.002 * 2) t = Math.abs(v0) / 0.002 / 2; // Stop at velocity = 0. if (v0 < 0) return v0 * t + 0.002 * t * t; else return v0 * t - 0.002 * t * t; } COM: <s> integrated linear velocity regression </s>
funcom_train/45623014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDependentAssemblyPathsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CodeAnalysisType_dependentAssemblyPaths_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CodeAnalysisType_dependentAssemblyPaths_feature", "_UI_CodeAnalysisType_type"), MSBPackage.eINSTANCE.getCodeAnalysisType_DependentAssemblyPaths(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the dependent assembly paths feature </s>
funcom_train/18516944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void styleSheetReconciled() { Shell shell = getSite().getShell(); if ((shell != null) && !shell.isDisposed()) { shell.getDisplay().asyncExec(new Runnable() { public void run() { synchronizeOutlinePageSelection(); } }); } } COM: <s> called by the reconciler after the style sheet has been reconciled </s>
funcom_train/5532066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getClassificationPrefix(String pClId) throws Exception { String sClassificationPrefix = ""; Criteria crit = new Criteria(); crit = crit.add(ClassificationnodePeer.ID, pClId); List lCC = ClassificationnodePeer.doSelect(crit); if (lCC.size() > 0) { sClassificationPrefix = ((Classificationnode) lCC.get(0)).getAccesscontrolpolicy(); } return sClassificationPrefix; } COM: <s> this function looks up the namespace prefix for a classification </s>
funcom_train/46740124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUpdateDt(DateTimeModel updateDt) { if (Converter.isDifferent(this.updateDt, updateDt)) { DateTimeModel oldupdateDt= DateTimeModel.getNow(); oldupdateDt.copyAllFrom(this.updateDt); this.updateDt.copyAllFrom(updateDt); setModified("updateDt"); firePropertyChange(String.valueOf(SETTINGVALUES_UPDATEDT), oldupdateDt, updateDt); } } COM: <s> date the setting value was updated </s>
funcom_train/4307206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int movePiece(int start, int end) { int returnValue = 0; // check if the end position of the piece is occupied if( occupied( end ) ) { // if it is return -1 returnValue = -1; // if it is not set a start position in the array to null // put a piece object at the end position in the array // that was at the start positon before } else { pieces[end] = pieces[start]; pieces[start] = null; } return returnValue; } COM: <s> move the piece at the start position to the end position </s>
funcom_train/43093661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mementoCreated(final ModelMemento memento) { Memento wrappedMemento = new Memento() { private ModelMemento modelMemento = memento; public void undo() { modelMemento.undo(); } public void redo() { modelMemento.redo(); } public void dispose() { modelMemento.dispose(); } }; UndoManager.getInstance().addMemento(wrappedMemento); } COM: <s> called when the model subsystem creates a memento </s>
funcom_train/24940355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSize(int size, boolean isSigned) { // is it allocated? if (value != null) { throw new IllegalStateException("Value already set"); } else if (size < 1) { throw new IllegalArgumentException("invalid size: " + size); } else { // allocate ... value = new Value(this, size, isSigned); } } COM: <s> sets the size in bits of this bus </s>
funcom_train/42871383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillFileList(File directory, List<File> entries) { File[] files = directory.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { fillFileList(files[i], entries); } else { entries.add(files[i]); } } } COM: <s> fills an array of file for the contents of a given directory </s>
funcom_train/3461375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Thread performInThread(ThreadGroup group, Method method, Object[] args, boolean forced) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException { if (! respondsToMethod(method) ) { throw new NoSuchMethodException(); } ThreadTask task = new ThreadTask(this, method, args); Thread newThread = new Thread(group, task, method.getName()); newThread.start(); return newThread; } COM: <s> sends a methodname message to the receiver </s>
funcom_train/1743277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AnnotationResult queryBySequence(SequenceRequest request) { AnnotationResult result = new AnnotationResult(); try { Protein protein = repository.submitSequence(request.getSequence()); if(log.isDebugEnabled()) { log.debug("returned protein: " + protein); } result = query(protein, request.getMaxHits()); } catch (Exception e) { result.setStatusMessage("Error: " + e.getMessage()); } return result; } COM: <s> submits the query sequence to the automatic annotation </s>
funcom_train/19537799
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String replace(String string, String pattern, String replacement, int times) { if (times < 0) { return replace(string, pattern, replacement); } StringBuffer sb = new StringBuffer(); Matcher m = Pattern.compile(pattern).matcher(string); while (m.find()) { if (times < 1) { break; } m.appendReplacement(sb, replacement); times--; } m.appendTail(sb); return sb.toString(); } COM: <s> replaces a pattern in a string a certain number of times </s>
funcom_train/23442952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMemberTypesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UnionType_memberTypes_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UnionType_memberTypes_feature", "_UI_UnionType_type"), SchemaPackage.Literals.UNION_TYPE__MEMBER_TYPES, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the member types feature </s>
funcom_train/43337112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLabel(Concept concept, String role) { Set<String> extendedLinkRoles = getExtendedLinkRoles(); Iterator<String> extendedLinkRolesIterator = extendedLinkRoles.iterator(); while (extendedLinkRolesIterator.hasNext()) { String currExtendedLinkRole = (String) extendedLinkRolesIterator.next(); String tmpLabel = getLabel(concept, null, role, currExtendedLinkRole); if (tmpLabel != null) return tmpLabel; } return null; } COM: <s> returns a certain label of a certain role contained in the label </s>
funcom_train/28130782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void write(final Object... content) throws IOException { // convert object array to strings and write them final String[] strarr = new String[content.length]; int i = 0; for( final Object o : content ) { if( o == null ) { throw new NullInputException("Object at position " + i + " is null", new CSVContext(getLineNumber(), i), (Throwable) null); } strarr[i++] = o.toString(); } write(strarr); } COM: <s> writes one or more objects </s>
funcom_train/18001389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setException(Exception ex, Long binderId, Long entryId) { if (null == entryId) logger.debug("TrashResponse.setException(" + binderId + "): ", ex); else logger.debug("TrashResponse.setException(" + binderId + ", " + entryId + "): ", ex); reset(); m_status = Status.Exception; m_exception = ex; m_binderId = binderId; m_entryId = entryId; } COM: <s> set the object to contain information about a generic </s>
funcom_train/39997642
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int randomNum(int num) { long currTime=System.currentTimeMillis(); if(DEBUG) Log.d(TAG,"randomNum constantCounter :"+constantCounter); switch(constantCounter){ case 0: currTimeSeed=currTime+pi; constantCounter++; break; case 1: currTimeSeed=currTime+goldenRatio; constantCounter++; break; case 2: currTimeSeed=currTime+expE; constantCounter++; break; default: currTimeSeed=currTime; constantCounter=0; break; } Random randomizer = new Random(currTimeSeed); return randomizer.nextInt(num); } COM: <s> returns a random number in the range 0 to n 1 </s>
funcom_train/22495493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector2f isect(Vector3f vv, float d0, float d1, float d2) { Vector2f i = new Vector2f(); i.x = vv.x + (vv.y - vv.x) * d0 / (d0 - d1); i.y = vv.x + (vv.z - vv.x) * d0 / (d0 - d2); return i; } COM: <s> calculates two tuple isect for triangle vertex and intersection line </s>
funcom_train/48879216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getPlanSimSplitPane() { if (planSimSplitPane == null) { planSimSplitPane = new JSplitPane(); planSimSplitPane.setContinuousLayout(true); planSimSplitPane.setOneTouchExpandable(true); planSimSplitPane.setDividerSize(8); planSimSplitPane.setDividerLocation(screenSize.width/3); planSimSplitPane.setLeftComponent(getPlanDetailsSplitPane()); planSimSplitPane.setRightComponent(getPlanInfoSplitPane()); } return planSimSplitPane; } COM: <s> this method initializes plan sim split pane </s>