__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/41725594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void pageDown() { int coef = fullScreen ? 1 : 0; if (list.size() <= maxLines - HEADER_HEIGHT) { selectionLine = list.size() - 1 + HEADER_HEIGHT; return; } if (selectionLine != maxLines - 1 - coef) { selectionLine = maxLines - 1 - coef; } else { offset = Math.min(offset + maxLines - 1 - HEADER_HEIGHT - coef, list.size() - maxLines + HEADER_HEIGHT + coef); } } COM: <s> implements page down command </s>
funcom_train/12164499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private List makeArgumentList(String name, String value, int count) { List result = new ArrayList(count); for (int i=0; i<count; i++) { ArgumentConfiguration ac = new ArgumentConfiguration(); ac.setName(name + i); ac.setValue(value + i); result.add(ac); } return result; } COM: <s> create a list of argument configuration </s>
funcom_train/18956633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element resolveElement(String uri) throws Exception { String path = uri.substring(uri.indexOf(":") + 1); LOGGER.debug("Reading xml from webapp " + path); File f = new File(context.getRealPath(path)); uri = f.toURI().toString(); return fallback.resolveElement(uri); } COM: <s> reads xml from a static file within the web application </s>
funcom_train/40120760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONObject append(final String key, final Object value) throws JSONException { testValidity( value ); final Object o = opt( key ); if ( o == null ) { put( key, new JSONArray().put( value ) ); } else if ( o instanceof JSONArray ) { put( key, ( ( JSONArray ) o ).put( value ) ); } else { throw new JSONException( "JSONObject[" + key + "] is not a JSONArray." ); } return this; } COM: <s> append values to the array under a key </s>
funcom_train/3167304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Map getMapById(String id) { Map referredMap; for (Iterator it = this.getMaps().iterator(); it.hasNext(); ) { Map itmap = (Map) it.next(); if (itmap.getId().equals(id)) { referredMap = itmap; return referredMap; } } return null; } COM: <s> returns the d2 r map identified by the id parameter </s>
funcom_train/29792730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension requestedMinimunSize(String str) { int width=str.length()*16*this.narrowestDim+31*this.narrowestDim; if ( this.style==CODE3OF9CHK ) width+=16*this.narrowestDim; int height=Math.max((int)(.15*width),35); return new Dimension(width,height); } COM: <s> return the minimum dimension needed to successfully display a code of string str </s>
funcom_train/19259274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UTMCoord getQuadNE() { UTMCoord quadNE = null; if ( quadNW != null && quadSE != null ) { try { quadNE = new UTMCoord( quadNW.getLatitude(), quadSE.getLongitude() ); } catch( ProjException e ) { // Shouldn't happen if quadNW and quadSE are good. e.printStackTrace(); } } return quadNE; } COM: <s> get utm coordinates of the northeast corner of the quadrangle </s>
funcom_train/25885332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void authenticateUser(String userId, String token) throws AuthenticationException { log.info("Validating user token. UserId: " + userId + ", Token:" + token); if (!userService.validateToken(userId, token)) { throw new AuthenticationException("Can't authenticate user: userid and/or token are invalid"); } } COM: <s> helper method that validates the users token </s>
funcom_train/29916015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getUnlockCardButton() { if (unlockCardButton == null) { unlockCardButton = new JButton(UIHelper.getText("notadmin.requestunlock")); unlockCardButton.setBounds(new Rectangle(288, 300, 250, 50)); unlockCardButton.setHorizontalTextPosition(SwingConstants.TRAILING); unlockCardButton.setHorizontalAlignment(SwingConstants.LEFT); unlockCardButton.setIcon(UIHelper.getImage("locked_card.gif")); } return unlockCardButton; } COM: <s> this method initializes unlock card button </s>
funcom_train/25011767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void registerEngine(IQserEngine iQserEngine) { try { Context ctx = new InitialContext(); ctx.bind(JNDI_IQSER_ENGINE, iQserEngine); // Sanity check to make sure JNDI is set up properly in the // container IQserEngine ie = (IQserEngine) ctx.lookup(JNDI_IQSER_ENGINE); if (ie == null) { throw new NamingException( "Cannot lookup IQserEngine, please check your JNDI config."); } } catch (NamingException ne) { log.error("Error during JNDI setup: " + ne.getMessage()); } } COM: <s> registers the code iqser engine code </s>
funcom_train/1104795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPojoPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Window_pojo_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Window_pojo_feature", "_UI_Window_type"), HarzemliUIPackage.Literals.WINDOW__POJO, true, false, true, null, getString("_UI_anaPropertyCategory"), null)); } COM: <s> this adds a property descriptor for the pojo feature </s>
funcom_train/22285754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void popup(Widget parent, int x, int y) { add(container); container.setScrollbarColors(getForeground(), new Color(232, 232, 232), getBackground()); container.setConstrained (true); dragged = false; invalidate(); super.popup(parent, x, y); // different from popup with fixed width Dimension pref = getPreferredSize(); setSize(pref.width, getPopupHeight()); fit(); // also different layoutContainer(); if (container.contHeight > this.height) { setSize(this.width + container.SCROLLSIZ, this.height); } } COM: <s> show the menu </s>
funcom_train/39243875
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRegion() { String regionName = ""; if (user.getAddress() != null) { Region reg = user.getOrganisation().getAddress().getRegion(); if (reg != null) { regionName = reg.getName(); } } return regionName; } COM: <s> get the name of the region </s>
funcom_train/35672465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHostToJava() { try { DfhcommareaTransformers transformers = new DfhcommareaTransformers(); Dfhcommarea dfhcommarea = (Dfhcommarea) transformers.toJava( LSFILEAE_HOST_BYTES); assertEquals("TOTO", dfhcommarea.getComPersonal().getComName().trim()); } catch (HostTransformException e) { fail(e.getMessage()); } } COM: <s> lsfileae from host to java </s>
funcom_train/31683651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object put(Object keyi, Object value) { String key = null; if (keyi instanceof String) { key = ((String) keyi).toLowerCase(); } else { throw new IllegalArgumentException( "internal programming error: header must be string: " + keyi); } return super.put(key, value); } COM: <s> set the value of a resource context </s>
funcom_train/27842791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(MouseEvent inEvent) { if (getTable().isEditing()) { return; //couldn't stop editing } int viewCol = getTable().getTableHeader().columnAtPoint(inEvent.getPoint()); int column = getTable().convertColumnIndexToModel(viewCol); if (column != -1) { sortByColumn(column); } } COM: <s> sortes the table by the clicked column </s>
funcom_train/9298679
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String render_set(ConnectorResultSet result) throws ConnectorOperationException{ StringBuffer output = new StringBuffer(); int index = 0; HashMap<String,String> values; while ( (values = result.get_next()) != null){ DataItem data = cfactory.createDataItem(values, config, index); if (data.get_id()==null) data.set_id(uuid()); event.trigger().beforeRender(data); data.to_xml(output); index++; } return output.toString(); } COM: <s> render db result set as xml string </s>
funcom_train/9569526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FaultModeSet getValueAt(int row, int column) { String rowName = getRowName(row); String columnName = getColumnName(column); if (rowName != null && columnName != null) { if (getRowName(row).equals(getColumnName(column))) { return getIdentity(); } } FaultModeSet m = null; if (data != null) m = data.get(new Point(row, column)); return (m == null) ? getDefault() : m; } COM: <s> will fetch the fault mode set contained at row column </s>
funcom_train/40885065
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void beginCache () { if (currentCache != null) throw new IllegalStateException("endCache must be called before begin."); int verticesPerImage = mesh.getNumIndices() > 0 ? 4 : 6; currentCache = new Cache(caches.size(), mesh.getVerticesBuffer().limit()); caches.add(currentCache); mesh.getVerticesBuffer().compact(); } COM: <s> starts the definition of a new cache allowing the add and </s>
funcom_train/13875326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addExceptionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CatchExp_exception_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CatchExp_exception_feature", "_UI_CatchExp_type"), ImperativeoclPackage.Literals.CATCH_EXP__EXCEPTION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the exception feature </s>
funcom_train/4557988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testBillingSettingSelectCountryWithState() { repEng.newStep("363", "Billing Settings-Select country with State"); //1. Goto Billing Settings page //2. Fill in First Name, Last Name, Address, Address2,City, State, Zip Code with valid data //3. Select one country // If United States, Canada are selected ,the State field should be display } COM: <s> 363 billing settings select country with state </s>
funcom_train/22278835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rect interiorRect(int x, int y, int width, int height) { int left, top; left = leftMargin(); top = topMargin(); return new Rect(x + left, y + top, width - left - rightMargin(), height - top - bottomMargin()); } COM: <s> computes the borders interior rectangle using the primitive margin </s>
funcom_train/18050041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setOrientation(int orientation) { checkWidget(); if (this.orientation == orientation) return; if (orientation != SWT.HORIZONTAL && orientation != SWT.VERTICAL) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } this.orientation = orientation; int sashOrientation = (orientation == SWT.HORIZONTAL) ? SWT.VERTICAL : SWT.HORIZONTAL; for (int i = 0; i < sashes.length; i++) { sashes[i].dispose(); sashes[i] = new Sash(this, sashOrientation); sashes[i].addListener(SWT.Selection, sashListener); } layout(); } COM: <s> if orientation is swt </s>
funcom_train/46640108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBlogDirectory(String blogName) { String result = StringUtils.EMPTY; // build our blog key String key = "blog." + getBlogId(blogName) + ".directory"; String blogDir = bloggerProperties.getProperty(key); // if we found this in our properties then find the directory given if (blogDir != null) { File file = new File(blogDir); if (file.exists() && file.isDirectory()) { result = file.getAbsolutePath(); } } return result; } COM: <s> gets the blog directory from our properties </s>
funcom_train/16380483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addHintPropertyDescriptor(Object object) { itemPropertyDescriptors.add (new UnsettablePropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SubTaskDefType_hint_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SubTaskDefType_hint_feature", "_UI_SubTaskDefType_type"), CTEPackage.Literals.SUB_TASK_DEF_TYPE__HINT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the hint feature </s>
funcom_train/17676357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearApplicationIdentityFields() { checkCmd(); if (cmd.top.identityType != MDStatics.IDENTITY_TYPE_APPLICATION) return; FieldMetaData[] pkf = cmd.top.pkFields; for (int i = pkf.length - 1; i >= 0; i--) { data[pkf[i].stateFieldNo] = null; filled[pkf[i].stateFieldNo] = false; } } COM: <s> clear any application identity fields from this state </s>
funcom_train/44991624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JEditorPane getJEditorPane() { URL hURL = parent.getSchedule().getHelpURL(); if (jEditorPane == null) { try { jEditorPane = new JEditorPane(hURL); } catch (IOException ioe) { ioe.printStackTrace(); jEditorPane = new JEditorPane(); } } else { try { jEditorPane.setPage(hURL); } catch (IOException ioe) { ioe.printStackTrace(); jEditorPane = new JEditorPane(); } } return jEditorPane; } COM: <s> this method initializes j editor pane </s>
funcom_train/5312991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { try { FastStack stack = (FastStack) super.clone(); if (this.contents != null) { stack.contents = (Object[]) this.contents.clone(); } return stack; } catch (CloneNotSupportedException cne) { throw new IllegalStateException("Clone not supported? Why?"); } } COM: <s> returns a clone of the stack </s>
funcom_train/18590870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean sendListToSender(Sim_event ev, List list) { if (ev == null) { return false; } boolean result = false; Object obj = ev.get_data(); if (obj instanceof Integer) { Integer id = (Integer) obj; result = super.sendListToSender(id.intValue(), ev.get_tag(), list); } return result; } COM: <s> sends a given list to sender </s>
funcom_train/48966149
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(float x, float y) { parent.pushMatrix(); if (drawMode == PConstants.CENTER) { parent.translate(x - width/2, y - height/2); } else if ((drawMode == PConstants.CORNER) || (drawMode == PConstants.CORNERS)) { parent.translate(x, y); } drawImpl(); parent.popMatrix(); } COM: <s> convenience method to draw at a particular location </s>
funcom_train/175045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void clearIndexToFirst() { for (;;) { Index q = head; for (;;) { Index r = q.right; if (r != null && r.indexesDeletedNode() && !q.unlink(r)) break; if ((q = q.down) == null) { if (head.right == null) tryReduceLevel(); return; } } } } COM: <s> clears out index nodes associated with deleted first entry </s>
funcom_train/34128769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed( ActionEvent e) { dialog.show( "http://"); if ( !dialog.isCancelled()) { URL url = dialog.getURL(); if ( url == null) { JOptionPane.showMessageDialog( parent, "Could not create a valid URL.", "Document Error", JOptionPane.ERROR_MESSAGE); } else { boolean isStartup = false; project.addRemote( url, isStartup); } } } COM: <s> the implementation of the ad remote document action </s>
funcom_train/4375951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAuthScheme(final AuthScheme authScheme) { if (authScheme == null) { invalidate(); return; } if (this.preemptive && !(this.authScheme.getClass().isInstance(authScheme))) { this.preemptive = false; this.authAttempted = false; } this.authScheme = authScheme; } COM: <s> assigns the given </s>
funcom_train/41163658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoMatrixExercises2 entity) { EntityManagerHelper.log("deleting CoMatrixExercises2 instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoMatrixExercises2.class, entity.getMatrixId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co matrix exercises2 entity </s>
funcom_train/6266067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { final Button button = new Button("Click me"); final Label label = new Label(); ClickListener cl = new ClickMe(label); button.addClickListener(cl); // Assume that the host HTML has elements defined whose // IDs are "slot1", "slot2". In a real app, you probably would not want // to hard-code IDs. Instead, you could, for example, search for all // elements with a particular CSS class and replace them with widgets. // RootPanel.get("slot1").add(button); RootPanel.get("slot2").add(label); } COM: <s> this is the entry point method </s>
funcom_train/26060488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Class getBeanClass(PortletRequest req) { String className = req.getPreferences().getValue("bean-class", ""); if (className.length() > 0) { try { return Class.forName(className); } catch (ClassNotFoundException e) { log.error("unable to get class name ", e); } } return null; } COM: <s> retrieves the portlet class from the preferences </s>
funcom_train/15825869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createLog(Properties properties) { StringBuffer logString = new StringBuffer(); logString.append("<log dir=\"" + properties.getProperty("logDir") + "\">"); logString.append("</log>"); return logString.toString(); } COM: <s> creates the xml for the log </s>
funcom_train/42544553
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handlePackageNode(final Tree packageNode) { String packageName = null; if (packageNode != null && packageNode.getChildCount() == 1) { StringBuilder sb = recursivelyCreatePackageName(packageNode .getChild(0)); packageName = sb.toString(); } for (IJavaSourceFileScannerListener listener : this.listeners) { listener.matchedPackage(packageName); } } COM: <s> handles an encountered package node </s>
funcom_train/48022627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isCallbackValuesFactoryClass(Class factoryProspect) { try { Method factoryMethod = factoryProspect .getDeclaredMethod("values", (Class[]) null); return 0 < (factoryMethod.getModifiers() & Modifier.STATIC) && factoryMethod.getReturnType().isArray(); } catch (NoSuchMethodException x) { return false; } } COM: <s> the default implementation returns true if the specified class has a </s>
funcom_train/7667532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private KeyStore getKeyStore(String keys) throws Exception { byte[] bytes = new Base64().decode(keys.getBytes()); InputStream inputStream = new ByteArrayInputStream(bytes); KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); keyStore.load(inputStream, PASSWORD.toCharArray()); inputStream.close(); return keyStore; } COM: <s> loads a keystore from a base64 encoded string </s>
funcom_train/14406542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final ProfileVersion other = (ProfileVersion) obj; if (major != other.major) return false; if (minor != other.minor) return false; if (patch != other.patch) return false; return true; } COM: <s> check if the objects are equal </s>
funcom_train/5522536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processAttributeValueInQuot() { while (!isQuote(sceneString.charAt(sceneStringIndex))) { // Build the attribute value if (isApostrophe(sceneString.charAt(sceneStringIndex))) { appendAposCharacterEntity(); // This should take care of whitespace within attribute value space } else { processCommonAVCharacters(); } removeCommaSeparators(); } } COM: <s> process all attribute values delimited by quotation marks </s>
funcom_train/17939635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeNick(String nick) { if (nicks.contains(nick)) { nicks.removeElement(nick); char c = nick.charAt(0); switch (c) { case '@': beginningVoiced--; case '+': beginningNormal--; default: count--; } return true; } else return false; } COM: <s> removes a nickname from the userlist </s>
funcom_train/7296100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toHostString() { CharArrayBuffer buffer = new CharArrayBuffer(32); buffer.append(this.hostname); if (this.port != -1) { buffer.append(':'); buffer.append(Integer.toString(this.port)); } return buffer.toString(); } COM: <s> obtains the host string without scheme prefix </s>
funcom_train/23996808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RealModeCodeBlock getRealModeCodeBlockAt(Memory memory, int offset) { try { byteSource.set(memory, offset); return compiler.getRealModeCodeBlock(realModeUDecoder.decodeReal(byteSource, limit)); } catch (OutOfBoundsException e) { return spanningRealModeCodeBlock; }catch (ArrayIndexOutOfBoundsException e) { return spanningRealModeCodeBlock; } } COM: <s> get a real mode codeblock instance for the given memory area </s>
funcom_train/16357785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CoordinateGPS getFilteredCoordinate() { CoordinateGPS newCoordinate = null; if (rawCoords.size() > 0) { newCoordinate = (CoordinateGPS) rawCoords.lastElement(); // if any filter returns true, filter the position: old position is outputted again if (filterSpeed() || filterDistance() || filterBearing()) ; // set the new position to output else lastCoordinate = newCoordinate; } return lastCoordinate; } COM: <s> retuns the filtered coordinate </s>
funcom_train/35193901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete() { try { this.crudService = new BreakTimeCRUDService(); BreakTimeCRUD crud = crudService.getBreakTimeCRUDPort(); BreakTime BreakTimeToDelete = crud.readBreakTime(id); crud.deleteBreakTime(BreakTimeToDelete); } catch (Exception e) { e.printStackTrace(); } } COM: <s> delete the break time corresponding with the identifier </s>
funcom_train/30196750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetNomeSettore() { System.out.println("setNomeSettore"); String nomeSettore = "test"; SettoreLavorativo instance = new SettoreLavorativo(); instance.setNomeSettore(nomeSettore); String result = instance.getNomeSettore(); assertEquals("test", result); } COM: <s> test of set nome settore method of class com </s>
funcom_train/33389042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void assertNoScheduledEvents() { List<ScheduledItem> scheduledItems = eventScheduler.getScheduledItems(); if (scheduledItems != null && !scheduledItems.isEmpty()) { throw new AxonAssertionError("Expected no scheduled events, got " + scheduledItems.size()); } } COM: <s> asserts that no events are scheduled for publication </s>
funcom_train/37229399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SPMSegment getSPM() { SPMSegment spm = (SPMSegment)findSegment( "SPM" ); if( spm == null ) { spm = new SPMSegment( this ); spm.initialize(); if( vSegments == null ) vSegments = new Vector(); vSegments.add(0,spm); } return spm; } COM: <s> get the spm segment that should be contained within this loop </s>
funcom_train/36528163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void executeMethod( HttpMethod method ) throws BugzillaConnectionException { try { int result = httpClient.executeMethod(method); if(result != HttpStatus.SC_OK) { throw new BugzillaConnectionException( "Bad HTTP response: " + result); } } catch (IOException e) { throw new BugzillaConnectionException("Error while invoking POST method.", e); } } COM: <s> wraps http method invocation </s>
funcom_train/43893965
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSize(Expression size) { Expression old = this.size; this.size = size; java.util.Iterator iter = marks.iterator(); while (iter.hasNext()) { ((MarkImpl) iter.next()).setSize(size); } fireChildChanged("size", size, old); } COM: <s> setter for property size </s>
funcom_train/48338627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void respond(Event e, Throwable x) { if (e.source instanceof LocalizedResource) { // Resolve localized resources to real event handlers. sendLocally((LocalizedResource)e.source, new ExceptionalEvent(this, e.closure, x)); } else { // Call the superclass's respond method. super.respond(e, x); } } COM: <s> this overloaded respond method copes with </s>
funcom_train/13994069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Color getColor(JList list, boolean isSelected, Object value) { if (isSelected) { return list.getSelectionBackground(); } if (value instanceof ValidationMessage) { return ((ValidationMessage) value) .getMessageClass().getColor(); } if (model.getSize() > 0) { return model.getHighestPriorityClass() .getColor(); } return Color.WHITE; } COM: <s> if value is an instance of code validation message code it returns </s>
funcom_train/20645949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDone() { if (!m_loading) return true; try { if (m_loading && !( m_currStream!=null && m_currStream.available()>0 )) { m_loading = false; return true; } } catch (java.io.IOException ioe) { // this means the stream is closed, so be happy. m_currStream = null; return true; } return false; } COM: <s> checks if the last document has been loaded successfully </s>
funcom_train/23453354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addServiceCategoryPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Profile_serviceCategory_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Profile_serviceCategory_feature", "_UI_Profile_type"), ProfilePackage.Literals.PROFILE__SERVICE_CATEGORY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the service category feature </s>
funcom_train/37078532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCompletelyObscured(int start,int stop,int yindex) { int realStart = (start < 0 ? 0 : start); int realStop = (stop >= size ? size-1 : stop); for (int i=realStart;i<=realStop;i++) { if (!mask[yindex][i]) { return false; } } return true; } COM: <s> start and stop are for x coords </s>
funcom_train/24085640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAlternative(Alternative alternative) { // to ensure referential integrity alternative.setAlternativesDefinition(this); long index = 1; if (alternatives.size() > 0) { index = (alternatives.get(alternatives.size()-1)).getAlternativeIndex()+1; } alternative.setAlternativeIndex(index); alternatives.add(alternative); } COM: <s> adds the given alternative to the list of alternatives </s>
funcom_train/48151323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Observable o, Object arg) { r = getValueSetter(0).getValue(); dist.setRate(r); timeline.setRange(dist.getDomain().getLowerBound(), dist.getDomain() .getUpperBound(), dist.getDomain().getWidth()); reset(); } COM: <s> this method handles the scrollbar events for adjusting the rate parameter </s>
funcom_train/11792967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setDigestInfoGroup(Content content, ContentType jaxbContent) { logger.debug("setDigestInfoGroup started"); if (content.getDigestValue() != null) { DigestMethodType digestMethodType = objectFactory .createDigestMethodType(); digestMethodType.setAlgorithm(content.getDigestMethod()); jaxbContent.setDigestMethod(digestMethodType); jaxbContent.setDigestValue(content.getDigestValue()); } logger.debug("setDigestInfoGroup finished"); } COM: <s> sets the digest properties of the given content type element </s>
funcom_train/31672367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeAdapter(SuperAdapter a) throws IOException { writeInt(3988); if (a == null) writeString(null); else { String str = a.getID(); if (a == null) { Com.DPrintf("writeAdapter: invalid Adapter id for " + a + "\n"); } writeString(str); } } COM: <s> writes the adapter id to the file </s>
funcom_train/24534069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private BeanPart getOriginal (BeanPart b) { Iterator itr = fBeanModel.getBeans(false).iterator() ; while (itr.hasNext()) { BeanPart bean = (BeanPart) itr.next() ; if (bean.isEquivalent(b)) if(bean.getUniqueName().equals(b.getUniqueName())) return bean ; } return null ; } COM: <s> get the coresponding bean part </s>
funcom_train/32741644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteSet(Transaction t, Pointer base, FieldDefinition fi) { TransactionImplementation t1 = (TransactionImplementation) t; t.update(t1.transformTypeName(fi.getSubtable().getName()) + " this", null, "this." + fi.getSubtable().getSetOwnerFieldName() + t1.getPrimaryKeyName() + "=" + t1.getParameterName(), base); } COM: <s> deletes a set </s>
funcom_train/47949260
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTableExistent(String tableName) { boolean tableExistent = false; Set<String> tableSet = findAllTables(); if (tableSet == null || tableSet.isEmpty()) { } else { if (tableSet.contains(tableName)) { tableExistent = true; } else { } } return tableExistent; } COM: <s> get the value of table existent </s>
funcom_train/31793332
/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 ("Kneobase".equals(portName)) { setKneobaseEndpointAddress(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/45401124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ClassPackageDependencyReferenceImpl addDependency (String groupId, String artifactId, String version, String classifier) { if (this.dependencies == null) this.dependencies = new ArrayList<IClassPackageDependencyReference>(); ClassPackageDependencyReferenceImpl dep = new ClassPackageDependencyReferenceImpl(groupId, artifactId, version, classifier); this.dependencies.add(dep); return dep; } COM: <s> facility in order to add </s>
funcom_train/45356321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String synchronizeProviderList() { // call the server and get the provider list ArrayList<Hashtable<Object,Object>> providers = null; try { providers = serverWrapper.getProviderList(); syncedObjectCount += providers.size(); } catch (Throwable t) { return MSG_SYNCCONN_FAILED; } if (addProvidersToModel(providers) > 0) { isDirty = true; activateFileSaveMenuItems(); } // put the list into the window's list model return MSG_PROVIDERSDOWNLOADED; } COM: <s> synchronize the state of the window with the server state </s>
funcom_train/4224020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getShadowTableColumnDataTypeSequence(ArrayList nameTypeList, String[] primCols,RepTable reptable) { StringBuffer toRet = new StringBuffer(); toRet.append(getColumnDataTypeSequence(nameTypeList,reptable)) .append(getPrimaryColumnDataTypeSequence(primCols,"rep_old_")); return toRet.toString(); } COM: <s> return the list of shadowtabls cols in a string </s>
funcom_train/11324378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getPagePackageName(IProject project) { IStructuredModel model = ClickUtils.getClickXMLModel(project); try { NodeList list = (((IDOMModel)model).getDocument()).getElementsByTagName(ClickPlugin.TAG_PAGES); if(list.getLength()==1){ Element pages = (Element)list.item(0); if(pages.hasAttribute(ClickPlugin.ATTR_PACKAGE)){ return pages.getAttribute(ClickPlugin.ATTR_PACKAGE); } } } catch(Exception ex){ } finally { if(model!=null){ model.releaseFromRead(); } } return null; } COM: <s> returns the package name of page classes which is specified in tt click </s>
funcom_train/21023125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void evaluateSecurityToAction(TreeItem item) { // Enables or disables move button if ( ( ((GWTFolder) item.getUserObject()).getPermissions() & GWTPermission.WRITE) == GWTPermission.WRITE) { Main.get().activeFolderTree.folderSelectPopup.enable(true); } else { Main.get().activeFolderTree.folderSelectPopup.enable(false); } } COM: <s> evaluates security to action to prevent not permission access to folder destination </s>
funcom_train/8688514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getTypeSpecifier() { String tkind = getTypeKind(); String tname = getTypeName(); String typeSpec = null; // Return the type-selector typeSpec = tkind + ":" + tname; if (getVOB() != null) { typeSpec += "@" + getVOB(); } return typeSpec; } COM: <s> get the type specifier string </s>
funcom_train/46718318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addDependent(FieldInterceptorElement fieldInterceptorElement) { if (fieldInterceptorElement.contains(this)) { throw new ObjectBoxException("Attempt was made to add a fieldInterceptor which would introduce a circular dependency"); } if (dependents == null) { dependents = new ArrayList<FieldInterceptorElement>(); } fieldInterceptorElement.incrementDependencyCount(); return dependents.add(fieldInterceptorElement); } COM: <s> adds a field interceptor element as a dependent an interceptor which </s>
funcom_train/22916747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void resetTxtBoxes() { //Disable the textboxes txtFirstName.setEnabled(false); txtLastName.setEnabled(false); txtMiddleName.setEnabled(false); txtLogin.setEnabled(false); txtPassword.setEnabled(false); //Disable edits txtFirstName.setEditable(false); txtLastName.setEditable(false); txtMiddleName.setEditable(false); txtLogin.setEditable(false); txtPassword.setEditable(false); //Empty the textboxes txtFirstName.setText(""); txtLastName.setText(""); txtMiddleName.setText(""); txtLogin.setText(""); txtPassword.setText(""); } COM: <s> a method to reset the text boxes on this panel </s>
funcom_train/15407440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFullTableName(JoinTable joinTable) { StringBuilder sb = new StringBuilder(); if (!StringHelper.isNull(joinTable.catalog())){ sb.append(joinTable.catalog()).append("."); } if (!StringHelper.isNull(joinTable.schema())){ sb.append(joinTable.schema()).append("."); } sb.append(joinTable.name()); return sb.toString(); } COM: <s> return the full table name </s>
funcom_train/4689225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Request filterWith(final Description desiredDescription) { return filterWith(new Filter() { @Override public boolean shouldRun(Description description) { if (description.isTest()) return desiredDescription.equals(description); // explicitly check if any children want to run for (Description each : description.getChildren()) if (shouldRun(each)) return true; return false; } @Override public String describe() { return String.format("Method %s", desiredDescription.getDisplayName()); } }); } COM: <s> returns a request that only runs contains tests whose </s>
funcom_train/36465820
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addVertex(Vertex v){ for(int i=0; i<this.v.size(); i++){ if(this.v.get(i).equals(v)){ return i+1; } } this.v.add(v); return this.v.size(); } COM: <s> inserts a new vertex or returns the index of an equal vertex </s>
funcom_train/50497193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Combo getCombo(Composite parent) { if (combo == null) { combo = new Combo(parent, SWT.READ_ONLY); combo.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { Integer oldValue = value; String valueString = combo.getText(); value = getValueForString(valueString); setPresentsDefaultValue(false); fireValueChanged(VALUE, oldValue, value); } }); } return combo; } COM: <s> lazily create and return the combo control </s>
funcom_train/5433438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocation(Grid grid,boolean setOccupier) { boolean changingPlanets = true; if(theLoc instanceof Grid) { changingPlanets=(((Grid)theLoc).thePlanet!=grid.thePlanet); } removeOldLocation(changingPlanets); theLoc=grid; if(changingPlanets) grid.thePlanet.groundObjects.add(this); if(setOccupier) grid.occupier=this; } COM: <s> set my new location </s>
funcom_train/13524193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddHeader() { assertNull(ctrlDoc.getHeader()); ctrlDoc.addHeader("HeaderTest"); assertNotNull(ctrlDoc.getHeader()); assertEquals("HeaderTest",ctrlDoc.getHeader()); ctrlDoc.addHeader("HeaderTest2"); assertNotNull(ctrlDoc.getHeader()); assertEquals("HeaderTest2",ctrlDoc.getHeader()); ctrlDoc.addHeader(null); assertNull(ctrlDoc.getHeader()); } COM: <s> test add header string </s>
funcom_train/48386013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExecuteWithSharkInterface() { WfResource wfResource = (WfResource) enhydraSharkTemplate.execute(new EnhydraSharkInterfaceCallback() { public Object doWithEnhydraSharkInterface(SharkInterface sharkInterface) throws Exception { SharkConnection sConn = sharkInterface.getSharkConnection(); sConn.connect(connectInfo); return sConn.getResourceObject(); } }); assertNotNull(wfResource); } COM: <s> test operation with shark interface </s>
funcom_train/46760153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TranslationModel getTranslation(final long translationId, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { if (call.isStoreAudit()) { BaseData.getSecurity().storeAudit(call.getUserRefId(), translationId, "Viewed Translation", call); } return ReferenceData.getTranslation(translationId, call); }}; return (TranslationModel) call(method, call); } COM: <s> return the single translation model for the primary key </s>
funcom_train/3391937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void navLinkNext() { if (next == -1) { printText("doclet.Next_Letter"); } else { printHyperLink("index-" + next + ".html","", configuration.getText("doclet.Next_Letter"), true); } } COM: <s> print the next unicode character index link </s>
funcom_train/22862317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GLSLManagedShader findShader(OpenGLState glState, GLSLDisplay disp, ShaderConfiguration sc, Shader s) { GLSLManagedShader cs = getCacheEntry(glState, disp, sc, s); if(cs == null) { System.err.println("Shader not found:"+s); return null; } shaderChanged = false; return cs; } COM: <s> will obtain a glslshader to emulate the input shaders </s>
funcom_train/17704358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean edit(Person person) { logger.debug("Editing person with id: " + person.getId()); try { for (Person p:persons) { if (p.getId().longValue() == person.getId().longValue()) { logger.debug("Found record"); persons.remove(p); persons.add(person); return true; } } logger.debug("No records found"); return false; } catch (Exception e) { logger.error(e); return false; } } COM: <s> edits an existing person </s>
funcom_train/44388045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void figureRemoved(FigureChangeEvent e) { System.out.println("In URLFigure.figureremoved+++++++++++++++++++++++++++++++++++++++++"); if(node.getDataField() != null) node.getDataField().setEditableItemText(""); node.setText(""); setConnectionFigure(null); PhoneObjectTopLevelNode pon = node.getCiscoParent(); GCF aGCF = pon.getGCFObject(); CiscoPhoneObject cpo = (CiscoPhoneObject)aGCF.pGcf; cpo.reDraw(pon); } COM: <s> sent when a figure was removed </s>
funcom_train/48211563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addItem(Item item) { ConstantPNode newConstantNode = new ConstantPNode(item, queryPen, canvas, this.variables); newConstantNode.addChangeListener(resizeListener); newConstantNode.translate(0, (title.getHeight() + BORDER_SIZE) * (2 + constantPNodeList.size()) + BORDER_SIZE); constantPNodeList.add(newConstantNode); ConstantsPane.this.addChild(newConstantNode); repositionAndResize(); } COM: <s> adds the item to this constanst pane in a new constant pnode </s>
funcom_train/38512460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addUnstoredFields() { mockTop.getUnstoredFields(); controlTop.setReturnValue(new HashSet(Arrays.asList(TOP_FIELDS))); mockBottom.getUnstoredFields(); controlBottom.setReturnValue(new HashSet(Arrays.asList(BOTTOM_FIELDS))); } COM: <s> adds a unstored fields to the merging object descriptor test object </s>
funcom_train/24558598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createWorkspace() { try { IContributionService contributionService = (IContributionService) ac.getBean("contributionService"); workspace = contributionService.addWorkspace(createIWorkspace()); } catch (ContributionServiceException e) { e.printStackTrace(); fail("Not yet implemented"); } } COM: <s> create a persisted workspace </s>
funcom_train/28929661
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected MessageDigest createDigester() throws EosException { try { final Configuration config = getConfiguration(); String algorithm = DEFAULT_MESSAGE_DIGEST; if (config != null) { algorithm = config.get(MESSAGE_DIGEST_CONFIG_NAME, DEFAULT_MESSAGE_DIGEST); } MessageDigest md; md = MessageDigest.getInstance(algorithm); return md; } catch (final NoSuchAlgorithmException e) { throw new EosException(e); } } COM: <s> returns the message digest implementation </s>
funcom_train/43382560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File resolvePath(String t) { String path = t; File newpath; if (path.startsWith("/") || path.startsWith(FILE_SEPARATOR)) { newpath = new File(path); } else { newpath = new File(client.getCurrentDirectory() + "/" + path); } return newpath; } COM: <s> constructs an absolute path from a partial path all relative paths are </s>
funcom_train/51298504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Role getRoleObj(Contractor ca, boolean isSupplier) { for (Iterator iter = ca.getRoles().iterator(); iter.hasNext();) { Role role = (Role) iter.next(); if (isSupplier) { if (role instanceof Partner && ((Partner) role).getGroupId() == 1) { return role; } } else { if (role instanceof Partner && ((Partner) role).getGroupId() == 2) { return role; } } } return null; } COM: <s> returns contractor role according to is supplier param </s>
funcom_train/7768857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSkill(CharacterSkill skill) throws PQException { Integer typeID = Integer.valueOf(skill.getTypeID()); if (skills.containsKey(typeID)) { skills.put(typeID, skill); throw new PQException("skill overwritten"); } else { skills.put(typeID, skill); } } COM: <s> adds a character skill to the characters skill list </s>
funcom_train/28754199
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setResults(String newVal) { if ((newVal != null && this.results != null && (newVal.compareTo(this.results) == 0)) || (newVal == null && this.results == null && results_is_initialized)) { return; } this.results = newVal; results_is_modified = true; results_is_initialized = true; } COM: <s> setter method for results </s>
funcom_train/199459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object createObject(Class type) { Class defaultType = mapper().defaultImplementationOf(type); try { return defaultType.newInstance(); } catch (InstantiationException e) { throw new ConversionException("Cannot instantiate " + defaultType.getName(), e); } catch (IllegalAccessException e) { throw new ConversionException("Cannot instantiate " + defaultType.getName(), e); } } COM: <s> create object returns an instance of the specified class </s>
funcom_train/22286232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void focusAtRowDisplay(int displayIndex) { if (displayIndex < 0 || displayIndex >= rowCount) { paramError("focusAtRowDisplay(int)","invalid row index specified"); return; } int rowPos = displayIndex * (rowHeight + rowPadding * 2) + ((TableContent)content).INSET; focusContent(-content.tx, rowPos, 1, rowHeight + rowPadding * 2 + 2); } COM: <s> focus at the row with the given display index </s>
funcom_train/12333584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object decisionFor(Object object) { if (! (object instanceof CrawlURI)) { return PASS; } CrawlURI curi = (CrawlURI)object; Object decision = checkOutLinks(curi); if (decision == ACCEPT) { curi.putString("resource-type", CSXConstants.HUB_TYPE); } return decision; } //- decisionFor COM: <s> checks links for hub status returning accept if success and pass </s>
funcom_train/19666104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vendor create() throws DataException { String id = null; try{ id = GUID.generate(); } catch (Exception e) { throw new DataException("Could not generate new Vendor", e); } Vendor v = new Vendor(id); Cache c = Cache.getInstance(); c.put(v.getVguid(), v); return v; } COM: <s> this method is used to create a business object of type vendor </s>
funcom_train/36671782
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createWorker(Socket socket) { String workerID = socket.getInetAddress().getHostName() + socket.getPort(); KSServerWorker worker = new KSServerWorker(frame, socket, workerID, transmitting, this); workers.put(workerID, worker); worker.start(); } // createWorker COM: <s> spawn a new code ksserver worker code to handle the communication with </s>
funcom_train/43040690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkSecurity(Long idStory){ logger.debug("IN checkSecurity(Long idStory)"); final User userConnected = SecurityUtil.getUserConnected(); if (!SecurityUtil.isUserConnectedAdmin() && !storyDAO.isOwner(userConnected, idStory)){ throw new AuthorizationServiceException("Non authorized for this operation"); } logger.debug("OUT checkSecurity(Long idStory)"); } COM: <s> check if the user own the story </s>
funcom_train/20205403
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void render(HtmlStringBuffer buffer) { if (getTag() != null) { renderTagBegin(getTag(), buffer); buffer.closeTag(); renderContent(buffer); renderTagEnd(getTag(), buffer); } else { if(hasControls()) { renderContent(buffer); } } } COM: <s> render the html representation of the table cell </s>