__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/22578396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void store(Configuration conf, URL target) throws IOException { if (!"file".equals(target.getProtocol())) { throw new UnsupportedOperationException("Protocol not supported: '" + target.getProtocol() + "'"); } if (conf instanceof TextConfiguration) { storeText(conf, target); } else if (conf instanceof XmlConfiguration) { storeXml(conf, target); } } COM: <s> store the configuration into the given url </s>
funcom_train/7531818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(long timeout, Object id, TimerListener listener, boolean periodic) { TimerElement te = new TimerElement(timeout, id, listener, periodic); synchronized(mLock) { //Add the new timer element mTimerListner.add(te); if (mTimerListner.first().equals(te)) { // The new TE should be the next triggered element mLock.notifyAll(); } } } COM: <s> register a timer </s>
funcom_train/38868660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void timeDimension() { DateTime fromTime = new DateTime(2005, 3, 1); DateTime toTime = new DateTime(2005, 3, 5); DateTime[] timeDimensions = fromTime.timeDimension(Calendar.DATE, toTime); int timeDimensionsLength = Array.getLength(timeDimensions); int expectedLength = 5; Assert.assertEquals(expectedLength, timeDimensionsLength); } COM: <s> tests time dimension int unit date time todate method of date time class </s>
funcom_train/8376087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void killClient() { // --- tell the server to remove the client from the client list server.removeClient(this); // --- close open connections and references try { in.close(); out.close(); socket.close(); thrThis = null; } catch (IOException ioe) { // Debug.writeActivity("Client IP: " + ip + " caused an error " + "while disconnecting."); } } COM: <s> kills this client </s>
funcom_train/47677377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCurCellX(int p_columnId, ExcelObject p_excelObject) { int columnId = p_columnId; if (columnId < -1) { columnId = -1; } p_excelObject.setCurrentCell(new int[] { columnId, p_excelObject.getCurrentCell()[1] }); } COM: <s> sets the column id of the current cell x position </s>
funcom_train/48153219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getPGF(double t){ double prod = 1, r = (double)populationSize / (distinctValues - 1); if (Math.abs(t) < r){ for (int i = 1; i <= distinctValues; i++) prod = prod * (populationSize - i + 1) * t / (populationSize - (i - 1) * t); return prod; } else if (t >= r) return Double.POSITIVE_INFINITY; else return Double.NaN; } COM: <s> this method computes the probability generating function of the distribution </s>
funcom_train/25307035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Response getUserResponse() { Response response = null; try { User user = getStore().getUserById(getUserId()); response = new Response(true, user, User.class, "user"); } catch (Exception e) { response = new Response(false, e.getMessage()); throw new ResourceException(Status.SERVER_ERROR_INTERNAL, e); } return response; } COM: <s> calls business layer </s>
funcom_train/3890824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleTypeAction() { IStructuredSelection selection = (IStructuredSelection)_treeViewer.getSelection(); Object o = selection.getFirstElement(); if(o instanceof CP_Resource) { CP_ResourceTypeDialog dialog = new CP_ResourceTypeDialog(_treeViewer.getControl().getShell(), (CP_Resource)o); dialog.open(); } } COM: <s> handle the type action </s>
funcom_train/39474667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawThinChecker(Graphics g, int color, Point p) { if (color == 1) { g.drawImage(thinChip1.getImage(), p.x, p.y, board); } else { g.drawImage(thinChip2.getImage(), p.x, p.y, board); } } COM: <s> paint the thin chip seen from the side </s>
funcom_train/19844328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Image getSubImage(int x, int y) { init(); if ((x < 0) || (x >= subImages.length)) { throw new RuntimeException("SubImage out of sheet bounds: " + x + "," + y); } if ((y < 0) || (y >= subImages[0].length)) { throw new RuntimeException("SubImage out of sheet bounds: " + x + "," + y); } return subImages[x][y]; } COM: <s> get the sub image cached in this sprite sheet </s>
funcom_train/5164164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean renameGroup(String oldName, String newName) { logDebug("renaming group '" + oldName + "' to '" + newName + "'"); Group f = null; for (Group g : groups) { if (g.getName().equals(oldName)) { f = g; break; } } if (f == null) { logDebug("cant find group"); return false; } f.name = newName; logDebug("group renamed"); return true; } COM: <s> renames a server internal group </s>
funcom_train/3990323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOb_babinskiegoPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BadanieOkresowe_ob_babinskiego_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_ob_babinskiego_feature", "_UI_BadanieOkresowe_type"), PrzychodniaPackage.Literals.BADANIE_OKRESOWE__OB_BABINSKIEGO, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the ob babinskiego feature </s>
funcom_train/38536465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Number getNumSmallestMax(int start, int end) { Number v = NumberMath.maxValue(numberType); double precision = getPrecision(); for (int i=start; i<=end; i++) { Number max = exprs[i].getNumMax(); if (NumberMath.compare(max,v,precision,numberType) < 0) v = max; } return v; } COM: <s> returns that smallest maximal value of all variables in array within </s>
funcom_train/2920178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _index(Object t, Map m) { if ( t==null ) { return; } int ttype = adaptor.getType(t); List elements = (List)m.get(ttype); if ( elements==null ) { elements = new ArrayList(); m.put(new Integer(ttype), elements); } elements.add(t); int n = adaptor.getChildCount(t); for (int i=0; i<n; i++) { Object child = adaptor.getChild(t, i); _index(child, m); } } COM: <s> do the work for index </s>
funcom_train/42402334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void submit() { // Fire the onSubmit event, because javascript's form.submit() does not // fire the built-in onsubmit event. if (false == this.getFormHandlers().fireOnSubmit(this)) { FormPanel.getSupport().submit(getElement(), this.getIFrame()); } } COM: <s> submits the form </s>
funcom_train/38733665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddMinResults() { // add integer value Goal goal1 = ResourceLoader.getGoal("goalNoFederationNFP.wsml"); FederationGoal fedGoal1 = new FederationGoalImpl(goal1); int expectedValue = 5; fedGoal1.addMinResults(expectedValue); int actualValue = fedGoal1.getMinResults(); logger.debug("AddMinResults: actual value: " + actualValue + ", expected value: " + expectedValue); assertEquals(expectedValue, actualValue); } COM: <s> test to add integer nfp min results </s>
funcom_train/43849679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { logger.log( Level.DEBUG, "Method has been called." ); String result = "RequestHeaderTO:" + Constants.LINE_SEPARATOR; result += "----------------" + Constants.LINE_SEPARATOR; result += "name: " + this.name + Constants.LINE_SEPARATOR; result += "value: " + this.value + Constants.LINE_SEPARATOR; return result; } COM: <s> string presentation of the object </s>
funcom_train/9442893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startTutorial() { DefaultSoftKeyboardEN inputManager = ((DefaultSoftKeyboardEN) mInputViewManager); View v = inputManager.getKeyboardView(); v.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { return true; }}); mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_START_TUTORIAL), 500); } COM: <s> start the tutorial </s>
funcom_train/22579440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setIPAddress(KnownDevice dev) { String sqlString = null; sqlString = new String ("UPDATE "+D_TBL_NAME + " SET ipAddress='"+dev.getIPAddress()+"'" + " WHERE deviceID="+dev.getDeviceID()); System.out.println("\nDbKnownDevice.setIPAddress:\n sqlString = "+sqlString); return executeUpdate(sqlString); } COM: <s> update the device table record with a new ip address </s>
funcom_train/18745607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean testParentBinding(LabelVar var) { boolean result = this.modelVars.containsKey(var); if (!result && this.parent != null) { result = this.parent.testParentBinding(var); if (result) { this.modelVars.put(var, new HashSet<AspectEdge>()); } } return result; } COM: <s> tests if a given variable is already bound at this or a parent </s>
funcom_train/17560972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String key, String val) { if (dict.containsKey(key)) { logger.warning("put(" + key + ") called, but there is already a value for this key."); } dict.put(key.toUpperCase(), val); } COM: <s> puts a string value into the dictionary </s>
funcom_train/3352238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Manifest createManifest(PluginDescriptor descr) throws ManifestException { Manifest mf = new Manifest(); mf.addConfiguredAttribute(new Manifest.Attribute("Bundle-SymbolicName", descr.getId())); mf.addConfiguredAttribute(new Manifest.Attribute("Bundle-ManifestVersion", "2")); mf.addConfiguredAttribute(new Manifest.Attribute("Bundle-Version", descr.getVersion())); return mf; } COM: <s> create a manifest for the given descriptor </s>
funcom_train/8812785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onSave() { service.execute(createSaveCommand(), view.getSavingMonitor(), new AsyncCallback() { public void onFailure(Throwable caught) { // let the monitor handle failure, we're not // expecting any exceptions } public void onSuccess(Object result) { getStore().commitChanges(); onSaved(); } }); } COM: <s> responds to an explict user action to save </s>
funcom_train/51128305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Iterator getJarFilesIterator(){ File dir = new File(cachedir); File[] jars; jars = dir.listFiles(new java.io.FileFilter(){ public boolean accept(File pathname) { return pathname.getName().endsWith(".jar"); } }); // Convert Files into JarFile JarFile[] jfs = new JarFile[jars.length]; for(int i=0;i < jars.length;i++){ try { jfs[i] = new JarFile(jars[i]); } catch (IOException e) { e.printStackTrace(); } } return Arrays.asList(jfs).iterator(); } COM: <s> returns a jar file iterator from jar files found along </s>
funcom_train/20846649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAttributeValue(PVI[] path, String name) { String key = null; ParameterType pt = null; if (path == null) { key = ELEMENT_ATTRIBUTEVALUE; pt = getType(); } else { key = PVI.toStringWithSlashes(path); pt = getType(key); } XMLSchemaAttribute attr = pt.getAttribute(name); if (attr == null) { return null; } return (String) attributeValues.get(key + "_" + name); } COM: <s> returns the value of a subelement attribute </s>
funcom_train/45760952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getAccessibleColumnExtentAt(int r, int c) { try { return unoAccessibleTable.getAccessibleColumnExtentAt(r,c); } catch (com.sun.star.lang.IndexOutOfBoundsException e) { return 0; } catch (com.sun.star.uno.RuntimeException e) { return 0; } } COM: <s> returns the number of columns occupied by the accessible </s>
funcom_train/49461394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fillDatabase() throws Exception{ _logger.info("Importing "+eventCache.size()+" events/daily"); int i=0; for(Iterator<EventDaily> it = eventCache.values().iterator(); it.hasNext();) { netImport.importEvent(it.next()); i++; if(i%1000 == 0){ _logger.debug(i+" events/daily imported"); } } } COM: <s> read the event cache and fill the db with it </s>
funcom_train/31651613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rollback( Connection connection ) { if (connection == null) return; try { // roll back any uncommitted changes if (!connection.getAutoCommit()) { connection.rollback(); } } catch( SQLException e ) { // ignore these exceptions if the connection does // not support commitment or rollback operations } } COM: <s> rolls back any uncommitted changes made to a database connection </s>
funcom_train/44712664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateMappingTableName(ObjectType type, String name) { String proposedName = type.getName().toLowerCase() + "_" + name.toLowerCase(); if (proposedName.length() > getMaxColumnNameLength()) { proposedName = proposedName.substring(0, getMaxColumnNameLength() - 1); } return findUniqueTableName(proposedName); } COM: <s> determines a unique name for a mapping table for a particular </s>
funcom_train/22665010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*private boolean sendData(Data data) { ObjectOutputStream outToClient = null; if (!clientGameSock.isClosed()) { try { outToClient = new ObjectOutputStream(clientGameSock .getOutputStream()); outToClient.writeObject(data); } catch (IOException ioe) { serverInstance.logOutput("Error writing to a socket.", ERROR_LOG); serverInstance.removePlayer(clientGameSock); return true; } return false; } return false; }*/ COM: <s> sends data to client associated with this thread </s>
funcom_train/30006923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setNewId(TestBase element) { element.setDescription(element.getDescription() + "\nFormer ID: " + element.getId()); Project p = element.getProject(); element.setProject(null); element.setId(p.generateId()); element.setProject(p); p.addId(element.getId()); } COM: <s> sets new ids for tt element tt and all its children </s>
funcom_train/25648295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void displayPreview( List<List<Transition>> paths, JGraphEditor je) { // ##TODO## remove from this class! Naughty naughty - UI code should not be in an algorithm class. Object[] cells = generatePreview(paths, je); // Remove all selections from visible graph (to avoid confusion) je.clearSelection(); if (cells != null && cells.length > 0) { je.setSelectionCells(cells); } } COM: <s> this method paints all the nodes from usecase in the graph </s>
funcom_train/23937343
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PDF3DProjection make3DViewProjection(boolean orthographic) { PDF3DProjection obj = new PDF3DProjection(); if (orthographic) { obj.setProjectionType(PDF3DProjection.PROJECTION_TYPE_ORTHOGRAPHIC); } else { obj.setProjectionType(PDF3DProjection.PROJECTION_TYPE_PERSPECTIVE); } // getFO3DDocument().registerObject(obj); obj.setDocument(getFO3DDocument()); return obj; } COM: <s> make a 3 d view projection dictionary </s>
funcom_train/10511661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendString(String s, boolean echoString) { OutputStream os = this.getOutputStream(); try { os.write((s + "\n").getBytes()); if (echoString) { log(s, Project.MSG_INFO); } os.flush(); } catch (Exception e) { throw new BuildException(e, getLocation()); } } COM: <s> write this string to the rexec session </s>
funcom_train/4521156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(VistaProcesoElectoralCols entity) { LogUtil.log("deleting VistaProcesoElectoralCols instance", Level.INFO, null); try { entity = entityManager.getReference( VistaProcesoElectoralCols.class, entity .getProcesoElectoralId()); entityManager.remove(entity); LogUtil.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent vista proceso electoral cols entity </s>
funcom_train/16358094
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFilter(List list) throws IllegalArgumentException,NumberFormatException { if (list.getItemCount() < 1) throw new IllegalArgumentException("No enougths arguments in order to set the filter lower. One is expected: limit."); try { limit = Double.valueOf(list.getItem(0)).doubleValue(); } catch (NumberFormatException e) { throw new NumberFormatException("Wrong number format with the limit parameter : " + list.getItem(0)); } } COM: <s> set the filter </s>
funcom_train/5340532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addFileToPlaylist(final File f) { GUIMediator.safeInvokeAndWait(new Runnable() { public void run() { synchronized(PLAY_LOCK) { add(f); PlayList pl = getCurrentPlayList(); if(pl != null) pl.setSongs(MODEL.getSongs()); } } }); } COM: <s> adds a file to the playlist </s>
funcom_train/10211965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { DArray a = (DArray)super.clone(); a.dimVector = new Vector(); for(int i=0; i<dimVector.size(); i++) { DArrayDimension d = (DArrayDimension)dimVector.elementAt(i); a.dimVector.addElement(d.clone()); } return a; } COM: <s> returns a clone of this code darray code </s>
funcom_train/51639631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void indentAfterCommentEnd(IDocument d, DocumentCommand c) { if (c.offset < 2 || d.getLength() == 0) { return; } try { if ("* ".equals(d.get(c.offset - 2, 2))) { //$NON-NLS-1$ // modify document command c.length++; c.offset--; } } catch (BadLocationException excp) { // stop work } } COM: <s> unindents a typed slash if it forms the end of a comment </s>
funcom_train/39810738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUser(String userId, String name, String companyName) { try { String[] names = splitIntoNames(name); String defaultPassword = Integer.toHexString("password".hashCode()); UserVO newUser = new UserVO(userId, names[0], names[1], defaultPassword); user.add(newUser); user.setCompany(userId, companyName, "System"); } catch (Exception ex) { ex.printStackTrace(); } this.fireTableDataChanged(); } COM: <s> used to add a given user </s>
funcom_train/26397278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPosition() { if (realPos == -1) { realPos = (executable == null ? 0 : 1); for (int i = 0; i < position; i++) { final Argument arg = arguments.elementAt(i); realPos += arg.getParts().length; } } return realPos; } COM: <s> return the number of arguments that preceeded this marker </s>
funcom_train/46277251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerSchemaSpecificTypes(TypeMapping tm) { // Register the timeInstant type tm.register(java.util.Calendar.class, Constants.XSD_TIMEINSTANT1999, new CalendarSerializerFactory(java.util.Calendar.class, Constants.XSD_TIMEINSTANT1999), new CalendarDeserializerFactory(java.util.Calendar.class, Constants.XSD_TIMEINSTANT1999)); } COM: <s> register the schema specific type mappings </s>
funcom_train/41335278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintSliderThumbBorder(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation) { paintBorder(context, g, x, y, w, h, orientation); } COM: <s> paints the border of the thumb of a slider </s>
funcom_train/9394965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String name, boolean value) throws IllegalArgumentException { ObjectSlot slot = findSlot(name, Boolean.TYPE); if (slot == null) { throw new IllegalArgumentException(); } slot.fieldValue = Boolean.valueOf(value); slot.defaulted = false; // No longer default value } COM: <s> find and set the boolean value of a given field named </s>
funcom_train/28157834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate(Object entity, Field field, Class<?> exception) throws Throwable { try { Annotation annotation = getAnnotation(field); if (annotation != null) { field.setAccessible(true); // so we can get private fields... validate(entity, field, annotation, exception); } } catch (IllegalAccessException ex) { logger.error("Error while evaluating field: " + field.getClass() + "." + field.getName(), ex); } } COM: <s> validates a persistent field </s>
funcom_train/24539874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceEmptyCell(EObject child, Object childObject, Object requestType, Point cell) { if (glayoutTable[cell.x][cell.y] != EMPTY_GRID) return; // Invalid request. replaceEmptyCell(new GridComponent(childObject, child, requestType), cell.x, cell.y); } COM: <s> replace empty cell with the given child </s>
funcom_train/51646357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetSelectedSimilarElements() { Assert.isNotNull(fPreloadedElementToName); for (Iterator iter= fPreloadedElementToNameDefault.keySet().iterator(); iter.hasNext();) { final IJavaElement element= (IJavaElement) iter.next(); fPreloadedElementToName.put(element, fPreloadedElementToNameDefault.get(element)); fPreloadedElementToSelection.put(element, Boolean.TRUE); } } COM: <s> resets the element maps back to the original status </s>
funcom_train/543418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGradient(Gradient g) { gColor = g; gColormap = g.buildColorMap(65536); gradientTool.setGradient(gColor); gradientTool.repaint(); synchronized (this) { convertImage(); if (zoomDialog != null && zoomDialog.isVisible()) buildZoom(); } } COM: <s> sets the colormap </s>
funcom_train/44284982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addKnobWidget(JComponent panel, String wLabel, Patch patch, int min, int max, int sysexOffset, int ccNum) { addKnobWidget(panel, wLabel, patch, min, max, 0, sysexOffset, ccNum); } COM: <s> adds a knob widget to the given jcomponent </s>
funcom_train/16471027
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setMethod(Object component, String key, String value, Object root, Object handler) { key = (String) getDefinition(getClass(component), key, METHOD)[1]; Object[] method = getMethod(component, value, root, handler); set(component, key, method); } COM: <s> sets a new event handler method for a component </s>
funcom_train/50332172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init(int minNode, int maxNode) { this.minNode = minNode; this.maxNode = maxNode; nodeArray = new AbstractNode[this.maxNode+1]; // numbering from 0 mustInit = new boolean[this.maxNode+1]; // initialize content for (int i=0; i<=this.maxNode; i++) { mustInit[i] = true; } } COM: <s> initialize based on number of first and last nodes </s>
funcom_train/25035053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Texture getTexture( String resourceName ) throws IOException { return getTexture( resourceName // , TextureFilter.NearestFilteredTexture ); // , TextureFilter.NONE ); // , TextureFilter.LinearFilteredTexture ); // // , TextureFilter.MipMapped ); // } COM: <s> load a texture </s>
funcom_train/24121884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getString(final String key) { try { return bundle.getString(key); } catch (MissingResourceException ex) { LOGGER.info("Key not found: " + key); //$NON-NLS-1$ return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$ } } COM: <s> returns the string associated with the given key </s>
funcom_train/45145416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void parseTemplate() { // find out the count of replaceble token variants int templParamCount = Constants.getTemplateParametersCount(); String templParam; for (int i = 0; i < templParamCount; i++) { templParam = Constants.getTemplateParameter(i); // process i-th template parameter processTemplateParameter(templParam); } } COM: <s> internal method for parsing the template </s>
funcom_train/16445832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object start(IApplicationContext context) throws Exception { engine = EngineUtil.INSTANCE.createSimpleCmdEngine(); // 25 Jobs for 60 seconds for (int i=0; i<25; i++) { QxCmdFeedingSimulatorJob simulatorJob = new QxCmdFeedingSimulatorJob(engine, 50000); cmdFeedingSimulatorJobList.add(simulatorJob); simulatorJob.schedule(); } while(!canFinish()); stop(); return null; } COM: <s> start posting random commands to command engine </s>
funcom_train/32068779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addProfils(Collection<Profil> profils) { boolean addOk = getProfils().addAll(profils); if (addOk) { for(Profil profil : profils) { profil.setRole((Role)this); } } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed profils collection to the role collection </s>
funcom_train/34282959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMarkOccurrences(boolean markOccurrences) { if (markOccurrences) { if (markOccurrencesSupport==null) { markOccurrencesSupport = new MarkOccurrencesSupport(); markOccurrencesSupport.install(this); firePropertyChange(MARK_OCCURRENCES_PROPERTY, false, true); } } else { if (markOccurrencesSupport!=null) { markOccurrencesSupport.uninstall(); markOccurrencesSupport = null; firePropertyChange(MARK_OCCURRENCES_PROPERTY, true, false); } } } COM: <s> toggles whether mark occurrences is enabled </s>
funcom_train/40698776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBounds(List<HasLatLng> points) { Preconditions.checkNotNull(points); switch(points.size()) { case 0: throw new IllegalArgumentException("Insufficient points"); case 1: setCenter(points.get(0)); break; default: display.setBounds(getBounds(points)); } } COM: <s> calculate bounds for the points and set that bounds on the map </s>
funcom_train/4934015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getParentObjectId(ActionEvent e) { if (parent == null) { final JComponent source = (JComponent) e.getSource(); parent = source.getParent(); } String subjectId = guiHelper.component2Instance.get(parent); // (hack) case of of group of buttons for polymorph properties: // navigate to the grandparent: if( subjectId == null ) { parent = parent.getParent(); subjectId = guiHelper.component2Instance.get(parent); } return subjectId; } COM: <s> get the parent object id that is the object associated to parent form </s>
funcom_train/565224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void close () { if (lc_dev_proxy != null) { try { DeviceData dd = new DeviceData(); dd.insert(dev_name); lc_dev_proxy.command_inout_asynch("UnRegister", dd, true); } catch (DevFailed dv) { //Ignore: some old LogViewer may not support the Unregister cmd } } lc_dev_proxy = null; dev_name = null; } COM: <s> release any resources allocated within the appender </s>
funcom_train/50155759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String makeSystemCollectionKey() { String useVocabMapping = "key"; String systemKey = ""; if (collectionKey != null) { try { // prtln ("about to call vocab.getFieldValueSystemId with " + collectionKey); systemKey = vocab.getFieldValueSystemId(useVocabMapping, collectionKey); } catch (Throwable e) { prtln("makeSystemCollectionKey failed with " + collection + ":\n" + e); } } else { prtln("makeSystemCollectionKey never got a collection!"); } return systemKey; } COM: <s> converts a collection key e </s>
funcom_train/33855540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BugInstance addCalledMethod(ConstantPoolGen cpg, InvokeInstruction inv) { String className = inv.getClassName(cpg); String methodName = inv.getMethodName(cpg); String methodSig = inv.getSignature(cpg); addMethod(className, methodName, methodSig, inv.getOpcode() == Constants.INVOKESTATIC); describe(MethodAnnotation.METHOD_CALLED); return this; } COM: <s> add a method annotation for the method which is called by given </s>
funcom_train/45865484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void GetcardType(int card){ switch (card) { case pteid.CARD_TYPE_IAS07: cardType=("IAS 0.7 card"); break; case pteid.CARD_TYPE_IAS101: cardType=("IAS 1.0.1 card"); break; case pteid.CARD_TYPE_ERR: cardType=("Unable to get the card type"); break; default: cardType=("Unknown card type"); } } COM: <s> returns cc card type </s>
funcom_train/35682951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCixsGroup(final Composite container) { Group group = createGroup(container, Messages.generation_project_label, 2); createLabel(group, Messages.generation_project_name_label + ':'); _serviceNameText = createText(group); createLabel(group, Messages.generation_java_package_label + ':'); _javaClassesPackageNameText = createText(group); addWidgetsToCixsGroup(group); } COM: <s> groups parameters that generically describe generated artifacts </s>
funcom_train/21913445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRowsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UIMTextArea_rows_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UIMTextArea_rows_feature", "_UI_UIMTextArea_type"), UIMPackage.Literals.UIM_TEXT_AREA__ROWS, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the rows feature </s>
funcom_train/4106211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand() { if (backCommand == null) {//GEN-END:|17-getter|0|17-preInit // write pre-init user code here backCommand = new Command("Back", Command.BACK, 0);//GEN-LINE:|17-getter|1|17-postInit // write post-init user code here }//GEN-BEGIN:|17-getter|2| return backCommand; } COM: <s> returns an initiliazed instance of back command component </s>
funcom_train/8952955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addGroup(String pGroup) { boolean changed = false; if (groupable && !managedElementGroups.containsKey(pGroup)) { managedElementGroups.put(pGroup, new ArrayList<ManageableType>()); changed = true; } if (changed) { fireDataChangedEvents(); } return changed; } COM: <s> add a new empty group </s>
funcom_train/9286086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void tearDown() throws IOException { // If the other party has crashed, closing the streams may fail (at // least the output stream since its close() method calls flush()). // In any case, we want the socket to be closed, so close it in a // finally clause. DERBY-3878 try { objInputStream.close(); objOutputStream.close(); } finally { socket.close(); } } COM: <s> closes the code socket code and the object streams obtained </s>
funcom_train/38552437
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(int index, Collection entries) { Cube42NullParameterException.checkNull(entries, "entries", "addAll", this); Iterator iter = entries.iterator(); Object entry; while (iter.hasNext()) { this.checkLogEntry(iter.next()); } return super.addAll(index, entries); } COM: <s> inserts all of the entries in in the specified collection into this </s>
funcom_train/23646441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Matrix44 mul(Matrix44 t) { double[][] m1 = new double[4][4]; for (int nR = 0; nR < 4; nR++) for (int nC = 0; nC < 4; nC++) for (int nl = 0; nl < 4; nl++) m1[nR][nC] += m[nR][nl] * t.m[nl][nC]; return new Matrix44(m1); } COM: <s> matrix multiplication this x t </s>
funcom_train/3902510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validatePrerequisiteStringType_MaxLength(String prerequisiteStringType, DiagnosticChain diagnostics, Map context) { int length = prerequisiteStringType.length(); boolean result = length <= 200; if (!result && diagnostics != null) reportMaxLengthViolation(AdlcpRootv1p2Package.Literals.PREREQUISITE_STRING_TYPE, prerequisiteStringType, length, 200, diagnostics, context); return result; } COM: <s> validates the max length constraint of em prerequisite string type em </s>
funcom_train/37476548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deactivateNonMileStoneNodes() throws Exception { this.getActiveNodes(); for (Iterator it = this.getActiveNodes().iterator(); it.hasNext();) { Node n = ((Node) it.next()); if (n.getMileStone() == null && !n.isEndNode()){ n.deactivate(); } } } COM: <s> deactivate all nodes that dont have a milestone </s>
funcom_train/23267838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNroAmortizacion() { System.out.println("getNroAmortizacion"); Amortizaciones instance = new Amortizaciones(); int expResult = 0; int result = instance.getNroAmortizacion(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get nro amortizacion method of class capa negocios </s>
funcom_train/8222778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScriptFile(String filename) throws EvalError { _scriptFile = filename; String prop = "BeanShell.scriptfile"; Preferences.setPreference(prop, filename); if (!filename.equals("")) { loadScriptFile(filename); } else { setScript(_defaultScript); } } COM: <s> sets the script file </s>
funcom_train/21483558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnknownEntry() throws Exception { // Make sure the entry does not exist assertNull(blockingCache.get("key")); // Put the entry blockingCache.put(new Element("key", null)); assertEquals(0, blockingCache.getKeys().size()); } COM: <s> elements with null valuea are not stored in the blocking cache </s>
funcom_train/987235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void glColor4f (float red, float green, float blue, float alpha) { CC.gl_color (gl_util.CLAMP (red, 0.0, 1.0), gl_util.CLAMP (green, 0.0, 1.0), gl_util.CLAMP (blue, 0.0, 1.0), gl_util.CLAMP (alpha, 0.0, 1.0)); } COM: <s> glvoid gl color4f glfloat red glfloat green glfloat blue glfloat alpha </s>
funcom_train/22023633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSceneSubtree(org.xith3d.scenegraph.Node subtree){ XithGeomData data = (XithGeomData) geom.getUserData(APPEARANCE_KEY); if(data== null){ data = new XithGeomData(); geom.setUserData(APPEARANCE_KEY, data); } data.subtree = subtree; } COM: <s> this allows total customization of what a geom looks like </s>
funcom_train/41332295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doClose(int tabIndex) { if (tabCloseListener == null || tabCloseListener.tabAboutToBeClosed(tabIndex)) { String title = tabPane.getTitleAt(tabIndex); Component component = tabPane.getComponentAt(tabIndex); tabPane.removeTabAt(tabIndex); if (tabCloseListener != null) { tabCloseListener.tabClosed(title, component); } } } COM: <s> called when a close tab button is pressed </s>
funcom_train/3905046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadViewPanel(int num) { _viewPanels[num].loadView(); _currentViewPanel = _viewPanels[num]; setFocus(); // Save tab SchemaViewerPlugin.getDefault() .getUserPreferenceStore() .setValue(PREFS_SELECTED_TAB, num); } COM: <s> load the given view panel on a tab item </s>
funcom_train/28888628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public L select2() { final IBBDAPIPrincipal userAccess = BBDAbstractFactory.makeBBDPrincipal("Duke", "Java"); selectHello2.setBbdPrincipal(userAccess); final IBBDConnection<R,L> myConnection = BBDAbstractFactory.makeBBDConnection(); L bbdRowAL = (L)new BBDRowArrayList<R>(); try { bbdRowAL = myConnection .executeQuery(selectHello2, "Duke"); } catch (final SQLException e) { log.severe(e.toString()); } return bbdRowAL; } COM: <s> ask the database for information by passing input parameter to </s>
funcom_train/3843258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createControl(Composite parent) { // Special treatment for property pages if (isPropertyPage()) { // Cache the page id pageId = getPageId(); // Create an overlay preference store and fill it with properties overlayStore = new PropertyStore( (IResource) getElement(), super.getPreferenceStore(), pageId); // Set overlay store as current preference store } super.createControl(parent); // Update state of all subclass controls if (isPropertyPage()) updateFieldEditors(); } COM: <s> we override the create control method </s>
funcom_train/39808304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVisibleColumnCount(int visibleColumnCount) { if (getVisibleColumnCount() == visibleColumnCount) return; int old = getVisibleColumnCount(); this.visibleColumnCount = visibleColumnCount; resetCalculatedScrollableSize(true); firePropertyChange("visibleColumnCount", old, getVisibleColumnCount()); } COM: <s> sets the preferred number of columns to show in a </s>
funcom_train/26383020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Properties getNamingProperties() { Properties p=new Properties(); p.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory"); p.setProperty("java.naming.provider.url","localhost"); return p; } COM: <s> in a real application you write this once somewhere </s>
funcom_train/23949848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hookColumns() { TableColumn[] cols = tbl.getColumns(); sortedCols = new SortedColumn[cols.length]; for(int i=0; i<cols.length; i++) { sortedCols[i] = new SortedColumn(cols[i], i, false, new DefaultComparisonAlgorithm(i, false)); cols[i].addSelectionListener(new SelectionAdapterWithSortableTable(this, i) { public void widgetSelected(SelectionEvent evt) { tbl.sortByColumn(colIndex); } }); } } COM: <s> sets up the listener hooks and addition information needed </s>
funcom_train/47808024
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeStudyFields(String study, HashMap<String,String> replacementHash) throws Exception{ // Get the file, where ever it is... isaTabArchive = getCurrentStudyFilePath(study); // Un zip it to the upload folder (be sure it is clean) Unzip(); // Replace the fields getItir().setIsaTabFolder(unzipFolder); //TODO, Null pointer getItir().replaceFields(replacementHash); //Zip it again to the specified folder Zip(isaTabArchive); } COM: <s> replaces values in isa tab zip file based on the hash field value </s>
funcom_train/41747674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getTotalExpenseBudgetAmount() { long total = 0; for (Iterator iterator = categories.iterator(); iterator.hasNext();) { Account account = (Account) iterator.next(); Integer accNum = new Integer(account.getAccountNum()); DetailedBudgetItem item = (DetailedBudgetItem)detExpenseItems.get(accNum); if (item != null) total += item.budgetAmount; } return total; } COM: <s> total budget amount for expense accounts </s>
funcom_train/32058072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEmptyParents() { System.out.println("testEmptyParents"); ParentMap parentmap = new ParentMap(); Object[] objs = new Object[5]; objs[1] = "Str"; Object child = new Object(); Object parent = new Object(); parentmap.addEntry(child, parent); assertTrue("testEmptyParents Fails", parentmap.emptyParents() != null); } COM: <s> this function tests empty parents function of parent map class </s>
funcom_train/3719358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsLast() throws Exception { ADT_A01 msg = new ADT_A01(); MessageIterator.Position last = new MessageIterator.Position(msg, "PDA", 0); MessageIterator.Position notLast = new MessageIterator.Position(msg, "ACC", 0); assertTrue(MessageIterator.isLast(last)); assertTrue(!MessageIterator.isLast(notLast)); } COM: <s> positive and negative test </s>
funcom_train/31251844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deletePrincipalById(String pid) throws SQLException { if (pid == null || pid.equals("") || pid.equals("null")) throw new NullPointerException("null principal_id for deletion"); StringBuffer where = new StringBuffer(" WHERE principal_id=") .append(pid); // erase this principal and the prinroles _db.update("DELETE FROM principal " + where.toString()); _db.update("DELETE FROM prinroles " + where.toString()); } COM: <s> delete a principal </s>
funcom_train/2586030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testStringToMonthCode() { int m = SerialDate.stringToMonthCode("January"); assertEquals(MonthConstants.JANUARY, m); m = SerialDate.stringToMonthCode(" January "); assertEquals(MonthConstants.JANUARY, m); m = SerialDate.stringToMonthCode("Jan"); assertEquals(MonthConstants.JANUARY, m); } COM: <s> test the conversion of a string to a month </s>
funcom_train/16862269
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNewLine() { if (newLine!=UNINITIALISED) return newLine; for (int i=0; i<end; i++) { char ch=sourceText.charAt(i); if (ch=='\n') return newLine=lastNewLine=LF; if (ch=='\r') return newLine=lastNewLine=(++i<end && sourceText.charAt(i)=='\n') ? CRLF : CR; } return newLine=null; } COM: <s> returns the a target blank href http en </s>
funcom_train/26276725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showException(final Throwable i_throwable) { Runnable showExceptionJob = new Runnable() { public void run() { _navigationSessionPanel.setStatusDisplayedInTab(ftraq.fs.LgFileSystemBrowserStatus.FAILURE); lastExceptionPanel.printExceptionInformation(i_throwable); setExceptionPanelVisible(true); repaint(); } }; SwingUtilities.invokeLater(showExceptionJob); } COM: <s> display the messages of an exception that occured while using the </s>
funcom_train/23309445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAll() { // deregister the collection as a change listener to each series in // the collection. Iterator iterator = this.data.iterator(); while (iterator.hasNext()) { SchedSeries series = (SchedSeries) iterator.next(); series.removeChangeListener(this); } // remove all the series from the collection and notify listeners. this.data.clear(); fireDatasetChanged(); } COM: <s> removes all the series from the collection and sends </s>
funcom_train/44824814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel2() { if (jPanel2 == null) { jPanel2 = new JPanel(); jPanel2.setLayout(new BorderLayout()); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Script", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.ABOVE_TOP, null, null)); jPanel2.add(getJScrollPane(), java.awt.BorderLayout.CENTER); } return jPanel2; } COM: <s> this method initializes j panel2 </s>
funcom_train/12839073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(int index) throws NoSuchObjectException { if (indexIsInRange(index) == false) { throw new NoSuchObjectException("Index [" + index + "] is out of range. Max index value is [" + (maxQueueSize - 1) + "]"); } return queue[index]; } COM: <s> returns the object with the argument key </s>
funcom_train/37619737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void fillNot(int n) { int maxChunk = subscript(n); if (maxChunk >= length()) { clearAll(); } else { for (int i = 0; i < maxChunk; i++) { setW(i, 0L); } andW(maxChunk, (~0L) << (n & MASK)); } } COM: <s> clears the first n bits of this bit vector </s>
funcom_train/50395197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkOverwriteAllowed(StorageClient sms, String fileName)throws Exception{ if(OverwritePolicy.DONT_OVERWRITE.equals(overwrite)){ GridFileType g=null; try{ //will throw IOexception if file does not exist g=sms.listProperties(fileName); }catch(IOException ioe){} if(g!=null){ throw new IOException("File <"+g.getPath()+"> exists, and we have been asked to not overwrite."); } } } COM: <s> checks if we may overwrite the given file in case it exists </s>
funcom_train/49994791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateSnipContent(SnipBean snip) { if (sourceViewer != null && snip != null) { sourceViewer.setDocument(new Document(snip.getContent())); snipDetailLabel.setText(createDetailString(snip)); } else { Activator.getDefault().reportError("IdeWikiEditor", "Text Viewer or Snip Content is null"); } } COM: <s> update snip edit widget and detail lable </s>
funcom_train/44853091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IndexWriter getMemberIndexWriter(boolean inCreate) throws LockObtainFailedException, IOException { if (memberIndexWriter == null) throw new CorruptIndexException(String.format(ERROR_MSG, createPath(CONTENT_INDEX))); if (!inCreate) { return memberIndexWriter; } try { memberIndexWriter.close(); } finally { IndexWriter.unlock(memberDir); } memberIndexWriter = new IndexWriter(memberDir, createConfiguration(inCreate)); return memberIndexWriter; } COM: <s> returns the code index writer code to index the the members </s>
funcom_train/35279166
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initShadows() { bsr = new BasicShadowRenderer(assetManager, 256); bsr.setDirection(new Vector3f(-1, -1, -1).normalizeLocal()); viewPort.addProcessor(bsr); // Default mode is Off -- Every node declares own shadow mode! rootNode.setShadowMode(ShadowMode.Off); } COM: <s> activate shadow casting and light direction </s>