__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/25658794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SQLRightsContainer getRightsForDTOClass( Class<? extends BLoMoDTO> dtoClass, String role ) { BLoMoDTO dto; try { dto = dtoClass.newInstance(); } catch (InstantiationException e) { e.printStackTrace(); return null; } catch (IllegalAccessException e) { e.printStackTrace(); return null; } return getRightsForTable(dto.getEntityTable(), role); } COM: <s> calls get rights for table with the dto classes entity </s>
funcom_train/28296633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getIsSuspended() { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - getIsSuspended"); System.out.println(" ::--> " + mIsSuspended); System.out.println(" :: SeqActivity --> END - getIsSuspended"); } return mIsSuspended; } COM: <s> retrieve this activitys is suspended status </s>
funcom_train/25434915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readBMPFile() throws IOException { FarbenRAF raf; try { raf = new FarbenRAF(this, "r"); } catch (Exception err) { throw new IOException("Error creating RAF object"); } try { bmpChunk = new BMPFileChunk(this, 0, this.length(), raf); } catch (IOException err) { raf.close(); throw err; } raf.close(); } COM: <s> read and parse the bmp file </s>
funcom_train/41332844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Paint decodeCloseGradient(Shape s, Color top, Color bottom) { Rectangle r = s.getBounds(); int width = r.width; int height = r.height; return createGradient(r.x + width / 2, r.y, r.x + width / 2, r.y + height - 1, new float[] { 0f, 1f }, new Color[] { top, bottom }); } COM: <s> create the gradient for the close button </s>
funcom_train/38552267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setCreateTime(long createTime) { if(createTime < DataPoint.EARLIEST_DATE.getTime()) { createTime = DataPoint.EARLIEST_DATE.getTime(); } if(createTime > DataPoint.LATEST_DATE.getTime()) { createTime = DataPoint.LATEST_DATE.getTime(); } this.createTime = createTime; } COM: <s> sets the create time for the data point </s>
funcom_train/38224741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { for(;;) { if (discovering == false) { discovering = true; System.out.println("Discoverer thread got woken up"); devices.removeAllElements(); try { agent.startInquiry(DiscoveryAgent.GIAC, this); } catch (BluetoothStateException e) { JOptionPane.showMessageDialog(null, e, "Generic Bluetooth Exception", JOptionPane.ERROR_MESSAGE); System.exit(1); } try { this.sleep(30000); } catch (InterruptedException e) { System.out.println("Discoverer interrupted"); return; } } } } COM: <s> long running thread that initiates async device inquiry in 30s intervals </s>
funcom_train/50189025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fireEndResultDocument() { if (hasTraceListeners()) { // count of registered tracelisteners int countListener = traceListeners.size(); for (int i = 0; i < countListener; i++) { TraceListener currentListener = (TraceListener) traceListeners.elementAt(i); // call the according method on tracelistener currentListener.endResultDocument(); } } } COM: <s> indicates the end of the result document </s>
funcom_train/32988265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadArray( URL file, Object drawable ) { if(file == null) return; this.file = file; if(drawable != null) { if(drawable instanceof Applet ) { applet = (Applet)drawable; } else if(drawable instanceof Graph2D) { graph = (Graph2D)drawable; graph.attachDataSet(ds); } } this.start(); return; } COM: <s> start loading the data into an array </s>
funcom_train/36640338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { try { // This magically creates an object of the right type BFloat iObj = (BFloat) super.clone(); // No need to call clone(), as these are not Objects iObj.iE = iE; iObj.iF = iF; return iObj; } catch (CloneNotSupportedException e) { System.out.println("BFloat.clone: Something happened that cannot happen -- ?"); return null; } } COM: <s> clone this object </s>
funcom_train/48649115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAdapters(Iterable<Adapter<?, ?>> adapters) { container.setGraphs( new TransitiveClosure<Type, Adapter<Object, Object>>(), new TransitiveClosure<Type, Adapter<Object, Object>>()); for(Adapter<?, ?> adapter : adapters){ register(adapter); } } COM: <s> set the adapters stored in this registry </s>
funcom_train/38416016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getSpeed() { if ( getLocation().isRoom() ) return 60.0f; // Default human speed ( 60pixel/s = 2m/s ) else if ( getLocation().isTown() ) return 10.0f; else if ( getLocation().isTileMap() ) return 35.0f; // Default human speed ( 60pixel/s = 2m/s ) else return 5.0f; } COM: <s> returns the speed of this character </s>
funcom_train/24060486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close ( ) { if ( ! this.isOpen ) return; // OK - it is already closed reconcile(); // make it self-consistent this.isOpen = false; this.cryptoManager = null; // TODO: should obliterate it this.encryptedPurse = null; // TODO: should obliterate it this.unencryptedPurse = null; // TODO: should obliterate it this.externalSalt = null; // TODO: should obliterate it } COM: <s> close the object and remove it from further use </s>
funcom_train/18220105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startUpdate() throws Exception { // Load raw data from cvs log by using CvsLogLoader module String inputData = new CvsLogLoader(osCommandProvider).loadData(); CVSAssociationSource parsedRCSData = delegateImport(inputData); // Associate data and store by using AssociationBuilder module: System.out.print("Store in database ... "); new CVSAssociationBuilder().associateAndStoreInformation(parsedRCSData); System.out.print("done"); } COM: <s> executes the import operation itself </s>
funcom_train/40004059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addListener(GameObjectEventListener l) { if (l == null) { return; } else if (listener == null) { listener = l; } else if (listener instanceof GameObjectEventMulticaster) { ((GameObjectEventMulticaster)listener).addListener(l); } else { listener = new GameObjectEventMulticaster(listener, l); } } COM: <s> adds a game object event listener to this object </s>
funcom_train/30144420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void actionDeleteJob(ActionRequest req, ActionResponse res) { String jobHandle = null; try { actionCancelJob(req, res); jobHandle = req.getParameter(JOB_HANDLE); PortletPersistenceManager.deleteHandle(req, jobHandle, JOB_HANDLES); } catch (Exception e) { logger.debug("Exception caught deleting job " + jobHandle + ":" + e.getMessage()); e.printStackTrace(); res.setRenderParameter(ERROR_DELETE, ERROR_DELETE_MSG); } } COM: <s> cancels the condor job and deletes the job from the list of </s>
funcom_train/9644645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JLabel getLabel() { if (label == null) { label = new JLabel() { /** * */ private static final long serialVersionUID = 9099682552947666866L; @Override protected void paintComponent(Graphics g) { g.setColor(getBackground()); g.fillRect(0, 0, getWidth(), getHeight()); super.paintComponent(g); } }; label.setBackground(noselectionColor); label.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); label.setOpaque(false); } return label; } COM: <s> gets the label </s>
funcom_train/10361281
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() { if(this.runningState == STATE_STOPPED) { throw new IllegalStateException("Stopwatch must be reset before being restarted. "); } if(this.runningState != STATE_UNSTARTED) { throw new IllegalStateException("Stopwatch already started. "); } stopTime = -1; startTime = System.currentTimeMillis(); this.runningState = STATE_RUNNING; } COM: <s> p start the stopwatch </s>
funcom_train/48385869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if(equals(Vector2D.ZERO)) return "Zero "; if(equals(Vector2D.NORTH)) return "North"; if(equals(Vector2D.EAST)) return "East "; if(equals(Vector2D.SOUTH)) return "South"; if(equals(Vector2D.WEST)) return "West "; return "<"+x+","+y+">"; } COM: <s> a string representing this vector with special names for </s>
funcom_train/11322880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUncheckedOnProcess() { MockContext.initContext(); Checkbox field = new Checkbox("field"); // Initially checkbox is checked field.setChecked(true); assertTrue(field.isChecked()); // Note, no request parameter for the checkbox has been set, so it should // be unchecked field.onProcess(); // Check that checkbox hs been unchecked assertFalse(field.isChecked()); } COM: <s> coverage test of on process for an unchecked checkbox </s>
funcom_train/22579436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setName(DeviceInterface devIf) { String sqlString = null; sqlString = new String ("UPDATE "+I_TBL_NAME + " SET name=\""+devIf.getIfDescr()+"\"" + " WHERE deviceID="+devIf.getDeviceID() + " AND ifIndex="+devIf.getIfIndex()); System.out.println("\nDbDeviceInterface.setName:\n sqlString = "+sqlString); return executeUpdate(sqlString); } COM: <s> update a device interface records name </s>
funcom_train/10955723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isUrlExcluded( HttpServletRequest request, List<Pattern> excludedPatterns ) { if (excludedPatterns != null) { String uri = getUri(request); for ( Pattern pattern : excludedPatterns ) { if (pattern.matcher(uri).matches()) { return true; } } } return false; } COM: <s> check whether the request matches a list of exclude patterns </s>
funcom_train/14406585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean serverTaskExists(WBEMClient cimClient) { String className = treeConfigData.getLookupClass(); if (className != null) { try { Lookup lookup = (Lookup) Class.forName(className).newInstance(); return lookup.lookup(cimClient,treeConfigData.getNamespace()); } catch (Exception e) { logger.log(Level.SEVERE,"Cannot lokup with class " + className + " on server " + getCimomData().getInfo(),e); } } return false; } COM: <s> checks by using the </s>
funcom_train/43557790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadData(Category data, RecordStore recordStores[]) throws RecordStoreException, IOException { int numberOfEntries = data.getEntriesCount(); for (int i=0; i<numberOfEntries; i++) { // get current entry Entry entry = data.getEntry(i); // load updated statistics loadUpdatedStatistics(entry, recordStores); // add entry addEntry(entry); } } COM: <s> loads a session from the given data and optionally updates it statistics </s>
funcom_train/43468522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeStatements() throws Exception { String strSQL; int intStatements = this.statements.size(); for (int i = 0; i < intStatements; i++) { strSQL = (String)this.statements.get(i); // Use the primary datasource for executing ddl script. getZx().getDataSources().getPrimary().executeDDL(strSQL); } } COM: <s> execute all of the statements generated </s>
funcom_train/7518209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Local entity) { EntityManagerHelper.log("deleting Local instance", Level.INFO, null); try { entity = getEntityManager().getReference(Local.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent local entity </s>
funcom_train/9886940
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getAlgorithmElement(NodeList setList, int id) { Element currElement; for(int i = 0; i < setList.getLength(); i++) { if(((Element)setList.item(i)).getAttribute("alg_id").equals(String.valueOf(id))) return (Element)setList.item(i); } return null; } COM: <s> returns an algorithm element given a node list and an algorithm id </s>
funcom_train/29723284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonCopyCB() { if (jButtonCopyCB == null) { jButtonCopyCB = new JButton(); jButtonCopyCB.setText("Copy into Clipboard"); jButtonCopyCB.setFont(new Font("Dialog", Font.BOLD, 12)); jButtonCopyCB.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { onCopyCBButton(); } }); } return jButtonCopyCB; } COM: <s> this method initializes j button select </s>
funcom_train/33817271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getExitCommand () { if (exitCommand == null) {//GEN-END:|17-getter|0|17-preInit // write pre-init user code here exitCommand = new Command ("Sair", Command.EXIT, 0);//GEN-LINE:|17-getter|1|17-postInit // write post-init user code here }//GEN-BEGIN:|17-getter|2| return exitCommand; } COM: <s> returns an initiliazed instance of exit command component </s>
funcom_train/25868712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); sb.append("TemplatePath [" + this.getOutputPath() + "] "); sb.append("TemplateName [" + this.getTemplateName() + "] "); sb.append("Extension [" + this.getExtension() + "] "); sb.append("Type [" + this.getAllowedAsset() + "] "); return sb.toString(); } COM: <s> output the template file as a string </s>
funcom_train/50297184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkCursorMove() throws SQLException { if (closed && rsHoldability != FirebirdResultSet.HOLD_CURSORS_OVER_COMMIT) throw new FBSQLException("The result set is closed"); wasNullValid = false; // close current fields, so that resources are freed. for(int i = 0; i < fields.length; i++) fields[i].close(); } COM: <s> check if statement is open and prepare statement for cursor move </s>
funcom_train/45018346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefinitionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXentryDefinition_definition_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXentryDefinition_definition_feature", "_UI_NXentryDefinition_type"), NexusPackageImpl.Literals.NXENTRY_DEFINITION__DEFINITION, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the definition feature </s>
funcom_train/22610952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String stopBtn_action(){ RowKey rowKey = tableRowGroup1.getRowKey(); Execution execution = (Execution)getExecutionsProvider().getObject(rowKey); PObjectReference ref = new PObjectReference(Execution.class,execution.getId()); ApplicationBean1.killExecution(ref); return null; } COM: <s> handler du bouton stop </s>
funcom_train/39048248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { byte[] buf = new byte[1024]; int count; try { while ((count = input.read(buf)) != -1) { output.write(buf, 0, count); output.flush(); } } catch (IOException e) { logger.log(Level.FINEST, "Input closed", e); } } COM: <s> reads the output from the </s>
funcom_train/35725358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Tool tool) { if (tool.equals(new Barricade())) ++barricadeNum; if(tool.equals(new Erector())) ++erectorNum; if(tool.equals(new Drill())) ++drillNum; if(tool.equals(new Explosive())) ++explosiveNum; if(tool.equals(new Parachute())) ++parachuteNum; System.out.println(tool.toString() + " added"); list.add(tool); } COM: <s> adds a new tool </s>
funcom_train/3083277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeNodeFromParent(MutableTreeNode node) { MutableTreeNode parent = (MutableTreeNode) node.getParent(); if (parent == null) { throw new IllegalArgumentException("node does not have a parent."); } int[] childIndex = new int[1]; Object[] removedArray = new Object[1]; childIndex[0] = parent.getIndex(node); parent.remove(childIndex[0]); removedArray[0] = node; nodesWereRemoved(parent, childIndex, removedArray); } COM: <s> message this to remove node from its parent </s>
funcom_train/28346683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void openURL( final String urlSpec ) { try { URL url = new URL( urlSpec ); openDocument( url ); } catch(MalformedURLException exception) { Logger.getLogger("global").log( Level.WARNING, "Error opening URL: " + urlSpec, exception ); System.err.println( exception ); displayError( exception ); } } COM: <s> support method for opening a new document with the url specification </s>
funcom_train/8362130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeBreakpointsInRange(int from, int to) { Iterator iterator = iterator(); while (iterator.hasNext()) { BreakpointInfo breakpoint = (BreakpointInfo) iterator.next(); int currLineNumber = breakpoint.getLineNumber(); if (currLineNumber >= from && currLineNumber <= to) { iterator.remove(); } else if (currLineNumber > to) { return; } } } COM: <s> removes breakpoints in specified range of lines </s>
funcom_train/3785126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseReleased(MouseEvent e) { /* mouseReleased */ mapRelXYtoImage(e); /* map mouse to this.(xImg,yImg) */ //String msg= showImageMousePositions(e,csi.dispName); //csi.showImgMsg(msg); } /* mouseReleased */ COM: <s> mouse released display data </s>
funcom_train/126169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getInt(byte[] array){ int i = ((array[3]&0xFF)<<24) | ((array[2]&0xFF)<<16) | ((array[1]&0xFF)<<8) | (array[0]&0xFF); return i; } COM: <s> reconstructs an int from a bitwise byte array </s>
funcom_train/40299648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3D getNorth() { if (north == null) { final double cosLat = Math.cos(latitude); final double sinLat = Math.sin(latitude); final double cosLon = Math.cos(longitude); final double sinLon = Math.sin(longitude); north = new Vector3D(-cosLon * sinLat, -sinLon * sinLat, cosLat); } return north; } COM: <s> get the direction to the north of point expressed in parent shape frame </s>
funcom_train/23411372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addFromPathFormulaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Until_fromPathFormula_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Until_fromPathFormula_feature", "_UI_Until_type"), OMPackage.Literals.UNTIL__FROM_PATH_FORMULA, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the from path formula feature </s>
funcom_train/3318977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); sb.append(getTime()); sb.append(" "); sb.append(getDate()); sb.append(": "); sb.append(itemType); sb.append(": "); if(attributes != null) { sb.append(" "); sb.append("Attributes ="); sb.append(getAttributesAsString()); sb.append(" "); } sb.append("embedded object = "); sb.append("item"); return sb.toString(); } COM: <s> convert the log item to a string </s>
funcom_train/3434907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Policy get_server_policy (int type) { // access is currently valid for all states: //checkAccess( MID_GET_SERVER_POLICY ); Policy result = null; if( objectAdapter != null ) { result = objectAdapter.getEffectivePolicy( type ); } // _REVISIT_ RTF Issue: get_server_policy spec not in sync with // get_effective_policy spec. return result; } COM: <s> returns the policy in effect for this operation for the given policy </s>
funcom_train/2583171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() throws CloneNotSupportedException { KeyToGroupMap result = (KeyToGroupMap) super.clone(); result.defaultGroup = (Comparable) KeyToGroupMap.clone(this.defaultGroup); result.groups = (List) KeyToGroupMap.clone(this.groups); result.keyToGroupMap = (Map) KeyToGroupMap.clone(this.keyToGroupMap); return result; } COM: <s> returns a clone of the map </s>
funcom_train/15742728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDirty(SPath path) throws FileNotFoundException { IFile file = path.getFile(); if (file == null || !file.exists()) { throw new FileNotFoundException("File not found: " + path); } FileEditorInput input = new FileEditorInput(file); return getDocumentProvider(input).canSaveDocument(input); } COM: <s> returns whether according to the document provider of this file it has </s>
funcom_train/50345628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateSensor(String sensorName, LayoutBlock blk, Component openFrame) { // check if anything entered if (sensorName.length()<1) { // no sensor entered return false; } // get a validated sensor corresponding to this name and assigned to block Sensor s = blk.validateSensor(sensorName,openFrame); if (s==null) { // There is no sensor corresponding to this name return false; } return true; } COM: <s> validates that the supplied occupancy sensor name corresponds to an existing sensor </s>
funcom_train/27822193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexOfChild(Object parent,Object child) { if (parent instanceof LazyTreeNode) { LazyTreeNode parentNode=(LazyTreeNode)parent; if (parentNode.getNodeState()!=LazyTreeNode.LOADED) { if (loadNodeChildren(parentNode)) return getChildIndexWhenNodeIsLoading(parentNode,child); } } return super.getIndexOfChild(parent,child); } COM: <s> returns the index of supplied child under given parent </s>
funcom_train/43925196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addJson(Integer id, String msg) { Assert.notNull(id); Assert.isTrue(id >= 0); if (json == null) { this.json = new HashMap<Integer, String>(); } this.json.put(id, msg); } COM: <s> id play two roles flag bit and message identification </s>
funcom_train/32213257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int addDoubleArg(StringTokenizer st, Vector args, StringBuffer cb) { if (!st.hasMoreTokens()) { return 1; } String tok = st.nextToken(); try { Double dval = new Double(tok); args.add(dval); cb.append(" "+dval); } catch (Exception e) { return -1; } return 0; } COM: <s> converts the next token to a double and adds to arg list </s>
funcom_train/7778537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String generateBatchId(int c, String year, int level) { String countStr = c + ""; if (countStr.length() == 1) { countStr = "0" + countStr; } String strLevel = "0"; if((level+"").length()==1) { strLevel = strLevel + level; } return "1904" + year + strLevel + countStr; } COM: <s> generate batch id </s>
funcom_train/29588657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEdgeLength(final Node node1, final Node node2, final double length) { assert getAdjacencies(node1).contains(node2) && getAdjacencies(node2).contains(node1) && length >= 0; final Edge edge = new SimpleEdge(node1, node2, length); edges.put(new HashPair<Node>(node1, node2), edge); edges.put(new HashPair<Node>(node2, node1), edge); } COM: <s> set edge distance between two adjacent nodes </s>
funcom_train/7660379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructor2() { long[] a = { 17L, 3L, -42L, 99L, -7L}; AtomicLongArray ai = new AtomicLongArray(a); assertEquals(a.length, ai.length()); for (int i = 0; i < a.length; ++i) assertEquals(a[i], ai.get(i)); } COM: <s> constructor with array is of same size and has all elements </s>
funcom_train/18989056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toAS400Layout(String javaText) { lastTransform_ = bdxJ2A_; if(as400Type_ == BidiStringType.NONE || javaType_ == BidiStringType.NONE || javaType_ == as400Type_) //Bidi-HCG2 return javaText; //Bidi-HCG BidiText src = new BidiText(bdxA2J_.flags, javaText); return src.transform(bdxJ2A_).toString(); } COM: <s> convert data from the java layout to the ibm i layout </s>
funcom_train/19704389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDebugInfo() { final StringBuffer sb=new StringBuffer().append(key).append(super.getDebugInfo()).append(",name=").append(nameSegment.getDebugInfo()); if (hasValue()) sb.append(",value=").append(valueSegment.getDebugInfo()).append('"').append(valueSegment).append("\"\n"); else sb.append(",NO VALUE\n"); return sb.toString(); } COM: <s> returns a string representation of this object useful for debugging purposes </s>
funcom_train/9200910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(int id, Double latitud, Double longitud) { // Keep looping for (;;) { // Put the timer to sleep try { Thread.sleep(m_rate); } catch (InterruptedException ioe) { continue; } // Use 'synchronized' to prevent conflicts synchronized (this) { // Increment time remaining m_elapsed += m_rate; // Check to see if the time has been exceeded if (m_elapsed > m_length) { // Trigger a timeout timeout(id, latitud, longitud); } } } } COM: <s> performs timer specific code </s>
funcom_train/32206015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendCommand ( ASConnection connection, ActionTarget target, String command ) { // Iterate through the targets and send the command for ( Iterator iter = target.iterator() ; iter.hasNext() ; ) { try { ActionTargetPlayer player = (ActionTargetPlayer)iter.next(); // Calls the command connection.sendPrivateMessage( player.getPlayerName(), command ); } catch ( ClassCastException cce ) { // This shouldn't happen since the iterator // returns object of type ActionTargetPlayer } } } COM: <s> calls the command specified by the i command i parameter using </s>
funcom_train/13287190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { try { Bookmark bookmark = (Bookmark) obj; return new EqualsBuilder() .append(this.getName(), bookmark.getName()) .append(this.getCategory(), bookmark.getCategory()) .isEquals(); } catch (ClassCastException e) { // The given object is not a topic, therefore they are not equal. return false; } } COM: <s> compares this bookmark with the given object for equality </s>
funcom_train/3698641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(){ for(int i=0;i<channelList.size();i++){ try { HandleChannel.removeUser(this,getChannelAt(i),true,getUserFullName(),new Quit().getName(),VOID,Config.getValue("command.quit.default.message","Bye bye")); } catch(IRCException e){} } } COM: <s> to remove the user from all the channels </s>
funcom_train/20082011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleEvent(Event e) { String actionName = e.getActionName(); if (actions.containsKey(actionName)) { actions.get(actionName).execute(this, e.getForm()); } else if (childActions.containsKey(actionName)) { childActions.get(actionName).handleEvent(e); } else if (parentController != null) { parentController.handleEvent(e); } else { throw new Error("Action not manageable by this controller"); } } COM: <s> handle an event by forwarding it to the right action </s>
funcom_train/4887573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearUserManagementData() { Iterator<PlayerData> iter = playerManagement.values().iterator(); if (getFrame() != null) { while (iter.hasNext()) { getFrame().removePlayerData(iter.next()); } } playerManagement.clear(); } COM: <s> clears content of player management data </s>
funcom_train/51118052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getFile(String name) { File copy = super.getFile(name); if (!bloomFilter.contains(name)) { bloomFilter.add(name); try { BufferedInputStream in = new BufferedInputStream(getFileData(name)); TempFileBuilder.copy(in, copy); } catch (IOException e) { throw new RepoException(e); } } return copy; } COM: <s> requests the file data with the specified name from a subclass </s>
funcom_train/10519020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object createTemplateObject(String name, Project project) { Object templateObject = null; try { templateObject = project.createTask(name); } catch (Exception e) { // the task name is recognised but task creation fails. try { // retry as data type, e.g. <presetdef> templateObject = project.createDataType(name); } catch(Exception e2) { // give it up } } return templateObject; } COM: <s> creates a template object for the task datatype of the given name </s>
funcom_train/13364819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSpellCheckingGroup() { final Group group = getGroup(NLS_GROUP_SPELLING, tt(NLS_TT_GROUP_SPELLING), 1); final Composite composite = getComposite(group); addField(new JJBooleanFieldEditor(P_NO_SPELL_CHECKING, NLS_LABEL_NO_SPELL_CHECKING, // tt(NLS_TT_NO_SPELL_CHECKING), composite)); } COM: <s> adds the comment spell checking group and field </s>
funcom_train/34068420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintLapTimeScreen() { int time = target.getCurrentLaptime().getIntermediateTime(target.getIntermediate()); paintBackground(); g2.setColor(NAME_COLOR); paintString(formatName(target), -NAME_COLUMN, LINE_1, 'l'); g2.setColor(TIME_COLOR); paintString(Utils.timeFormat(time, true), -NAME_COLUMN, LINE_2, 'l'); } COM: <s> paints a screen showing the current lap time for the targeted contestant </s>
funcom_train/25290202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSrcOffset(int xSrcOffset, int ySrcOffset) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_OFFSET_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("Raster7")); ((RasterRetained)this.retained).setSrcOffset(xSrcOffset, ySrcOffset); } COM: <s> sets the offset within the source array of pixels </s>
funcom_train/36601006
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setResetButton() { if (m_targetNode == null) return; if (m_targetNode instanceof SkinnedMeshJoint) { jButton1.setEnabled(true); jButton1.setVisible(true); } else { jButton1.setEnabled(false); jButton1.setVisible(false); } } COM: <s> checks if the target node is skinned mesh joint and enables or disables </s>
funcom_train/46759912
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OrderInstanceContainerModel getOrderInstanceContainer(final long orderInstanceContainerId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return OrderData.getOrderInstanceContainer(orderInstanceContainerId, chain, call); }}; return (OrderInstanceContainerModel) call(method, call); } COM: <s> same transaction return the single order instance container model for the primary key </s>
funcom_train/28901487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPath(File f, List<Statement> sts) { BNode bn=new BNodeImpl(f.toString()); long lastModified=f.lastModified(); sts.add(new StatementImpl(bn, Constants.LASTMODIFIED, new LiteralImpl(lastModified+""))); sts.add(new StatementImpl(bn, Constants.FILEPATH, new LiteralImpl(f.toString()))); } COM: <s> adds information about a file to the output statements </s>
funcom_train/45918418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addScheduling(Container container, Scheduling scheduling) throws SchedulingException { assert scheduler.getSchedulings(container).length == 0 : "Espected to be initially empty."; scheduler.addScheduling(container, scheduling); Scheduling[] schedulings = scheduler.getSchedulings(container); assert schedulings.length == 1 : "Expected just one scheduling."; assert schedulings[0].equals(scheduling) : "Expected to be the same."; } COM: <s> generic test for </s>
funcom_train/4349229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeMatrix() { for (int col = 0; col < COLS; col++) { for (int row = 0; row < ROWS; row++) { this.gameMatrix[col][row] = GameLogic.EMPTY; } } this.setStone(3, 3, GameLogic.PLAYER_ONE); this.setStone(4, 4, GameLogic.PLAYER_ONE); this.setStone(3, 4, GameLogic.PLAYER_TWO); this.setStone(4, 3, GameLogic.PLAYER_TWO); } COM: <s> initializes the game matrix </s>
funcom_train/11123677
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void nextChunk() throws IOException { chunkSize = getChunkSize(); if (chunkSize < 0) { throw new MalformedChunkCodingException("Negative chunk size"); } state = CHUNK_DATA; pos = 0; if (chunkSize == 0) { eof = true; parseTrailerHeaders(); } } COM: <s> read the next chunk </s>
funcom_train/3114656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double getScaleFactor() { double scale; //// 1. Calculations. scale = GraphicalObjectLib.getScaleFactor(COORD_ABS, getAttachedGraphicalObject()); //scale = getAttachedGraphicalObject().getTransform(COORD_ABS).getScaleX(); return (scale); } // of getAbsoluteScaleFactor COM: <s> get the absolute scale factor </s>
funcom_train/21609835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public QueueElementIF dequeue() { if (selset.size() == 0) return null; if ((ready_size == 0) || (ready_offset == ready_size)) { doPoll(0); } if (ready_size == 0) return null; return new SelectQueueElement(ready[ready_offset++]); } COM: <s> dequeues the next element from the select source without blocking </s>
funcom_train/25283700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadPluggedGUI(final PluggedGUI<?>[] pGUIs) { for (final PluggedGUI<?> pgui : pGUIs) pgui.initialize(sShell, expandBar, menuBar, coolBar, grpGraphs); coolBar.setBounds(5, 5, 300, 30); coolBar.layout(); coolBar.setLocked(true); coolBar.setVisible(false); } COM: <s> loads gui instances for the available video filters </s>
funcom_train/133564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void zoom(int id, double zoom_scale) { if (id == X) { alignmap.zoom(id, zoom_scale); consmap.zoom(id, zoom_scale); } else if (id == Y) { alignmap.zoom(id, zoom_scale); labelmap.zoom(id, zoom_scale); } else { throw new IllegalArgumentException("NeoAssembler.zoom() id argument " + "must be either NeoAssembler.X or NeoAssembler.Y"); } } COM: <s> zoom affects alignments in both dimensions </s>
funcom_train/24185301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JaCoPxcspParser (String agentName, Element root, boolean countNCCCs, HashSet<String> spacesToIgnoreNcccs, boolean mpc) { super (agentName, root, countNCCCs, false, spacesToIgnoreNcccs, mpc); assert this.countNCCCs == false : "NCCCs not implemented"; /// @todo Implement NCCCs? } COM: <s> constructor from a jdom root element in xcsp format </s>
funcom_train/33705708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setName(String name) { LOGGER.entering("Project", "setName", name); if (name == null) { throw new IllegalArgumentException("Name should not be null"); } this.name = name; LOGGER.exiting("Project", "setName", this.name); } COM: <s> changes the name of this </s>
funcom_train/36775444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreeObject getSelectedNodeParent() { DefaultMutableTreeNode parentNode = null; TreePath parentPath = tree.getSelectionPath(); parentNode = (DefaultMutableTreeNode) (parentPath.getLastPathComponent()); TreeObject parent = (TreeObject) (parentNode.getParent()); return (parent); } COM: <s> return the parent node of the current selected node </s>
funcom_train/46748533
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocationRef(DisplayModel locationRef) { if (Converter.isDifferent(this.locationRef, locationRef)) { DisplayModel oldlocationRef= new DisplayModel(this); oldlocationRef.copyAllFrom(this.locationRef); this.locationRef.copyAllFrom(locationRef); setModified("locationRef"); firePropertyChange(String.valueOf(RESOURCESCHEDULES_LOCATIONREFID), oldlocationRef, locationRef); } } COM: <s> location of this resource schedule </s>
funcom_train/23854438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMoleculeComparator(Comparator<? super Molecule> molComparator) { this.moleculeComparator = molComparator; if (isShowScaffoldDetailsNodes()) { for (ScaffoldNode s : Iterables.filter(getVNodes(), ScaffoldNode.class)) { s.setMoleculeComparator(molComparator); } } } COM: <s> set the comparator used for sorting molecules in scaffold detail nodes </s>
funcom_train/32238965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MJButton getBDel() { if (bDel == null) { bDel = new MJButton(); bDel.setText("Delete"); bDel.setMnemonic(KeyEvent.VK_D); bDel.setPreferredSize(new java.awt.Dimension(85, 26)); } return bDel; } COM: <s> this method initializes b del </s>
funcom_train/2582934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Number getValue(Comparable rowKey, Comparable columnKey) { int r = getRowIndex(rowKey); int c = getColumnIndex(columnKey); if (c != -1) { return this.underlying.getValue(r, c + this.firstCategoryIndex); } else { throw new UnknownKeyException("Unknown columnKey: " + columnKey); } } COM: <s> returns the value for a pair of keys </s>
funcom_train/46745840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFileDirectory(String fileDirectory) { if (Converter.isDifferent(this.fileDirectory, fileDirectory)) { String oldfileDirectory= null; oldfileDirectory = this.fileDirectory; this.fileDirectory = fileDirectory; setModified("fileDirectory"); firePropertyChange(String.valueOf(FILECOPIES_FILEDIRECTORY), oldfileDirectory, fileDirectory); } } COM: <s> directory file copies are stored in including delimeter to append file name e </s>
funcom_train/28471335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getProperty(String propertyName, String defaultValue) { String value; value = (String) hmProps.get(propertyName); if (value == null) if (ancestor != null) value = ancestor.getProperty(propertyName, defaultValue); else return defaultValue; return value; } COM: <s> method returns a value corresponding to a given key </s>
funcom_train/46489467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveByPixel(int x, int y) { // The vector for move in swing coordinate system: P4 v = new P4(-x, -y, 0); // The zero view point vector in swing coordinate system: P4 zero = map.getView().getTransform().mul(new P4(0, 0, 0)); // The point to move to: v = zero.add(v); moveTo(v); } COM: <s> move the view by n pixel </s>
funcom_train/10509952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isExists() { if (isReference()) { return ((Resource) getCheckedRef()).isExists(); } dieOnCircularReference(); InputStream is = null; try { is = getInputStream(); return is != null; } catch (IOException ex) { return false; } finally { FileUtils.close(is); } } COM: <s> learn whether this resource exists </s>
funcom_train/12641503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(Collection c) { Object[] a = c.toArray(); int numNew = a.length; ensureCapacity(size + numNew); // Increments modCount /* IAI - 15 */ CVM.copyObjectArray(a, 0, elementData, size, numNew); /* IAI - 15 */ size += numNew; return numNew != 0; } COM: <s> appends all of the elements in the specified collection to the end of </s>
funcom_train/44852644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCount(Integer inMemberID) throws BOMChangeValueException { try { KeyObject lKey = new KeyObjectImpl(); lKey.setValue(GroupAdminHome.KEY_MEMBER_ID, inMemberID); return getCount(lKey); } catch (VException exc) { throw new BOMChangeValueException(exc.getMessage()); } catch (SQLException exc) { throw new BOMChangeValueException(exc.getMessage()); } } COM: <s> returns the number of groups </s>
funcom_train/11649302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void clearCachedAuthorizationInfo(PrincipalCollection principals) { if (principals == null) { return; } Cache<Object, AuthorizationInfo> cache = getAvailableAuthorizationCache(); //cache instance will be non-null if caching is enabled: if (cache != null) { Object key = getAuthorizationCacheKey(principals); cache.remove(key); } } COM: <s> clears out the authorization info cache entry for the specified account </s>
funcom_train/36987559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void render(Oval oval) { indentAndAdd(OVAL_FORMAT.form(new double[] {oval.getCenter().getX(), -oval.getCenter().getY(), oval.getWidth() / 2, oval.getHeight() / 2})); addShapeAttributes(oval); } COM: <s> renders an oval </s>
funcom_train/1038855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddUser() { try { cps.addUser("testUser", "testPassword"); trackUser("testUser", "testPassword"); }catch(StoreException e){ fail("Failed to add user"); } boolean failed = false; try { cps.addUser("testUser", "testPassword"); }catch(StoreException e){ failed = true; } assertEquals("Added a user with same name as another" ,true, failed); addLotsOfUsers(); //TODO test concurrent access with multiple threads/multiple connections } COM: <s> test adding a user </s>
funcom_train/18727982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructor() { JaxoPaintableGrid grid = new JaxoDefaultGrid(15, JaxoPaintableGrid.TYPE_HEXAGONAL, gridSize); assertEquals(16, grid.getGridSize()); assertEquals(JaxoPaintableGrid.TYPE_HEXAGONAL, grid.getGridType()); } COM: <s> tests constructor of class jaxo draw </s>
funcom_train/3785300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete() { /* delete */ int n= lookup(this); if(n==-1) return(false); for(int i=n;i<(nMaps-1);n++) flkUsers[i]= flkUsers[i+1]; flkUsers[nMaps-1]= null; nMaps--; return(true); } /* delete */ COM: <s> delete rmv entry from database flk users 0 n maps 1 </s>
funcom_train/37415344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(HtmlWriter htmlOut) throws IOException { if(href == null) htmlOut.a(getUriPath() + "?" + getElementName() + "=true", tagProperties.toString()); else htmlOut.a(href, tagProperties.toString()); super.paint(htmlOut); htmlOut.aEnd(); } COM: <s> output text to the html writer </s>
funcom_train/23333813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop(){ if (audioPlayer!= null) { if (_alwaysListener != null) audioPlayer.removeControllerListener(_alwaysListener); if (_prefetchListener != null) audioPlayer.removeControllerListener(_prefetchListener); if (_soundListener != null) audioPlayer.removeControllerListener(_soundListener); audioPlayer.stop(); //audioPlayer.close(); //if (audioPlayer!= null) audioPlayer.deallocate(); //audioPlayer = null; } } COM: <s> stops the player and closes the thread </s>
funcom_train/25073771
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createRadioButtons(ChooseDiagrammTask aTask) { HistoryElement tmpHistory = ProjectTree.getTree().getSelectedHistory(); if (tmpHistory != null) { diagrams = tmpHistory.getDiagrams(); diagramRadioButtons = new JRadioButton[diagrams.size()]; for (int i = 0; i < diagrams.size(); i++) { diagramRadioButtons[i] = new JRadioButton(diagrams.get(i) .getTitle()); diagramRadioButtons[i].addActionListener(aTask); } } } COM: <s> creates as many radio buttons as diagrams selected </s>
funcom_train/3902834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDataFromLMSPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DocumentRoot_dataFromLMS_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DocumentRoot_dataFromLMS_feature", "_UI_DocumentRoot_type"), AdlcpV1p3Package.Literals.DOCUMENT_ROOT__DATA_FROM_LMS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the data from lms feature </s>
funcom_train/50688543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getDateHeader(String name) { long time = 0; try { time = this.request.getDateHeader(name); } catch (IllegalArgumentException e) { String header = getHeader(name); if (header != null) { LOGGER.log(Level.SEVERE, "Header could not be converted to a date: " + header); } } if (time < 1) { return null; } return new Date(time); } COM: <s> returns null if header was not specified </s>
funcom_train/32273749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButton getCluePacket() { if (cluePacket == null) { cluePacket = new JRadioButton(); cluePacket.setText("Clue Packet"); cluePacket.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { packet = new DXCluePacket(); initializeCluePacket(); getServerEvent().setEnabled(false); getAddClueButton().setEnabled(true); updatePacketDisplay(); } }); } return cluePacket; } COM: <s> this method initializes j radio button1 </s>
funcom_train/31363424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getValues() { Vector rVector = new Vector(); rVector.add (strPermID); rVector.add (new Long(lClassID)); rVector.add (new Integer(iUnits)); rVector.add (dtEntryDate); rVector.add (dtExitDate); rVector.add (dtDiscoveryDate); return rVector; } COM: <s> returns a vector of values for all the roster fields </s>