__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/4875383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setLimitTime(int l) { if (l > 0) { info.add(limitTime); limitTime.setText(Messages.getString("QuestionQcmPreview.17") + l + Messages.getString("QuestionQcmPreview.18")); //$NON-NLS-1$ //$NON-NLS-2$ } else limitTime.setText(Messages.getString("QuestionQcmPreview.19")); //$NON-NLS-1$ } COM: <s> sets the time limit in seconds </s>
funcom_train/25187530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetDateFormat() { System.out.println("getDateFormat"); String mask = "yyy-MM-dd"; Formats instance = new Formats(); DateFormat result = instance.getDateFormat(mask); assertNotNull(result); try { instance.getDateFormat(mask + " trjsryksryksryk"); fail("Should not return dat fortmatter for invalid pattern. MUST throw exception."); } catch (Throwable th) { } } COM: <s> test of get date format method of class formats </s>
funcom_train/42861023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printDocument(Node node, String indent) { System.out.println(indent + node.getNodeName()); Node child = node.getFirstChild(); while (child != null) { printDocument(child, indent + " "); child = child.getNextSibling(); } } COM: <s> prints document to console </s>
funcom_train/31561107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MaverickString CAT(MaverickString result, ConstantString append) { //Note this impl is slow(but safe to avoid string overwriting itself) //by making extra copies if (result == append) { String a = append.toString(); result.set(this); result.append(a); } else { result.set(this); result.append(append); } return result; } COM: <s> appends a maverick string to the current maverick string </s>
funcom_train/51616309
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean connect() throws XMPPException, java.net.UnknownHostException { xmppCon = new XMPPConnection(setConnection(this.getTargetInetAddress(),this.getTargetPort())); xmppCon.login(this.getUsername(),this.getPassword()); return true; } COM: <s> try to connect to the service </s>
funcom_train/17380288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doTest() throws Exception { if (SINGLESHOT) { NUMBER_OF_ITERATIONS = 1; NUMBER_OF_THREADS = 1; } for (int i = 1 ; i <= NUMBER_OF_THREADS; i++) { GUPT gupt = new GUPT(); gupt.setThreadName("GUPT_" + i); Thread thread = new Thread(gupt); thread.setName("GUPT-" + i); thread.start(); Thread.sleep(EXTRA_THREAD_DELAY); } } COM: <s> old style test where individual threads are created </s>
funcom_train/41593120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBookStatePropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Book_bookState_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Book_bookState_feature", "_UI_Book_type"), LibraryPackage.Literals.BOOK__BOOK_STATE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the book state feature </s>
funcom_train/45250542
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateGradient() { MultiEditor multiEditor = (MultiEditor) parentPane.getPartReference() .getPart(true); if (multiEditor != null) { IEditorPart part = (IEditorPart) this.getEditorReference().getPart( true); if (part != null) { multiEditor.updateGradient(part); } } } COM: <s> update the gradient on the inner editor title bar </s>
funcom_train/3761510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void afterWorldChange() throws DimxException { if (this.container == null) this.reset(); for (int i=this.contents.size()-1; i >= 0; i--) { AdvObject x = (AdvObject) this.contents.elementAt(i); x.afterWorldChange(); } } COM: <s> does any final operations after world change typically calls reset </s>
funcom_train/26104137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void gotoInbox() { exitingKeyguardSecurely = true; ManageKeyguard.exitKeyguardSecurely(new LaunchOnKeyguardExit() { public void LaunchOnKeyguardExitSuccess() { Intent i = SmsPopupUtils.getSmsInboxIntent(); SmsPopupActivity.this.getApplicationContext().startActivity(i); inbox = true; myFinish(); } }); } COM: <s> take the user to the messaging app inbox </s>
funcom_train/18739627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isDisabled(CtrlCall call) { if (this.disabledRules == null || this.disabledRules.contains(call.getRule())) { return true; } // since disabledRules != null, it is now certain that this is a NextState GraphNextState state = (GraphNextState) this.state; if (state.getCtrlTransition().isModifying()) { return true; } return false; } COM: <s> indicates if matches of a given control call might have been disabled </s>
funcom_train/37764039
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long getOftenMinutes() { Recurrence r = ((TaskMaintenanceComponent) getComponent()).getRecurrence(); Integer oftenMinutes = r != null && r instanceof Recurrence.Often ? ((Recurrence.Often) r).getMinutes() : null; return oftenMinutes != null ? new Long(oftenMinutes) : null; } COM: <s> getter for property often minutes </s>
funcom_train/15512923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void decorate(JLabel renderer, TargetFile row, Object cellValue) { if( ! row.isSelected() ) { renderer.setForeground( Color.GRAY ); } else { renderer.setForeground( Color.BLACK ); } if(! row.isIncluded() ) { renderer.setBackground( SwingConfig.GRAY_EXTRA_LIGHT ); } else { renderer.setBackground( Color.WHITE ); } } COM: <s> basic renderer functionality handy classes for inheritors </s>
funcom_train/45054493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AccessKeyBundleList makeCopy() { AccessKeyBundleList clonedCopy; clonedCopy = new AccessKeyBundleList(this.locale); Collections.copy(clonedCopy, this); clonedCopy.onlyFuzzies = this.onlyFuzzies; clonedCopy.keepExistingAssigns = this.keepExistingAssigns; clonedCopy.honorOriginalIfPossible = this.honorOriginalIfPossible; clonedCopy.charList = charList; return clonedCopy; } COM: <s> makes a copy of the object </s>
funcom_train/7518290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(ParametrosFiltro entity) { EntityManagerHelper.log("deleting ParametrosFiltro instance", Level.INFO, null); try { entity = getEntityManager().getReference(ParametrosFiltro.class, entity.getId()); 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 parametros filtro entity </s>
funcom_train/49636832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSystemProperty (String name, String value) { //value = value.replace (" ", "\\ "); String arg = "-D"+name+"="+value; log.trace ("Added JVM arg: " + arg); jvmArgs.add (arg); } COM: <s> set a system property for the command line that will be created </s>
funcom_train/645855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadDrivers(InputStream input) throws ExplorerException { try { Element root = XMLUtils.readRoot(input); if(root == null) { throw new ExplorerException("Unable to read driver definitions"); } if (root.getName().equals("Beans")) root = convertFromV3(root); for (Element driverElem : root.elements(DRIVER)) { ManagedDriver driver = new ManagedDriver(driverElem); addDriver(driver); } }catch(Exception e) { throw new ExplorerException(e); } } COM: <s> loads driver definition from a given location </s>
funcom_train/25218137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LetterGroup findLetterGroup(String key) { SortedSet<String> list = index.get(key.equals("") // ? null : Character.valueOf(key.charAt(0))); if (list != null) { for (String prefix : list) { if (key.startsWith(prefix)) { return prefixMap.get(prefix); } } } return null; } COM: <s> find a letter group for a given key </s>
funcom_train/26474840
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasAttribute(String attribute) { if (this.attribute == null) return false; StringTokenizer tokenizer = new StringTokenizer(attribute, "."); int size = tokenizer.countTokens(); int depth = this.attribute.getDepth(); if (size != depth) return false; for (int i = 0; i < size && i < depth; i++) { String lastName = this.attribute.getName(i); if (!lastName.equals(tokenizer.nextToken())) { return false; } } return true; } COM: <s> checks wether this code column code has the specified attribute as its </s>
funcom_train/11731256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(String field) { StringBuffer sb = new StringBuffer(); sb.append("DerefQuery("); sb.append(refProperty); sb.append(", "); sb.append(contextQuery); sb.append(", "); sb.append(nameTest); sb.append(")"); return sb.toString(); } COM: <s> always returns deref query </s>
funcom_train/3370750
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int indexOfTab(Icon icon) { for(int i = 0; i < getTabCount(); i++) { Icon tabIcon = getIconAt(i); if ((tabIcon != null && tabIcon.equals(icon)) || (tabIcon == null && tabIcon == icon)) { return i; } } return -1; } COM: <s> returns the first tab index with a given code icon code </s>
funcom_train/5244511
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void pushFollow(BitSet fset) { if ( (state._fsp +1)>=state.following.length ) { BitSet[] f = new BitSet[state.following.length*2]; System.arraycopy(state.following, 0, f, 0, state.following.length); state.following = f; } state.following[++state._fsp] = fset; } COM: <s> push a rules follow set using our own hardcoded stack </s>
funcom_train/28744311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WorkflowDetailInfo getWorkflowDetailInfoById(Integer id) throws SimsException { //String errMsg = clsName + ".getWorkflowDetailInfoById(): "; WorkflowDetailInfo info; try { local = this.getWorkflowDetailLocalById(id); info = local.getWorkflowDetailInfo(); } catch (RuntimeException e) { //Propagate. throw e; } return info; } COM: <s> get workflow detail info object by id </s>
funcom_train/7808118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem1() { if (stringItem1 == null) {//GEN-END:|66-getter|0|66-preInit // write pre-init user code here stringItem1 = new StringItem("Version: ", getVersion());//GEN-LINE:|66-getter|1|66-postInit // write post-init user code here }//GEN-BEGIN:|66-getter|2| return stringItem1; } COM: <s> returns an initiliazed instance of string item1 component </s>
funcom_train/11650855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String whoAmI() { StringBuilder sb = new StringBuilder(); sb.append(Thread.currentThread().getName()); sb.append("@"); sb.append(Integer.toHexString(hashCode())); sb.append("-"); sb.append(getName()); return sb.toString(); } COM: <s> generate a string identifier of this instance for debugging purposes </s>
funcom_train/2881396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDefaultDomain() throws RuntimeConnectionException { if (!isActive) { throw new RuntimeConnectionException("ClientConnector not connected"); } try { return rmiConnectorServer.getDefaultDomain(); } catch (RemoteException re) { throw new RuntimeConnectionException(re, re.getMessage()); } } COM: <s> gets the default domain attribute of the rmi connector client object </s>
funcom_train/32829517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String createFieldName(String fieldName, String innerFieldName, boolean includePoint) { if (fieldName == null) { return innerFieldName; } StringBuilder result = new StringBuilder(); result.append(fieldName); if (includePoint) { result.append("."); } result.append(innerFieldName); return result.toString(); } COM: <s> adds the inner field name to the given field name </s>
funcom_train/32861559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeTextX(int delete, String insert) { if (insert.indexOf(";;") != -1) { String cfg = insert.substring(insert.indexOf(";;")); loadConfig(cfg); insert=insert.substring(0,insert.indexOf(";;")); } ga.changeText(delete, insert); } COM: <s> internal method handling both loading config files and changing </s>
funcom_train/2558611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateExpression(Label label) throws Exception { Expression location = label.getExpression(); if(expression != null) { String path = expression.getPath(); String expect = location.getPath(); if(!path.equals(expect)) { throw new PathException("Path '%s' does not match '%s' in %s", path, expect, type); } } else { expression = location; } } COM: <s> this is used to validate the expressions used for a label that </s>
funcom_train/20307514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void incrementProfile(RuleClauseCode clause) { if (profile != null) { String index = clause.toString(); Count count = (Count)profile.get(index); if (count == null) { profile.put(index, new Count(clause).inc()); } else { count.inc(); } } } COM: <s> record a rule invocation in the profile count </s>
funcom_train/51752634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public String toString(final Date date, String pattern) { String result = null; if (date != null) { if (pattern == null) { pattern = "yyyy-MM-dd HH:mm:ss"; } final SimpleDateFormat sdf = new SimpleDateFormat(pattern, Locale.getDefault()); result = sdf.format(date); }//else: date unavailable return result; }//toString() COM: <s> convert a date object to a string representation </s>
funcom_train/26631242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addPropertyWrapper(String propertyName) { Validation.isNotNull(propertyName, "Property name"); CodedBeanPropertyData pd = new CodedBeanPropertyData(this, propertyName); Property property = JodaFactory.getInstance().createProperty( this, propertyName, null, new Class[] {pd.getPropertyType()}, pd ); } COM: <s> add a property to the map using the wrapper approach </s>
funcom_train/8936770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateData(List<String> completionItems) { data.clear(); data.addAll(completionItems); // notify the list the content has been updated fireContentsChanged(completionList, 0, data.size()); completionList.revalidate(); completionList.setSelectedIndex(0); completionList.ensureIndexIsVisible(0); } COM: <s> update the completion list items </s>
funcom_train/34960907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(TorontoSchool entity) { EntityManagerHelper.log("saving TorontoSchool 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 toronto school entity </s>
funcom_train/44600336
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void _test_invariant_ghost_field_01a(){ compileAndExecGivenStatementExpectRuntimeError( "X.java", "public class X {\n" + " //@ public ghost int x = 0;\n" + " //@ public static invariant x == 10;\n" + "}\n", "new X()", null, JMLInvariantError.class); } COM: <s> the front end should detect a non static reference from </s>
funcom_train/46752239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean mergeMatch(IBaseModel toModel, IBaseModel modelFrom) { if (toModel.isNotNew()) { if (modelFrom.isNotNew()) { return toModel.getId().equals(modelFrom.getId()); } } if (commonMatch(toModel, modelFrom)) { return true; } if (toModel.mergeMatch(modelFrom)) { return true; } return false; } COM: <s> determine if the models are logically matched and should be merged </s>
funcom_train/11774250
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCustomSubnetMask(String inInterface,String inCustomSubnetMask)throws InvalidSubnetMaskException, InvalidNetworkInterfaceNameException { if(ipAddress.containsKey(inInterface)) { IPV4Address temp = (IPV4Address)ipAddress.get(inInterface); temp.setCustomSubnetMask(inCustomSubnetMask); } else { throw new InvalidNetworkInterfaceNameException("Invalid Interface Name."); } } COM: <s> sets the custome subnet mask </s>
funcom_train/32776108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValue() { String s = c.getText(); if (format == null) { try { if (currentClass == null) return null; else { Constructor cons = currentClass .getConstructor(new Class[] { String.class }); return cons.newInstance(new Object[] { s }); } } catch (Exception e) { e.printStackTrace(); return null; } } else { try { return format.parseObject(s); } catch (java.text.ParseException ex) { return null; } } } COM: <s> returns the value from the text field as an object of the current </s>
funcom_train/42451616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void accept(IConfigSectionVisitor visitor) { visitor.visitSection(this); for (ConfigProperty prop : _properties) { visitor.visitProperty(prop); } if (_sections.size() > 0) { visitor.beginSubsections(); for (ConfigSection sec : _sections) { sec.accept(visitor); } visitor.endSubsections(); } } COM: <s> accepts the specified visitor against this config section object </s>
funcom_train/39973760
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void computeVertexNormals() { for (Vertex v : vertices.values()) { v.clearNormal(); } for (Face f : faces) { f.a.addFaceNormal(f.normal); f.b.addFaceNormal(f.normal); f.c.addFaceNormal(f.normal); } for (Vertex v : vertices.values()) { v.computeNormal(); } } COM: <s> computes the smooth vertex normals for the entire mesh </s>
funcom_train/31702195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IFixedDrawable getCollaboratingDrawable(IFixedDrawable draw) { int fixedDrawCount = persistentDataList.size(); IFixedDrawable fixedDraw; for (int pos = 0; pos < fixedDrawCount; pos++) { fixedDraw = (IFixedDrawable) persistentDataList.get(pos); if (draw.isCompatible(fixedDraw)) { return fixedDraw; } } return null; } COM: <s> returns a partner ifixed drawable suited for collaboration </s>
funcom_train/46327623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean delete(Long actionID) { if (actionID == null) { throw new IllegalArgumentException("primary key null."); } // Set the whereArgs to null here. return database.delete(DATABASE_TABLE, KEY_ACTIONID + "=" + actionID, null) > 0; } COM: <s> delete a registered action record </s>
funcom_train/49159626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cleanUp() { // Set to border layout this.getContentPane().setLayout(borderLayout1); // Remove all existing panels this.getContentPane().removeAll(); // Remove current dialog this.closeDialog(); // Update content pane this.getContentPane().validate(); try { Thread.sleep(100); } catch (Exception err) { } } COM: <s> removes all panels from the desktop </s>
funcom_train/20926425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void findLoopBody() { BasicBlock header=mLoop.getHeader(); BasicBlock exit=mLoop.getExits().get(0).getFirst(); mLoopBody=new HashSet<BasicBlock>(); // add the exit so that the traversal doesn't pass exit (exit dominates body) mLoopBody.add(exit); for (BasicBlock backEdge: mLoop.getBackEdges()) { visitLoopBody(backEdge); } } COM: <s> create the set of basic blocks which are in the loop body </s>
funcom_train/14227611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectionDisconnected(final CallId id, final String address, final int cause) { // define action block EventHandler eh = new EventHandler() { public void process(Object o) { // find, but don't create the call FreeConnection conn = ((GenericProvider)o).getCallMgr().getCachedConnection(id, address); if (conn != null) conn.toDisconnected(cause); } }; // dispatch for processing this.getEventPool().put(eh); } COM: <s> receive and queue up a connection disconnected notification event </s>
funcom_train/35329572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildAclEntries(PrincipalImpl owner, AclImpl acl) { if (children != null) { for (int i = 0; i < children.length; ++i) { SimpleNode n = (SimpleNode)children[i]; if (n != null) { n.buildAclEntries(owner, acl); } } /* end of loop */ } } COM: <s> build the acl entries from the syntactic tree </s>
funcom_train/43467834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPersistStatusDirty() { if (this.bo.getPersistStatus() == null || !(this.bo.getPersistStatus().equals(zXType.persistStatus.psNew) || this.bo.getPersistStatus().equals(zXType.persistStatus.psDeleted))) { this.bo.setPersistStatus(zXType.persistStatus.psDirty); } } COM: <s> set persist status dirty set the persist status for bo associated with </s>
funcom_train/43245113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPrintDeviceListing() throws Exception { System.out.println("getPrintDeviceListing"); String securitytoken = secToken; RefDataServicesImpl instance = new RefDataServicesImpl(); PrinterObject[] result = instance.getPrintDeviceListing(securitytoken); assertTrue(result.length>0); } COM: <s> test of get print device listing method of class org </s>
funcom_train/44821830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getRefColumnList() { StringBuffer colList = new StringBuffer(); for (int i=0; refColumnNames != null && i<refColumnNames.length; i++) { if (colList.length() > 0) colList.append(","); colList.append (refColumnNames[i]); } return colList.toString(); } COM: <s> get reference columns as a comma separated list </s>
funcom_train/41042781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAnimation(String animation) { if (animations.size() != 0) { for (int i = 0; i < animations.size(); i++) { if (animations.get(i).getName() == animation) { animations.get(i).setActive(true); } else { animations.get(i).setActive(false); } } } } COM: <s> this sets the active animation </s>
funcom_train/10642374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaximizable(final boolean b) { boolean oldValue = isMaximizable(); maximizable = b; LookAndFeel.markPropertyNotInstallable(this, StringConstants.INTERNAL_FRAME_MAXIMIZABLE_PROPERTY); firePropertyChange(StringConstants.INTERNAL_FRAME_MAXIMIZABLE_PROPERTY, oldValue, b); } COM: <s> sets the code maximizable code property </s>
funcom_train/44222698
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containDataLayer(int level) { Enumeration en = this.stackHash.elements(); while (en.hasMoreElements()) { LayerStack stack = (LayerStack) en.nextElement(); if (stack.keySet().contains(String.valueOf(level))) { return true; } } return false; } COM: <s> p check if any data layer exists in the given level </s>
funcom_train/22439474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void performDefaults() { super.performDefaults(); IPreferenceStore store = getPreferenceStore(); _numberCheckedOut.setSelection(store.getDefaultBoolean(VSSPlugin.SHOW_NUMBER_CHECKED_OUT)); _recuriveOperation.setSelection(store.getDefaultBoolean(VSSPlugin.ASSUME_RECURSIVE_OPERATION)); _useMoveDeleteHook.setSelection(store.getDefaultBoolean(VSSPlugin.MOVE_DELETE_HOOK)); _useComments.setSelection(store.getDefaultBoolean(VSSPlugin.USE_COMMENTS)); // _refreshReport.setSelection(store.getDefaultBoolean(VSSPlugin.USE_REFRESH_REPORT)); } COM: <s> defaults was clicked </s>
funcom_train/4461108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double interval(double p1, double p2, double p3, double p4, double i) { double t1 = a * (p3 - p1); double t2 = a * (p4 - p2); return super.interval(p2, t1, t2, p3, i); } COM: <s> interpolates between the start point p2 and end point p3 at interval i </s>
funcom_train/31536507
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void intersectionCompoundTerm(jCompoundTerm ct) {Enumeration e = terms.elements(); Vector vt = new Vector(Math.min(size(),ct.size())); while (e.hasMoreElements()) {jTerm t = (jTerm) e.nextElement(); if (ct.hasTerm(t)) vt.addElement(t); } terms = vt; }; COM: <s> adds all code j terms code in given code j compound term code </s>
funcom_train/25187058
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetValidationContext_String() throws Exception { System.out.println("getValidationContext"); BigFactory instance = BigFactory.getInstance(); assertNull(instance.getValidationContext(BigFactory.F_DUMP)); assertNotNull(instance.getValidationContext(BigFactory.F_JSON)); assertNull(instance.getValidationContext(BigFactory.F_XML)); } COM: <s> test of get validation context method of class big factory </s>
funcom_train/18806340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEquals() { // test the tokens for equality... assertEquals(AreaRendererEndType.LEVEL, AreaRendererEndType.LEVEL); assertEquals(AreaRendererEndType.TAPER, AreaRendererEndType.TAPER); assertEquals(AreaRendererEndType.TRUNCATE, AreaRendererEndType.TRUNCATE); } COM: <s> a test for the equals method </s>
funcom_train/34339650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getCantProducto2() { if (CantProducto2 == null) {//GEN-END:|45-getter|0|45-preInit // write pre-init user code here CantProducto2 = new TextField("Cantidad Producto2:", null, 5, TextField.ANY);//GEN-LINE:|45-getter|1|45-postInit // write post-init user code here }//GEN-BEGIN:|45-getter|2| return CantProducto2; } COM: <s> returns an initiliazed instance of cant producto2 component </s>
funcom_train/50899849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DBSubset getGroups(JDCConnection oConn) throws SQLException { Object aCompany[] = { get(DB.gu_company) }; DBSubset oGroups = new DBSubset(DB.k_x_group_company,DB.gu_acl_group,DB.gu_company + "=?",10); oGroups.load (oConn, aCompany); return oGroups; } // getGroups COM: <s> p get groups that may have access to this company </s>
funcom_train/10626644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemoveObject() { // Create an instance and add one child BeanContextSupport sup = new BeanContextSupport(); BeanContextChildSupport ch = new BeanContextChildSupport(); sup.add(ch); // Remove non-existent child assertFalse(sup.remove(new Object())); // Remove it assertTrue(sup.remove(ch)); // No children must be present assertEquals("The size of the collection must be 0", 0, sup.size()); } COM: <s> test method remove with object parameter </s>
funcom_train/38907887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { try { SerialPort sp = getSerialPort(); if (sp != null) { InputStream is = sp.getInputStream(); SentenceReader sr = new SentenceReader(is); sr.addSentenceListener(this); sr.start(); } } catch (IOException e) { e.printStackTrace(); } } COM: <s> init serial port and reader </s>
funcom_train/31782419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void renameGroup( int nGroupId, String strNewGroupName ) throws MSNException { if( notificationServer != null ) { try { notificationServer.renameGroup( nGroupId, strNewGroupName ); } catch( MSNException e ) { throw e; } } else throw new MSNException( MSNException.MSN_EX_NOT_CONNECTED ); } COM: <s> rename a group </s>
funcom_train/19765389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getStopCommand() { if (stopCommand == null) {//GEN-END:|24-getter|0|24-preInit // write pre-init user code here stopCommand = new Command("stop", Command.SCREEN, 0);//GEN-LINE:|24-getter|1|24-postInit // write post-init user code here }//GEN-BEGIN:|24-getter|2| return stopCommand; } COM: <s> returns an initiliazed instance of stop command component </s>
funcom_train/3164611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addContextNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (new ItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getString("_UI_Wrapper_contextName_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Wrapper_contextName_feature", "_UI_Wrapper_type"), GrammarPackage.eINSTANCE.getWrapper_ContextName(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE)); } COM: <s> this adds a property descriptor for the context name feature </s>
funcom_train/32057230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPreferredSize() { System.out.println("testGetPreferredSize"); Dimension d = new Dimension(); GPGraph graph = null; CellView[] views = null; RealGraphCellRenderer x = new RealGraphCellRenderer(graph, views); d = x.getPreferredSize(); } COM: <s> test of get preferred size method of class real graph cell renderer </s>
funcom_train/26485352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Provider getReferenceProvider() { if ((refProvider == null) && (driver != null) && (url != null) && (userid != null) && (password != null)) { refProvider = new ProviderExt(); refProvider.setConnectionProperties(driver, url, userid, password, schemaName); } return refProvider; } COM: <s> return the reference schema database connection properties </s>
funcom_train/24288501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONObject getJSONObject(int index) throws JSONException { Object o = get(index); if (o instanceof JSONObject) { return (JSONObject)o; } throw new JSONException("JSONArray[" + index + //$NON-NLS-1$ "] is not a JSONObject."); //$NON-NLS-1$ } COM: <s> get the jsonobject associated with an index </s>
funcom_train/12858831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseClicked(MouseEvent e) { Point mouseLoc = e.getPoint(); // Calculate the center point of the spot RELATIVE to the // center of the of the circle. double apx = mouseLoc.getX() - radius; double apy = radius - mouseLoc.getY(); theta = Math.atan2(apy, apx); repaint(); } COM: <s> empy method because nothing happens on a click </s>
funcom_train/9132244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String exportConfiguration(RulesProfile activeProfile) { Module module = toXStream(activeProfile.getActiveRulesByPlugin(PhpCodesnifferPlugin.KEY)); module.getOrCreateChild("TreeWalker" + Module.MODULE_SEPARATOR + "FileContentsHolder"); module.getOrCreateChild("SuppressionCommentFilter"); return addXmlHeader(module.toXml()); } COM: <s> export the configuration to an xml string </s>
funcom_train/34004354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Measure multiply(Measure measure) { if (measure != null) { if (isSameMeasure(measure)) { if (isSameClass(measure)) { _value = _value.multiply(measure._value, STRICT); } else { _value = _value.multiply(convert(measure)._value, STRICT); } } else { _value = _value.multiply(measure._value, STRICT); } } return this; } COM: <s> multiplies the unit from this value by first converting the foreign unit </s>
funcom_train/44166977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringTemplate add(String key, String value) { if (templateType == TemplateType.TEMPLATE) { keys.add(key); replacements.add(new StringTemplate(value, TemplateType.KEY)); } else { throw new IllegalArgumentException("Cannot add key-value pair to StringTemplate type " + templateType.toString()); } return this; } COM: <s> add a new key and replacement to the string template </s>
funcom_train/18015430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void genStat(JCTree tree, Env<GenContext> env) { if (code.isAlive()) { code.statBegin(tree.pos); genDef(tree, env); } else if (env.info.isSwitch && tree.tag == JCTree.VARDEF) { // variables whose declarations are in a switch // can be used even if the decl is unreachable. code.newLocal(((JCVariableDecl) tree).sym); } } COM: <s> derived visitor method generate code for a statement </s>
funcom_train/14273738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertRecord(MemoRecord rec) { this.record = rec; int col = 0; insertTitles(record); insertTypes(record); int row = getDocument().size(); // Insert DLPRecord col = super.insertRecord(this.record); setElementAt(new JSCSVCell(record.getMemoText()), row, col++); } // end-method COM: <s> insert record into csv row </s>
funcom_train/21404823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSentenceST(){ StringBuilder sb = new StringBuilder(); for (int i = 0; i < this.getSentenceLength(); ++i){ sb.append(StringUtils.join(this.words.get(i), "\t")); sb.append("\n"); } return sb.toString(); } COM: <s> this returns the current sentence in the original st format </s>
funcom_train/3360639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ StringBuffer str = new StringBuffer("Address Type: " + addrType + "\n"); str.append("AddressContents: "); for (int i = 0; i<buf.length && i < 32; i++) { str.append(Integer.toHexString(buf[i]) +" "); } if (buf.length >= 32) str.append(" ...\n"); return (str.toString()); } COM: <s> generates the string representation of this address </s>
funcom_train/48735333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String letterTranslate(String toBeTranslated) { String translated = ""; int i = 0; while (i < toBeTranslated.length()) { String toTranslate = toBeTranslated.substring(i, i + 1); if (checkLetterValidity(toTranslate.charAt(0))) { translated = translated.concat(m_translationTable .translate(toTranslate)); i = i + 1; } else { throw new IllegalArgumentException( "Unrecognized triplet to be translated..." + toTranslate); } } return translated; } COM: <s> translates the given as parameter dna sequence to be translated to binary </s>
funcom_train/10586659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Configuration getModuleConfiguration(String name) { Configuration conf = null; if (this.handler != null && this.application != null) { conf = this.getApplicationConfiguration().getConfiguration(name); } if (this.handler != null && conf == null) { conf = this.handler.getHandlerConfiguration().getConfiguration(name); } return conf; } COM: <s> get the configuration if available </s>
funcom_train/34983099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFovarite(String newVal) { if ((newVal != null && this.fovarite != null && (newVal.compareTo(this.fovarite) == 0)) || (newVal == null && this.fovarite == null && fovarite_is_initialized)) { return; } this.fovarite = newVal; fovarite_is_modified = true; fovarite_is_initialized = true; } COM: <s> setter method for fovarite </s>
funcom_train/7614192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeIIOWriteWarningListener(IIOWriteWarningListener listener) { if (warningListeners == null || listener == null) { return; } int idx = warningListeners.indexOf(listener); if (idx > -1) { warningListeners.remove(idx); warningLocales.remove(idx); if (warningListeners.isEmpty()) { warningListeners = null; warningLocales = null; } } } COM: <s> removes the specified iiowrite warning listener listener </s>
funcom_train/49719993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemBackward() { if (jMenuItemBackward == null) { jMenuItemBackward = new JMenuItem(); jMenuItemBackward.setText("Backward"); jMenuItemBackward.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.out.println("actionPerformed()"); // getJDesktopPane().selectFrame(false); } }); } return jMenuItemBackward; } COM: <s> this method initializes j menu item backward </s>
funcom_train/302228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSavedLocation( Point p ) { this.pntLocation = p; // remember the left and top distances for the window prpFeeds.setProperty( "left", new Integer( (int)p.getX() ).toString() ); prpFeeds.setProperty( "top", new Integer( (int)p.getY() ).toString() ); } COM: <s> set the location of the component </s>
funcom_train/1973238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void calcSearchDepth() { /* * Calculate the approximate number of nodes that this AI should be able * to search using the remainingTime. */ int numSearchableNodes = (int) (remainingTime * TARGET_TIME_RATIO * nodesPerMillisecond); searchDepth = MIN_SEARCH_DEPTH; searchDepth = (int) ((float) Math.log(numSearchableNodes) / (float) Math .log(averageBranchingFactor)); maxSearchDepth = searchDepth + 2; } COM: <s> calculate the search depth and max search depth based on the </s>
funcom_train/50353196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getRunPanel() { if (runPanel == null) { runPanel = new JPanel(); runPanel.setLayout(new BorderLayout()); runPanel.add(getRunStatusPanel(), java.awt.BorderLayout.SOUTH); runPanel.add(getSendOptionsPanel(), java.awt.BorderLayout.NORTH); } return runPanel; } COM: <s> this method initializes send panel </s>
funcom_train/1005247
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void addAlwaysTopFocus(DisplayObject child) { if (child != null) { events.offer(new DisplayObjectEvent(DisplayObjectEvent.EVENT_MOVE_TOP, child)); if (always_top_elements == null) { always_top_elements = new Vector<DisplayObject>(); always_top_elements.add(child); } else if (!always_top_elements.contains(child)) { always_top_elements.add(child); } } } COM: <s> top top 2 top 1 top 0 </s>
funcom_train/50102860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void removeHighlights(JTextComponent textComponent) { // stop the timer that removes the highlights Timer timer = (Timer)textComponent.getClientProperty(PROPKEY_HIGHLIGHT_TIMER); if (timer != null) timer.stop(); // remove the highlights removeHighlight(textComponent, PROPKEY_HIGHLIGHT0); removeHighlight(textComponent, PROPKEY_HIGHLIGHT1); } COM: <s> removes any parenthesis highlights that are being displayed by a </s>
funcom_train/28473325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getMissingPanel() { if (missingPanel == null) { missingPanel = new JPanel(); missingPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); missingPanel.add(excludeLabel1, null); missingPanel.add(getMissingCutoffField(), null); missingPanel.add(excludeLabel2, null); missingPanel.setAlignmentX(Component.LEFT_ALIGNMENT); } return missingPanel; } COM: <s> this method initializes missing panel </s>
funcom_train/45599086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DatabaseConnection getDatabaseConnection(String databaseName) { DatabaseConnection databaseConnection = databaseConnectionsPerDatabaseName.get(databaseName); if (databaseConnection == null) { databaseConnection = createDatabaseConnection(databaseName); databaseConnectionsPerDatabaseName.put(databaseName, databaseConnection); } return databaseConnection; } COM: <s> gets the connection for the database with the given name </s>
funcom_train/8109005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeData(String path) throws IOException { String cr = System.getProperty("line.separator"); FileWriter output = new FileWriter(path); output.append(header).append(cr); for (SimulationEntry entry : entries) { output.append(entry.getCsv()).append(cr); } output.close(); System.out.println("Wrote " + path); } COM: <s> writes out the simulation data </s>
funcom_train/47036715
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEquals(String arg1, String arg2) { StringBuffer condition = new StringBuffer(); condition.append("<equals "); //$NON-NLS-1$ condition.append("arg1=\""); //$NON-NLS-1$ condition.append(arg1); condition.append("\" "); //$NON-NLS-1$ condition.append("arg2=\""); //$NON-NLS-1$ condition.append(arg2); condition.append("\"/>"); //$NON-NLS-1$ singleConditions.add(condition.toString()); } COM: <s> add an equals condition to this ant condition </s>
funcom_train/50034345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumberOfTransitions() { if (isSingleton()) { return singleton.length(); } int c = 0; Iterator i = getStates().iterator(); while (i.hasNext()) { State s = (State) i.next(); c += s.transitions.size(); } return c; } COM: <s> returns number of transitions in this automaton </s>
funcom_train/16914721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeAttributes() { timeSeriesConsumerType = new AttributeType(this, "Series", "setValue", double.class, true); addConsumerType(timeSeriesConsumerType); for (int i = 0; i < model.getDataset().getSeriesCount(); i++) { addTimeSeriesSetter(i); } } COM: <s> initialize consuming attributes </s>
funcom_train/31940484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String encodeImplementsStr(ArrayList orig) { StringBuffer encodeBuffer = new StringBuffer(); for (int i = 0; i < orig.size(); i++) { encodeBuffer.append((String) orig.get(i)); if (i + 1 < orig.size()) { encodeBuffer.append(","); } } return encodeBuffer.toString(); } COM: <s> this encodes the array list for the multiple implements structure into a string </s>
funcom_train/32234258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void connect(IConnectionData connectionData) { try { ConnectionManager.getInstance().getDestination(connectionData, false); } catch (ConnectionException e) { ErrorDialog.openError(getWorkbenchWindow().getShell(), Messages.ConnectionStatusDisplay_ErrorTitle, Messages.ConnectionStatusDisplay_ConnectionErrorMessage, new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getLocalizedMessage(), e)); } } COM: <s> activates a connection </s>
funcom_train/37039375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getParameterMap() { if (parameterMap.isLocked()) return parameterMap; Enumeration enum = getParameterNames(); while (enum.hasMoreElements()) { String name = enum.nextElement().toString(); String[] values = getParameterValues(name); parameterMap.put(name, values); } parameterMap.setLocked(true); return parameterMap; } COM: <s> returns a code map code of the parameters of this request </s>
funcom_train/25389026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAccepted(Collection accepted) { logger.debug("addAccepted(Collection accepted=" + accepted + ") - start"); if (accepted != null) { for (Iterator iter = accepted.iterator(); iter.hasNext();) { String s = (String) iter.next(); addAcceptedPath(s); } } logger.debug("addAccepted(Collection accepted=" + accepted + ") - end"); } COM: <s> add a collection of accepted pathnames </s>
funcom_train/31406883
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getElement() { Element element = new Element("group"); // set attributes element.setAttribute("entry-number", getEntry().getEntryNum() + ""); element.setAttribute("tag", getName()); element.setAttribute("tabulated", isDone() ? "true" : "false"); return element; } COM: <s> get element representing this group </s>
funcom_train/17624388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Font getFont(boolean big) { Font font; float size; if (big) { font = this.bigFont; size = bigFontSize; } else { font = this.font; size = fontSize; } float newSize = size * (float) Settings.getBrickSizeRatio(); if (font.getSize() < newSize) { font = font.deriveFont(newSize); } return font; } COM: <s> getter for game font instance </s>
funcom_train/10231288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getProtocolAsString() { switch (m_iProtocolType) { case PROTOCOL_TYPE_RAW_TCP: return PROTOCOL_STR_TYPE_RAW_TCP; case PROTOCOL_TYPE_SOCKS: return PROTOCOL_STR_TYPE_SOCKS; case PROTOCOL_TYPE_HTTPS: return PROTOCOL_STR_TYPE_HTTPS; case PROTOCOL_TYPE_HTTP: return PROTOCOL_STR_TYPE_HTTP; default: return PROTOCOL_STR_TYPE_UNKNOWN; } } COM: <s> gets the protocol of this listener interface as string </s>
funcom_train/46001850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printShipArray() { for (int i = 0; i < ships.length; i++) { if (ships[i] != null) { System.out.println("(" + ships[i].getX() + "," + ships[i].getY() + ")" + "Length: " + ships[i].getLength() + " , Direction: " + ships[i].getDirection()); } } } COM: <s> print the ship array with the details of every ship coordinates x y </s>
funcom_train/22562904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String searchWithFilter() { collapsed = false; Date maxDate = DateUtils.getMaximizedCurrentDate(); final Date minDate = DateRangeEnum.getDate(DateRangeEnum.valueOf(prefsController.getDateRangeType()), maxDate); if (minDate == null) { maxDate = null; } search(prefsController.getSelectedEntities(), prefsController.getSelectedEvents(), getSearchParameter(), minDate, maxDate); return null; } COM: <s> search with filter on title </s>