__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/4730354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initialPopulateContainerNameField() { super.initialPopulateContainerNameField(); IPath fullPath = getContainerFullPath(); IProject project = getProjectFromPath(fullPath); // IPath webContentPath = getWebContentPath(project); // if (webContentPath != null && !webContentPath.isPrefixOf(fullPath)) { // setContainerFullPath(webContentPath); // } } COM: <s> this method is overriden to set the selected folder to web contents </s>
funcom_train/18551973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector splitUpPackageName(String pName) { Vector v = new Vector(); StringTokenizer stringTokenizer = new StringTokenizer(pName, "."); DefaultMutableTreeNode packageNode = null; while (stringTokenizer.hasMoreTokens()) { packageNode = new DefaultMutableTreeNode(stringTokenizer.nextToken()); v.add(packageNode); } return v; } COM: <s> splits the package into individual nodes </s>
funcom_train/13287070
/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 { Author author = (Author) obj; return new EqualsBuilder() .append(this.getEmailAddress(), author.getEmailAddress()) .isEquals(); } catch (ClassCastException e) { // The given object is not an author, therefore they are not equal. return false; } } COM: <s> compares this author with the given object for equality </s>
funcom_train/4521095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Procesoelectoraltipoeleccion entity) { LogUtil.log("deleting Procesoelectoraltipoeleccion instance", Level.INFO, null); try { entity = entityManager.getReference( Procesoelectoraltipoeleccion.class, entity.getId()); 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 procesoelectoraltipoeleccion entity </s>
funcom_train/4124641
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(int value) { final int oldValue = this.value; this.value = value; if (value != oldValue && isDefined) { firePropertyChange("value", Integer.valueOf(oldValue), Integer.valueOf(value)); } isDefined = true; } COM: <s> sets the value of this code integer option code </s>
funcom_train/45252885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getDecorations(Object element, DecorationBuilder decoration) { LightweightDecoratorDefinition[] decorators = getDecoratorsFor(element); for (int i = 0; i < decorators.length; i++) { // If we are doing the adaptable one make sure we are // only applying the adaptable decorations LightweightDecoratorDefinition dd = decorators[i]; decoration.setCurrentDefinition(dd); decorate(element, decoration, dd); } } COM: <s> fill the decoration with all of the results of the decorators </s>
funcom_train/42068171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addChunkStartPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CuePoint_chunkStart_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CuePoint_chunkStart_feature", "_UI_CuePoint_type"), WavPackage.Literals.CUE_POINT__CHUNK_START, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the chunk start feature </s>
funcom_train/34135148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Enumeration children() { if (!this.isExpanded()) { return DefaultMutableTreeNode.EMPTY_ENUMERATION; } else { Enumeration children = super.children(); Vector realChildren = new Vector(); while ( children.hasMoreElements()) { TreeStateNode child = (TreeStateNode)children.nextElement(); Object value = child.getValue(); if ( value instanceof DesignerNode) { if ( !((DesignerNode)value).isVirtual()) { realChildren.addElement( child); } } } return realChildren.elements(); } } COM: <s> returns the children of the receiver </s>
funcom_train/48407431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUserChangeablePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MethodPlugin_userChangeable_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MethodPlugin_userChangeable_feature", "_UI_MethodPlugin_type"), SpemxtcompletePackage.eINSTANCE.getMethodPlugin_UserChangeable(), true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the user changeable feature </s>
funcom_train/27820874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(File[] localFiles, String remoteDir) throws IOException { FileInputStream fis = null; _cdInto(remoteDir); for (int i = 0; i < localFiles.length; i++) { try { fis = new FileInputStream(localFiles[i]); } catch (FileNotFoundException fnfe) { //Ignore bad data from user } ftpClient.storeFile(localFiles[i].getName(), fis); } _cdUpFrom(remoteDir); } COM: <s> not thread safe </s>
funcom_train/3935425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fill(ToolBar inParent, int inIndex) { toolItem = new ToolItem(inParent, SWT.SEPARATOR, inIndex); Control lControl = createControl(inParent); toolItem.setWidth(lControl.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x); toolItem.setControl(lControl); } COM: <s> the control item implementation of this code icontribution item code </s>
funcom_train/37062555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setMaxDisplayHeight(int max) { if (max < 100) { maxHeight = 100; deltaH = 10; } else if (max < 500) { maxHeight = 500; deltaH = 50; } else if (max < 1000) { maxHeight = 1000; deltaH = 100; } else if (max < 2000) { maxHeight = 2000; deltaH = 200; } else { maxHeight = 3000; deltaH = 500; } } COM: <s> set the maximum height value for the diagram </s>
funcom_train/17201232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void swap(int i, int j) { double tmpS = counts[i]; counts[i] = counts[j]; counts[j] = tmpS; int tmpC = cmids[i]; cmids[i] = cmids[j]; cmids[j] = tmpC; map[cmids[i]] = i; map[cmids[j]] = j; } COM: <s> swap the heap entries at i and j </s>
funcom_train/13321125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getResolutionTagFromTiff(TIFFDirectory directory, List<Integer> tags, int tag) { if (tags.contains(tag)) { double result = directory.getField(tag).getAsDouble(0); // value of 1 means: not created by hylafax if (result <= 1) { return 1; } else { return TiffToPdfConverter.TIFF_RESOLUTION / result; } } else { return 1; } } COM: <s> read resolution value from tiff directory </s>
funcom_train/9978526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDefaultActionRef(Element ref) { pContext.getProject().fireChangeEvent(ProjectChangeListener.EventType.PluginSettingsWillChange, Struts2Tools.pluginID); ref.getParentNode().removeChild(ref); pContext.getProject().fireChangeEvent(ProjectChangeListener.EventType.PluginSettingsChanged, Struts2Tools.pluginID); } COM: <s> removes a default action ref </s>
funcom_train/29680109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disconnect() { if (active) { notifyOnDisconnect(); plugins = null; this.tree = new ServerTreeNode(this, null, username + "@" + host + ":" + port, //$NON-NLS-1$ //$NON-NLS-2$ getRootImageDescriptor(), connectAction); active = false; notifyAfterDisconnect(); } } COM: <s> disconnect from the server </s>
funcom_train/22467914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putPrediction(IPredictor predictor, UserId user, IRatableItem item, Prediction prediction) { PredictionKey key = new PredictionKey(predictor, user, item); try { cache.put(key, prediction); } catch (DuineException e) { log.warn("Exception while caching a prediction. Exception: " + e.toString()); } } COM: <s> puts the prediction associated with the given parameters into the cache </s>
funcom_train/22371209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize() { navigationTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); // Disable autoresize, as we will control it navigationTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); add(lookAndFeelManager.getCurrentLookAndFeel().getTableScrollPane(navigationTable.getSwingComponent()), BorderLayout.CENTER); } COM: <s> adds the content </s>
funcom_train/16524095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addTabForTileset(TileSet tileset) { TilePalettePanel tilePanel = new TilePalettePanel(); tilePanel.setTileset(tileset); tilePanel.addTileSelectionListener(this); JScrollPane paletteScrollPane = new JScrollPane(tilePanel, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); addTab(tileset.getName(), paletteScrollPane); } COM: <s> adds a tab with a </s>
funcom_train/29078305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String rebuild() { StringBuffer newRecord = new StringBuffer(); for (int i = 0; i < segs.size(); i++) { newRecord.append(((Hl7Segment) segs.get(i)).rebuild()+sep0); } changeRecord(newRecord.toString()); return newRecord.toString(); } COM: <s> rebuilds the record from the segments in case they </s>
funcom_train/15862538
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void randomInitialState(){ int i=generateur.nextInt(longueur); int j=generateur.nextInt(largeur); while(!forme[i][j].isFree()){ i=generateur.nextInt(longueur); j=generateur.nextInt(largeur); } defaultCurrentState=new MazeState(i,j,this); oldState=defaultCurrentState; } COM: <s> set the initial state to any free position of the maze </s>
funcom_train/3141815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getMaxOutDegree() { Iterator i = getNodes().iterator(); Node maxNode = null; Node next = null; int maxOutgoingDegree = -1; while (i.hasNext()) { next = (Node) i.next(); int outDegree = 0; for (Iterator iter = getEdges(next).iterator(); iter.hasNext();) { Edge edge = (Edge) iter.next(); if (edge.getSource().equals(next)) outDegree++; } if (maxOutgoingDegree < outDegree) { maxNode = next; maxOutgoingDegree = outDegree; } } return maxNode; } COM: <s> determines a node with the maximal outgoing degree </s>
funcom_train/35575731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getEntry(){ String entry = null; synchronized (theLogQueue){ if (busy && theLogQueue.isEmpty()){ try{ theLogQueue.wait(); } catch (InterruptedException ie){ } } if (!theLogQueue.isEmpty()){ entry = (String) theLogQueue.remove(0); } } return entry; } COM: <s> h4 fetches or waits for the next log entry from the log queue </s>
funcom_train/21998854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkSettings() { final String error = graphUI.checkSettings(); if (error != null) JobsManager.getInstance() .submitBatchJob(ContinuousTrade.jobQueueBatch, new Runnable() { public void run() { MovOptionPane.showInternalMessageDialog(DesktopManager.getDesktop(), error, Localization.getString("ERROR_GRAPH_SETTINGS_TITLE"), JOptionPane.ERROR_MESSAGE); } }, 0, "GraphSettingsDialog", "checkSettings ERROR_GRAPH_SETTINGS_TITLE"); return (error == null); } COM: <s> check the settings entered by the user </s>
funcom_train/17983670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String addColumnStatement(Column column, String tableName) { Validator.notNull(column, "Column can not be null"); Validator.notNull(tableName, "Table name can not be null"); StringBuffer alter = new StringBuffer(); alter.append("ALTER TABLE ") .append(wrapName(tableName)) .append(" ADD ") .append(makeColumnString(column, false)); return alter.toString(); } COM: <s> generates a statement to add a new column to a table </s>
funcom_train/35212252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateView() { MainView.LOGGER.debug("updating main view"); TreePanel.getInstance().updateView(); if (MainApp.getInstance().getModel() == null) { ViewPanel.getInstance().showView(null); } this.panel.revalidate(); MainView.LOGGER.debug("update finished"); } COM: <s> called when the view should be updated </s>
funcom_train/16911757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPriorityView(boolean visibility) { if (visibility == true) { priorityText = new PText("" + neuron.getUpdatePriority()); priorityText.setFont(PRIORITY_FONT); setPriorityTextPosition(); addChild(priorityText); } else { if (priorityText != null) { removeChild(priorityText); } } } COM: <s> toggles the visibility of the priority view text label </s>
funcom_train/13692922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateLinks(GuiLink link){ GuiLink tmplink; for(Enumeration en = links.elements(); en.hasMoreElements();) { tmplink = (GuiLink)en.nextElement(); if (tmplink == null) continue; if (link.id == tmplink.id) { tmplink = link; } } setNodes(nodes); setLinks(links); repaint(); } COM: <s> updates the link vector </s>
funcom_train/33413328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int store( Connection conn, T ... beans ) throws SQLException { String sql = this.getStoreStatement(); Log.TRACE_CMD("store", sql ); PreparedStatement ps = conn.prepareStatement(sql); int result = 0; for( T bean : beans ) { ps.clearParameters(); this.setStoreStatement( ps, bean ); result += ps.executeUpdate(); } ps.close(); return result; } COM: <s> update bean into db </s>
funcom_train/29504840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Format findFormatByCode(Integer code) throws Exception { try { return (Format)manager.createQuery("from Format f where f.code = :x").setParameter("x",code).getSingleResult(); } catch (Exception e) { log.error("findFormatByCode("+code+") - Failed to find format: "+e); throw e; } } COM: <s> returns the format with the code specified </s>
funcom_train/3528189
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { ResourceId resourceId; if (obj instanceof ResourceId) { resourceId = (ResourceId) obj; return getNamespace() == resourceId.getNamespace() && getStore() == resourceId.getStore() && uuri.equals(resourceId.uuri); } else { return false; } } COM: <s> tests equivalence of two resource ids </s>
funcom_train/50863064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getTerrainGrade(Direction direction) { // Determine the terrain grade in a given direction from the vehicle. SurfaceFeatures surface = Simulation.instance().getMars().getSurfaceFeatures(); TerrainElevation terrain = surface.getSurfaceTerrain(); return terrain.determineTerrainDifficulty(getCoordinates(), direction); } COM: <s> gets the average angle of terrain over next 7 </s>
funcom_train/5868606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void afterValidate(Event event) throws WrongValueException{ Execution exec = Executions.getCurrent(); List wvList = (List)exec.getAttribute(WRONG_VALUE_KEY); if(wvList==null) return; exec.removeAttribute(WRONG_VALUE_KEY); if(wvList.size()>0) throw (WrongValueException)wvList.get(0); } COM: <s> validate input when on binding validate </s>
funcom_train/46570108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int index(AdapterNode child) { int count = childCount(); for (int i = 0; i < count; i++) { AdapterNode n = this.child(i); if (child.domNode == n.domNode) return i; } return -1; // Should never get here. } COM: <s> returns the index of child of this </s>
funcom_train/43245604
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTypeOfDisposition() { System.out.println("setTypeOfDisposition"); String typeOfDisposition = ""; ApplicationObject instance = new ApplicationObject(); instance.setTypeOfDisposition(typeOfDisposition); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set type of disposition method of class org </s>
funcom_train/15601242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void m_Reconnect() throws UnknownHostException, IOException { // Try to connect to the server m_Socket = new Socket(m_ServerHost, m_ServerPort); m_Handler.start(this, new BufferedInputStream(m_Socket.getInputStream()), new BufferedOutputStream(m_Socket.getOutputStream()), true, "Server"); } COM: <s> p trying to reconnect from a disconnected server </s>
funcom_train/26486301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void about() { String msg = I18N.get("DesignWin.about_1") + info.Version + "\n" + I18N.get("DesignWin.about_2") + "\n" + info.URL + "\n\n" + info.Copyright + ".\n\n" + I18N.get("DesignWin.about_3"); JOptionPane.showMessageDialog(null, msg, I18N.get("DesignWin.about_title"), JOptionPane.PLAIN_MESSAGE); } COM: <s> opens the about box </s>
funcom_train/40505635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Muscle getMuscle(Element e) { String node1key = e.getAttribute("a"); String node2key = e.getAttribute("b"); Double restLength = Double.parseDouble(e.getAttribute("restlength")); Double amplitude = Double.parseDouble(e.getAttribute("amplitude")); Double phase = Double.parseDouble(e.getAttribute("phase")); return new Muscle(map.get(node1key), map.get(node2key), restLength, amplitude, phase); } COM: <s> get the muscle object from an xml tree element </s>
funcom_train/23067397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildDocument(String collageName, String collageId, Document document) { if (collageId == null) { return; } entitySearcher.flushAnyChanges(); List entityDocuments = entitySearcher.findAllForCollageId(collageName + "." + collageId); for (Iterator iter = entityDocuments.iterator(); iter.hasNext();) { Document entityDocument = (Document) iter.next(); mergeDocuments(document, entityDocument, true); } } COM: <s> for a given collage find the the unique document that represents it based </s>
funcom_train/13629795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void framerateDelay() { long current_ticks; long target_ticks; long the_delay; /* * Next frame */ framecount++; /* * Get/calc ticks */ current_ticks = SDLTimer.getTicks(); target_ticks = lastticks + (framecount * (long) rateticks); if (current_ticks <= target_ticks) { the_delay = target_ticks - current_ticks; try { SDLTimer.delay(the_delay); } catch (InterruptedException e) { } } else { framecount = 0; lastticks = SDLTimer.getTicks(); } } COM: <s> delay execution to maintain a constant framerate </s>
funcom_train/34354561
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T get(URI uri) throws DataAccessException { synchronized (application) { T result = cache.get(uri); if (result == null) { if (failedRetrievals.contains(uri)) { throw new DataAccessException("The document is not available: " + uri); } try { result = getDocument(uri); } catch (DataAccessException e) { failedRetrievals.add(uri); throw e; } if (result == null) { cache.put(uri, result); } } return result; } } COM: <s> retrieves a document either from cache or from the network </s>
funcom_train/51100220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createTable(DbEntity ent) { // SET SCHEMA <schemaname> String sql = super.createTable(ent); if (sql != null && sql.toUpperCase().startsWith("CREATE TABLE ")) { sql = "CREATE CACHED TABLE " + sql.substring("CREATE TABLE ".length()); } return sql; } COM: <s> uses create cached table instead of create table </s>
funcom_train/32750701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sortElementsByPosition(ArrayList allElements) { Collections.sort(allElements, new Comparator() { /** Comparator for the sortElementsByPosition member function. */ public int compare(Object obj1, Object obj2) { double p1 = ((Element) obj1).getPosition(); double p2 = ((Element) obj2).getPosition(); return Double.compare(p1, p2); } }); } COM: <s> sort lattice elements by their position </s>
funcom_train/787735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveEvent(MouseEvent e) { Display d = (Display)e.getSource(); d.getAbsoluteCoordinate(e.getPoint(), m_tmp); for ( int i=0; i<m_layouts.length; i++ ) m_layouts[i].setLayoutAnchor(m_tmp); runAction(e); } COM: <s> registers a mouse move event updating the anchor point for all </s>
funcom_train/3710133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildList() { int nspectra = fd.getNExtens(); data = new String [nspectra][]; // file descriptors support 1-indexed spectra ! for (int i = 0; i < data.length; i++) { data[i] = fd.getSpecRepresentation(i+1, i+1); } String[] title = fd.getSpecRepresentation (0, 0); buildBasicList (data, title); } COM: <s> populates the list object with information from all spectra in </s>
funcom_train/4822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWeight(String itemName, float weight){ //check parameters if(itemName == null){ throw new IllegalArgumentException("Null parameter given to Weights object."); } if(weight < 0.0f || weight > 1.0f){ throw new IllegalArgumentException("The weights must be between 0.0 and 1.0 (inclusive)"); } //set the weight value this.m_weights.put(itemName, new Float(weight)); } COM: <s> sets the weight for the given type of item </s>
funcom_train/23982244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof EarthLocationLite)) { return false; } EarthLocationLite that = (EarthLocationLite) obj; return lat.equals(that.lat) && lon.equals(that.lon) && alt.equals(that.alt); } COM: <s> indicates if this tuple is identical to an object </s>
funcom_train/29414541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void critterMove() { // TODO: Crittermove should be completely located in the Whirli object. This whole double-looping crap should go away. int current; // If we're counting predator turns, subtract one now //if(tire_count > 0) tire_count--; for(current=0; current!=whirlis.length; current++) { crittercalc(current); } } COM: <s> do an iteration on the whirlis for movement </s>
funcom_train/8826777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnabled(Context ctx, boolean enabled) { int en = enabled ? 1 : 0; if (en == this.enabled) return; DatabaseHelper dbHelper = new DatabaseHelper(ctx); SQLiteDatabase db = dbHelper.getWritableDatabase(); String update = "update music_api set enabled = " + en + " where _id = " + this.id; db.execSQL(update); this.enabled = en; dbHelper.close(); } COM: <s> enables disables scrobbling from this api music app </s>
funcom_train/51337865
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Properties getProperties() { final Properties properties = new Properties( super.getProperties() ); // Note: test requires data on disk. properties.setProperty(Options.BUFFER_MODE, BufferMode.Disk .toString()); // Disable index copy - overflow will always cause an index segment build. properties.setProperty(Options.COPY_INDEX_THRESHOLD,"0"); return properties; } COM: <s> forces the use of persistent journals so that we can do overflow </s>
funcom_train/51338432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_roundTrip01() throws IOException, ClassNotFoundException { assertRoundTrip(tps); tps.set("foo", t1, "bar"); assertRoundTrip(tps); tps.set("foo", t2, "baz"); assertRoundTrip(tps); tps.set("foo", t3, null); assertRoundTrip(tps); } COM: <s> tests a series of bindings for one property </s>
funcom_train/2578190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Size2D arrangeNN(Graphics2D g2) { Rectangle2D contentSize = new Rectangle2D.Double(); if (this.line != null) { contentSize.setRect(this.line.getBounds2D()); } if (this.shape != null) { contentSize = contentSize.createUnion(this.shape.getBounds2D()); } return new Size2D(contentSize.getWidth(), contentSize.getHeight()); } COM: <s> performs the layout with no constraint so the content size is </s>
funcom_train/48706084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeCustomEntryType(CustomEntryType tp, int number) { String nr = ""+number; put(CUSTOM_TYPE_NAME+nr, tp.getName()); putStringArray(CUSTOM_TYPE_REQ+nr, tp.getRequiredFields()); putStringArray(CUSTOM_TYPE_OPT+nr, tp.getOptionalFields()); } COM: <s> stores all information about the entry type in preferences with </s>
funcom_train/13196327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { PieceFactory factory = PieceFactory.newInstance(gameEnv); pieceMap = new HashMap(); List goldList = new ArrayList(); List scarletList = new ArrayList(); pieceMap.put(Player.GOLD, goldList); pieceMap.put(Player.SCARLET, scarletList); /* Create pieces according to PieceConfigurations */ initializePieceList(factory, PieceConfiguration.GOLD, goldList); initializePieceList(factory, PieceConfiguration.SCARLET, scarletList); } COM: <s> creates the lists of pieces for both players and fills them </s>
funcom_train/9489901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Ggb3DVector getPoint(double l1, double l2){ Ggb3DVector v=new Ggb3DVector(new double[] {l1,l2,1}); //Application.debug("v ="+v.toString()); Ggb3DVector r=getMatrix().mul(v); //Application.debug("getMatrix() ="+getMatrix().toString()); //Application.debug("r ="+ r.toString()); return r; } COM: <s> returns the point at position l1 l2 on the coord sys </s>
funcom_train/27849859
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSaveBases(int fort, int will, int ref){ super.getSaves().getFort().setBaseStat(fort); super.getSaves().getWill().setBaseStat(will); super.getSaves().getRef().setBaseStat(ref); } COM: <s> set the base saving throws of all three saving throws </s>
funcom_train/6343842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dumpCacheEntries() { log.debug("dumpingCacheEntries"); for (MemoryElementDescriptor me=first; me != null; me=me.next) { log.debug("dumpCacheEntries> key="+me.ce.getKey()+", val="+me.ce.getVal()); } } COM: <s> dump the cache entries from first to list for debugging </s>
funcom_train/28343895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNewProbe(Probe aProbe) { probe = aProbe; bPropagated = false; if (probe instanceof EnvelopeProbe) { initProbeState = (EnvelopeProbeState) probe.createProbeState(); //initTwiss = ((EnvelopeProbe) probe).getTwiss(); initTwiss = ((EnvelopeProbe) probe).getCorrelation().computeTwiss(); } // notify the new probe notifyListeners(ModelProxyListener.PROBE_CHANGED); } COM: <s> setter for a new probe </s>
funcom_train/39998731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node getNativeTree() { IIOMetadataNode root = new IIOMetadataNode(nativeMetadataFormatName); IIOMetadataNode node = new IIOMetadataNode("imageDimensions"); node.setAttribute("imageWidth", Integer.toString(imageWidth)); node.setAttribute("imageHeight", Integer.toString(imageHeight)); root.appendChild(node); return root; } COM: <s> returns the image metadata in a tree using the following format element </s>
funcom_train/38905376
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTextFieldZadani3() { if (textFieldZadani3 == null) {//GEN-END:|56-getter|0|56-preInit // write pre-init user code here textFieldZadani3 = new TextField("", null, 32, TextField.ANY);//GEN-LINE:|56-getter|1|56-postInit // write post-init user code here }//GEN-BEGIN:|56-getter|2| return textFieldZadani3; } COM: <s> returns an initiliazed instance of text field zadani3 component </s>
funcom_train/2484763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void goToNextState() { String nextTransitionName = currentState.nextTransition(inputSource); S nextState = stateMachineDescription.findNextState(currentState, nextTransitionName); if (nextState == null) { throw new InvalidStateTransitionException( "Could not transition to next state (transition name was '" + nextTransitionName + "')"); } notifyExitListeners(currentState); notifyEnterListeners(nextState); this.currentState = nextState; } COM: <s> performs a single state transition and fires the requisite </s>
funcom_train/33382356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refreshData(PAGE_NAME pageNameSelected) { TreeViewer treeViewer = getTreeViewer(); treeViewer.setContentProvider(contentProvider); treeViewer.setLabelProvider(labelProvider); treeViewer.addSelectionChangedListener(this); // if (pageNameSelected == PAGE_NAME.CRUD) { treeViewer.setInput(getRootNode()); configureContextMenu(); // } else { // treeViewer.setInput(null); // } treeViewer.expandAll(); } COM: <s> reload outline content </s>
funcom_train/5461832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawlCalScaleProperty(Property property, Resource parentNode, RDFContainer rdfContainer) { String value = property.getValue(); if (value.equals(CalScale.GREGORIAN.getValue())) { addStatement(rdfContainer, parentNode, NCAL.calscale, NCAL.gregorianCalendarScale); } } COM: <s> crawls the calscale property </s>
funcom_train/5546082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void isItemAlreadyInBasket(int iProdId) throws DataStoreException { int iRowCnt = _dsShoppingCart.getRowCount(); if(iRowCnt<1) return; //iterate throught the datastore rows and compare the product ID... for(int i=0 ; i< iRowCnt ;i++){ int iCurProdId = _dsShoppingCart.getInt(i, _dsShoppingCart.DSSHOPPINGCART_BKT_PROD_ID); if(iCurProdId == iProdId){ _dsShoppingCart.removeRow(i); return; } } } COM: <s> check if the product is alreay in the cart </s>
funcom_train/3340917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setJMenuBar(JMenuBar menubar_) { _menubar = menubar_; super._insets = new Insets(2, 1, 1, 1); /* * Insert the menubar as the first component so that it will be the * first to get the keyboard focus. */ super._components.insertElementAt(menubar_, 0); menubar_.setParent(this); menubar_.doLayout(); } COM: <s> sets the menubar for this frame </s>
funcom_train/46161462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeDescendant(VisualDeletedMessage visualDeletedMessage) { if (getChildren() != null) { Collection<Spatial> childrenCopy = Collections.unmodifiableCollection(getChildren()); for (Spatial child : childrenCopy) { if (child instanceof VisualParent) { ((VisualParent) child).removeDescendant(visualDeletedMessage); } } } } COM: <s> recursively pass the removal message down to child nodes removing </s>
funcom_train/3721016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHL7Version(String HL7Version) throws java.beans.PropertyVetoException { String oldHL7Version = this.HL7Version; vetoableChangeSupport.fireVetoableChange("HL7Version", oldHL7Version, HL7Version); this.HL7Version = HL7Version; propertyChangeSupport.firePropertyChange("HL7Version", oldHL7Version, HL7Version); } COM: <s> setter for property hl7 version </s>
funcom_train/4744942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void info(Object message, Throwable t) { if(is12) { getLogger().log(FQCN, (Priority) Level.INFO, message, t ); } else { getLogger().log(FQCN, Level.INFO, message, t ); } } COM: <s> log an error to the log4j logger with code info code priority </s>
funcom_train/41209411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPressedStyle(Style style) { if (pressedStyle != null) { pressedStyle.removeStyleListener(this); } pressedStyle = style; pressedStyle.addStyleListener(this); if (pressedStyle.getBgPainter() == null) { pressedStyle.setBgPainter(new BGPainter()); } setShouldCalcPreferredSize(true); checkAnimation(); } COM: <s> sets the component style for the pressed state allowing us to manipulate </s>
funcom_train/331026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startNextTask() { int nTasks = taskList.size(); if (nTasks == 0) { pamController.enableGUIControl(true); return; } Runnable nextTask = taskList.get(0); if (SwingWorker.class.isAssignableFrom(nextTask.getClass())) { SwingUtilities.invokeLater(new ScheduledWorkerTask((SwingWorker) taskList.get(0))); } else { SwingUtilities.invokeLater(nextTask); taskList.remove(0); startNextTask(); } } COM: <s> start the next task in the list </s>
funcom_train/9430773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void populateSourcePreference() { for (SuggestionSource source : mSources.getSuggestionSources()) { Preference pref = createSourcePreference(source); if (pref != null) { if (DBG) Log.d(TAG, "Adding search source: " + source); mSourcePreferences.addPreference(pref); } } } COM: <s> fills the suggestion source list </s>
funcom_train/9297411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IJM2TProject getJM2TProject(IResource resource) { switch (resource.getType()) { case IResource.FOLDER: return getJM2TProject(((IFolder) resource).getProject()); case IResource.FILE: return getJM2TProject(((IFile) resource).getProject()); case IResource.PROJECT: return getJM2TProject(((IProject) resource)); default: throw new IllegalArgumentException( Messages.element_invalidResourceForProject); } } COM: <s> returns the active jm2 t project associated with the specified resource </s>
funcom_train/3926348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getLocation( int startLocation, SpaceEntitySet iLocations, float[] result ) { int counter = 0; iLocations.clearFloats( result ); while (( startLocation < listSize ) && ( ilist[ startLocation ] != -1 )) { iLocations.sumFloats( ilist[startLocation++], result ); } } COM: <s> get the location of an element from an ilist </s>
funcom_train/27937167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LayoutHConstraints getLayoutConstraints(Class layoutClass) { UIHConfig defaultConfig = getDefault(); if(layoutHConstraintsMap != null) { LayoutHConstraints layoutHConstraints = (LayoutHConstraints)layoutHConstraintsMap.get(layoutClass); if(layoutHConstraints != null || this == defaultConfig) { return layoutHConstraints; } } return defaultConfig.getLayoutConstraints(layoutClass); } COM: <s> get the layout constraints handler associated to a layout class </s>
funcom_train/40470370
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int result = 19; result = 37 * result + (int) ((long)this.segmentSize ^ ((long)this.segmentSize >>> 32)); result = 37 * result + (int) ((long)this.startTime ^ ((long)this.startTime >>> 32)); return result; } COM: <s> returns a hash code for this object </s>
funcom_train/5866071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getEncodedURL() { if (_image != null) return Utils.getDynamicMediaURI( //already encoded this, _imgver, "c/" + _image.getName(), _image.getFormat()); final Desktop dt = getDesktop(); //it might not belong to any desktop return dt != null ? dt.getExecution() .encodeURL(_src != null ? _src: "~./img/spacer.gif"): ""; } COM: <s> returns the encoded url of the image never null </s>
funcom_train/8366884
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void terminateFault(int fault) { dispenseCtrl.allowSelection(false); switch (fault) { case FAULT_CHANGE: coinReceiver.storeCash(); break; case FAULT_STORECOIN: // do nothing break; case FAULT_DISPENSE: coinReceiver.refundCash(); break; } this.isActive=false; } COM: <s> if the transaction controller is informed that a fault was discovered while </s>
funcom_train/19779661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String concateString(Object[] objs, String sMiddle) { if (null == objs || objs.length < 1) return ""; // String s = ConvertUtil.objToString(objs[0], false); String s = CommonUtil.nullToString(objs[0]); for (int i = 1; i < objs.length; i++) s += sMiddle + CommonUtil.nullToString(objs[i]); return s; } COM: <s> concate the elements of objs using s middle </s>
funcom_train/18809017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void notifyListeners(final SeriesChangeEvent event) { final Object[] listenerList = this.listeners.getListenerList(); for (int i = listenerList.length - 2; i >= 0; i -= 2) { if (listenerList[i] == SeriesChangeListener.class) { ((SeriesChangeListener) listenerList[i + 1]).seriesChanged(event); } } } COM: <s> sends a change event to all registered listeners </s>
funcom_train/30075883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ModelAndView vosHandler(HttpServletRequest request, HttpServletResponse response) throws ServletException { Map model = new HashMap(); model.put("vos", gpir.getVos()); return new ModelAndView("vosView", "model", model); } COM: <s> custom handler for vos display </s>
funcom_train/3834232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void validateRequest( RPCWebEvent event ) throws CatalogClientException { Debug.debugMethodBegin(); RPCMethodCall mc = event.getRPCMethodCall(); RPCParameter[] para = mc.getParameters(); if ( para.length != 2 ) { throw new CatalogClientException( "Request / method call must contain " + "two parameters " ); } Debug.debugMethodEnd(); } COM: <s> validates the request to be performed </s>
funcom_train/1193898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getHelpCommand() { if (helpCommand == null) {//GEN-END:|406-getter|0|406-preInit // write pre-init user code here helpCommand = new Command(LocalizationSupport.getMessage("HELPELEMENT"), Command.HELP, 0);//GEN-LINE:|406-getter|1|406-postInit // write post-init user code here }//GEN-BEGIN:|406-getter|2| return helpCommand; } COM: <s> returns an initiliazed instance of help command component </s>
funcom_train/2586836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getValueCount(final Object key) { if (key == null) { throw new NullPointerException("Key must not be null."); } final List list = (List) this.table.get(key); if (list != null) { return list.size(); } return 0; } COM: <s> returns the number of elements registered with the given key </s>
funcom_train/47115779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int GetClumpId(String name) throws CompilerException { for(int i = 0; i < clumps.size(); i++) { if(clumps.get(i).getName().compareTo(name) == 0) { return i; } } //throw new CompilerException("Error clumpid not found! clumpid = " + name); return -1; } COM: <s> retrieves the clump id </s>
funcom_train/14464958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVeryHidden(boolean b){ int h = 0; if(b)h=Boundsheet.VERY_HIDDEN ; mysheet.setHidden(h); int t = mysheet.getSheetNum(); try{ // set the next sheet selected... Boundsheet s2 = mybook.getWorkSheetByNumber(t+1); s2.setSelected(true); }catch(WorkSheetNotFoundException e){;} } COM: <s> set whether this sheet is very hidden opening the file </s>
funcom_train/36003750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void process() { if (dataProvider != null) { if (pattern != null) { if (!setAttribute(attribute, Kuix.processI18nPattern(processBindPropertyVariables(pattern)))) { throw new IllegalArgumentException(attribute); } } else if (bindedProperties != null && bindedProperties.length == 1) { if (!setObjectAttribute(attribute, dataProvider.getValue(bindedProperties[0]))) { throw new IllegalArgumentException(attribute); } } } } COM: <s> process the bind instruction </s>
funcom_train/26385130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void useDirectoryView() { nCurrentTreeView = DIRECTORY_VIEW; this.removeAllChildren(); Iterator fileWalk = projectProperties.getJavaFiles().iterator(); while (fileWalk.hasNext()) { JavaFile javaFile = (JavaFile) fileWalk.next(); appendToDirectoryView(javaFile); } } COM: <s> reconstructs the projects tree view based on directory structure </s>
funcom_train/45483296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillFromXml(Document doc) throws Exception { Element root = doc.getDocumentElement(); PWTableEntry tEntry = new PWTableEntry(root); // check name assertEquals("Checking name", TEST_NAME, tEntry.getName()); // check content assertEquals("Checking content", TEST_CONTENT, tEntry.getContent()); } COM: <s> read the pwtable entry in from xml and check its content </s>
funcom_train/38725392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveHTML(File file) { if (!GuiController.htmlFileFilter.accept(null, file.getName())) { file = new File(file.getPath() + ".html"); } HTMLReportGenerator hrg = new HTMLReportGenerator(); hrg.saveHTML(file, getActiveBrowsingController()); } COM: <s> saves a html representation of the active browsing controller to the </s>
funcom_train/37835929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createStyleDefinition() { return "<style type=\"text/css\">body {font-family:" + WtWindowManager.getInstance().getProperty("ui.logfont", FONT_NAME) + "; margin:12px} p {margin:4px 0px} a {color:#a00000} li, ul {margin-left:10px}</style>"; } COM: <s> style sheet for the scroll html areas </s>
funcom_train/10834945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkSuspended() { synchronized ( this.suspendLock ) { while ( this.suspendedSince != -1 ) { try { this.suspendLock.wait(MAX_SUSPEND_TIME); } catch (final InterruptedException ignore) { this.ignoreException(ignore); } if ( System.currentTimeMillis() > this.suspendedSince + MAX_SUSPEND_TIME ) { this.resume(); } } } } COM: <s> check if the queue is suspended and go into suspend mode </s>
funcom_train/26475967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int extractSuffixNr(String str,String pfx) { int val = ERROR; try { str = str.substring( pfx.length() ); } catch (IndexOutOfBoundsException e) { return ERROR; } try { val = Integer.parseInt(str); } catch (NumberFormatException e) { return ERROR; } return val; } COM: <s> extract suffix nr pfx5 5 </s>
funcom_train/3111171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMnemonic(String top, String menus, char c) { JMenuItem item = menubar.getMenuComponent(top, getTokenizer(menus)); if (item instanceof JMenu) { ((JMenu) item).setMnemonic(c); } item = popup.getMenuComponent(top, getTokenizer(menus)); if (item instanceof JMenu) { ((JMenu) item).setMnemonic(c); } } COM: <s> sets a mnemonic on a jmenu indiviudal menuitems should be controlled externally </s>
funcom_train/20270667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasConditionalAncestor(Node n) { for (Node ancestor : n.getAncestors()) { switch (ancestor.getType()) { case Token.DO: case Token.FOR: case Token.HOOK: case Token.IF: case Token.SWITCH: case Token.WHILE: case Token.FUNCTION: return true; } } return false; } COM: <s> return true if the node has any form of conditional in its ancestry </s>
funcom_train/28261898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute() { // Push extra register first, if 32 bit instruction // Double word will be stored as [cx[LSB][MSB] ecx[LSB][MSB]] because // stack is counting backwards in memory if (cpu.doubleWord) { cpu.setWordToStack(cpu.ecx); } // Get word at CX and assign to SS:SP cpu.setWordToStack(cpu.cx); } COM: <s> this pushes the word in cx onto stack top ss sp </s>
funcom_train/3946102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addParametersPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ItemType_parameters_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ItemType_parameters_feature", "_UI_ItemType_type"), ImscpRootv1p1p2Package.eINSTANCE.getItemType_Parameters(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the parameters feature </s>
funcom_train/18734356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResolvedType getSuperclass() { if (isObject) return null; ensureGenericSignatureUnpacked(); if (superclassSignature == null) { if (superclassName == null) superclassName = javaClass.getSuperclassName(); superclassSignature = getResolvedTypeX().getWorld().resolve(UnresolvedType.forName(superclassName)).getSignature(); } World world = getResolvedTypeX().getWorld(); ResolvedType res = world.resolve(UnresolvedType.forSignature(superclassSignature)); return res; } COM: <s> must take into account generic signature </s>
funcom_train/1959486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateEntry(ITableKey key, boolean reply, Node node, String direction) { TableEntry entry = (TableEntry) this.get(key); if (entry != null){ // the is in the HashTable and an entry was returned. // updated the entry and put it back in the HashTable. this.put(key, key.updateEntry(entry, reply, node, this.getHostname())); return true; } else return false; } COM: <s> method which updates an entry in the state table </s>
funcom_train/23791922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unsubscribeSlot(int nodeId, int slotId) { if(isRegistered) { Object[] arg = {incoming_port, name, nodeId, slotId}; OSCMessage msg = new OSCMessage("/unsubscribe/slot", arg); out.send(msg); } else { if(verbo > 2) System.err.println("\nSenseWorldDataNetwork warning: the client is not yet registered. Cannot unsubscribe from slots."); } } COM: <s> unubscribes from a specific slot on the network </s>
funcom_train/19725857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createPartControl(Composite parent) { viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); viewer.setContentProvider(new ViewContentProvider()); viewer.setLabelProvider(new ViewLabelProvider()); viewer.setSorter(new NameSorter()); viewer.setInput(getViewSite()); //hookDoubleClickAction(); getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(listener); //getSite().getPage().addSelectionListener(listener); } COM: <s> this is a callback that will allow us </s>