__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/5445278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isNameAndType(int Index) { if ((Index < 1) || (Index >= ItemType.length) || (ItemType[Index] == 0)) throw new ClassFormatError("Constant pool item does not exist"); return ItemType[Index] == CONSTANT_NAME_AND_TYPE; } COM: <s> check if a constant pool item is a name and type constant </s>
funcom_train/45465815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XMLType getBaseType() { if ( (_baseType != null) && (super.getBaseType() == null) ) { XMLType baseType = getSchema().getType(_baseType); setBaseType( baseType ); } return super.getBaseType(); } //-- getBaseType COM: <s> returns the base type that this type inherits from </s>
funcom_train/25068887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void findBackwards() { loc--; if (loc < 0) loc = sortedMatches.length - 1; table.changeSelection(((POCommon) sortedMatches[loc]).getIndex(), 0, false, false); table.requestFocus(); table.getColumnModel() .getColumn(0) .getCellRenderer() .getTableCellRendererComponent(table, null, true, true, ((POCommon) sortedMatches[loc]).getIndex(), 0); return; } COM: <s> displays the previous matched search term resets to the least closest </s>
funcom_train/24512624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void filterChanged(Filter filter) { Filter next = next(filter); if (next == null) { // prepared for additional event type // if (filter == getSorter()) { // fireSortOrderChanged(); // } fireContentsChanged(); } else { next.refresh(); // Cascade to next filter } } COM: <s> called when the specified filter has changed </s>
funcom_train/43789530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int read(Pixel [] buffer) throws IOException{ int pixelCount = 0; Pixel pixel; while (pixelCount < buffer.length) { // stop if alread end of file if((pixel=read()) == null) break; pixelCount++; buffer[pixelCount] = pixel; } return pixelCount; } COM: <s> read pixels into a buffer </s>
funcom_train/16105035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPlayerVersion(String playerVersion) { for (int i = 0, count = this.cmbPlayerVersion.getItemCount(); i < count; i++) { if (((DropDownHolder) this.cmbPlayerVersion.getItemAt(i)).toString().equals(playerVersion)) { this.cmbPlayerVersion.setSelectedIndex(i); return; } } } COM: <s> sets the recommended player version for this flash file </s>
funcom_train/36442305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerControllers() { JMenuItem menuItem; // MenuController handles events on menu items (i.e. when they are clicked) ServerMenuController sm = new ServerMenuController(this); for (int i = 0; i < menu.getItemCount(); i++) { menuItem = menu.getItem(i); menuItem.addActionListener(sm); } } COM: <s> registers the controllers for all items in each menu </s>
funcom_train/24493120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unloadReviewComments(String reviewId) { PluginLogger.log(this.getClass().toString(), "unloadReviewComments", "Unload comments of review: " + reviewId); // Remove the given review from the models this.rModel.removeReview(reviewId, false); // TODO: Erstmal nicht aus dem anderen Model rauslöschen. Dazu muss es cleverer werden } COM: <s> removes the comments of the given review from the database </s>
funcom_train/50187041
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int result = super.hashCode(); result = 29 * result + stxtype; result = 29 * result + (event != null ? event.hashCode() : 0); result = 29 * result + (inst != null ? inst.hashCode() : 0); return result; } COM: <s> returns a hash code value for this instance </s>
funcom_train/22359429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeUnitSpells(Map<? extends ID, Spell> spells) throws IOException { if (spells == null) return; Iterator<Spell> i = spells.values().iterator(); if (i.hasNext()) { write("SPRUECHE"); newLine(); } while (i.hasNext()) { Spell s = i.next(); writeQuotedString(s.getName()); } } COM: <s> write a units spell sprueche block to the underlying stream </s>
funcom_train/4121952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendToAll(Element element, Connection exceptConnection) { Iterator<Connection> connectionIterator = getConnectionIterator(); while (connectionIterator.hasNext()) { Connection connection = connectionIterator.next(); if (connection != exceptConnection) { try { connection.sendAndWait(element); } catch (IOException e) { logger.warning("Exception while attempting to send to " + connection); } } } } COM: <s> sends a network message to all connections except </s>
funcom_train/5790532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String cimScope(int cs) { switch (cs) { case CIMScope.CLASS : return CLASS; case CIMScope.ASSOCIATION : return ASSOCIATION; case CIMScope.INDICATION : return INDICATION; case CIMScope.PROPERTY : return PROPERTY; case CIMScope.REFERENCE : return REFERENCE; case CIMScope.METHOD : return METHOD; case CIMScope.PARAMETER : return PARAMETER; case CIMScope.ANY : return ANY; default : return "UNKNOWN"; } } COM: <s> this method will take the integer representing the cimscope </s>
funcom_train/13390961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String eventClassName = (eventClass==null? "<null>":eventClass.getName()); String eventIDVal = (eventID==null? "<null>":eventID.toString()); return ("Class: " + eventClassName + ", eventID: " + eventIDVal); } COM: <s> produce a string representation of an event descriptor </s>
funcom_train/140742
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hideTray() { if (trayState == TrayState.HIDDEN) { return; } if (trayState == TrayState.WINDOW) { unWindow(); } if (trayState == TrayState.EXTENDED) { saveDividerLocation(); } setDividerLocation(getHideDividerLocation()); setDividerSize(0); trayState = TrayState.HIDDEN; PreferenceUtils.saveComponentState(title, TrayState.HIDDEN.toString()); notifyTrayStateChangeListeners(); } COM: <s> put the tray in the hidden tray state </s>
funcom_train/47028618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void configureShell(Shell shell) { super.configureShell(shell); shell.setText(Messages.ErrorDescriptorInfoDialog_IgnoreWarningError); //$NON-NLS-1$ PlatformUI.getWorkbench().getHelpSystem().setHelp(shell, IWorkbenchHelpContextIds.FILE_EXTENSION_DIALOG); } COM: <s> method declared in window </s>
funcom_train/18743758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void maybeShowPopup(MouseEvent evt) { if (isPopupMenuEvent(evt) && getActions() != null) { getUI().cancelEdgeAdding(); Point atPoint = evt.getPoint(); createPopupMenu(atPoint).getPopupMenu().show(this, atPoint.x, atPoint.y); } } COM: <s> shows a popup menu if the event is a popup trigger </s>
funcom_train/1541818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readAll() throws IOException { Iterator i = entry.values().iterator(); while (i.hasNext()) { TTFTable table = (TTFTable) i.next(); if ((table != null) && (!table.isRead())) table.read(); } } COM: <s> reads all tables </s>
funcom_train/31936374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LayoutTree remove(LayoutPart child) { LayoutTree tree = find(child); if(tree == null) return this; LayoutTreeNode oldParent = tree.getParent(); if(oldParent == null) { //It was the root and the only child of this tree return null; } if(oldParent.getParent() == null) return oldParent.remove(tree); oldParent.remove(tree); return this; } COM: <s> find a child in the tree and remove it and its parent </s>
funcom_train/32752480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Rule getInstance( final DataAdaptor adaptor ) { final String pattern = adaptor.stringValue( "pattern" ); final String command = adaptor.stringValue( "command" ); final String kind = adaptor.hasAttribute( "kind" ) ? adaptor.stringValue( "kind" ) : ""; final boolean excludes = adaptor.hasAttribute( "excludes" ) ? adaptor.booleanValue( "excludes" ) : false; return new Rule( pattern, kind, command, excludes ); } COM: <s> create an instance from a data adaptor </s>
funcom_train/3902491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateMaxtimeallowedType_MaxLength(String maxtimeallowedType, DiagnosticChain diagnostics, Map context) { int length = maxtimeallowedType.length(); boolean result = length <= 13; if (!result && diagnostics != null) reportMaxLengthViolation(AdlcpRootv1p2Package.Literals.MAXTIMEALLOWED_TYPE, maxtimeallowedType, length, 13, diagnostics, context); return result; } COM: <s> validates the max length constraint of em maxtimeallowed type em </s>
funcom_train/6204352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateIcon() { String templateId = getStateData().getTemplateId(); try { IProcessStateTemplate stateTemplate = GaijinCore.resolveProcessStateTemplate(templateId); getProcessStateFigure().setIcon(GaijinUIPlugin.getTemplateImage(stateTemplate)); } catch (TemplateNotFoundException tnfe) { getProcessStateFigure().setIcon(GaijinUIImages.get(GaijinUIImages.KEY_UNRESOLVED)); } } COM: <s> update the icon from the model node template id </s>
funcom_train/7313371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSubType() { System.out.println("testGetSubType"); if(c7.getSubType() != null) fail("Wrong subtype"); if(!c6.getSubType().equals("Var a")) fail("Wrong subtype"); } COM: <s> test of get sub type method of class nl </s>
funcom_train/16093279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPropertyEditor(String propName, Class editClass) { java.util.Enumeration enumer = m_PropertyDescriptors.elements(); while (enumer.hasMoreElements()) { PropertyDescriptor pd = (PropertyDescriptor)enumer.nextElement(); if (pd.getName().equals(propName)) pd.setPropertyEditorClass(editClass); } } COM: <s> method to set a property editor class for a property </s>
funcom_train/51205772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(XmlPrinting xmlReader, PrintLayout layout) throws JException { this.layout = layout; this.xmlReader = xmlReader; NodeList lstFonts = xmlReader.getConfigElement().getElementsByTagName("font"); for(int i=0; i < lstFonts.getLength(); i++) { if(lstFonts.item(i) != null) { parseFont((Element)lstFonts.item(i)); } } } COM: <s> load the configuration data from the xml to print </s>
funcom_train/25791997
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Rectangle2D getRectangle(double x, double y, double width) { double height = width / RECTANGLE_ASPECT_RATIO; // Center the rectangle around the specified x and y if (height > 1) { x -= width / RECTANGLE_WIDTH_MODIFIER; y -= height / RECTANGLE_HEIGHT_MODIFIER; } m_rectangleShape.setFrame(x, y, width, height); return m_rectangleShape; } COM: <s> gets a rectangle with the given position and height </s>
funcom_train/14034292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String decrypt(String encryptedString) throws EncryptionException { if (encryptedString == null || encryptedString.trim().length() <= 0) throw new IllegalArgumentException( "encrypted string was null or empty"); try { SecretKey key = keyFactory.generateSecret(keySpec); cipher.init(Cipher.DECRYPT_MODE, key); BASE64Decoder base64decoder = new BASE64Decoder(); byte[] cleartext = base64decoder.decodeBuffer(encryptedString); byte[] ciphertext = cipher.doFinal(cleartext); return bytes2String(ciphertext); } catch (Exception e) { throw new EncryptionException(e); } } COM: <s> decrypt a code string code </s>
funcom_train/40469962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyTo(ChronoDate target) { ArgChecker.isNotNull(target, "target"); // TODO: Subclasses can potentially speed up this calc if we check if // 'target' is also an instance of this class and, if so, manually transfer // over the fields. target.setTime(this.getTime()); } COM: <s> copies the state of this date over to the target date </s>
funcom_train/36956034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasSource(IRubyElement je) { if (je == null || !je.exists()) return false; try { return je instanceof ISourceReference && ((ISourceReference)je).getSource() != null; } catch (RubyModelException ex) { IStatus status= new Status(IStatus.ERROR, RubyUI.ID_PLUGIN, IStatus.OK, "Error in JDT Core during AST creation", ex); //$NON-NLS-1$ RubyPlugin.getDefault().getLog().log(status); } return false; } COM: <s> checks whether the given ruby element has accessible source </s>
funcom_train/34282305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void forceCurrentLineHighlightRepaint() { // Check isShowing() to prevent BadLocationException // in constructor if linewrap is set to true. if (isShowing()) { // Changing previousCaretY makes us sure to get a repaint. previousCaretY = -1; // Trick it into checking for the need to repaint by firing // a false caret event. fireCaretUpdate(mouseListener); } } COM: <s> forces the current line highlight to be repainted </s>
funcom_train/1345486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDragonCurve() { Grammar g = new DOLGrammar(); g.setVariables("XY"); g.setConstants("F+-"); g.setInitiator("FX"); Rule rule1 = new ProductionRule("X", "X+YF"); Rule rule2 = new ProductionRule("Y", "FX-Y"); g.addProductionRule(rule1); g.addProductionRule(rule2); // start assertEquals("FX", g.getState()); g.iterate(); assertEquals("FX+YF", g.getState()); } COM: <s> test dragon curve l system </s>
funcom_train/7589557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(Object o1, Object o2){ DistanceNode node1 = (DistanceNode) o1; DistanceNode node2 = (DistanceNode) o2; double distance1,distance2; distance1 = node1.getDistance(); distance2 = node2.getDistance(); if (distance1 < distance2) return -1; else if (distance1 > distance2) return 1; else return 0; } // DistanceNodeComparator COM: <s> compares two code distance node code </s>
funcom_train/4362683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBytes(byte[] b, int off, int len) { byteC.setBytes( b, off, len ); type=T_BYTES; hasStrValue=false; hasHashCode=false; hasIntValue=false; hasLongValue=false; hasDateValue=false; } COM: <s> sets the content to the specified subarray of bytes </s>
funcom_train/32741774
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getTagName(String tagName) { if (tagName.startsWith(makumbaPrefix)) { tagName = tagName.substring(makumbaPrefix.length() + 1); } else if (tagName.startsWith(formPrefix)) { tagName = tagName.substring(formPrefix.length() + 1); } return tagName; } COM: <s> gets the short name of a tag without the prefix </s>
funcom_train/15462556
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveEverythingAway() throws Exception { Enumeration en = localRegistry.keys(); while (en.hasMoreElements()) { RegistryLocation rl = new RegistryLocation((String)en.nextElement()); Pid pid = getPidFromRegistryLocation(rl); ForeignObjectBase fo = new ForeignObjectBase(this, rl, pid, buildStaticPath(rl)); fo.move(); removePid2Object(pid, rl.getIndex()); } } COM: <s> takes every single stored foreign object and moves it to the central registry </s>
funcom_train/5382429
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(IStatus status) { Assert.isLegal(status != null); IStatus[] result = new IStatus[children.length + 1]; System.arraycopy(children, 0, result, 0, children.length); result[result.length - 1] = status; children = result; int newSev = status.getSeverity(); if (newSev > getSeverity()) { setSeverity(newSev); } } COM: <s> adds the given status to this multi status </s>
funcom_train/2422436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addUserDefinedProperty(String name, String value) { if (SystemJndiProperty.isSystemDefined(name)) { throw new IllegalArgumentException("name cannot be one of the system defined properties"); } JndiContextProperty p = JndiContextPropertyFactory.createUserDefinedProperty(name); p.setValue(value); userDefined.put(name, p); } COM: <s> adds a new user defined property to this code jndi context properties code </s>
funcom_train/24089279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMigrationWorkflowResultItem(DigitalObject inputDigo, DigitalObject outputDigo, long startTime, long endTime, String logInfo){ WorkflowResultItem item = new WorkflowResultItem(WorkflowResultItem.SERVICE_ACTION_MIGRATION,startTime,endTime,logger); item.setInputDigitalObject(inputDigo); if(outputDigo!=null){ item.setOutputDigitalObject(outputDigo); } item.addLogInfo(logInfo); } COM: <s> document a migration specific workflow result item </s>
funcom_train/42944369
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InetAddress getInetAddress() { if (this.tcpClient != null) { return this.tcpClient.getInetAddress(); } else if (this.udpClient != null) { SocketAddress sa = this.udpClient.getSocketAddress(); if (sa instanceof InetSocketAddress) { return ((InetSocketAddress) sa).getAddress(); } else { return null; } } else { return null; } } COM: <s> returns the address to which the socket is connected </s>
funcom_train/1539628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isBooleanClosed(GenPolynomial<C> A) { if (A == null || A.isZERO()) { return true; } C a = A.leadingBaseCoefficient(); C i = a.idempotent(); GenPolynomial<C> B = A.multiply(i); // better run idemAnd on coefficients if (A.equals(B)) { return true; } return false; } COM: <s> is boolean closed test if a idempotent ldcf a a </s>
funcom_train/11420552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Boolean doEquals(Object rhs) { Boolean ret = Boolean.FALSE; // find the target object and do comparison if (rhs instanceof Proxy) { InvocationHandler rhsHandler = Proxy.getInvocationHandler(rhs); if (rhsHandler instanceof CXFInvocationHandler) { ret = Boolean.valueOf(getData().getTarget() == ((CXFInvocationHandler)rhsHandler).getData() .getTarget()); } } return ret; } COM: <s> checks for equality based on the underlying target object </s>
funcom_train/44149249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveToXML(Element parent) { base = parent.getOwnerDocument().createElementNS(UDDIElement.XMLNS, UDDIElement.XMLNS_PREFIX + UDDI_TAG); // Save attributes if (text!=null) { base.appendChild(parent.getOwnerDocument().createTextNode(text)); } parent.appendChild(base); } COM: <s> save an object to the dom tree </s>
funcom_train/42710602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonAddInvoice() { if (jButtonAddInvoice == null) { jButtonAddInvoice = new JButton(); jButtonAddInvoice.setText("Add"); jButtonAddInvoice.setBounds(new Rectangle(10, 450, 121, 21)); jButtonAddInvoice.setActionCommand("AddInvoice"); } return jButtonAddInvoice; } COM: <s> this method initializes j button add invoice </s>
funcom_train/42643220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTermIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_OntotatorResult_termId_feature"), getString("_UI_PropertyDescriptor_description", "_UI_OntotatorResult_termId_feature", "_UI_OntotatorResult_type"), ModelPackage.Literals.ONTOTATOR_RESULT__TERM_ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the term id feature </s>
funcom_train/18056944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCancelButton() { if (cancelButton == null) { cancelButton = new JButton(); cancelButton.setBounds(new java.awt.Rectangle(13, 193, 117, 27)); cancelButton.setText("Cancel"); cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { dispose(); } }); } return cancelButton; } COM: <s> this method initializes cancel button </s>
funcom_train/320115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean skipScope() { switch (fToken) { case Symbols.TokenRPAREN: return skipScope(Symbols.TokenLPAREN, Symbols.TokenRPAREN); case Symbols.TokenRBRACKET: return skipScope(Symbols.TokenLBRACKET, Symbols.TokenRBRACKET); case Symbols.TokenRBRACE: return skipScope(Symbols.TokenLBRACE, Symbols.TokenRBRACE); default: Assert.isTrue(false); return false; } } COM: <s> skips a scope and positions the cursor code f position code on the </s>
funcom_train/27929931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getHelpItem() { if (helpItem == null) { helpItem = new JMenuItem(); helpItem.setText("OSGi Navigator Help"); helpItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { helpDialog.setVisible(true); } }); } return helpItem; } COM: <s> create the help menu item </s>
funcom_train/491568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONObject put(String key, Object value) throws JSONException { if (key == null) { throw new JSONException("Null key."); } if (value != null) { testValidity(value); this.myHashMap.put(key, value); } else { remove(key); } return this; } COM: <s> put a key value pair in the jsonobject </s>
funcom_train/25810278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean sameHour(long startDateTime, long endDateTime) { Calendar cal = GregorianCalendar.getInstance(); cal.setTimeInMillis(startDateTime); int startHour = cal.get(Calendar.HOUR_OF_DAY); int startMinute = cal.get(Calendar.MINUTE); int startSecond = cal.get(Calendar.SECOND); cal.setTimeInMillis(endDateTime); return startHour == cal.get(Calendar.HOUR_OF_DAY) && startMinute == cal.get(Calendar.MINUTE) && startSecond == cal.get(Calendar.SECOND); } COM: <s> true if the two times is on the same hour </s>
funcom_train/10471077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeDelegate() { if (delegate == null) { try { delegate = (StubDelegate)delegateClass.newInstance(); } catch (Exception e) { throw (org.omg.CORBA.INITIALIZE)new org.omg.CORBA.INITIALIZE( "Can not create Stub delegate: " + delegateClass.getName()).initCause(e); } } } COM: <s> lazy initialization routine for the stub delegate </s>
funcom_train/7857318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document getDocument(final File file, Log log) throws SAXException, IOException { Document document = fileCache.get(file); if (document != null) { log.debug("Using file from cache: " + file); } else { // load xml log.debug("Parsing file: " + file); document = builder.parse(file); fileCache.put(file, document); } return document; } COM: <s> retrieves document either from cache or builds a new one from the file </s>
funcom_train/46656564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int setTrackingSpeed(int mode) { int response = METHOD_OK; try { log.info("Changing tracking speed to "+mode); if (mode == ServiceTelescopeGeminiCommands.SIDERAL_MODE){ SerialPortManagerGemini.getInstance().sendSetNativeCommand(ServiceTelescopeGeminiCommands.SET_SIDERAL_MODE); } else if (mode == ServiceTelescopeGeminiCommands.TERRESTRIAL_MODE){ SerialPortManagerGemini.getInstance().sendSetNativeCommand(ServiceTelescopeGeminiCommands.SET_TERRESTRIAL_MODE); } } catch (SerialPortCommunicationException e) { response = METHOD_ERROR_SERIAL; log.error(e.getMessage()); e.printStackTrace(); } return response; } COM: <s> set tracking speed </s>
funcom_train/18219288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsCaseValueCalculator(final String caseValueCalculatorID) { for (final Iterator<CaseValueCalculator> it = caseValueCalculators.iterator(); it.hasNext();) { final CaseValueCalculator calculator = it.next(); if (caseValueCalculatorID.equals(calculator.getID())) { return true; } } return false; } COM: <s> checks if the case value calculator with the given identifier exists in </s>
funcom_train/10508610
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean sameDefinition(AntTypeDefinition def, AntTypeDefinition old) { boolean defValid = validDefinition(def); boolean sameValidity = (defValid == validDefinition(old)); //must have same validity; then if they are valid they must also be the same: return sameValidity && (!defValid || def.sameDefinition(old, project)); } COM: <s> check if two definitions are the same </s>
funcom_train/32987407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getIdentifierEsc() { String prov=GeneralUtils.replace(delta,"%","%25"); prov=GeneralUtils.replace(prov,"&","%26"); prov=GeneralUtils.replace(prov,"&","%23"); return GeneralUtils.replace(prov,"+","%2B"); } COM: <s> gets the identifier attribute of the values for velocity bean object escaped </s>
funcom_train/20422603
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeExternal(PofWriter pofWriter) throws IOException { pofWriter.writeByteArray(POF_INDEX_TOKEN, getTokenToSerialize(servicePrincipalName)); pofWriter.writeString(POF_INDEX_USERNAME, getName()); pofWriter.writeString(POF_INDEX_SPN, getServicePrincipalName()); pofWriter.writeString(POF_INDEX_MEMBER, getMemberString()); } COM: <s> coherence portable object method to deserialize this principal </s>
funcom_train/43245337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPhoneNumber() { System.out.println("getPhoneNumber"); FamilyDemographicDependentObject instance = new FamilyDemographicDependentObject(); String expResult = ""; String result = instance.getPhoneNumber(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get phone number method of class org </s>
funcom_train/47448527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private EditPart getPartForElement(final Object modelElement) { if (modelElement instanceof ScreenAdapter) { return new ScreenEditPart(); } if (modelElement instanceof StickyNoteAdapter) { return new StickyNoteEditPart(); } if (modelElement instanceof PointerLocation) { return new PointerLocationEditPart(); } if (modelElement instanceof Wire) { return new WireEditPart(); } throw new RuntimeException("Can't create part for model element: " + ((modelElement != null) ? modelElement.getClass().getName() : "null")); } COM: <s> maps an object to an edit part </s>
funcom_train/15896375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AuthToken getAuthenticationToken(String userid, String cred) { Get_authToken get_authToken = new Get_authToken(); get_authToken.setUserID(userid); get_authToken.setCred(cred); try { token = binding.get_authToken(get_authToken); } catch (Exception ex) { ex.printStackTrace(); } return token; } COM: <s> this function is to get an authantication token from the ws context store </s>
funcom_train/22335423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testAdvancedCookieCompiledWithClients() { try { XmlHttpClient xmlHttpClient = new XmlHttpClient("org/placidus/xmlhttplib/test/tests/test3/test3-compiled-clients.xml"); Map<String, Object> result = xmlHttpClient.execMap("methodheadertest", getDefaultParams()); Log.logInfo("Result of methodheadertest: " + CollectionHelper.dump(result)); assertTrue(result.get("headerstest_responseheader_ResponseHeaderAdvancedCookieCorrect") != null); } catch (Exception ex) { Log.logError(ex); fail(ex.getMessage()); } } COM: <s> checks advancedcookie parameters correct at server </s>
funcom_train/35846169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateCountLabel() { int size = Designer.theDesigner().getToDoList().size(); countLabel.setText(formatCountLabel(size)); countLabel.setOpaque(size > WARN_THRESHOLD); countLabel.setBackground((size >= ALARM_THRESHOLD) ? ALARM_COLOR : WARN_COLOR); } COM: <s> update the count label </s>
funcom_train/8486723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Move playMove(Stone player, Position position) { // these conditions don't need to change the goban stateto know if the move is possible if (! goban.isValid(position) || goban.readCell(position) != Stone.EMPTY ) { return Move.INVALID; } //write on the goban necessary to test the suicide made by a group return goban.writeCell(this,position, player,true); } COM: <s> play a move and return the result </s>
funcom_train/44025664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void LoadIcons() { TagIconsHashMap = new HashMap<String, String>(10); // TODO: Probably get list of tags and icon pictures from server TagIconsHashMap.put("Private", "TagIcons/drop-no_1.gif"); TagIconsHashMap.put("Public", "TagIcons/drop-yes_1.gif"); TagIconsHashMap.put("Atomic", "TagIcons/columns_1.gif"); TagIconsHashMap.put("New", "TagIcons/exclamation_1.gif"); } COM: <s> loads different icons which indicates common template tags </s>
funcom_train/34889632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String decode64BitEncodedString(String encodedString) { byte[] decodedBytes = decode64BitEncodedStringToBytes(encodedString); if (decodedBytes == null) { return null; } String s = null; try { s = new String(decodedBytes, "UTF-8"); } catch (UnsupportedEncodingException e) { return null; } return s; } COM: <s> decodes 64 bit encoded strings </s>
funcom_train/27822380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getTableCellEditorComponent(JTable table,Object value,boolean isSelected,int row,int column) { m_disableEvents=true; m_lastTable=table; m_moveToNextCell=0; m_delegate.setValue(value); m_disableEvents=false; return m_component; } COM: <s> called to get editor component </s>
funcom_train/15614029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initilizeLoggedUser() { if (this.loggedUser != null) { return; } String login = FacesContext.getCurrentInstance().getExternalContext().getRemoteUser(); if (UserBean.logger.isTraceEnabled()) { UserBean.logger.trace("Performing initialization on logged user " + login); } this.loggedUser = this.userFascade.getUserByLogin(login); this.initilizePriviliges(); } COM: <s> initializes logged user </s>
funcom_train/8085473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setButtons() { boolean isEmpty; isEmpty = m_TextQuery.getText().trim().equals(""); m_ButtonExecute.setEnabled((m_Connected) && (!isEmpty)); m_ButtonClear.setEnabled(!isEmpty); m_ButtonHistory.setEnabled(m_History.size() > 0); } COM: <s> sets the buttons according to the connected state </s>
funcom_train/22497427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Attachment loadFile(Element fileElement) { int id; String name; File file; try { id = fileElement.getAttribute("id").getIntValue(); name = fileElement.getChildTextNormalize("name"); file = new File(fileElement.getChildTextNormalize("location")); } catch (Exception e) { logger.log(Level.SEVERE, "Data conversion error in getting the id for " + fileElement + ".", e); return null; } Attachment newFile = new Attachment(id, name, file); logger.log(Level.INFO, "Loaded file: " + fileElement.getTextNormalize(), file); return newFile; } COM: <s> this method loads the file from the given file element </s>
funcom_train/40439274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String put(String key, String value) { if (key == null || value == null) { throw new IllegalArgumentException("Key and/or value cannot be null!"); } String old = storage.getItem(key); storage.setItem(key, value); return old; } COM: <s> adds or overwrites a new key value pair in the storage </s>
funcom_train/41666550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getServerPath() { String serverPath = ""; HttpServletRequest req = getWebRequestCycle().getWebRequest() .getHttpServletRequest(); String scheme = req.getScheme(); // http String serverName = req.getServerName(); // localhost int serverPort = req.getServerPort(); // 8081 // i.e http://localhost:8081 serverPath += scheme + "://" + serverName + ":" + serverPort; return serverPath; } COM: <s> gets server path </s>
funcom_train/12860852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDoubleClickAction() { viewer.addDoubleClickListener(new IDoubleClickListener() { public void doubleClick(DoubleClickEvent event) { MessageDialog.openInformation(viewer.getControl().getShell(), "Maloney", "Double Click detected"); // TODO open the coresponding editor } }); } COM: <s> create the double click action and register it at the viewer </s>
funcom_train/3391028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printClassAttributes(){ out.println(); AttrData[] clsattrs = cls.getAttributes(); for(int i = 0; i < clsattrs.length; i++){ String clsattrname = clsattrs[i].getAttrName(); if(clsattrname.equals("SourceFile")){ out.println(" SourceFile: "+ cls.getSourceName()); }else if(clsattrname.equals("InnerClasses")){ printInnerClasses(); }else { printAttrData(clsattrs[i]); } } } COM: <s> print class attribute information </s>
funcom_train/38550584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String info() { HtmlTable htmlTable = new HtmlTable(3); //first setup the headers htmlTable.addCell("Column Name"); htmlTable.addCell("Type"); htmlTable.addCell("Size"); for(int jj = 0 ; jj < getNumberColumns(); jj++) { //columns[jj].size); htmlTable.addCell(columns[jj].getName()); htmlTable.addCell(columns[jj].getTypeName()); htmlTable.addCell(String.valueOf(columns[jj].getSize())); } return htmlTable.printTable(); } COM: <s> get additional information about the columns in the table from the </s>
funcom_train/38464038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startLocalShared(String appName) throws StorageException { applicationName = validateName(appName); Properties controllerProperties = new Properties(); Properties managerProperties = new Properties(); logger.info("Starting local shared application"); startLocal(controllerProperties,managerProperties); bindController(controllerProperties); } COM: <s> starts a storage manager and a storage controller in the current jvm but </s>
funcom_train/29954549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetSolver() { System.out.println("setSolver"); SolverParamObject solver = new SolverParamObject(); SimuParamObject instance = new SimuParamObject(); instance.setSolver(solver); SolverParamObject result = instance.getSolver(); SolverParamObject expResult = solver; System.out.println(result); assertEquals(expResult, result); } COM: <s> test of set solver method of class hbm </s>
funcom_train/28672824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addParentPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RefType_parent_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RefType_parent_feature", "_UI_RefType_type"), BeansPackage.Literals.REF_TYPE__PARENT, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the parent feature </s>
funcom_train/3619290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDeltaTsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Bug_deltaTs_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Bug_deltaTs_feature", "_UI_Bug_type"), EclipsesrsPackage.Literals.BUG__DELTA_TS, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the delta ts feature </s>
funcom_train/1240773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeContents() { // unlink if (children != null) { for (int i = 0; i < children.size(); i++) { try { ((NodeImpl) children.get(i)).setParent(null); } catch (SOAPException e) { log.debug("ignoring", e); } } // empty the collection children.clear(); setDirty(); } } COM: <s> remove all chidlren </s>
funcom_train/31689960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getValues(int index) throws DataStoreException { if (m_wheres.get(index) instanceof WhereCondition) { return ((WhereCondition) m_wheres.get(index)).getValues(); } else { throw new DataStoreException("Invalid Class: " + m_wheres.get(index).getClass() .getName()); } } COM: <s> returns the list of conditional values for the condition at the </s>
funcom_train/18021282
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyRemoval (int from, int to) { ListDataEvent ev = new ListDataEvent ( this, ListDataEvent.INTERVAL_REMOVED, from, to - 1 ); removeInterval (external, from, to); int cnt = to - from; size -= cnt; regenerateCheckedBitSet (); fireChange (ev); } COM: <s> notifies removal of inteval from inclusive to exclusive and </s>
funcom_train/46017258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateHelp() { Vector<FieldEditor> fields = getModel().getFields(); int[] rows = table.getSelectedRows(); if (rows.length == 1) { setSelectedItemTitle(fields.get(rows[0]).getHelpTitle()); setSelectedItemDescription(fields.get(rows[0]).getHelpDescription()); } else { setSelectedItemTitle(""); setSelectedItemDescription(""); } } COM: <s> updates the help system </s>
funcom_train/1111567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map createCellAttributes(Point2D point) { Map map = new Hashtable(); // Add a Border Color Attribute to the Map GraphConstants.setBorderColor(map, Color.black); // Add a White Background GraphConstants.setBackground(map, Color.white); // Set autosize //GraphConstants.setAutoSize(map, true); // Move the label of the vertex to the bottom GraphConstants.setVerticalAlignment(map, JLabel.BOTTOM); return map; } COM: <s> hook from graph ed to set attributes of a new cell </s>
funcom_train/18451214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setActive(boolean active) { this.active = active; if (this.getWindowDecorationStyle() == JRootPane.FRAME) { this.closeButton.putClientProperty("paintActive", active); this.minimizeButton.putClientProperty("paintActive", active); this.toggleButton.putClientProperty("paintActive", active); } this.rootPane.repaint(); } COM: <s> updates state dependant upon the windows active state </s>
funcom_train/37230307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void initLog4J() throws IOException { //If already configured, don't do that again if(Logger.getLogger("jrds").getAllAppenders().hasMoreElements()) return; Appender consoleAppender = new ConsoleAppender(new org.apache.log4j.SimpleLayout(), DEFAULTLOGFILE); consoleAppender.setName(APPENDER); putAppender(consoleAppender); //Default level is debug, not a very good idea for(String loggerName: rootLoggers) { Logger.getLogger(loggerName).setLevel(Level.ERROR); } } COM: <s> the method used to prepare a minimal set of logging configuration </s>
funcom_train/37831619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getCoolingPeriod(final Player player1, final Player player2) { final int level1 = player1.getLevel(); final int level2 = player2.getLevel(); final double levelRatio = (Math.max(level1, level2) + 1.0) / (Math.min(level1, level2) + 1.0); return (int) (MIN_COOLING_PERIOD * levelRatio * levelRatio); } COM: <s> get the required cooling period for wedding ring use between players </s>
funcom_train/1842523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int nextBin() { // fast case int i = lastBin; do { Heap bin = bins[i]; if (!bin.isEmpty() && bin.peekFirst().time < binMax) { return lastBin = i; } i = (i + 1) % bins.length; binMax += binWidth; } while (i != lastBin); // linear scan lastBin = minBin(); binMax = bins[lastBin].peekFirst().time; binMax = binMax - binMax % binWidth + binWidth; return lastBin; } COM: <s> scan for and return next bin with an event with the next calendar </s>
funcom_train/29779496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(int value) { try { lock.writeLock().lock(); if (value > MAX_VALUE) { this.value = MAX_VALUE; } else if (value < 0) { this.value = 0; } else { this.value = value; } } finally { lock.writeLock().unlock(); } } COM: <s> set the current current activity advancement status in percentage from 0 </s>
funcom_train/49800148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*public void testSendEventLog() { System.out.println("sendEventLog"); // Begin transaction em.getTransaction().begin(); DPEvent event = null; String description = ""; UserUtil instance = null; instance.sendEventLog(event, description); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }*/ COM: <s> test of send event log method of class uk </s>
funcom_train/41579807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Dialog onCreateDialog(int id) { Dialog dialog; switch(id) { case 1: // Pop up a dialog to select a parent category final String[] categories = mdb.getCategories(); AlertDialog.Builder builder1 = new AlertDialog.Builder(context); builder1.setTitle("Select a parent category"); builder1.setItems(categories, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item1) { parentField.setText(categories[item1]); } }); dialog = builder1.create(); break; default: dialog = null; } return dialog; } COM: <s> creates a dialog message and displays it </s>
funcom_train/2625161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createLock() throws IOException { synchronized (LockableFileWriter.class) { if (!lockFile.createNewFile()) { throw new IOException("Can't write file, lock " + lockFile.getAbsolutePath() + " exists"); } lockFile.deleteOnExit(); } } COM: <s> creates the lock file </s>
funcom_train/23335414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void _remove() { SwingUtilities.invokeLater(new Runnable() { public void run() { if (plotPanel != null) { if ((_container != null) && (plotPanel != null)) { _container.remove(plotPanel); _container.invalidate(); _container.repaint(); } else if (_frame != null) { _frame.dispose(); } } } }); } COM: <s> remove the display from the current container if there is one </s>
funcom_train/50331285
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getThrottleMsgAddr() { if (this.isThrottleMessage()) { int a1 = this.getElement(2); int a2 = this.getElement(3); if(a1==0) return(a2); else return (((a1 * 256) & 0xFF00) + (a2 &0xFF) - 0xC000); } else return -1; } COM: <s> if this is a throttle type message return address </s>
funcom_train/28756044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setResynthesiscount(Long newVal) { if ((newVal != null && this.resynthesiscount != null && (newVal.compareTo(this.resynthesiscount) == 0)) || (newVal == null && this.resynthesiscount == null && resynthesiscount_is_initialized)) { return; } this.resynthesiscount = newVal; resynthesiscount_is_modified = true; resynthesiscount_is_initialized = true; } COM: <s> setter method for resynthesiscount </s>
funcom_train/18014665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FGPseudoLikelihoodTrainer (FeatureGraph graph, Binding labels) { this.graph = graph; this.labels = labels; featureList = new ArrayList<Feature>(graph.getFeatures()); featureLookup = new HashMap<Feature, Integer> (); for (int i = 0; i < featureList.size(); i++) featureLookup.put(featureList.get(i), i); localLLMap = new HashMap <DiscreteVariable, double []> (); System.out.println(featureList); } COM: <s> initializes a trainer for the given feature graph and training labels </s>
funcom_train/51121117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == null || !obj.getClass().equals(IndexedContainerItem.class)) return false; IndexedContainerItem li = (IndexedContainerItem) obj; return getHost() == li.getHost() && itemId.equals(li.itemId); } COM: <s> tests if the given object is the same as the this object </s>
funcom_train/31057399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doLocalSetup() throws AgentInitializationException { super.doLocalSetup(); displayCanvas = new SpokeCanvas(); try { acms = getComponentManagerShadow(); } catch (ShadowNotFoundException e) { throw new AgentInitializationException("This agent cannot run on a cell without a UI."); } acms.acceptComponentFrom(this, displayCanvas, "Spokes"); } COM: <s> when the agent arrives at its destination it creates a canvas </s>
funcom_train/32362596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispatch(IEventQueueDispatchCondition condition) throws IllegalAccessException { if (!EventQueue.isDispatchThread()) throw new IllegalAccessException("This method cannot be invoked from outside of dispatching thread"); try { while (condition.evaluate()) { AWTEvent awtEvent = getNextEvent(); dispatchEvent(awtEvent); } } catch (InterruptedException x) { } } COM: <s> dispatches awt events until specified condition is tt false tt </s>
funcom_train/18849834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadProperties() { properties = new Properties(); if (propFile.isFile()) { try { final FileInputStream in = new FileInputStream(propFile); properties.load(in); in.close(); } catch (Exception e) { System.out.println("[FATAL] - Error loading file '" + PROPERTIES_FILE + "'. (" + e.getMessage() + ")"); System.exit(EXIT_FATAL_ERROR); } } } COM: <s> loads the properties file </s>
funcom_train/24121131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(OutputStream out) throws IOException { int size = this.getSize(); WMFConstants.writeLittleEndian(out, size); WMFConstants.writeLittleEndian(out, WMFConstants.WMF_RECORD_SETTEXTJUSTIFICATION); WMFConstants.writeLittleEndian(out, breakCount); WMFConstants.writeLittleEndian(out, breakExtra); } COM: <s> writes the content of the set text justification record to a stream </s>
funcom_train/49789763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetStringToNumberRun() throws Exception { beginAtSitemapThenPage("Home"); { String target = getLabelIDForText("String"); assertLabeledFieldEquals(target, ""); // empty setLabeledFormElementField(target, "123"); } clickButtonWithText("Run"); // target should now have changed { String target = getLabelIDForText("Target"); assertLabeledFieldEquals(target, "123"); // empty } // no problems assertNoProblem(); } COM: <s> if we set the string field to 123 and click </s>
funcom_train/3158700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProperties(ParamProperties properties) { Guardian.assertNotNull("properties", properties); _properties.removePropertyChangeListener(_propertyChangeListener); _properties = properties; _properties.addPropertyChangeListener(_propertyChangeListener); if (_editor != null) { _editor.updateUI(); _editor.reconfigureUI(); } } COM: <s> sets the additional parameter information </s>