__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/50018656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDecodeAttributeBody() throws StunException { char offset = Attribute.HEADER_LENGTH; char length = (char)(msgFixture.unknownOptionalAttribute.length - offset); optionalAttribute.decodeAttributeBody(msgFixture.unknownOptionalAttribute, offset, length); assertTrue("OptionalAttribute did not decode properly.", Arrays.equals( expectedAttributeValue, optionalAttribute.getBody())); assertEquals("Lenght was not properly decoded", length, optionalAttribute.getDataLength()); } COM: <s> test whether sample binary arrays are correctly decoded </s>
funcom_train/1835463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStandardXmlXslHeader() throws ClientHeaderException { if (this.xslFilename != null) { String h = "V1,XMLXSL2PDF,USER," + this.username + "," + this.xslFilename; setHeader(h); } else { throw new ClientHeaderException("The XSLT filename must be set before creating the header."); } } // End of setStandardXmlXslHeader method COM: <s> sets a standard header used for xml xsl transactions </s>
funcom_train/14123272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveMail(GWTMailMessage mailMessage) { AsyncCallback callback = new AsyncCallback() { public void onSuccess(Object result) { afterSave((GWTMailMessage) result); } public void onFailure(Throwable caught) { } }; GWTMailServiceCaller.getService().saveMailMessage(editedMail, callback); } COM: <s> rpc for saving edited mail </s>
funcom_train/14009507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer countWords(String text) { if (BlojsomUtils.checkNullOrBlank(text)) { return new Integer(0); } else { String textWithoutTokens = text.replaceAll("\\<.*?\\>", ""); StringTokenizer tokenizer = new StringTokenizer(textWithoutTokens); return new Integer(tokenizer.countTokens()); } } COM: <s> count the number of words in a piece of text </s>
funcom_train/29092398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { try { final Message[] msgs = this.getMessages(); final Messages ret = (Messages) super.clone(); ret.clear(); for(int i = msgs.length - 1; i >= 0; i--) { ret.addMessage((Message) msgs[i].clone()); } return ret; } catch(CloneNotSupportedException e) { throw new RuntimeException(e); } } COM: <s> creates and returns a deep copy of this object </s>
funcom_train/1883169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getCommentsScrollPane() { if (this.commentsScrollPane == null) { this.commentsScrollPane = new JScrollPane(); this.commentsScrollPane .setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); this.commentsScrollPane.setPreferredSize(new Dimension(200, 45)); this.commentsScrollPane.setSize(new Dimension(200, 45)); this.commentsScrollPane.setViewportView(this.getCommentsTextArea()); } return this.commentsScrollPane; } COM: <s> this method initializes comments scroll pane </s>
funcom_train/11708627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static private String getText(String text) { int start = text.indexOf("<TEXT>"); int end = text.indexOf("</TEXT>"); if (start != -1 && end != -1) { return text.substring(start + 6, end); } else { return text; } } COM: <s> gets text to be processed by the tae </s>
funcom_train/48555571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createGroupDescript() { GridData gridData2 = new GridData(); gridData2.grabExcessHorizontalSpace = true; gridData2.heightHint = 64; gridData2.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; groupDescript = new Group(this, SWT.NONE); groupDescript.setLayout(new FillLayout()); groupDescript.setText("备注"); groupDescript.setLayoutData(gridData2); descript = new Text(groupDescript, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.BORDER); } COM: <s> this method initializes group descript </s>
funcom_train/36769916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleMouseEvent(MouseEvent e) { if (eventsAreDisabled()) { return; } if (e.getSource() == attachmentList) { if (e.isPopupTrigger()) { if (target != null) { enableAttachmentMenuItems(); attachmentPopupMenu.show(e.getComponent(), e.getX(), e.getY()); } } } } COM: <s> event handler for the attachment lists mouse events </s>
funcom_train/45623395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addClrVersionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_GenerateApplicationManifestType_clrVersion_feature"), getString("_UI_PropertyDescriptor_description", "_UI_GenerateApplicationManifestType_clrVersion_feature", "_UI_GenerateApplicationManifestType_type"), MSBPackage.eINSTANCE.getGenerateApplicationManifestType_ClrVersion(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the clr version feature </s>
funcom_train/8520300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resetCommonProperties() { // Give the particle full life when created. life = 1.0f; // Give the particle random fade value. fade = getRandomFadeValue(); // Set color values red = getGreyValue(); green = getGreyValue(); blue = getGreyValue(); // Initial location for the particle is at 0,0,0. position.set(1, 0); position.set(2, 0); position.set(3, 0); } COM: <s> resets the life fade color and location of this particle object </s>
funcom_train/18049321
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getSvEditNameTextField() { if (svEditNameTextField == null) { svEditNameTextField = new JTextField(); svEditNameTextField.setPreferredSize(new Dimension(181, 22)); svEditNameTextField.setAlignmentX(1.0F); svEditNameTextField .setToolTipText("Specifies the name of the secret, which is used to identify this secret."); svEditNameTextField.setMinimumSize(new Dimension(181, 22)); } return svEditNameTextField; } COM: <s> this method initializes sv edit name text field </s>
funcom_train/3652253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(File f) { if (!f.canRead()) { return false; } else if (f.isDirectory()) { return true; } else { for (int ii = 0; ii < extensions.length; ii++) { if (f.getName().endsWith("." + extensions[ii])) { return true; } } return false; } } COM: <s> accepts readable files that are either directories </s>
funcom_train/35691584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getPartialSubmit() { if (partialSubmit != null) { return partialSubmit.booleanValue(); } ValueBinding vb = getValueBinding("partialSubmit"); Boolean boolVal = vb != null ? (Boolean) vb.getValue(getFacesContext()) : null; return boolVal != null ? boolVal.booleanValue() : Util.isParentPartialSubmit(this); } COM: <s> p return the value of the code partial submit code property </s>
funcom_train/43226123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void render() { Brick brick; Iterator it; Point3D cameraLocation, cameraLookAt; synchronized (viewDirtyLock) { if (viewDirty) { cameraLocation = camera.getLocation(); cameraLookAt = camera.getLookAt(); performCameraTransform(cameraLocation, cameraLookAt); it = bricks.iterator(); while (it.hasNext()) { brick = (Brick)it.next(); if (brick.isVisible()) { renderBrick(brick); } } viewDirty = false; } } } COM: <s> step through the bricks rendering each one </s>
funcom_train/33058624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean getPropDataBool(IDRSHead idrs) throws Exception { Object obj = idrs.getObject(owner); Class cls = obj.getClass(); Method meth = cls.getMethod(src,new Class[0]); return ((Boolean) meth.invoke(obj,new Object[0])).booleanValue() ; } COM: <s> uses reflection to retrieve data from a bean property </s>
funcom_train/48144386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double mean() { double sum=((MathDouble)getArgument(0)).value(); for(int i=1;i<length();i++) { Object next=getArgument(i); if(next instanceof MathMLExpression) next=((MathMLExpression)next).evaluate(); sum+=((MathDouble)next).value(); } return sum/length(); } COM: <s> calculates the mean for this expression </s>
funcom_train/2292670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasCheckMultiActions() { Iterator it = m_multiActions.elementList().iterator(); while (it.hasNext()) { CmsListMultiAction action = (CmsListMultiAction)it.next(); if (!(action instanceof CmsListRadioMultiAction)) { return true; } } return false; } COM: <s> returns code true code if at least check multiaction has been set </s>
funcom_train/10620362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkInstance() throws SecurityException { if (getCurrentKeyboardFocusManager() != this) { // awt.7C=this KeyboardFocusManager is not installed in the current thread's context throw new SecurityException(Messages.getString("awt.7C")); //$NON-NLS-1$ } } COM: <s> this method will throw a security exception if this keyboard focus manager </s>
funcom_train/1615590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { while(true) { repaint(); try { canvas.changeSize(getHeight(), getWidth()); simthread.sleep(10); canvasthread.run(); canvasthread.join(); //this.iters++; } catch(Exception ie) {} //System.out.println(iters + "!!"); } } COM: <s> iterate the physics call repaint </s>
funcom_train/49044636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEventPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EventRelativeTime_Event_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EventRelativeTime_Event_feature", "_UI_EventRelativeTime_type"), EventPackage.Literals.EVENT_RELATIVE_TIME__EVENT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the event feature </s>
funcom_train/32206009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll ( BotOperatorSet container ) { if ( container == null ) { throw new NullPointerException(); } if ( resolver == null ) { throw new NullPointerException(); } // Iterate through one container and add everything to the other synchronized ( container ) { for ( Iterator iter = container.iterator() ; iter.hasNext() ; ) { BotOperator operator = (BotOperator)iter.next(); add( operator ); } } } COM: <s> adds all the bot operator of a container in this one </s>
funcom_train/47615327
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeRow(FlexTable flexTable, RadioButton rb) { int numRows = flexTable.getRowCount(); for (int i = numRows; i > 2; i--) { Widget w = flexTable.getWidget(i - 1, 1); if (rb == w) { flexTable.removeRow(i - 1); break; } } } COM: <s> remove a row from the flex table </s>
funcom_train/11754918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttribute(AttributeInfo attribute) { synchronized (attributes) { AttributeInfo results[] = new AttributeInfo[attributes.length + 1]; System.arraycopy(attributes, 0, results, 0, attributes.length); results[attributes.length] = attribute; attributes = results; this.info = null; } } COM: <s> add a new attribute to the set of attributes for this mbean </s>
funcom_train/8806234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int offsetByLine(final int line) throws BadLocationException { /* * Works for any binary search tree. */ int remaining= line; int offset= 0; Node node= fRoot; while (true) { if (node == null) fail(line); if (remaining == node.line) return offset + node.offset; if (remaining < node.line) { node= node.left; } else { remaining -= node.line + 1; offset += node.offset + node.length; node= node.right; } } } COM: <s> returns the offset for the given line number </s>
funcom_train/16102654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPanButtons() { if (this.panButtons == null) { this.panButtons = new JPanel(); this.panButtons.setLayout(new BorderLayout()); this.panButtons.add(this.getBtnCancel(), java.awt.BorderLayout.EAST); this.panButtons.add(this.getBtnOk(), java.awt.BorderLayout.WEST); } return this.panButtons; } COM: <s> this method initializes pan buttons </s>
funcom_train/50640512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (UmpPackage.eINSTANCE.getAbstractMappingContainer_Mappings(), UmpFactory.eINSTANCE.createMapping())); } COM: <s> this adds to the collection of </s>
funcom_train/51271038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkStartExpr(int startPosition) throws MXQueryException { assignVars(startVars, startVarsHolder, startPosition); boolean value=false; TokenInterface startTok = startExpr.next(); if(startTok.getEventType() == Type.BOOLEAN){ value = startTok.getBoolean(); }else{ throw new RuntimeException("This should never happen because the condition is always a boolean expression."); } startExpr.reset(); return value; } COM: <s> checks the start expression </s>
funcom_train/51589232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean match(final ServiceReference reference) { try { return match(((ServiceReferenceImpl) reference).properties); } catch (Exception e) { // so this was not instance of ServiceReferenceImpl. Someone // must have created an own implementation. final Dictionary dict = new Hashtable(); String[] keys = reference.getPropertyKeys(); for (int i = 0; i < keys.length; i++) { dict.put(keys[i], reference.getProperty(keys[i])); } return match(dict); } } COM: <s> check if the filter matches a service reference </s>
funcom_train/35838272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UINode getUINode(String id) { Component array[] = oViewPane.getComponentsInLayer((UIViewPane.NODE_LAYER).intValue()); UINode uinode = null; int i=0; while(i<array.length) { uinode = (UINode)array[i++]; if((uinode.getNode().getId()).equals(id)) { return uinode; } } return null; } COM: <s> return the uinode with the given id </s>
funcom_train/41593039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRenterPropertyDescriptor(Object object) { itemPropertyDescriptors .add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_RentRecord_renter_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_RentRecord_renter_feature", "_UI_RentRecord_type"), LibraryPackage.Literals.RENT_RECORD__RENTER, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the renter feature </s>
funcom_train/49350227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getColorChooserPanel() { if (colorChooserPanel == null) { colorChooserPanel = new JPanel(); colorChooserPanel.setLayout(new GridBagLayout()); colorChooserPanel.setBorder(BorderFactory.createTitledBorder(null, resource.getString("colorPaths"), TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null)); colorChooserPanel.add(getColorChooser(), new GridBagConstraints()); } return colorChooserPanel; } COM: <s> this method initializes color chooser panel </s>
funcom_train/45850743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String filterInfo(String info) { info = StringUtilities.replaceHtmlCoding(info); info = StringUtilities.removeAccents(info); info = StringUtilities.removeSpecialChars(info); // TODO try applying and not applying stems info = StringUtilities.stem(info); info = StringUtilities.removeStopWords(info); // TODO try applying and not applying spellcheck info = StringUtilities.spellCheck(info); info = (info.length() >= ConfigParser.getMinLengthTerm()) ? info : ""; return info; } COM: <s> filter the info before adding to the arff file </s>
funcom_train/22384148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void exec(ZZCell code) { p("CLANG exec "+code); for(ZZCell current = code; current != null; current = current.s("d.2", 1)) { // Find op. ZZClangOp op = (ZZClangOp)funcs.get(current.getText()); p("OP: op"); if(op==null) throw new ZZError("Unknown op '"+current.getText()+ "'"); op.exec(current, cursor, this); } } COM: <s> execute starting from a cell </s>
funcom_train/20352929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getcolorchoosebut() { ChooseColor b = new ChooseColor(listframe); b.setBound(new Rectangle(141, 509, 40, 35)); b.addlist(new ActionListener() { public void actionPerformed(ActionEvent e) { JButton tmpb = (JButton) e.getSource(); listpanel.setBackground(tmpb.getBackground()); } }); b.getBut().setToolTipText("Change Color Scheme"); return b.getBut(); } COM: <s> build list of color choose buttons </s>
funcom_train/13850602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private EntryClass getEmptyEntryClass(EntryClass eclass) { EntryClass match = null; for (int i = entryClasses.size(); --i >= 0; ) { EntryClass cand = (EntryClass)entryClasses.get(i); if (eclass.isAssignableFrom(cand)) { if (cand.getNumFields() != 0 || match != null) return null; match = cand; } } return match; } COM: <s> return member of entry classes that is equal to or a subclass of </s>
funcom_train/13874969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addReferredRelationPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RelationCallExp_referredRelation_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RelationCallExp_referredRelation_feature", "_UI_RelationCallExp_type"), QvtrelationPackage.Literals.RELATION_CALL_EXP__REFERRED_RELATION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the referred relation feature </s>
funcom_train/2935950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTriggeredByPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Transition_triggeredBy_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Transition_triggeredBy_feature", "_UI_Transition_type"), StatemPackage.Literals.TRANSITION__TRIGGERED_BY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the triggered by feature </s>
funcom_train/42387242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Image getImage(Template template) { ImageRegistry registry= TemplateEditorUI.getDefault().getImageRegistry(); Image image= registry.get(DEFAULT_IMAGE); if (image == null) { ImageDescriptor desc= TemplateEditorUI.imageDescriptorFromPlugin("org.eclipse.ui.examples.rubyeditor", DEFAULT_IMAGE); //$NON-NLS-1$ registry.put(DEFAULT_IMAGE, desc); image= registry.get(DEFAULT_IMAGE); } return image; } COM: <s> always return the default image </s>
funcom_train/41164163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoHability entity) { EntityManagerHelper.log("saving CoHability instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co hability entity </s>
funcom_train/32719750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getBERUsmPayloadLength() { int length = authoritativeEngineID.getBERLength(); length += authoritativeEngineBoots.getBERLength(); length += authoritativeEngineTime.getBERLength(); length += userName.getBERLength(); length += authenticationParameters.getBERLength(); length += privacyParameters.getBERLength(); return length; } COM: <s> get berusm payload length </s>
funcom_train/9163670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void expect(String value, Breaks delims) { StringBuilder temp = new StringBuilder(value.length() + 1); for (int i = 0; i < value.length(); i++) { temp.append(read()); } char delim = peek(); if (!delims.isDelimiter(delim)) { temp.append(delim); } if (!temp.toString().equals(value)) { throw new ParseException(getPlace(), "Expected " + value + " but got " + temp + "."); } } COM: <s> expects the given string </s>
funcom_train/7614297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private NativeImageFormat createImageFormat(BufferedImage bi) { int nRows = bi.getHeight(); int nCols = bi.getWidth(); int nComps = bi.getColorModel().getNumColorComponents(); short imgData[] = new short[nRows*nCols*nComps]; return new NativeImageFormat( imgData, nComps, nRows, nCols); } COM: <s> creates native image format from buffered image </s>
funcom_train/51657611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleMouseDown(MouseEvent event) { if (fTextViewer != null) { int[] lines= toLineNumbers(event.y); Position p= getAnnotationPosition(lines, false); if (p != null) { fTextViewer.revealRange(p.getOffset(), p.getLength()); fTextViewer.setSelectedRange(p.getOffset(), p.getLength()); } fTextViewer.getTextWidget().setFocus(); } fLastMouseButtonActivityLine= toDocumentLineNumber(event.y); } COM: <s> handles mouse clicks </s>
funcom_train/25710242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FredOutVal getBestFred(ArrayList<FredOutVal> data) { // Sort the values and pick the best one, storing the sorted values in the debug file. File debug = new File(workingDirectory + "fredDebug.dat"); FredOutVal bestFred; bestFred = binningFasta.chooseBest(data, debug); return bestFred; } COM: <s> choose the best fred value according to the sorting algorithm </s>
funcom_train/3121638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paintIcon(Component c, Graphics g, int x, int y) { if (flagDebug == true) { g.setColor(Color.RED); g.fillRect(x, y, getIconWidth(), getIconHeight()); } } // of method COM: <s> only paint if debug was on </s>
funcom_train/30047258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getResourceInfo(String hostname, String queryType) { GpirQueryClient queryClient = getGpirQueryClient(); String xmlResult = null; try { xmlResult = queryClient.getQueryByResource(queryType,hostname); } catch (SOAPException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return xmlResult; } COM: <s> queries the gpir web service for summary information about a single resource </s>
funcom_train/26114079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String recordToString() { String string = new String(); int index=1; int i=1; for(Move m : moves) { if(i%2==1) { string += index+"."+m.getString() + " "; i++; } else { string += m.getString()+"; "; i++; index++; } } return string; } COM: <s> converts the record of games moves into string </s>
funcom_train/33441905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void validate() { if (!isLogged()) { AuthRole basicRole = new AuthRole("ANONYMOUS"); getCurrentRolesHolder().setRole(basicRole); return; } else { User user = getDomainFactory().get(User.class, getUserId()); if (user != null && !user.getRoles().equals( getCurrentRolesHolder().getRoles())) { getCurrentRolesHolder().setRoles(user.getRoles()); } } } COM: <s> validate local thread roles with logged user roles </s>
funcom_train/7265870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void throwExceptionIfNotBootstrapped(String operation) throws NotBootstrappedException { if (!isBootstrapped()) { if (ContextSettings.THROW_EXCEPTION_IF_NOT_BOOTSTRAPPED.getValue()) { throw new NotBootstrappedException(getName(), operation); } else if (LOG.isInfoEnabled()) { LOG.info(NotBootstrappedException.getErrorMessage(getName(), operation)); } } } COM: <s> a helper method that throws a not bootstrapped exception if </s>
funcom_train/4122406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Unit getBestTreasureTrain(Tile tile) { Unit bestTreasureTrain = null; for (Unit unit : tile.getUnitList()) { if (unit.canCarryTreasure() && (bestTreasureTrain == null || bestTreasureTrain.getTreasureAmount() < unit.getTreasureAmount())) { bestTreasureTrain = unit; } } return bestTreasureTrain; } COM: <s> returns the treasure train carrying the largest treasure </s>
funcom_train/18437548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public State undo() { // Ignore if game over if (gameOver) { return null; } try { State s = this.game.undo(); this.state = s; return s; } catch (GameException e) { e.printStackTrace(); return this.state; } finally { fireListeners(GameControllerListener.OPERATION_UNDO); } } COM: <s> performs an undo in the game </s>
funcom_train/44627580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testJMLprecedence2a() { helpExpr("a <==> b <==> c <==> d", JmlBinary.class, 16, JmlBinary.class, 9, JmlBinary.class, 2, JCIdent.class ,0, JCIdent.class ,7, JCIdent.class ,14, JCIdent.class ,21); } COM: <s> test association of equiv operators </s>
funcom_train/38289548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() throws Exception { Document doc = DocumentBuilderFactory.newInstance() .newDocumentBuilder() .parse(new File(this.fileString)); //$NON-NLS-1$ FORenderer renderer = new FORenderer(null); renderer.init(new DOMSource(doc.getDocumentElement()), null); this.root = renderer.getRootFigure(); setUpForTestOverlapping(); } COM: <s> intitialize basic figures </s>
funcom_train/3102383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getNextBreak(int offset) { Assertion.nonNegative(offset); int width= 0; int accumulated= 0; int extent= 0; int follow= fIterator.following(offset); String word= null; while (follow != BreakIterator.DONE) { word= fLine.substring(offset, follow); extent= fGraphics.textExtent(word).x; accumulated= extent + width; if (accumulated > fWidth) { if (width > 0) { return offset; } return follow; } offset= follow; width= accumulated; follow= fIterator.next(); } return follow; } COM: <s> returns the next line break after the offset </s>
funcom_train/22356822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gameDataChanged(GameDataEvent e) { if (e.getGameData() != null) { gamename = e.getGameData().getGameName().toLowerCase(); if (ImageFactory.log.isDebugEnabled()) { ImageFactory.log.debug("ImageFactory.gameDataChanged: set gamename to " + gamename); } images.clear(); } } COM: <s> called if gamedata changes </s>
funcom_train/6369894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateModelBound() { for (int i = 0; i < this.getQuantity(); i++) { if (this.getChild(i) instanceof TerrainPage) { ((TerrainPage) getChild(i)).updateModelBound(); } else if (this.getChild(i) instanceof TerrainBlock) { ((TerrainBlock) getChild(i)).updateModelBound(); } } } COM: <s> code update model bound code updates the model bounds generates the </s>
funcom_train/32353252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File show(final FileFilter filter) { final JFileChooser fc = new JFileChooser(); if (filter != null) { fc.addChoosableFileFilter(filter); fc.setAcceptAllFileFilterUsed(false); } final int returnVal = fc.showOpenDialog(mainframe); if (returnVal == JFileChooser.APPROVE_OPTION) { final File file = fc.getSelectedFile(); logger.info("Opening: " + file.getName() + "."); return file; } else { logger.info("Open command cancelled by user."); } return null; } COM: <s> show the dialog and get the file </s>
funcom_train/25332814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetAssemblyDAO() throws Exception { DBDAOCollectionCoreFactory instance = new DBDAOCollectionCoreFactory(); DBCollectionSpecies sp = new DBCollectionSpecies(); instance.setSpecies(sp); DBAssemblyDAO result = instance.getAssemblyDAO(); assertNotNull(result); assertTrue(result.getFactory()==instance); assertTrue(result.getSpecies()==sp); } COM: <s> test of get assembly dao method of class dbdaocollection core factory </s>
funcom_train/7758181
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addService(ID name, Service service) { Service oldp = addServiceSync(name, service); setShortCut(name, service); if ((oldp != null) && (oldp != service)) { LOG.warn("Service replaced for " + name); // oldp.stopApp(); maybe ? } } COM: <s> adds a service to the set </s>
funcom_train/1238266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefinitionGenerators() { addGenerator(Definition.class, JavaDefinitionWriter.class); // for faults addGenerator(Definition.class, JavaDeployWriter.class); // for deploy.wsdd addGenerator(Definition.class, JavaUndeployWriter.class); // for undeploy.wsdd addGenerator(Definition.class, JavaBuildFileWriter.class); //add a build file writer } // addDefinitionGenerators COM: <s> method add definition generators </s>
funcom_train/18721743
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getContentMediaSummary() { String xPath = OFFSET + "Description/MultimediaContent/*/TextAnnotation/FreeTextAnnotation"; //System.out.println(mpeg7.toString()); contentMediaSummary = readXmlValue(xPath, contentMediaSummary); if (contentMediaSummary == null) { contentMediaSummary = ""; } return contentMediaSummary; } COM: <s> summary about the content of the media file </s>
funcom_train/2032680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createPowerOfTwoTexture() { //called after scaleToFit therefore we use realW and realH. int canvasW = nextPowerOfTwo(realW); int canvasH = nextPowerOfTwo(realH); if (realW != canvasW || realH != canvasH) { ILU.iluEnlargeCanvas(canvasW, canvasH, 1); realW = canvasW; realH = canvasH; System.out .println("canvas enlarged to: " + canvasW + " " + canvasH); } } COM: <s> makes the texture a power of two one </s>
funcom_train/15743452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAll(IResource resource) throws CoreException { add(resource); if (resource instanceof IContainer) { IContainer container = (IContainer) resource; IResource[] members = container.members(IContainer.EXCLUDE_DERIVED); for (IResource child : members) { addAll(child); } } } COM: <s> adds the resource and recursively adds its decendants if its a </s>
funcom_train/31140833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void initLogging(){ String configFileName = Globals.DEF_LOG_CONFIG_FILENAME; File file = new File(configFileName); if ( file.exists() ) { DOMConfigurator.configure(configFileName); LOGGER.debug(configFileName + " found, configuring Log4J"); } else { BasicConfigurator.configure(); Properties properties = new Properties(); properties.setProperty("log4j.threshold", "INFO"); PropertyConfigurator.configure(properties); LOGGER.info("configuring Log4J to defaults"); } LOGGER.info("Log4J configured"); LOGGER.debug("configureLogging [OUT ]"); } COM: <s> initializes the log4 j logging system </s>
funcom_train/10628791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLongValuePositive1() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, 120, -34, -12, 45, 98}; long result = 3268209772258930018L; long aNumber = new BigInteger(aBytes).longValue(); assertTrue(aNumber == result); } COM: <s> convert a big integer to a positive long value </s>
funcom_train/27810911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private InputStream getImageInputStream(File file) throws IOException { JaudiotaggerParser parser = new JaudiotaggerParser(); if (parser.isApplicable(file)) { MediaFile mediaFile = mediaFileService.getMediaFile(file); return new ByteArrayInputStream(parser.getImageData(mediaFile)); } else { return new FileInputStream(file); } } COM: <s> returns an input stream to the image in the given file </s>
funcom_train/44101571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ArrayList addDistinctNames(ArrayList to, ArrayList from){ ArrayList res = to; Iterator fi = from.iterator(); String name = ""; while (fi.hasNext()){ name = ""; name = (String) fi.next(); if (!res.contains(name)){ res.add(name); } } return res; } COM: <s> adds distinct string values form one array list to another </s>
funcom_train/6269258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearTextAreas() { T140TextArea area = t140Panel.getRemoteTextArea(); if (area != null) { area.setText(""); } area = t140Panel.getLocalTextArea(); if (area != null) { area.setText(""); } T140LogArea larea = t140Panel.getLogTextArea(); if (larea != null) { larea.clearArea(); } } COM: <s> clears the text areas </s>
funcom_train/36489877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(){ try { DAO = ProjectDAO.getInstance(); ResultSet rs = DAO.getAllFlights(); while(rs.next()) { getAllFlights().add(rs.getInt(RESULT_1)); } } catch (Exception e) { System.out.println("Cannot Connect To Database"); } } COM: <s> run function for this use case </s>
funcom_train/50770746
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DeclaredObjectReference addDeclaredObjectReference(Vector pack, String concern, String filterm, String name) { DeclaredObjectReference doref = new DeclaredObjectReference(); doref.setPackage(pack); doref.setConcern(concern); doref.setFilterModule(filterm); doref.setName(name); this.addToRepository(doref); return (doref); } COM: <s> creates a new reference to an intenal will be resolved in rexref </s>
funcom_train/22286788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeColumnWidth(int index, int widthChange) { // do nothing if index or change of width is incorrect if (index >= columnCount || index < 0) { paramError("changeColumnWidth(int,int)", index + " and " + widthChange); return; } setColumnWidth(index, getColumn(index).size + widthChange); } COM: <s> change the column width of the column with the given actual index </s>
funcom_train/51782671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void resizeNe(double diffx, double diffy) { tmpPos.setLocation(node.getAbsoluteX1(), node.getAbsoluteY1() + diffy); tmpSize.setSize(node.getSize().getWidth() + diffx, node.getSize().getHeight() - diffy); new CornerSnap(editor.getDiagram(), tmpPos, tmpSize).snapRightUpper(); } COM: <s> resize using the ne handle </s>
funcom_train/3444867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reparent(int node, int newparent) { if (isAncestor(newparent, node)) throw new RuntimeException("cannot reparent into a child"); int par = getParent(node); if (par == newparent) return; try { disableNotify(); firing++; removeChild(node); addChild(node, newparent); } finally { firing--; enableNotify(); fireTreeNodesChanged(node); } } COM: <s> change the parent of a specified node changing the structure </s>
funcom_train/31890086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean saveConfig() { try { CfgFile.writeCfgFile("Perm", cfg); return true; } catch (Exception e) { JOptionPane.showMessageDialog(null, res.getString("CFG_Save_Error"), res.getString("APP_Caption"), JOptionPane.ERROR_MESSAGE); } return false; } COM: <s> saves the configuration </s>
funcom_train/11729803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private long countChildElems(Element elem) { long length = 0; org.w3c.dom.Node child = elem.getFirstChild(); while (child != null) { if (child.getNodeType() == org.w3c.dom.Node.ELEMENT_NODE) { length++; } child = child.getNextSibling(); } return length; } COM: <s> counts the number of child elements of the given xml element </s>
funcom_train/11380707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSmallShares() { scheds.add(new FakeSchedulable(10)); scheds.add(new FakeSchedulable(5)); scheds.add(new FakeSchedulable(3)); scheds.add(new FakeSchedulable(2)); SchedulingAlgorithms.computeFairShares(scheds, 1); verifyShares(0.25, 0.25, 0.25, 0.25); } COM: <s> test that shares are computed accurately even when there are many more </s>
funcom_train/3613439
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIllegalDeltaTimeLine() { final TimeLine t1 = new TimeLine("title", "domain"); t1.addChange(date1, 10); t1.addChange(date2, -5); try { t1.getDataPoints(); fail("expected IllegalStateException because of missing setInitialValue"); } catch (final IllegalStateException expected) { // expected } } COM: <s> test a time line with only relative values and no initial value </s>
funcom_train/41698064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point2D getWorldCoordsFromGridCoords(GridCell cell){ double x = m_dXMin + (cell.getX() + 0.5) * m_dCellSize; double y = m_dYMax - (cell.getY() + 0.5) * m_dCellSize; Point2D pt = new Point2D.Double(x, y); return pt; } COM: <s> converts a grid cell into a world coordinate representing </s>
funcom_train/38808464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_TCM__boolean_equals_Object() throws JHuPeDOMException { Element el = jhupeDomFactory.newElement("theElement", "x", "urn:foo"); Element el2 = jhupeDomFactory.newElement("theElement", "x", "urn:foo"); assertTrue("incorrect equals evaluation", ((Object) el).equals(el)); assertTrue("incorrect equals evaluation", !((Object) el2).equals(el)); } COM: <s> test the equals compares only object instances </s>
funcom_train/15453396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFormatedLastCommentDate() { Date date = this.lastCommentDate; String dateStr = "-"; if(date != null) { DateFormat df = new SimpleDateFormat(Resources.getString( Resources.DATE_FORMAT, Locale.getDefault())); dateStr = df.format(date); } return dateStr; } COM: <s> returns the formated last comment date </s>
funcom_train/50344100
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void replaceLoad(String type, String oldLoadName, String newLoadName){ List<String> cars = getByIdList(); for (int i = 0; i < cars.size(); i++) { Car car = getById(cars.get(i)); if (car.getType().equals(type) && car.getLoad().equals(oldLoadName)) car.setLoad(newLoadName); } } COM: <s> replace car loads </s>
funcom_train/21916798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IAttribute lookupImplicitAttribute(String name) { IAttribute result = null; Iterator elems = namedElements.iterator(); while (elems.hasNext()) { NamedElement ne = (NamedElement) elems.next(); if (ne.mayBeImplicit()) { result = ((VariableDeclaration) (ne.getElement())).getType().findAttribute(name); if (result != null) { return result; } } } if (this.getParent() != null) { return this.getParent().lookupImplicitAttribute(name); } return null; } COM: <s> find i name i as an implicit attribute in thgis environment </s>
funcom_train/46764519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeFontSize(int size) { Font newfont = new Font("MS Sans Serif", Font.PLAIN, size); messageList.setFont(newfont); if (cellrenderer != null){ cellrenderer.setStandardFont(newfont); int format_ancestors = Integer.parseInt(visualProperties.getProperty("format_ancestors")); Font ancestorsfont = new Font("MS Sans Serif",format_ancestors, size); cellrenderer.setAncestorsFont(ancestorsfont); } } COM: <s> changes the font size </s>
funcom_train/10383897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HttpSession getSession() { if (facade == null){ if (SecurityUtil.isPackageProtectionEnabled()){ final StandardSession fsession = this; facade = AccessController.doPrivileged( new PrivilegedAction<StandardSessionFacade>(){ public StandardSessionFacade run(){ return new StandardSessionFacade(fsession); } }); } else { facade = new StandardSessionFacade(this); } } return (facade); } COM: <s> return the code http session code for which this object </s>
funcom_train/3712349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void buildTransform() { if (axis_type == AxisType.LINEAR) { wcst = new WCSLinearTransform(wcs, dev, dim, borderLeft, borderBottom); } else { wcst = new WCSLogTransform(wcs, dev, dim, borderLeft, borderBottom, axis_type, log_object); } } COM: <s> builds the coordinate transform object </s>
funcom_train/9868193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnrecognizedFeature() throws Exception { try { String unknownFeatureName = "http://www.semagia.com/tinyTiM/unknownTMAPIFeature"; _sysFactory.setFeature(unknownFeatureName, true); fail("Expected an exception while setting a unknown feature"); } catch (FeatureNotRecognizedException ex) { // noop. } } COM: <s> tests if an unknown feature throws the expected exception </s>
funcom_train/32600923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Tab findTab(String name) { if (name == null) return null; // itertae through our list of Tabs Iterator<Tab> it = tabs.iterator(); while (it.hasNext()) { Tab tab = it.next(); // check the name of this Tab if (name.equals(tab.getDataItemName())) return tab; } return null; } COM: <s> find a tab for a given name </s>
funcom_train/44872053
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sync(Tie tie, Tieable newest) { if (newest != this) { if (!(newest instanceof Value)) { throw new IllegalArgumentException( "Internal Error: A VariableJSlider can only sync with Value objects."); } double oldVal = getVal(); double newVal = ((Value) newest).getVal(); if (oldVal != newVal) { setVal(newVal); } serialNumber = newest.getSerialNumber(); } } COM: <s> change the value and serial number of this object to match those of </s>
funcom_train/325731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUniqueSuperDetection(U superDetection) { synchronized (superDetectionSyncronisation) { if (superDetections != null) { ListIterator<U> superList = superDetections.listIterator(); U aSuper; while (superList.hasNext()) { aSuper = superList.next(); if (aSuper.getClass() == superDetection.getClass()) { superList.remove(); aSuper.removeSubDetection(this); } } } addSuperDetection(superDetection); } } COM: <s> sets a unique super detection </s>
funcom_train/7356008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Icon getSpecialFolderIcon(FileInfo info) { // Load the icon from the UIDefaults table Icon icon = UIManager.getIcon("FileChooser.sideBarIcon." + info.getFile().getName()); // If we somehow fail to load the icon, fall back to standard way if (icon == null) { icon = info.getIcon(); } return icon; } COM: <s> gets the special icon for the folder </s>
funcom_train/11388210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getPassFactor(int factor, int passNo, int numSegments) { if (passNo > 1 || numSegments <= factor || factor == 1) return factor; int mod = (numSegments - 1) % (factor - 1); if (mod == 0) return factor; return mod + 1; } COM: <s> determine the number of segments to merge in a given pass </s>
funcom_train/9237447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createContainer() { container = new DCCFrame(this, "DCCs"){}; final JWrappingLabel label = new JWrappingLabel("This is a placeholder window to group DCCs together.", SwingConstants.CENTER); label.setText(label.getText()+"\n\nClosing this window will close all the active DCCs"); ((TextFrame)container.getFrame()).getContentPane().add(label); WindowManager.addWindow(container.getFrame()); } COM: <s> create the container window </s>
funcom_train/8331190
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean forceFocus() { checkWidget(); return handleFocusOperation(new RunnableWithResult() { public void run() { boolean success; if (isDisposed()) { success = false; } else { success = superForceFocus(); success = postProcessForceFocus(success); } setResult(new Boolean(success)); } }); } COM: <s> overridden to return false and prevent any focus change </s>
funcom_train/4521157
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(PerfilesOpciones entity) { LogUtil.log("deleting PerfilesOpciones instance", Level.INFO, null); try { entity = entityManager.getReference(PerfilesOpciones.class, entity .getId()); entityManager.remove(entity); LogUtil.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { LogUtil.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent perfiles opciones entity </s>
funcom_train/18721874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*public String getDescriptionTitle() { String xPath = OFFSET + "DescriptionMetadata/Comment/FreeTextAnnotation"; //System.out.println(mpeg7.toString()); descriptionTitle = readXmlValue(xPath, descriptionTitle); if (descriptionTitle == null) { descriptionTitle = ""; } return descriptionTitle; }*/ COM: <s> meaningful title descripting this desctipion and the content </s>
funcom_train/28175606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setBorderToNormal(Component c) { if (true) { return; } if (c instanceof AbstractButton) { AbstractButton b = (AbstractButton) c; Border border = (Border) borderTable.remove(b); b.setBorder(border); Boolean value = (Boolean) rolloverTable.remove(b); if (value != null) { b.setRolloverEnabled(value.booleanValue()); } } } COM: <s> sets the border of the component to have a normal border </s>
funcom_train/40370467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TraversalManager getTraversalManager() throws RepositoryException { // logger.info("getTraversalManager"); FileTraversalManager fileQTM = new FileTraversalManager( fileObjectFactory, objectStore, this.isPublic, this.useIDForChangeDetection, this.displayUrl, this.additionalWhereClause, this.deleteadditionalWhereClause, this.included_meta, this.excluded_meta, this.db_timezone); return fileQTM; } COM: <s> to return the traversal manager class object </s>
funcom_train/1758287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int lowestIndex(String name, float distance) { Character c = indexChar(name); int minLength = name.length() - lengthDelta(name, distance); if (minLength < 0) { // the available max is less than our potential max allowed. Adjust minLength = 0; } return index.get(c).get(minLength); } COM: <s> find lowest index to the names array worth trying to match against </s>
funcom_train/33839401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int naxisN(String key) { if (key.length() > 5 && key.substring(0,5).equals("NAXIS")) { for (int i=5; i<key.length(); i += 1) { boolean number = true; char c = key.charAt(i); if ('0' > c || c > '9') { number = false; break; } if (number) { return Integer.parseInt(key.substring(5)); } } } return -1; } COM: <s> find the index for naxisn keywords </s>