__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/7928371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRolesAsInt(int i) { if ((i & 2) > 0) this.roles.add(AccountRole.ENTRYAMINISTRATOR); if ((i & 4) > 0) this.roles.add(AccountRole.FEEDAMINISTRATOR); if ((i & 8) > 0) this.roles.add(AccountRole.USERADMINISTRATOR); } COM: <s> sets the roles from a int representation </s>
funcom_train/30275749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNewExternalSessionId(String mainSessionId) throws DashboardException { try { DashboardSession oldSession = DashboardSessionManager.getInstance() .getSession(mainSessionId); return addNewExternalSession(oldSession); } catch (DashboardException e) { if (LOG.isWarnEnabled()) { LOG.warn("Getting new external session in Dashboard failed" + ", mainSessionId = " + mainSessionId + ", message:" + e.getMessage()); } throw e; } } COM: <s> add new external session </s>
funcom_train/12922915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Place3 setDepth(final Integer aNumber) { if ((aNumber != null) && ((aNumber < 1) || (aNumber > Coder.USHORT_MAX))) { throw new IllegalArgumentRangeException( 1, Coder.USHORT_MAX, aNumber); } depth = aNumber; return this; } COM: <s> sets the number of layers that this object will mask </s>
funcom_train/38215513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String serverCookie(){ StringBuffer response=new StringBuffer("Set-Cookie: "); response.append(Name+"="+(version>0?"\"":"")+Value+(version>0?"\"":"")+";"); if (!Domain.equals("")){ response.append("Domain="+(version>0?"\"":"")+Domain+(version>0?"\"":"")+";"); } if (age!=-1){ if(version>0){ response.append("Max-Age=\""+age+"\";"); }else{ response.append("Expires="+dateConverter(age)+";"); } } if (!Path.equals("")){ response.append("Path="+(version>0?"\"":"")+Path+(version>0?"\"":"")+";"); } if (Secure){ response.append("Secure;"); } if (version>0){ response.append("Version="+(version>0?"\"":"")+version+(version>0?"\"":"")); } String res=response.toString(); if (res.endsWith(";")){ res=res.substring(0,res.length()-1); } return res; } COM: <s> generates a server generated set cookie statement </s>
funcom_train/44880953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName(AbstractJavaEntity fieldOrMethod) { String fieldName = null; if (fieldOrMethod instanceof JavaField) { fieldName = fieldOrMethod.getName(); } else if (fieldOrMethod instanceof JavaMethod) { fieldName = ((JavaMethod) fieldOrMethod).getPropertyName(); } return fieldName; } COM: <s> an utility method to obtains the expected field name in mapping file </s>
funcom_train/41163337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(AgAnnouncement entity) { EntityManagerHelper.log("saving AgAnnouncement instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved ag announcement entity </s>
funcom_train/42642900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCreationPlacePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IElement_creationPlace_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IElement_creationPlace_feature", "_UI_IElement_type"), DigitalHPSPackage.Literals.IELEMENT__CREATION_PLACE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the creation place feature </s>
funcom_train/1962052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void commit() { for(Committable c : transactions) { try { if(Controller.DEBUG) System.out.println("Committing transaction " + c); for(PreparedStatement ps : c.getSQL(conn)) { query(ps); } transactions.remove(c); } catch(SQLException e) { System.err.println("Transaction \"" + c + "\" caused an SQL Exception: " + e.getMessage()); } } } COM: <s> flush the cache of queries </s>
funcom_train/16830624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void compact() { if (keys.length > size) { Class<?>[] newKeys = new Class<?>[size]; Object[] newVals = new Object[size]; System.arraycopy(keys, 0, newKeys, 0, size); System.arraycopy(values, 0, newVals, 0, size); keys = newKeys; values = newVals; } } COM: <s> reduces memory consumption to the minimum for representing the values </s>
funcom_train/10519326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Hashtable getFiles(){ if (files != null){ return files; } files = new Hashtable(); DirectoryScanner ds = getDirectoryScanner(viewpath); String[] includes = ds.getIncludedDirectories(); addElements(files, ds.getBasedir(), includes); includes = ds.getIncludedFiles(); addElements(files, ds.getBasedir(), includes); return files; } COM: <s> restrict the set of files directories to be processed </s>
funcom_train/51782477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dragControlPoint(int index, double xcoord, double ycoord) { double diffx = xcoord - anchor.getX(); double diffy = ycoord - anchor.getY(); moveDragPoint(index, diffx, diffy); dragConnectedSegmentPointBefore(index, diffx, diffy); dragConnectedSegmentPointAfter(index, diffx, diffy); meltinNextToOuterPoints(); restoreConnectionToNode(); } COM: <s> top level method for dragging a control point </s>
funcom_train/35730172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHandler( T handler ) { Class eventClass = handler.getEventClass(); List<T> list = this.handlersMap.get( eventClass ); // Create the map entry if not there yet. if( null == list ){ list = new ArrayList(); this.handlersMap.put( eventClass, list ); } // Skip if we already have this one registered. else{ if( list.contains( handler ) ) return; } list.add( handler ); } COM: <s> add a handler listener for an event type class </s>
funcom_train/50505462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSourcePartner(IPropertyInfo property){ List partnerList = getPartners(); Iterator iter = partnerList.iterator(); while (iter.hasNext()) { RelationshipPartner partner = (RelationshipPartner)iter.next(); if(partner.getField().equals(property)) return true; } return false; } COM: <s> checks beans if they are a partner return true else false </s>
funcom_train/25567743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Icon newIcon(String iconName) { File file = new File(getFullPath(iconName)); if(!file.exists()){ if(getParent()!=null) return getParent().getIcon(iconName); return null; } try { return new ImageIcon((BufferedImage) MethodCaller.call( "org.apache.sanselan.Sanselan", null, "getBufferedImage", new Object[]{file}) ); } catch (Throwable e) { return new ImageIcon(file.getPath()); } } COM: <s> creates icon from file with the given name </s>
funcom_train/11533088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearFilters() { _filters.clear(); _filters.add(new ScanIdentifierFilter(_engineType, ScriptingConst.ENGINE_TYPE_JSF_ALL, ScriptingConst.ENGINE_TYPE_JSF_NO_ENGINE)); _filters.add(new StandardNamespaceFilter()); } COM: <s> clears the entire filter map </s>
funcom_train/7411139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getAllInstructions() { List l = new ArrayList(); Iterator it = instructions.iterator(); while (it.hasNext()) { Instruction ins = (Instruction) it.next(); if (ins instanceof Sequence) l.addAll(((Sequence) ins).getInstructions()); else l.add(ins); } return l; } COM: <s> returns a list of all instructions in this code attribute this list </s>
funcom_train/43245849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetBNStreetAddr2() { System.out.println("setBNStreetAddr2"); String bNStreetAddr2 = ""; EmergencyContactDG5Object instance = new EmergencyContactDG5Object(); instance.setBNStreetAddr2(bNStreetAddr2); // 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 bnstreet addr2 method of class org </s>
funcom_train/16258679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BigDecimal pow(double base, int expornent) { BigDecimal value; if (expornent > 0) { value = new BigDecimal(new Double(base).toString()).pow(expornent); } else { value = BigDecimal.ONE.divide(new BigDecimal(new Double(base) .toString()).pow(-expornent)); } return value; } COM: <s> calculates the value of the first argument raised to the power of the </s>
funcom_train/21465428
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addSource(DataSource source, String fieldName){ //verify if this source already exists for(Condition cond : perception){ if(cond.getSource().equals(source)){ System.err.println("ERROR: source " + source.toString() + " already exists"); return false; } } //create the new condition Condition cond = new Condition(source,null); //associate condition to datasource instance source.getInstance().setAssociatedCondition(fieldName,cond); //add this source as a new instance in the perception value return perception.add(cond); } COM: <s> adds a new data source to the perception </s>
funcom_train/5580440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _new() { UserBean ub = new UserBean(); int i = JOptionPane.showConfirmDialog(this, ub, "New User", JOptionPane.OK_CANCEL_OPTION); if (i == JOptionPane.OK_OPTION) { if (ub.isUser()) { User u = ub.getUser(); _newAccount(u); } else { JOptionPane.showMessageDialog(this, "Invalid user entries...", "New User", JOptionPane.ERROR_MESSAGE); return; } } } COM: <s> create a new user </s>
funcom_train/36747874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isEmpty() { // getValue() also handles read-through mode Object value = getValue(); return (value == null) || ((wrappedField instanceof AbstractSelect) && ((AbstractSelect) wrappedField).isMultiSelect() && (value instanceof Collection) && ((Collection) value) .isEmpty()); } COM: <s> is the field empty </s>
funcom_train/42944410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSoLinger(int timeoutSec) throws SocketException { if (this.tcpClient != null) { if (timeoutSec <= 0) { this.tcpClient.setSoLinger(false, 0); // no linger } else { this.tcpClient.setSoLinger(true, timeoutSec); } } } COM: <s> enable disable so linger with the specified linger time in seconds </s>
funcom_train/26630363
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ConnectionListener (int port) { try { serversocket = new ServerSocket(port); serversocket.setSoTimeout(TIMEOUT); } catch (BindException b) { System.out.println(b.getMessage()); // System.out.println("Port " + PORT + " is already in use. Another instance of the server may be running"); } catch (IOException e) { System.out.println(e.getMessage()); //e.printStackTrace(); } listening = true; System.out.println("ConnectionListener is listening on port " + port); } COM: <s> create a new code connection listener code which listens on the </s>
funcom_train/37833816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkOnline() { if ((target == null) || (target.isGhost() && (sender.getAdminLevel() < AdministrationAction.getLevelForCommand("ghostmode")))) { sender.sendPrivateText("No player named \"" + targetName + "\" is currently active."); return false; } return true; } COM: <s> confirm that target is online at this time </s>
funcom_train/24251222
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveConfiguration() { editingPreference.reloadConfiguration(getSelectedPreferenceType(), contentPanel); String newGroupName = editingPreference .getConfigurationValue(DefaultConfigurations.GROUP_NAME); if (!editingPreference.getParentGroup().getName().equals(newGroupName)) { parentTable.getPreferences().movePreferenceToNewGroup( editingPreference, newGroupName); } contentPanel.getCurrentCard().setSaved(); updateSaveButton(); fireSaveListeners(); } COM: <s> saves the current configuration to the selected user editable preference </s>
funcom_train/28294237
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getObjMeasureWeight() { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - " + "getObjMeasureWeight"); System.out.println(" ::--> " + mObjMeasureWeight); System.out.println(" :: SeqActivity --> END - " + "getObjMeasureWeight"); } return mObjMeasureWeight; } COM: <s> retrieves the value of the rollup objective measure weight sequencing </s>
funcom_train/25099114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsRemovedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_VehicleFeature_isRemoved_feature"), getString("_UI_PropertyDescriptor_description", "_UI_VehicleFeature_isRemoved_feature", "_UI_VehicleFeature_type"), VehiclefeaturemodelingPackage.Literals.VEHICLE_FEATURE__IS_REMOVED, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is removed feature </s>
funcom_train/165387
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColor(String color) { if (color == null) { this.color = WHITE; } else { if (hexColorMatcher.reset(color).find()) { this.color = hexColorMatcher.group(); } else { throw new IllegalArgumentException("Unknown color: " + color); } } } COM: <s> sets the padding color used only when mode is </s>
funcom_train/17755878
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { TreeViewer viewer = getTreeViewer(); if (viewer != null) { Control control = viewer.getControl(); if (control != null && !control.isDisposed()) { viewer.removeSelectionChangedListener(this); control.setRedraw(false); viewer.setInput(fInput); // viewer.expandAll(); control.setRedraw(true); selectSegment(fEditor.getCursorLine(), true); viewer.addSelectionChangedListener(this); } } } COM: <s> updates the outline page </s>
funcom_train/16092621
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean renameHeader(String key, String newKey) { for (int i = 0; i < headerList.size(); ++i) { if (headerList.get(i).getKey().equals(key)) { headerList.set(i, new Header(newKey, headerList.get(i) .getValue())); return true; } } return false; } COM: <s> renames given header </s>
funcom_train/15400684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWetRead(WetReadDTO wr) { _wr = wr; // Completely new data, so we clear the current selection. _rfvTable.clearSelection(); // Set the new reason list. _rfvModel.setData(_wr.getReasons().toArray()); // Set the new comment. _commentsTA.setText(_wr.getComment()); } COM: <s> sets the wet read dto whose information should be displayed </s>
funcom_train/50585346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void convert(final File outputDir, final File file) throws Exception { OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(new File(outputDir, file.getName())), "UTF-8"); out.write(convert(file)); out.close(); } COM: <s> converts a specified file and puts output file in a specified directory </s>
funcom_train/8221160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addConversationForUrl(HttpUrl url, ConversationID id) { List clist = (List) _urlConversations.get(url); if (clist == null) { clist = new ArrayList(); _urlConversations.put(url, clist); } int index = Collections.binarySearch(clist, id); if (index < 0) clist.add(-index - 1, id); } COM: <s> adds the conversation for url </s>
funcom_train/25374534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void forceInsertAttributeAt(int position) { double[] newValues = new double[m_AttValues.length + 1]; System.arraycopy(m_AttValues, 0, newValues, 0, position); newValues[position] = Utils.missingValue(); System.arraycopy(m_AttValues, position, newValues, position + 1, m_AttValues.length - position); m_AttValues = newValues; } COM: <s> inserts an attribute at the given position </s>
funcom_train/12683638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getVariableData(Variable var, String expression){ String bpws = namespaces.getPrefix(getBPWSNS()); String result = bpws + ":getVariableData('" + var.getName() + "','" + var.getPart() + "')"; if (!expression.equals("")){ result += expression; } return result; } COM: <s> creates expression to get variable data </s>
funcom_train/27947167
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getCircleRadius(int z, double radius) { double raw = radius*atomSphereFactor; float depth = (float)(z - atomZOffset) / (2.0f*atomZOffset); float tmp = atomScreenScale * ((float)raw + atomDepthFactor*depth); return tmp < 0.0f ? 1.0f : tmp; } COM: <s> returns the on screen radius of an atom with the given radius </s>
funcom_train/45503495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void addExit( ExitCell exit ) throws IllegalArgumentException { // System.out.println( "Add Exit ist ausgeführt worden!" ); // if( exits.contains( exit ) ) { // throw new IllegalArgumentException( "Specified exit exists already in list exits." ); // } else { // exits.add( exit ); // } // } COM: <s> adds an exit cell to the list of all exits of the building </s>
funcom_train/37785155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPut() throws Exception { java.util.Random r = new java.util.Random( System.currentTimeMillis()); for( int i = 0; i < 30; i++ ) { int idx = r.nextInt( NUMBER_OF_VALUES ); String value = new String( Integer.toString(2000+i)); testValues.set(idx,value); table.put( new BigInteger(Integer.toString(idx)), value); } assertTrue( "testPut", compareValues()); } COM: <s> randomly replace 30 values and retest </s>
funcom_train/47171126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextToken getNextText(int fromHere, boolean skipEmpty) { int start = fromHere; while (start < elements.size()) { AbstractHTMLToken element = elements.get(start); if (element instanceof TextToken) { if (!skipEmpty || !isWhitespace(element)) { return (TextToken)element; } } start ++; } return null; } COM: <s> returns the next text token html token in the current file starting from </s>
funcom_train/6343404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() throws IOException { // remote.freeCache(cacheName); p( "disposing of remote cache" ); try { remote.dispose(cacheName); } catch(Exception ex) { p( "couldn't dispose" ); handleException(ex, "Failed to dispose " + cacheName); //remote = null; } } COM: <s> synchronously dispose the remote cache if failed replace the remote </s>
funcom_train/7335833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logAttributes() { if (log.isDebugEnabled()) { log.debug("Configuration Attributes"); log.debug("layoutID: " + layoutID); log.debug("docroot: " + docroot); log.debug("cachedir: " + cachedir); log.debug("columns: " + columns); log.debug("showAlbumname: " + showAlbumnames); log.debug("showPicturecount: " + showPicturecount); } } COM: <s> prints all attributes into the logger </s>
funcom_train/48190234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(PosVersion entity) { LogUtil.log("deleting PosVersion instance", Level.INFO, null); try { entity = entityManager.getReference(PosVersion.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 pos version entity </s>
funcom_train/21986854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL getContextURL() { if(context == null) { if(parent != null) { return parent.getContextURL(); } else { // return pwd try { return new URL("file://" + System.getProperty("user.dir") + System.getProperty("file.separator")); } catch(MalformedURLException e) { throw new AssertionError("Unable to read the present " + "working directory: " + e.getMessage()); } } } else { return context; } } COM: <s> returns the context url for the current scope </s>
funcom_train/9551439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renewDomain(String dmdURL,DomainCredentialType credential,String strDomainID) throws ServiceException,JAXBException { short transactionID = sessionList.newSession(PROTOCOL_RENEW_DOMAIN_1,dmdURL); authenticateReq(sessionList.getService(transactionID),dmdURL,"urn:DMDRenewDomainService","DMDRenewDomainProcessor",credential,strDomainID,transactionID); } COM: <s> this method is called when the renewal of a domain is requested </s>
funcom_train/43410788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RespostaString copyListaDestinatarios(String lg, String nomeNovaLista, String listaIDParaCopia) { EntidadesService entidades = new EntidadesService(lg); entidades.getConnectionDB(); RespostaString result = null; result = entidades.copyListaDestinatarios(nomeNovaLista, listaIDParaCopia); entidades.closeConnectionDB(); return result; } COM: <s> copy an personalized entities list creating another with specified name </s>
funcom_train/43540172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void logExit(String methodName, String... returnValues) { if (PlatformActivator.isOptionEnabled(DEBUG_OPTION_ENTRY_EXIT)) { List<StackTraceElement> callStack = getCallStackBefore("logExit"); //$NON-NLS-1$ logExit(methodName, callStack, returnValues); } } COM: <s> log exit log a statement that indicates a method exit has occurred </s>
funcom_train/37420694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getElementValue(Element element) { if (element == null) return ""; for (Node i = element.getFirstChild(); i != null; i = i.getNextSibling()) { if (i.getNodeType() == Node.TEXT_NODE) { return i.getNodeValue().trim(); } } return ""; } COM: <s> gets the value content of textnode of element </s>
funcom_train/29556114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void putInt( int index, int i ) { assertCapacity( index + 3); bytes[index + 3] = (byte) (i >>> 0); bytes[index + 2] = (byte) (i >>> 8); bytes[index + 1] = (byte) (i >>> 16); bytes[index + 0] = (byte) (i >>> 24); } COM: <s> write int lsb first </s>
funcom_train/28224829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActiveTrackable(final Trackable t) { activeTrackable = t; if (activeTrackable != null) { // Add mark. In the future we might support multiple active marks. if (markers.geMarks(Markers.Type.ACTIVE).isEmpty()) { markers.addMarker(new SpotMarker(t), Markers.Type.ACTIVE); } else { markers.geMarks(Markers.Type.ACTIVE).iterator().next() .setTrackable(t); } } else { markers.removeAllMarkers(Markers.Type.ACTIVE); } } COM: <s> set which trackable usually an agent or a place is selected at the </s>
funcom_train/6225105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintButtonPressed(Graphics g, AbstractButton b) { Border border=b.getBorder(); if(border==null || !(border instanceof ToolBarBorder)) { Insets insets=b.getInsets(); g.setColor(activeBorder); g.drawRect(insets.left, insets.top, b.getWidth()-insets.left-insets.right-1, b.getHeight()-insets.top-insets.bottom-1); } } COM: <s> paints the specified button in the pressed state </s>
funcom_train/46281810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IndexSearcher indexSearcher() throws OmmsIndexerException { try { if (m_isearcher == null) { m_isearcher = new IndexSearcher(directory()); } } catch (FileNotFoundException e) { //Nothing has been indexed yet. //e.printStackTrace(); return null; } catch (IOException e) { e.printStackTrace(); throw new OmmsIndexerException(ErrorCondition.internal_server_error , e.getMessage()); } return m_isearcher; } COM: <s> returns the index searcher </s>
funcom_train/10282218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void previewFeed(Object pSrc, XPersonalFeed feed) { mLog.info("previewFeed(), feed : " + feed); if (feed != null) { boolean mark = false; if (feed.getEnclosureSize() == 0) { mark = true; } feed.setInstruction(pSrc, true, true, mark, true, false, false); addFeedToCollect(feed); } } COM: <s> preview a feed </s>
funcom_train/28757976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVlink(String newVal) { if ((newVal != null && this.vlink != null && (newVal.compareTo(this.vlink) == 0)) || (newVal == null && this.vlink == null && vlink_is_initialized)) { return; } this.vlink = newVal; vlink_is_modified = true; vlink_is_initialized = true; } COM: <s> setter method for vlink </s>
funcom_train/12367425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCoordinateSystemInterval() { int coordinateSystemInterval = Integer.parseInt(this.coordinateSystemIntervalTextField.getText()); if (coordinateSystemInterval <= 0) { coordinateSystemInterval = 1; } svgSettingsService.setCoordinateSystemInterval(coordinateSystemInterval); scriptService.log(svgSettingsService, "setCoordinateSystemInterval", null, coordinateSystemInterval); } COM: <s> reads the value of the textfield of the coordinate system interval </s>
funcom_train/43220001
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IPluginFile getFirstFileByType() { if(fFiles == null) { createFileIterator(); } if(fFiles == null || fFiles[0] == null) { return null; } fCounter = 0; IPluginFile pluginFile = (fFiles[0]).getPluginFile(); currentFile = pluginFile; return pluginFile; } COM: <s> retrieves the first file in the directory supported by the viewer </s>
funcom_train/4470244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValueAt(final int row, final int col,final Object value) { final RowData data = (RowData)this.rowData.get(row); this.model.setValueAt(data.getModelIndex(), col, value); Timer timer = new Timer() { public void run() { updateRowData(data, row); } }; timer.schedule(10); } COM: <s> sets the value at the specified position in the table </s>
funcom_train/50911985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IntSet inRange(IntRange r) { int n = size(); IntSet temp = new IntSet(); for (int i = 0; i < n; i++) { if (r.isValid() && r.includes(array[i])) { temp.addElement(i); } } return temp; } COM: <s> get elements within a range </s>
funcom_train/51741287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(String className) { boolean passed = (this.includePattern == null ? true : this.includePattern.matcher(className).matches()) && (this.excludePattern == null ? true : !this.excludePattern.matcher(className) .matches()); SystemLog.debug("Class Name %s %s", className, passed ? " ... passed." : " ... failed."); return passed; } COM: <s> does the grunt work of deciding what gets included </s>
funcom_train/27792922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String parse(Reader aReader) { fBuffer = new StringBuffer(2000); fSubRules = new Stack(); fCurrentSubRule = new SubRule(); // Parse ANTLR grammar from given reader ANTLRLexer lexer = new ANTLRLexer(aReader); TokenBuffer tokenBuf = new TokenBuffer(lexer); ANTLRParser p = new ANTLRParser(tokenBuf, this, new OverviewTool()); p.setFilename("."); try { p.grammar(); } catch (Exception e) { AntlrCorePlugin.log(e); } String text = fBuffer.toString(); fBuffer = null; fSubRules = null; fCurrentSubRule = null; return text; } COM: <s> parse a file to generate the overview </s>
funcom_train/9557077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void storeGroupsToDelete() throws SQLException { // System.out.println("AddressBook Entity Bean: storeGroupsToDelete"); Iterator i = this.groupsToDelete.iterator(); makeConnection(); try { while (i.hasNext()){ ContactGroup group = (ContactGroup) i.next(); String deleteStatement = "delete from contactgroups where contactgroupId = ?"; PreparedStatement ps = connection.prepareStatement(deleteStatement); ps.setLong(1, group.groupId); ps.executeUpdate(); ps.close(); } } finally { releaseConnection(); this.groupsToDelete.clear(); } } COM: <s> deletes removed groups from database </s>
funcom_train/43391109
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runJava(String pBin,String pParams, String pStdOut, String pStdErr)throws IOException{ fw.write("java -jar "+pBin+" "+pParams+" >"+pStdOut+" 2>"+pStdErr+" \n"); fw.flush(); } COM: <s> generating start command for java job </s>
funcom_train/10749987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInterrupt_New() { Thread t = new Thread(); t.interrupt(); waitTime = waitDuration; while (!t.isInterrupted() && !(expired = doSleep(10))) { } if (expired) { fail("interrupt status has not changed to true"); } } COM: <s> interrupt a newly created thread </s>
funcom_train/23843907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String find(String name) { int i; if (attributes.size() == 0) return null; for (i = 0; i < attributes.size(); i++) { XMLAttribute a = (XMLAttribute)attributes.get(i); if (a.name == null) continue; else if (a.name.compareTo(name) == 0) return a.value; } return null; } COM: <s> retrieve the value associated with the attribute identified </s>
funcom_train/13363574
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List convertToNameValues(List src) { List trg = new ArrayList(); if (src != null) { for (int i = 0; i < src.size(); i++) { String name = (String) src.get(i); trg.add(new LabelValueBean(name, name)); } } return trg; } COM: <s> converts a list of strings to a list of label value bean objects </s>
funcom_train/33481264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertAllStaffs(Long trackedID) { dbAsync.insertStaffs(trackedID, arrStaff, new AsyncCallback<ServiceResult<Boolean>>() { @Override public void onFailure(Throwable caught) { caught.printStackTrace(); } @Override public void onSuccess(ServiceResult<Boolean> result) { if (result.isOK()) { hide(); if (callback != null) { callback.onApplyOperation(arrManage, arrStaff); } } else { MessageBox.alert(result.getMessage()); } } }); } COM: <s> insert all staff username in arr manage into database </s>
funcom_train/15522241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeAllSurveys(String[] ids) throws BusinessException { org.hibernate.Transaction transaction = super.begin(SurveyFactory .getInstance()); try { for (int i = 0; i < ids.length; i++) { Survey survey = (Survey) SurveyFactory.getInstance().findByKey( ids[i]); SurveyFactory.getInstance().remove(survey); } super.commit(transaction); } catch (DAOException daoe) { super.rollback(transaction); throw new BusinessException(daoe); } } COM: <s> removes a bunch of code survey code instances in a single transaction </s>
funcom_train/38828192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Point getPoint3(String s) { double x = getReal(s); if (Math.abs(x) < Constants.Grain) x = 0; double y = getReal(s); if (Math.abs(y) < Constants.Grain) y = 0; double z = getReal(s); if (Math.abs(z) < Constants.Grain) z = 0; return Point.valueOf(x,y,z, Constants.unit); } COM: <s> return 3 d point from string </s>
funcom_train/48410692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChildren(Canvas... children) { if(!isDrawn()) { setAttribute("children", children, false); } else { for (int i = 0; i < children.length; i++) { Canvas child = children[i]; addChild(child); } } } COM: <s> array of all canvii that are immediate children of this canvas </s>
funcom_train/26272960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buf = new StringBuffer("DefaultGlobMethodFinder{"); buf.append( "expression:`"+expression+"', "); buf.append( "pattern:"+pattern+", "); // buf.append( ); buf.append( " }" ); return buf.toString(); } COM: <s> prints the debuggable string </s>
funcom_train/14365654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setChartTitle(E transactions_p, boolean addListener_p, boolean renderingNeeded_p) { String chartTitle = getGraphicalComponentName(transactions_p, addListener_p); // Set chart title. if (null != chartTitle) { _chart.setTitle(chartTitle); if (renderingNeeded_p) { markDirty(); renderChart(true, false); } } } COM: <s> set chart name </s>
funcom_train/44493670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getTraceKeyValuePairs(Set keys, Map rowData){ Iterator it = keys.iterator(); String key; String traceMsg = "key=>value: "; while (it.hasNext()) { key = (String) it.next(); traceMsg += "'"+key+"'=>'"+rowData.get(key)+"' "; } return traceMsg; } COM: <s> traces the key value pairs to screen for debugging purposes </s>
funcom_train/51641474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(IJavaProject javaProject) { fJavaProject= javaProject; fPackageExplorer.addPostSelectionChangedListener(fHintTextGroup); fActionGroup.getResetAllAction().setBreakPoint(javaProject); if (Display.getCurrent() != null) { doUpdateUI(); } else { Display.getDefault().asyncExec(new Runnable() { public void run() { doUpdateUI(); } }); } } COM: <s> initialize the controls displaying </s>
funcom_train/37503885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object readResolve() { if (i != null) { // add a property change listener to inventory to forward // action point change i.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent ev) { if (propertyChangeSupport != null) { propertyChangeSupport.firePropertyChange (PROPERTY_AP, -1, getActionPoints()); } } }); } return this; } COM: <s> resolve this hero instance after deserialization </s>
funcom_train/29928052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getMaxAbsVal(ChromosomeLocus start) { double maxVal = 0.0; if (start == null) return maxVal; ChromosomeLocus locus = start; do { int cdtIndex = locus.getCdtIndex(); if (cdtIndex >= 0) { double abs = mapValues[cdtIndex]; if (abs == nodata) { // ignore nodata... } else { abs = Math.abs(abs); if (abs > maxVal) maxVal = abs; } } locus = locus.getRight(); } while ((locus != start) && (locus != null)); return maxVal; } COM: <s> this function traverses the chromosomes starting at start and calling get right until </s>
funcom_train/48990919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEntityBasePackages(String... packNames) { entities = new ArrayList<Class<?>>(50); for(String name : packNames) { PackageUtils.doWithClassInPackage(name, new Handler<Class<?>>() { public void doWith(Class<?> beanClass) { if(beanClass.isAnnotationPresent(javax.persistence.Entity.class)) { entities.add(beanClass); } } }); } } COM: <s> entity bean entity </s>
funcom_train/44823298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ExternalJar getExternalJarByName (String name) { for (int i=0; i<externalJars.size(); i++) { ExternalJar cur = (ExternalJar) externalJars.get(i); if (name.equals(cur.getName())) { return cur; } } return null; } COM: <s> get an external jar by its name </s>
funcom_train/34561734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleLocationEdit(Record record) { Activity act = (Activity) ActivityStore.activity.getValue(record); String id = ActivityStore.location.getValue(record); Location l = locationStore.getLocation(id); if (l != null) { act.setLocation(l); ActivityStore.location.updateRecord(record, act); } } COM: <s> transform result of combobox to location </s>
funcom_train/34339923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSendMessage() { if (SendMessage == null) {//GEN-END:|24-getter|0|24-preInit // write pre-init user code hereEnviarCobro1(); SendMessage = new Command("Send Message", Command.OK, 0);//GEN-LINE:|24-getter|1|24-postInit // write post-init user code here String quepaso = comprobacion() ; }//GEN-BEGIN:|24-getter|2| return SendMessage; } COM: <s> returns an initiliazed instance of send message component </s>
funcom_train/43345526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enqueue(AgentIdentifier identifier, ACLMessage message) { if (this.contexts.containsKey(identifier)) { if (!this.messages.containsKey(identifier)) { this.messages.put(identifier, new LinkedList<ACLMessage>()); } LinkedList<ACLMessage> stack = this.messages.get(identifier); this.lock.lock(); try { stack.addLast(message); this.newMessages.add(message); } finally { this.lock.unlock(); } this.invoke(); } } COM: <s> manages the enqueuing of messages </s>
funcom_train/11025171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMappedPropertyType() throws Exception { MappedPropertyDescriptor desc; // Check a String property desc = (MappedPropertyDescriptor) PropertyUtils.getPropertyDescriptor(bean, "mappedProperty"); assertEquals(String.class, desc.getMappedPropertyType()); // Check an int property desc = (MappedPropertyDescriptor) PropertyUtils.getPropertyDescriptor(bean, "mappedIntProperty"); assertEquals(Integer.TYPE, desc.getMappedPropertyType()); } COM: <s> test the mapped property type of mapped property descriptor </s>
funcom_train/16933200
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private OMElement getSayHelloOMElement(String data) { OMFactory fac = OMAbstractFactory.getOMFactory(); // OMNamespace omNs = fac.createOMNamespace("http://www.example.org/firemen/", // "fir"); OMElement method = fac.createOMElement(new QName( "getReactivity")); // OMElement value = fac.createOMElement("param0", omNs); // value.addChild(fac.createOMText(value, data)); // method.addChild(value); return method; } COM: <s> build the message payload </s>
funcom_train/16141849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: class DataSourceFactoryImpl implements DataSourceFactory { public DataSource build(String DataSourceXMLRepresentation, DataSourceAdminConfig config) throws Exception { //returns instance of the data source return new DataSourceXstreamImpl(DataSourceXMLRepresentation, config); } public DataSource build(DataSourceState dataSourceState, DataSourceAdminConfig config) throws InvalidDataSourceStateException, Exception { //returns instance of the data source return new DataSourceXstreamImpl(dataSourceState, config); } } COM: <s> implements the factory for data source implementation objects </s>
funcom_train/18502872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void shell(Shell parent) { dialog = ShellUtil.newShell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL, "about", GuiIcons.text, 450, 480, GridUtil.newGridLayout(5, 5, 5, 5, 1, false), true, false); widgets.add(dialog); } COM: <s> creates a new shell for the about dialog </s>
funcom_train/2881573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ObjectName preRegister(MBeanServer server, ObjectName name) throws java.lang.Exception { myName = name; myServer = server; ObjectName mBeanServerDelegateName = new ObjectName("JMImplementation:type=MBeanServerDelegate"); //myServer.addNotificationListener(mBeanServerDelegateName, this, this, null); return name; } COM: <s> allows the mbean to perform any operations it needs before being </s>
funcom_train/44431521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleaningStarted(ChannelIF channel) { final int size = observers.size(); for (int i = 0; i < size; i++) { final CleanerObserverIF observer = (CleanerObserverIF) observers.get(i); try { observer.cleaningStarted(channel); } catch (Exception e) { // Do not care about exceptions from sub-observers. } } } COM: <s> invoked by cleanup engine when cleaning of the channel has started </s>
funcom_train/26595072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean previous() throws com.daffodilwoods.database.resource.DException { if (state == INVALIDSTATE) throw new DException("DSE4117", null); if (state == AFTERLAST) return last(); if (!leftIterator.previous()) { state = BEFOREFIRST; return false; } return (state = alignPrevious() ? state : BEFOREFIRST) != BEFOREFIRST; } COM: <s> this method is responsible for retrieving the previous record </s>
funcom_train/17119074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createLinkedIMG() { // <a href="bla#Zieldef">Ziel f�r Verweise definieren</a> return ValidationAnswer.toLink(this.getName(), (String) this.getValue(), iconJumpIMG, "Press this button to jump to inputfield: " + this.getQuestion()); } COM: <s> creates a linked img to itself including an anchor </s>
funcom_train/42536062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o){ if(!(o instanceof TraceReq))return false; if(o == this)return true; TraceReq oo = (TraceReq)o; return (((Object)url).equals(oo.url))&&(((Object)ver).equals(oo.ver)); } COM: <s> is the given object equal to this trace req </s>
funcom_train/2448390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertStyledText(String text, String style, ExceptionHandler<BadLocationException> exceptionHandler) { StyledDocument doc = getStyledDocument(); try { doc.insertString(doc.getLength(), text, doc.getStyle(style)); } catch (BadLocationException ex) { exceptionHandler.caught(ex); } } COM: <s> inserts a string using a predefined style </s>
funcom_train/15721350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createWorkers(int workers) { this.workers = workers; // Setup the workers ready to roll if (_workers == null) _workers = new XalanWorker[workers]; for (int i = 0; i < workers; i++) { _workers[i] = new XalanWorker(_workQueue, i); _workers[i].start(); } } COM: <s> this method is called before the start of a benchmark iteration </s>
funcom_train/26273473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetNameStringStringClass() { ICalcService calcService = (ICalcService)sai.getName("newton", "calcService"); assertNotNull("failed to retrieve the calcService from assembly", calcService ); if ( !calcService.isStarted() ) fail( "Assembly factory never executed calculation service start()!"); } COM: <s> class under test for object get name string string class </s>
funcom_train/18504134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { cancelButton_actionPerformed(null); } else if (e.getID() == WindowEvent.WINDOW_ACTIVATED) { // If the dialog has just been activated, we focus the search field selectorField.requestFocus(); } } COM: <s> overridden method so we can exit when window is closed </s>
funcom_train/3720631
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doSend(Transportable theMessage) throws TransportException { if (myConnectOnSend) { makeConnection(); } try { Writer out = new OutputStreamWriter(new BufferedOutputStream(myConnection.getOutputStream())); out.write(theMessage.getMessage()); out.flush(); } catch (IOException e) { throw new TransportException(e); } } COM: <s> writes the given message to the url </s>
funcom_train/22179198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void readValuesFromPropertyStore() { ProjectPropertyStore prjPropStore = ProjectUtils.getProjectPropertyStore(project, tableLibPath.getShell()); if (null != prjPropStore) { lstLibPath = prjPropStore.getLibraryPath(); lstDefaultLibPath = prjPropStore.getDefaultLibraryPath(new ArrayList<String>()); } else { lstLibPath = new ArrayList<String>(); lstDefaultLibPath = new ArrayList<String>(); } tableLibPath.setItemCount(lstLibPath.size()); } COM: <s> reads all settings beeing displayed from the code project property store code </s>
funcom_train/644435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchToOptionDialog(DialogOptions dialogOptions) { this.dialogOptions = dialogOptions; CardLayout cl = (CardLayout) (dialogOptions.getPanelOptions().getLayout()); cl.show(dialogOptions.getPanelOptions(), PersistenceManager.Values.CARD_OPTIONS_DIALOG.name()); dialogOptions.setSelectedOption(PersistenceManager.Values.CARD_OPTIONS_DIALOG.name()); } COM: <s> switches to the option dialog category in the option dialog </s>
funcom_train/33607176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintDate(Graphics2D g, StringStyle style, boolean selected, Point2D p, double r, String day, String month){ GraphicString gs = new GraphicString(month, p.getX() + 2, p.getY() - 3, GraphicString.CENTER); style.draw(g, gs, selected); } COM: <s> paints date at given window location and pixel radius </s>
funcom_train/37774897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage() { String[] l = new String[m_applicationExceptions.size()]; for(int i=0;i<m_applicationExceptions.size();i++) l[i]=m_applicationExceptions.get(i).getMessage(); return StringHelper.printArray(l); } COM: <s> this will return a printable the array of messages from all the </s>
funcom_train/26568778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getResourceAsStream(String name) { final URL url = getResource(name); if (url == null) { return null; } try { return (InputStream) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws IOException { return url.openStream(); } }, acc); } catch (PrivilegedActionException e) { if (debug) { Logger.debug("Unable to find resource for class " + name + " ", e); } return null; } } COM: <s> allow access to resources </s>
funcom_train/11688683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void execute(final Runnable task, int priority) { if (!initialzed) { throw new IllegalStateException("Executor is not initialized"); } // create a dummy worker to execute the task Worker w = new Worker(task, priority); if (beforeExecuteHandler != null) { beforeExecuteHandler.beforeExecute(w); } // we are capturing all the exceptions to prevent threads from dying executor.execute(w); } COM: <s> execute a given task with the priority specified </s>
funcom_train/27976436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAbbreviation () { return (this.type == VERBAL? "V": this.type == SOMANTIC? "S": this.type == MATERIAL? "M": this.type == FOCUS? "F": this.type == DIVINE_FOCUS? "DF": this.type == EXPERIENCE_COST? "XP": ""); } COM: <s> determine the abbreviation for this type of component </s>