__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/26335280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void roundAdvanced( GameEngine engine ) { if( this.getCurrentMap().isOutside() ) { int mod = (this.getCurrentMap().getZoomFactor() >= 3 ? 200 : 5); if( this.worldClock.getRounds() % mod == 0 ) { this.runOutdoors(); } } } COM: <s> round advanced listener implementation </s>
funcom_train/21701807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List queryByType(String restrictedType) { String query = "select v from" + " org.olat.repository.RepositoryEntry v" + " inner join fetch v.olatResource as res"+ " where res.resName= :restrictedType"; DBQuery dbquery = DBFactory.getInstance().createQuery(query); dbquery.setString("restrictedType", restrictedType); dbquery.setCacheable(true); return dbquery.list(); } COM: <s> query by type without any other limitations </s>
funcom_train/47969049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPlugin(URL url) throws IOException { logger.debug("Adding plugin with URL {}", url); InputStream in = url.openStream(); try { Properties properties = new Properties(); properties.load(in); plugins.add(new WtfPlugin(properties)); } finally { in.close(); } } COM: <s> adds a plugin for a given url </s>
funcom_train/14008802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getBlojsomPropertyAsList(String propertyKey) { if (_blojsomConfiguration.containsKey(propertyKey)) { Object value = _blojsomConfiguration.get(propertyKey); if (value instanceof List) { return (List) value; } else { ArrayList values = new ArrayList(); values.add(value); return values; } } return null; } COM: <s> retrieve a property from code blojsom </s>
funcom_train/16147879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getColor(int x, int y) { if (((BufferedImage) getImage()).getAlphaRaster().getSample(x, y, 0) == 0) { return null; } else { return new Color(((BufferedImage) getImage()).getRGB(x, y)); } } COM: <s> returns the color of the pixel localized at code x code </s>
funcom_train/32906348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSecureGroup() { System.out.println("### Creating secure group... ###"); secureGroup = groupMgr.createSubGroup("Secure Group 1", "Secure group based on certificate authentication", new SCSecurityManagerImpl( netPeerGroup, "admin", true, 5, 1, 10 ) ); } COM: <s> secure group creation </s>
funcom_train/4357951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Digester createContextDigester() { Digester digester = new Digester(); digester.setValidating(false); RuleSet contextRuleSet = new ContextRuleSet("", false); digester.addRuleSet(contextRuleSet); RuleSet namingRuleSet = new NamingRuleSet("Context/"); digester.addRuleSet(namingRuleSet); return digester; } COM: <s> create if necessary and return a digester configured to process the </s>
funcom_train/37742347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getAsapEventType(WfAuditEvent event) { String type = event.eventType(); if (type.equals(WfAuditEvent.PROCESS_CREATED)) { return "InstanceCreated"; } if (type.equals(WfAuditEvent.PROCESS_STATE_CHANGED)) { return "StateChanged"; } return null; } COM: <s> gets the asap description for the </s>
funcom_train/45233356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Gauge getGauge () { if (gauge == null) {//GEN-END:|34-getter|0|34-preInit // write pre-init user code here gauge = new Gauge ("", false, 100, 50);//GEN-BEGIN:|34-getter|1|34-postInit gauge.setLayout (ImageItem.LAYOUT_DEFAULT);//GEN-END:|34-getter|1|34-postInit // write post-init user code here }//GEN-BEGIN:|34-getter|2| return gauge; } COM: <s> returns an initiliazed instance of gauge component </s>
funcom_train/37827626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseDragged(MouseEvent e) { /** * requires: MouseEvent as a result of the mouse being dragged. * effects: If the user has control, the default vtkPanel mouseDragged event will be invoked. * modifies: Because the window must be re-rendered, system memory will be consumed. */ if (!CVEIDesktop.user.canPerformActions()) { return; } super.mouseDragged(e); } COM: <s> mouse dragged event handler manipulates the visualization </s>
funcom_train/44584371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void computeCorrections(IProblem problem, ICompilationUnit targetUnit, ICorrectionRequestor requestor) throws JavaModelException { if (requestor == null) { throw new IllegalArgumentException(Messages.correction_nullUnit); } this.computeCorrections( targetUnit, problem.getID(), problem.getSourceStart(), problem.getSourceEnd(), problem.getArguments(), requestor); } COM: <s> performs code correction for the given iproblem </s>
funcom_train/19308762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAnnotationList(final PDFAnnotList listToAdd) { if (listToAdd == null) { return; } for (int i = 0; i < listToAdd.annotations.size(); i++) { final PDFAnnotation annotationToAdd = listToAdd.annotations.get(i); this.addAnnotation(annotationToAdd); } } COM: <s> for each item in annotation list add the item to this </s>
funcom_train/29290105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean checkUserIsParticipate(String user_id, String survey_id) throws EJBException { boolean isparticipate = false; try { Collection<ResponeCMPLocal> coll = getResponeCMPLocalHome().findCheckUserIsParticipate(user_id, survey_id); if(coll.size()>0) { isparticipate = true; System.out.println("User Participated this Survey"); } else System.out.println("User No Participated this Survey"); } catch (FinderException e) { // TODO Auto-generated catch block e.printStackTrace(); } return isparticipate; } COM: <s> check user have participate this survey where user id and survey id </s>
funcom_train/14092898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testValidLabel1CaseSensitive() throws Exception { JLabelFinder finder = new JLabelFinder("Dum"); JLabel label = new JLabel("Dummy"); JFrame frame = createJFrame(getName()); setWindow(frame); frame.getContentPane().add(label); packAndShow(frame); assertTrue("Finder is not working", finder.testComponent(label)); } COM: <s> tests the test method for valid label </s>
funcom_train/51141873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAccountList(ArrayList accounts) throws Exception { for (Iterator itr = _accounts.iterator(); itr.hasNext();) ((AccountInfo)itr.next()).destroy(); for (Iterator itr = accounts.iterator(); itr.hasNext();) ((AccountInfo)itr.next()).update(); _accounts = accounts; notifyForChange(ACCOUNTS_CHANGED); } COM: <s> when replacing the account list we first have to destroy the old accounts </s>
funcom_train/5376861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void publishBundleEvent(int type, org.osgi.framework.Bundle bundle) { if ((bundleEventSync != null) || (bundleEvent != null)) { final BundleEvent event = new BundleEvent(type, bundle); if (System.getSecurityManager() == null) { publishBundleEventPrivileged(event); } else { AccessController.doPrivileged(new PrivilegedAction() { public Object run() { publishBundleEventPrivileged(event); return null; } }); } } } COM: <s> deliver a bundle event to synchronous bundle listeners synchronous </s>
funcom_train/11728663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBoolean() throws RepositoryException { Value val = PropertyUtil.getValue(prop); String str = val.getString(); boolean bool = val.getBoolean(); assertEquals("Wrong conversion from Binary to Boolean.", new Boolean(bool), Boolean.valueOf(str)); } COM: <s> tests conversion from binary type to boolean type </s>
funcom_train/14059697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSeed(final Serializable seed) { long l; if (seed == null) { throw new NullPointerException(); } if (!(seed instanceof Number)) { throw new IllegalArgumentException(); } l = ((Number) seed).longValue(); this.setSeed(l); } COM: <s> set the seed of this randomizer </s>
funcom_train/17664961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activateExistingPatientRecall(int patnum) throws Exception { try { PreparedStatement stmt = getConnection().prepareStatement("UPDATE recall SET IsDisabled=? WHERE PatNum=?"); stmt.setInt(1, 0); stmt.setInt(2, patnum); stmt.executeUpdate(); } catch (Exception e) { e.printStackTrace(); Exception newE = new Exception("failed on editing recall", e); throw newE; } } COM: <s> activates all recalls for an existing patient </s>
funcom_train/37866513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public VariableByteInput getAsStream(long pointer) throws IOException { final DataPage page = getDataPage(StorageAddress.pageFromPointer(pointer)); switch (page.getPageHeader().getStatus()) { case MULTI_PAGE: return ((OverflowPage) page).getDataStream(pointer); default: return getAsStream(page, pointer); } } COM: <s> get the value located at the specified address as a </s>
funcom_train/5380089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addAccessibleListeners(Label label, final Image image) { label.getAccessible().addAccessibleListener( new AccessibleAdapter(){ public void getName(AccessibleEvent event) { final String accessibleMessage = getAccessibleMessageFor(image); if(accessibleMessage == null) return; event.result = accessibleMessage; } } ); } COM: <s> add an accessible listener to the label if it can be </s>
funcom_train/42259675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getLocation() { final Interface[] children = getChildrenInternal(); if (children != null) { for (final Interface child : children) { if (child != null) { if (child.getMasterX() != -1 && child.getMasterY() != -1) { return new Point(child.getMasterX(), child.getMasterY()); } } } } return new Point(-1, -1); } COM: <s> gets the location of the interface </s>
funcom_train/3174251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Property getRowRoot(int row) { // init rows getNumRows(); // and look it up Property result = (Property)rows.get(row); if (result==null) return result; // since we do a lazy update after a gedcom write lock we check if cached properties are still good if (result.getEntity()==null) { result = null; rows.set(row, null); } // done return result; } COM: <s> property for row </s>
funcom_train/8214615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double cosSimilarity(Document doc1, Document doc2) { String word; double similarity = 0; for (Iterator<String> it = doc1.words.keySet().iterator(); it.hasNext(); ) { word = it.next(); if (doc2.words.containsKey(word)) { similarity += doc1.words.get(word)[2] * doc2.words.get(word)[2]; } } similarity = similarity / (doc1.vectorlength * doc2.vectorlength); return similarity; } COM: <s> calculates cosine similarity between two documents </s>
funcom_train/9362462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean register(E callback, Object cookie) { synchronized (mCallbacks) { if (mKilled) { return false; } IBinder binder = callback.asBinder(); try { Callback cb = new Callback(callback, cookie); binder.linkToDeath(cb, 0); mCallbacks.put(binder, cb); return true; } catch (RemoteException e) { return false; } } } COM: <s> add a new callback to the list </s>
funcom_train/21888653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanelDescription() { if (panelDescription == null) { panelDescription = new JPanel(); panelDescription.setLayout(new BorderLayout()); JPanel jp = new JPanel(); jp.add(new CluedHelpLabel("Explanation: ", "Description means..")); panelDescription.add(jp, "West"); panelDescription.add(getJScrollPane(), "Center"); panelDescription.add(getJPanel1(), BorderLayout.EAST); } return panelDescription; } COM: <s> this method initializes panel description </s>
funcom_train/1942388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFilterSQL(AbstractFilter filter) throws SQLException { String ret = ""; Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("SELECT filter_sql FROM Filter WHERE filter_id="+filter.getDBID()); if (rs.first()) ret = rs.getString(1); stmt.close(); return ret; } COM: <s> gets the sql statement of a filter </s>
funcom_train/12160871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testControlTypes() { for (int i = 0; i < TYPE_ARRAY.length; i++) { assertNotNull("Expected an ControlType of: " + TYPE_ARRAY[i] + ".", ControlType.getControlType(TYPE_ARRAY[i])); } } COM: <s> test that there is a control type for each known type </s>
funcom_train/9470192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONStringer object() throws JSONException { return open(Scope.EMPTY_OBJECT, "{"); } /** * Ends encoding the current object. * * @return this stringer. */ public JSONStringer endObject() throws JSONException { return close(Scope.EMPTY_OBJECT, Scope.NONEMPTY_OBJECT, "}"); } COM: <s> begins encoding a new object </s>
funcom_train/9239632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override protected boolean publish(String declarationLTR, String declarationRTL){ if (StyleSheetInjectionEngine.get() == StyleSheetInjectionEngine.this) { String declaration = isLtr() ? declarationLTR : declarationRTL; if (isAnonymous()) { userPublish(declaration); } else { themePublish(declaration); } return true; } return false; } COM: <s> publish the declaration into the html document </s>
funcom_train/43424502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getNames( Node node, List names ) { if( node instanceof FunctionNode ) { List children = ((FunctionNode)node).getArguments() ; for( int i=0 ; i < children.size() ; i++ ) { getNames( (Node)children.get(i), names ) ; } } else if( node instanceof NameNode ) { names.add( ((NameNode)node).getName() ) ; } } COM: <s> internal function that actually gets the names </s>
funcom_train/31012513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PollValue getPollInfo(long pollid) { PollManager pollMan = null; try { pollMan = ((PollManagerHome)EJBHomeFactory.getInstance().lookup(POLL_MANAGER_JNDI,PollManagerHome.class)).create(); return pollMan.getPoll(pollid); } catch (Exception e) { e.printStackTrace(); return null; } finally { EJBUtils.remove(pollMan); } } COM: <s> get the information about a poll from the database </s>
funcom_train/21087450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // protected void addVisiblePropertyDescriptor(Object object) { // itemPropertyDescriptors.add(createItemPropertyDescriptor( // ((ComposeableAdapterFactory) adapterFactory) // .getRootAdapterFactory(), getResourceLocator(), // getString("_UI_SNI_Objet_visible_feature"), // getString("_UI_SNI_Objet_visible_description"), // SNI_Package.Literals.SNI_OBJET__VISIBLE, true, false, false, // ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, // getString("_UI_AffichagePropertyCategory"), null)); // } COM: <s> this adds a property descriptor for the visible feature </s>
funcom_train/47885905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String convertToHex(byte[] data) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < data.length; i++) { int lhb, rhb; // left and right half bytes lhb = (data[i] >>> 4) & 0x000F; rhb = data[i] & 0x000F; buf.append(getHex(lhb)); buf.append(getHex(rhb)); } return buf.toString(); } COM: <s> converts a byte sequence to a hexadecimal string </s>
funcom_train/7384620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getRoutingCenterY(mxCellState state) { float f = (state.getStyle() != null) ? mxUtils.getFloat(state .getStyle(), mxConstants.STYLE_ROUTING_CENTER_Y) : 0; return state.getCenterY() + f * state.getHeight(); } COM: <s> returns the y coordinate of the center point for automatic routing </s>
funcom_train/1560008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintContentBorderTopEdge(Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) { g.setColor(SystemColor.controlDkShadow); g.drawLine(x, y, x + w, y); g.setColor(SystemColor.controlLtHighlight); g.drawLine(x, y + 1, x + w, y + 1); } COM: <s> paint the top border </s>
funcom_train/45844883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTextureOnEyeball(int row, int col) { avatarCheck(); String temp = jTable_Eyes.getValueAt(row, col).toString(); String location = temp.substring(1, temp.length() - 1); Manipulator.setEyesTexture(character, location, TextureType.Color, Manipulator.Eyes.allEyes); } COM: <s> grabs the selected texture and applys the texture to the mesh material and </s>
funcom_train/20909139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Group getGroupById(short id) { for (Iterator<ContactListItem> iter = rootGroup.getContainedItems().iterator(); iter.hasNext();) { ContactListItem item = iter.next(); if (item.getGroupId() == id) { return (Group) item; } } return null; } COM: <s> find grup by group id </s>
funcom_train/202132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void statusChanged(StatusEvent event) { logger.debug(event); synchronized (statusCount) { int code = event.getStatus().getStatusCode(); Integer count = statusCount.get(code); if (count == null) count = 1; else count++; statusCount.put(code, count); if (count == proxies.size()) propagate(event); } } COM: <s> multiplex hydra proxy status events into the status events for </s>
funcom_train/39286230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSetUp(IType type, ImportsManager imports) throws JavaModelException { final String delimiter= getLineDelimiter(); StringBuffer buffer= new StringBuffer(); buffer.append("protected void "); //$NON-NLS-1$ buffer.append(SETUP); buffer.append("() throws "); //$NON-NLS-1$ buffer.append(imports.addImport("java.lang.Exception")); //$NON-NLS-1$ buffer.append(" {}"); //$NON-NLS-1$ buffer.append(delimiter); type.createMethod(buffer.toString(), null, false, null); } COM: <s> create the set up method of the generating testcase </s>
funcom_train/3026129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void postApply(File inputFile, SimpleNode root) { PropertiesFile props = jsPlugin.getProperties("pretty", jsPlugin.getProjectName(view, buffer)); if (props.getBoolean("checkOnSave", false)) { jsPlugin.instanceCheck(view, buffer, true); } } COM: <s> after we have applied the pretty printing </s>
funcom_train/37817762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean close() { // if some dialogs are open, close this first if (gui.isDialogOpen()) return false; // ensure, that tree is in consistent state if (controller.algorithmHasNextStep()) try { controller.abort(); gui.algorithmAborted(); } catch (NoActionException ex) { // no exception handling here, module is being closed } return true; } COM: <s> this method is invoked when module or program are intended to be closed </s>
funcom_train/46618790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parseCatalog(String file) { ApacheCatalog catalog = (ApacheCatalog) getCatalog(); // Pass in reference to ourselves so we can be called back. catalog.setResolver(this); try { catalog.parseCatalog(file); } catch (MalformedURLException ex) { throw new BuildException(ex); } catch (IOException ex) { throw new BuildException(ex); } } COM: <s> xmlcatalog calls this to add an external catalog file for each </s>
funcom_train/35692273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSortAscending() { if (sortAscending != null) { return sortAscending.booleanValue(); } ValueBinding vb = getValueBinding("sortAscending"); Boolean v = vb != null ? (Boolean) vb.getValue(getFacesContext()) : null; return v != null ? v.booleanValue() : DEFAULT_SORTASCENDING; } COM: <s> p return the value of the code sort ascending code property </s>
funcom_train/13364674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelection(final IRegion aRange, final ITextSelection aSelection) { if (aRange != null) { setHighlightRange(aRange.getOffset(), aRange.getLength(), true); } else { resetHighlightRange(); } if (aSelection != null) { selectAndReveal(aSelection.getOffset(), aSelection.getLength()); } } COM: <s> highlights a range and selects a text </s>
funcom_train/13904121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { JButton button = (JButton) e.getSource(); String buttonText = button.getText(); int day = new Integer(buttonText).intValue(); setDay(day); ((JCalendar)this.getParent()).getManagerFrame().validate(); ((JCalendar)this.getParent()).getManagerFrame().getDayPanel().refresh(); } COM: <s> jday chooser is the action listener for all day buttons </s>
funcom_train/20219804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processConnection() throws IOException { Object o = null; do { try { o = input.readObject(); System.out.println("feeh 7aga wasalet le el server"); if (o instanceof String) { String s = (String) o; if (s.equals("New Game")) { display.syncExec(new Runnable(){ @Override public void run() { PlateBar.createFirst(); facade.newGame(); }}); } } } catch (ClassNotFoundException classNotFoundException) { } } while (o != null); } COM: <s> process connection requirements </s>
funcom_train/43501098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDecode_ASCII() { for (char c = 0x00; c < 0x80; c++) { String s = String.valueOf(c); String enc = URICoder.encode(s); if (UNRESERVED.indexOf(c) >= 0) { assertEquals(s, enc); } else { assertEquals(s, URICoder.decode(enc)); } } } COM: <s> test the code decode code method for all ascii characters 0x00 to 0x7f </s>
funcom_train/4805265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttributeValidationModeUsage(ModeUsage modeUsage) { int ap = modeUsage.getAttributeProcessing(); if (ap != Mode.ATTRIBUTE_PROCESSING_NONE) { attributeValidationModeUsages.addElement(modeUsage); attributeProcessing = Math.max(ap, attributeProcessing); if (modeUsage.isContextDependent()) contextDependent = true; } } COM: <s> adds a mode usage to the attribute validation mode usages list </s>
funcom_train/15858565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDoLabel(String c) { doLabel = NOLABEL; if (c.equals("No Label")) doLabel = NOLABEL; else if (c.equals("Initials")) doLabel = INITIALS; else if (c.equals("First")) doLabel = FIRST; else if (c.equals("Last")) doLabel = LAST; else if (c.equals("Whole")) doLabel = WHOLE; Person.doLabel = doLabel; dirty=true; repaint(); } COM: <s> sets up the labelling mode </s>
funcom_train/4758485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addWords(Matcher m, String abbr, List<String> matches) { while (m != null && m.find()) { String word = m.group(); if (StringUtils.camelCaseMatch(word, abbr)) { if (!matches.contains(word)) { matches.add(word); } } } } COM: <s> add words from the matcher m that match the word abbr to matches </s>
funcom_train/11792760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Option createTransTypeOption() { Option transTypeOption = OptionBuilder.create("t"); transTypeOption.setDescription(Messages .getString("Client.TransportTypeOptionText")); logger.debug("Transport Type option description: " + Messages.getString("Client.TransportTypeOptionText")); transTypeOption.setArgName("type"); transTypeOption.setArgs(1); transTypeOption.setLongOpt("transtype"); return transTypeOption; } COM: <s> creates the cli code option code of the transport type option </s>
funcom_train/46711657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBuildingStatus() { System.out.println("buildingStatus"); LinkByActor instance = new LinkByActor(); assertEquals(State.UNINITIALIZED,instance.buildingStatus()); instance.buildQuery(true, new NullActorQuery(), new NullActorQuery(),SetOperation.OR ); assertEquals(State.READY,instance.buildingStatus()); } COM: <s> test of building status method of class link by actor </s>
funcom_train/42643208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTextsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TextFile_texts_feature"), getString("_UI_PropertyDescriptor_description", "_UI_TextFile_texts_feature", "_UI_TextFile_type"), ModelPackage.Literals.TEXT_FILE__TEXTS, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the texts feature </s>
funcom_train/48559165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand9() { if (backCommand9 == null) {//GEN-END:|318-getter|0|318-preInit backCommand9 = new Command("\u041D\u0430\u0437\u0430\u0434", Command.BACK, 0);//GEN-LINE:|318-getter|1|318-postInit }//GEN-BEGIN:|318-getter|2| return backCommand9; } COM: <s> returns an initiliazed instance of back command9 component </s>
funcom_train/1849487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findIndexOfLargestNumber(double[] values){ int index = -1; double largestValue = Double.MIN_VALUE; for(int i=1; i<values.length; i++){ if(values[i] > 0 && values[i] > largestValue){ largestValue = values[i]; index = i; } } if(index != -1){ values[index] = 0.0; } return index; } COM: <s> returns the index of the largest value in an array </s>
funcom_train/12922944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MorphGradientFill add(final MorphGradient aGradient) { if (aGradient == null) { throw new IllegalArgumentException(); } if (gradients.size() == Gradient.MAX_GRADIENTS) { throw new IllegalStateException( "Maximum number of gradients exceeded."); } gradients.add(aGradient); return this; } COM: <s> add a morph gradient object to the list of gradient objects </s>
funcom_train/49329355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scale(RocketComponent component, double mul, boolean scaleMass) { Class<?> clazz = component.getClass(); while (clazz != null) { List<Scaler> list = SCALERS.get(clazz); if (list != null) { for (Scaler s : list) { s.scale(component, mul, scaleMass); } } clazz = clazz.getSuperclass(); } } COM: <s> perform scaling on a single component </s>
funcom_train/38553028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getMenuComponentIndex(JMenu menu, JMenuItem item) { for(int i = 0; i < menu.getItemCount(); i++) { if(item.getText().equals(menu.getItem(i).getText())) return i; } return -1; } COM: <s> returns the position of the item in the menu </s>
funcom_train/45271352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isConvertedGraphSchedulable(SIRStream container) { // create buffer for collecting result final StringBuffer buffer = new StringBuffer(); SIRToStreamIt.run(container, new JInterfaceDeclaration[]{}, new SIRInterfaceTable[]{}, new SIRStructure[]{}, buffer); // parse buffer and check result String res = buffer.toString(); System.err.println("Output: " + res); // TODO: check the result; what to look for if the graph is invalid? return true; } COM: <s> checks the output of the provided sircontainer and returns true if the </s>
funcom_train/21243955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getColumnValue(int iPos) { if ((iPos > -1) && (iPos < numColumns)) { return (String) getValues().get(iPos); } else { throw new IndexOutOfBoundsException ( "Source row only contains [" + numColumns + "] columns, not " + (iPos + 1) ); } } COM: <s> returns the value in the ith column position </s>
funcom_train/48151354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDistributions() { sumDist.setParameters(dieDist, n); averageDist.setParameters(sumDist, 0, 1.0 / n); minDist.setParameters(dieDist, n, 1); maxDist.setParameters(dieDist, n, n); acesDist.setParameters(n, dieDist.getDensity(1)); reset(); } COM: <s> this method sets the parameters of the distributions when the parameters </s>
funcom_train/49049970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findItemIndex (String inItemIdentifier, Object inParent) { // Get the item list from the parent, but only if the parent // is an organization or an item. // List itemList = getItemList (inParent); if (itemList != null) return findItemIndex (inItemIdentifier, itemList); else return -1; } // end findItemIndex (inItemIdentifier, inParent) COM: <s> find an items index in a list of items </s>
funcom_train/43899468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setColorObject(final CharSequence category, final Object colors) { final String name = unlocalized(category); if (colors != null) { if (colorMap == null) { colorMap = new HashMap(); } colorMap.put(name, colors); } else if (colorMap != null) { colorMap.remove(name); if (colorMap.isEmpty()) { colorMap = null; // For more accurate 'equals' implementation. } } } COM: <s> applies colors to the given category </s>
funcom_train/27906530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVersion(String version) { if (!("0".equals(version) || "1".equals(version))) { throw new IllegalArgumentException("Unsupported cookie version"); } synchronized (this.version) { this.version = version; } if ("0".equals(version)) { bExplicitMaxage = false; } else if (maxage == -1) { bExplicitMaxage = false; } } COM: <s> sets the cookie version </s>
funcom_train/9276891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean inClause(int numParams) throws SQLException { String testName = "IN clause with " + numParams + " parameters"; StringBuffer sqlBuffer = new StringBuffer((numParams * 20) + 512); sqlBuffer.append("SELECT * FROM T0 WHERE SI IN (" ); for (int i = 1; i < numParams; i++) { sqlBuffer.append("?, "); } sqlBuffer.append("?)"); return checkT0Query(testName, sqlBuffer, numParams, 2); } COM: <s> test in clause with many parameters </s>
funcom_train/48338260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stopFetching() { Window window; synchronized (lock) { if (null != lm) { lm.cancel(); lm = null; } fetchRound = -1; fetchUser = null; fetchLocation = null; fetchPassword = null; if (ACTIVE != status) { return; } window = (Window)mainWindow; } window.setFetchEnabled(true); } COM: <s> stop the fetcher protocol </s>
funcom_train/41721804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeRelationEnd(RelationEnd relationEnd) { if (relations.contains(relationEnd)) { relations.remove(relationEnd); } else throw new RuntimeException("Invalid relation (shape ID:" + relationEnd.getSimpleCase().getId() + "," + "attribute '" + relationEnd.getAttributeName() + "' to be removed from expression ID:" + this.getId()); } COM: <s> remove one instance of this shape </s>
funcom_train/5787588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rating createRating(User user, Review review) throws ObjectDoesNotExistException { // make sure that the user exists HibernateUtil.assertExists(User.class, user.getId()); // grab the current session Session session = HibernateUtil.getSessionFactory().getCurrentSession(); // create the new rating Rating r = new Rating(user, review); session.save(r); return r; } COM: <s> creates a new detached rating object for use </s>
funcom_train/41150779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInterpolationParameterUpperBound(double value) { if ( (value <= 0) || (value > 1) || (value < getInterpolationParameterLowerBound()) ) throw new IllegalArgumentException("Illegal upper bound"); m_sUpper = value; m_tuneInterpolationParameter = true; m_interpolationParameterValid = false; } COM: <s> sets the upper bound for the interpolation parameter tuning </s>
funcom_train/51102161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getCatalogs() throws SQLException { List catalogs = new ArrayList(); ResultSet rs = getMetaData().getCatalogs(); try { while (rs.next()) { String catalog_name = rs.getString(1); catalogs.add(catalog_name); } } finally { rs.close(); } return catalogs; } COM: <s> retrieves catalogues for the database associated with this db loader </s>
funcom_train/3156893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPixelFloat(int x, int y, float pixelValue) { if (isScalingApplied()) { getRasterData().setElemDoubleAt(getRasterWidth() * y + x, scaleInverse(pixelValue)); } else { getRasterData().setElemFloatAt(getRasterWidth() * y + x, pixelValue); } fireProductNodeDataChanged(); setModified(true); } COM: <s> sets the pixel at the given pixel coordinate to the given pixel value </s>
funcom_train/8090890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String rule = ""; for (int i = 0; i < min.length; i++) { rule = rule + "[ " + min[i] + " " + max[i] + " ] "; } rule = rule + "in Class: " + className + " \n"; return rule; } COM: <s> returns a description of the fuzzy lattice </s>
funcom_train/32070738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addDocumentGroups(Collection<DocumentGroup> documentGroups) { boolean addOk = getDocumentGroups().addAll(documentGroups); if (addOk) { for(DocumentGroup documentGroup : documentGroups) { documentGroup.setLabel((Label)this); } } else { if (logger.isWarnEnabled()) { logger.warn("add returned false"); } } return addOk; } COM: <s> add the passed document groups collection to the label collection </s>
funcom_train/3577239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUser(String name, String password){ try { // Save the user to disk. InputStream in = new FileInputStream(serverProp); Properties localProperties = new Properties(); localProperties.load(in); localProperties.setProperty("user." + name, password); OutputStream out = new FileOutputStream(serverProp); localProperties.store(out, ""); // add to in memory property. properties.setProperty("user." + name, password); } catch (Exception e){ System.out.println("" + e); } } COM: <s> add a user </s>
funcom_train/37082102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperties(Properties combinedProperties) { tier_history.clear(); parent.setChildProperties (combinedProperties, tier_history); history_is_initialized = false; initTiersList((String) combinedProperties.get(tier_label)); setTierProperties ((String) displayTierBox.getEditor().getItem()); history_is_initialized = true; } COM: <s> p walk each property weve been handed </s>
funcom_train/10591648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { /* This roughly does what String.hashCode() does (if I got it right) */ int k = this.hash; if (k == 0) { for (int x = 0; x < array.length; x++) k = 31 * k + array[x]; this.hash = k; } return(k); } COM: <s> p return the hash code of this instance </s>
funcom_train/42750592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Query query(Clause clause) throws SQLException { ByteArrayOutputStream baos = new ByteArrayOutputStream(256); PrintStream out = new PrintStream(baos); boolean old_value = Literal.isRepresentDirectly(); Literal.setRepresentDirectly(false); clause.sqlRepresent(out); Literal.setRepresentDirectly(old_value); String sql = baos.toString(); Query q = queryMap.get(sql); if(q != null) { q.refresh(Literal.collectLiterals(clause)); return q; } q = new Query(new ConnectionWrapper(this), clause); queryMap.put(sql, q); return q; } COM: <s> do not use this method </s>
funcom_train/26570511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void decreaseBombCounter(Bomb target) { bombCounter--; bombsStillUnderPlayer.remove(target); for (int i = 0; i < remoteBombs.length; i++) { if (remoteBombs[i] == target) { remoteBombs[i] = null; i = remoteBombs.length; } } } COM: <s> decreases the counter of active </s>
funcom_train/10795361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getAccessCode(Class<?> cls) { int accessCode = AccessCode.UNKNOWN; Access access = AccessController.doPrivileged( J2DoPrivHelper.getAnnotationAction(cls, Access.class)); if (access != null) { accessCode |= AccessCode.EXPLICIT | (access.value() == AccessType.FIELD ? AccessCode.FIELD : AccessCode.PROPERTY); } return accessCode; } COM: <s> gets the explicit access for the class if any </s>
funcom_train/43213598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print(String string) { // split by any inserted newlines String[] split = string.split("\\\n"); for (int i = 0; i < split.length - 1; i++) { println(split[i]); } // write the last bit without assuming new-line buffer.write(split[split.length - 1]); } COM: <s> p prints a string </s>
funcom_train/42251429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createJNDIRealm(String parent) throws Exception { // Create a new JNDIRealm instance JNDIRealm realm = new JNDIRealm(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); // Add the new instance to its parent component containerBase.setRealm(realm); // Return the corresponding MBean name ObjectName oname = realm.getObjectName(); if (oname != null) { return (oname.toString()); } else { return null; } } COM: <s> create a new jndi realm </s>
funcom_train/46520402
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Contact getSelectedContact(){ DefaultMutableTreeNode selectedNode = getSelectedContactNode(); if (selectedNode == null) return null; String selectedName = selectedNode.toString(); //TODO: better save? Contact returnContact = null; try { returnContact = BuddyList.getBuddy(selectedName); } catch (NameNotFoundException e) { log.debug("Buddy does not exist anymore"); } return returnContact; } COM: <s> returns the selected contact from the j tree contacts </s>
funcom_train/29018891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGrayed (boolean grayed) { checkWidget (); if ((style & SWT.CHECK) == 0) return; this.grayed = grayed; int /*long*/ flags = OS.SendMessage (handle, OS.BM_GETCHECK, 0, 0); if (grayed) { if (flags == OS.BST_CHECKED) updateSelection (OS.BST_INDETERMINATE); } else { if (flags == OS.BST_INDETERMINATE) updateSelection (OS.BST_CHECKED); } } COM: <s> sets the grayed state of the receiver </s>
funcom_train/9185847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int entryPoint(State state, Type pushed) { int pc = curPc(); alive = true; this.state = state.dup(); Assert.check(state.stacksize <= max_stack); this.state.push(pushed); if (debugCode) System.err.println("entry point " + state); pendingStackMap = needStackMap; return pc; } COM: <s> declare an entry point with initial state plus a pushed value </s>
funcom_train/36932416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CCColor darker(final float theScale) { return new CCColor( CCMath.constrain(r * theScale, 0, 1), CCMath.constrain(g * theScale, 0, 1), CCMath.constrain(b * theScale, 0, 1), a ); } COM: <s> creates a new color that is a darker version of this color </s>
funcom_train/44452098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean changeCall(Call call, Rule newRule) { int index = calls.indexOf(call); call = calls.get(index); if (call.canBeRemoved()) { call.getRule().references.remove(call); call.setRule(newRule); newRule.references.add(call); return true; } else { return false; } } COM: <s> change the rule provided call calls </s>
funcom_train/4129961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String format() { String r = " I N V O I C E\n\n" + billingAddress.format() + "\n\nDescription Price Qty Total\n"; for (int i = 0; i < items.size(); i++) { InvoiceItem nextItem = (InvoiceItem) items.get(i); r = r + nextItem.format() + "\n"; } r = r + "\nAMOUNT DUE: $" + getAmountDue(); return r; } COM: <s> formats the invoice </s>
funcom_train/43245290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetStreetAddr1() { System.out.println("getStreetAddr1"); FamilyDemographicDependentObject instance = new FamilyDemographicDependentObject(); String expResult = ""; String result = instance.getStreetAddr1(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get street addr1 method of class org </s>
funcom_train/9705934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCachedDocElement(Element e) { if (USE_SOFT_REFERENCES) { if (softDocElement == null || softDocElement.get() == null) { if (e != null) { softDocElement = new SoftReference(e); } else { // The wsdl has no document element softDocElement = new SoftReference(Boolean.FALSE); } } } } COM: <s> store the cached document element </s>
funcom_train/20328936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setBorderToRollover(Component c) { if (c instanceof AbstractButton) { AbstractButton b = (AbstractButton) c; Border border = (Border) borderTable.get(b); if (border == null || border instanceof UIResource) { borderTable.put(b, b.getBorder()); } rolloverTable.put(b, b.isRolloverEnabled() ? Boolean.TRUE : Boolean.FALSE); b.setRolloverEnabled(true); } } COM: <s> sets the border of the component to have a rollover border which </s>
funcom_train/13750039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(int bv) throws IOException { int b = (256 + bv) % 256; if (m_currentChar != -1) { if (m_currentChar == b) { m_runLength++; if (m_runLength > 254) { writeRun(); m_currentChar = -1; m_runLength = 0; } } else { writeRun(); m_runLength = 1; m_currentChar = b; } } else { m_currentChar = b; m_runLength++; } } COM: <s> modified by oliver merkel 010128 </s>
funcom_train/18672124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNamespaceDeclaration(final Namespace additional) { // Verify the new namespace prefix doesn't collide with another // declared namespace, an attribute prefix, or this element's prefix final String reason = Verifier .checkNamespaceCollision(additional, this); if (reason != null) { throw new IllegalAddException(this, additional, reason); } if (this.additionalNamespaces == null) { this.additionalNamespaces = new ArrayList<Object>( INITIAL_ARRAY_SIZE); } this.additionalNamespaces.add(additional); } COM: <s> adds a namespace declarations to this element </s>
funcom_train/34479311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeInfoFromDict(SdaiModel dict_mod) throws SdaiException { int i; SchemaData schd = dict_mod.schemaData; for (i = 0; i < schd.noOfEntityDataTypes; i++) { schd.entities[i].used = false; } for (i = 0; i < schd.defTypesCount; i++) { schd.def_types[i].used = false; } } COM: <s> initializes some fields for entities and defined types to know which </s>
funcom_train/16147816
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rebuildTCLUsingLabels(final int[] desiredLabels) { // long startTime = System.nanoTime(); labelsDesiredPartition = desiredLabels; if (hierarchyCriterion.isFloodingCriterion()) { rebuildTCLFromFlooding(); } else { rebuildGenericTCL(); } buildScale(); // long estimatedTime = System.nanoTime() - startTime; // System.out.println("rebuild TCL: \t" + (int) (estimatedTime / 1e9) + // "s"); } COM: <s> rebuilds the hierarchy in order to contain and selecting the partition </s>
funcom_train/22277847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int cursorForPoint(int x, int y) { Point tmpPoint; int cursor; if (contentView == null) { return ARROW_CURSOR; } tmpPoint = Point.newPoint(x, y); convertPointToView(contentView, tmpPoint, tmpPoint); cursor = contentView.cursorForPoint(tmpPoint.x, tmpPoint.y); Point.returnPoint(tmpPoint); return cursor; } COM: <s> overridden to return the scroll views content views cursor for this </s>
funcom_train/32993208
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("ItemBankService".equals(portName)) { setItemBankServiceEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/29771259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDataResultSet() throws Exception { System.out.println("getDataResultSet"); BlueFuseSQLTable instance = null; ResultSet expResult = null; ResultSet result = instance.getDataResultSet(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get data result set method of class sql </s>
funcom_train/12118283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC59(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end this.scadenzeDerivJMenuItem_ActionPerformed(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c59 scadenze deriv jmenu item </s>
funcom_train/9298392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected final String TEXT_89 = NL + NL + "\t/**" + NL + "\t * @see Servlet#destroy()" + NL + "\t */" + NL + "\tpublic void destroy() {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}"; COM: <s> protected final string text 88 nl nl t nl t </s>