__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/11035551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isAbsolute(String uri) { String[] protocols = { "http://", "https://", "file:/", "jar:", }; for (int i = 0; i < protocols.length; i++) { if (uri.startsWith(protocols[i])) { return true; } } return false; } COM: <s> override logic in default uriresolver class </s>
funcom_train/46628664
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePractice(AddRemoveDocumentRequest request) throws UserException, ProgramException, PracticeException, ValidationFailedException, SessionExpiredException { String token = request.getToken(); Locale defaultLocale = Locale.getDefault(); serviceFacade.removePracticesFromProgram(request.getTargetDocumentId(), request.getDocumentIds(), token, defaultLocale); } COM: <s> removes an practice from a document </s>
funcom_train/48900880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setProjectShortName(final String shortName) { assertNotNull(this.release); final Package pkg = this.release.getPackage(); assertNotNull(pkg); final Project project = pkg.getProject(); assertNotNull(project); this.log("Setting projectshortname: " + shortName); project.setShortName(shortName); } COM: <s> called when the code projectshortname code xml attribute is encountered </s>
funcom_train/1889956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void storeLine(String linebuffer, FileInfo pInfo) { int lineNum = ++pInfo.maxLine; /* note, no line zero */ if (lineNum > FileInfo.MAXLINECOUNT) { System.err.println("MAXLINECOUNT exceeded, must stop."); System.exit(1); } pInfo.symbol[lineNum] = Node.addSymbol(linebuffer, pInfo == oldInfo, lineNum); } COM: <s> store line places line into symbol table </s>
funcom_train/21999714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private HashMap buildMenu(JMenu menu, String[] items) { HashMap<JMenuItem, String> menuMap = new HashMap<JMenuItem, String>(); if (items.length > 0) { for (int i = 0; i < items.length; i++) { JMenuItem menuItem = MenuHelper.addMenuItem(this, menu, items[i]); menuMap.put(menuItem, items[i]); } } return menuMap; } COM: <s> take the list of menu item and add them to the given menu </s>
funcom_train/9860062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean endsWith(final CharSequence pString) { if (pString.length() > length()) { return false; } int i; final int length = pString.length(); final int start = length() - length; for (i = 0; i < length; i++) { if (charAt(start + i) != pString.charAt(i)) { return false; } } return true; } COM: <s> does the string start with the specified substring </s>
funcom_train/48588045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public UserEntry updateUser(String username, UserEntry userEntry, String domain) throws AppsForYourDomainException, ServiceException, IOException, Exception { LOGGER.log(Level.INFO, "Updating user '" + username + "'."); prepareUserService(domain); URL updateUrl = new URL(domainUrlBase + "user/" + SERVICE_VERSION + "/" + username); return userService.update(updateUrl, userEntry); } COM: <s> updates a user </s>
funcom_train/19536099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveInitToolSettings(InitToolGameSettings settings, String database) { setInitToolSettings(settings); setInitToolEventScripts(settings.getEventScripts()); if (settings.isCombatantLookupAvailable() && PropertyTable.tableExists(database, InitToolGameSettings.TABLE_NAME)) saveCombatantLookupDatabase(database); } COM: <s> save all of the settings referenced in this file </s>
funcom_train/1434469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getAxisMax() { if (!(axisMax!=axisMax)) { // x!=x is a faster isNaN return axisMax; } else if (GChart.NAI != tickCount) { return getDataMax(); } else { return Math.max(getDataMax(), getTickMax()); } } COM: <s> returns the maximum value displayed on this axis </s>
funcom_train/3904106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addForwardOnlyPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ControlModeType_forwardOnly_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ControlModeType_forwardOnly_feature", "_UI_ControlModeType_type"), ImsssPackage.Literals.CONTROL_MODE_TYPE__FORWARD_ONLY, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the forward only feature </s>
funcom_train/18320206
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean handle(String propertyId, Problem.Range range) { FeedbackPropertyStyle s = style.getPropertyStyle(propertyId); if (s == null) { s = new FeedbackPropertyStyle(); style.putPropertyStyle(propertyId, s); } s.addRange(range); return true; } COM: <s> event handler for properties feedback events </s>
funcom_train/39171434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void skipLeadingComments() { // Keep skipping lines till we find one on which the first white space // character is not the comment symbol (#). while (true) { skipWhiteSpace(); if (indexInInputFile<inputFile.length() && inputFile.charAt(indexInInputFile) == '#') skipToStartOfNextLine(); else return; } } COM: <s> skip over any lines which are just comments </s>
funcom_train/48703068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendPosition(String tag, int start, int end) { LinkedList<TMarkedStoreItem> ll = tagMap.get(tag); if (ll == null) { ll = new LinkedList<TMarkedStoreItem>(); tagMap.put(tag, ll); } TMarkedStoreItem item = new TMarkedStoreItem(); ll.add(item); item.end = end; item.start = start; } COM: <s> appends a selection propertie for tag </s>
funcom_train/1665991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void installDefaults() { // setFont(UIManager.getFont("InternalFrame.titleFont", getLocale())); Font font = LiquidLookAndFeel.winDecoPanther ? UIManager.getFont("InternalFrame.pantherTitleFont") : UIManager.getFont("InternalFrame.titleFont"); setFont(font); } COM: <s> installs the fonts and necessary properties on the liquid title pane </s>
funcom_train/13222881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { CharArrayBuffer buffer = new CharArrayBuffer(16); buffer.append(this.name); if (this.value != null) { buffer.append("="); format(buffer, this.value, false); } return buffer.toString(); } COM: <s> get a string representation of this pair </s>
funcom_train/33380910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static protected PyObject DateFromTicks(long ticks) { Calendar c = Calendar.getInstance(); c.setTime(new java.util.Date(ticks * 1000)); c.set(Calendar.HOUR, 0); c.set(Calendar.MINUTE, 0); c.set(Calendar.SECOND, 0); c.set(Calendar.MILLISECOND, 0); return Py.java2py(new java.sql.Date(c.getTime().getTime())); } COM: <s> this function constructs an object holding a date value from the </s>
funcom_train/15607712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GenomicProperty createAltAccProp(String description, Map returnMap) { DeflineParser descriptionParser = new DeflineParser(description); String altAccession = descriptionParser.getDefId(); GenomicProperty altAccessionProp = null; if (altAccession != null) { altAccessionProp = createDefaultSettingsProperty(HitAlignmentFacade.ALT_ACCESSION_PROP, altAccession); returnMap.put(altAccessionProp.getName(), altAccessionProp); } // Got accession. return altAccessionProp; } // End method: createAltAccProp COM: <s> create properties for alternative accession and accession </s>
funcom_train/3343504
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testSignal() throws DDC1NoSignalException { final boolean old = api.getDDC1Bit(); for (int count = HEADER * BITS_PER_BYTE; count > 0; count--) { if (old != api.getDDC1Bit()) { return; } } throw new DDC1NoSignalException("No DDC1 signal detected"); } COM: <s> test for the presence of a ddc1 signal </s>
funcom_train/7274264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void tryBootstrapFromRouteTable() { synchronized (lock) { // Make sure we try this only once. if (triedRouteTable) { return; } if (pingFuture != null || bootstrapFuture != null) { return; } pingFuture = getMojitoDHT().findActiveContact(); pingFuture.addDHTFutureListener(new PongListener(pingFuture)); triedRouteTable = true; fromRouteTable = true; } } COM: <s> tries to bootstrap the local node from an existing </s>
funcom_train/1156613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StyledDocument create(final String string, Map properties) { try { return create(new ByteArrayInputStream(string.getBytes("UTF-8")), properties); } catch (IOException ex) { throw Tests.assertionError("UTF-8 should always be supported", ex); } } COM: <s> this parses the text in the given string </s>
funcom_train/8844498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OutputDestinationEnum getOutputDestination() { if ( _gui.getSetupView().rdoToFileSelected() ) { return OutputDestinationEnum.FILE; }else if( _gui.getSetupView().rdoToScreenSelected() ){ return OutputDestinationEnum.SCREEN; } return OutputDestinationEnum.FILE_AND_SCREEN; } COM: <s> returns the output destination file screen file and screen </s>
funcom_train/51538534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleRepaintEvent(int x1, int y1, int x2, int y2, Object target) { // Its ok to ignore the foreground/paintSuspended state from here. // repaint() will not succeed if the foreground/paintSuspended // status has changed in the meantime. Display.this.callPaint(x1, y1, x2, y2, target); } COM: <s> called by event delivery when a repaint should occur </s>
funcom_train/42637806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addVariables(List<String> variables, List<Number> points) { discardResult(); if (variables.size() != points.size()) throw new IllegalArgumentException("Size of variable list should be equal size of points list. " + variables.size() + " != " + points.size()); getVariables().addAll(variables); getPoints().addAll(points); for (String variable : variables) //Should be synchronized with differentiator. getDifferentiator().addVariable(variable); } COM: <s> actually now works only with one variable first in list one </s>
funcom_train/31363519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getNames() { Vector rVector = new Vector (); rVector.add ("MachineID"); rVector.add ("Name"); rVector.add ("Description"); rVector.add ("Note"); rVector.add ("NDSName"); rVector.add ("UNC"); rVector.add ("IPName"); return rVector; } COM: <s> returns a vector of field names for all the cfg machine columns </s>
funcom_train/2516571
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void verifyAlphaCode(String code, Pattern pattern) { Matcher codeMatcher = null; if (code == null) { throw new IllegalArgumentException("Null alpha code"); } codeMatcher = pattern.matcher(code); if (!codeMatcher.matches()) { throw new IllegalArgumentException( String.format("Alpha code '%1$s' does not match regular expression '%2$s'", code, pattern.pattern())); } } COM: <s> verifies alpha codes </s>
funcom_train/37823352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected VisualNode getNodeNear(Point point) { // check all elements for (VisualGraphElement element : elements) { // check, if the current element is a node if (element instanceof VisualNode) { // check, if the node boundaries have been hit if (element.hitBoundaries(point)) { // return node return (VisualNode) element; } } } return null; } COM: <s> return the node near a specified position using the node boundaries </s>
funcom_train/2807821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object arithmeticValue(double d0, double d1) { double result = 0; switch (operator) { case '+': result = d0 + d1; break; case '-': result = d0 - d1; break; case '*': result = d0 * d1; break; case '/': result = d0 / d1; break; case '%': result = d0 % d1; break; default: result = 0.0; } return new Double(result); } COM: <s> do the math </s>
funcom_train/3944352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double intersect(Ray r) { if (r == null || !Ray.isValidRay(r)) { throw new IllegalArgumentException( "intersect() called with Ray that is either null or not valid."); } return (-this.distanceTo(r.getStart()) / this.getNormal() .dotProduct(r.getDirection())); } COM: <s> intersect a ray with this plane </s>
funcom_train/24540524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getMoveChildrenCommand(List children, Object position) { CommandBuilder cBld = new CommandBuilder(""); Iterator itr = children.iterator(); while (itr.hasNext()) { Object child = itr.next(); if (!(child instanceof Department)) return UnexecutableCommand.INSTANCE; } if (children.contains(position)) return UnexecutableCommand.INSTANCE; Company parent = (Company) container; cBld.append(new RemoveDepartmentsCommand(parent, children)); cBld.append(new AddDepartmentsCommand(parent, children, (Department) position)); return cBld.getCommand(); } COM: <s> move the children </s>
funcom_train/13402444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { try { cat.debug( "Lease of " + entry + " expired."); struct.remove( entry); } catch ( NoSuchEntryException e) { cat.error( "", e); throw new InternalSpaceException( "Unexpected NoSuchEntryException occured. See log for details.", e); } } COM: <s> removes the entry from the store </s>
funcom_train/8987758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DmsRoot getDmsRootByDocumentID(Integer documentID) throws ApplicationException { DmsRootDAObject dmsRootDAO = new DmsRootDAObject(sessionContainer, conn); DmsDocument dmsDocument=this.getDocument(documentID); DmsRoot dmsRoot = (DmsRoot) dmsRootDAO.getObjectByID(dmsDocument.getRootID()); return dmsRoot; } COM: <s> get dms root by document id </s>
funcom_train/50846549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsWritable() throws Exception { JDBCResultSetMetaData rsmd = newJdbcResultSetMetaData(); int columnCount = rsmd.getColumnCount(); for (int i = 1; i <= columnCount; i++) { assertEquals("column: " + i, true, rsmd.isWritable(i)); } } COM: <s> test of is writable method of class org </s>
funcom_train/21889847
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder sb = new StringBuilder(); boolean isFirstLine = true; for(Line line : lines) { if (isFirstLine) { isFirstLine = false; } else { sb.append("\n"); } for (Word word : line.getWords()) { boolean isFirstWord = true; if (isFirstWord) { isFirstWord = false; } else { sb.append(" "); } for(Letter letter : word.getLetters()) { sb.append(letter.getText()); } } } return sb.toString(); } COM: <s> returns a plain text version of the page </s>
funcom_train/35844315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JComponent getModelElementSelector() { if (modelElementSelector == null) { modelElementSelector = new Box(BoxLayout.X_AXIS); modelElementSelector.add(new UMLComboBoxNavigator( Translator.localize("label.modelelement.navigate.tooltip"), new UMLComboBox2( new UMLTaggedValueModelElementComboBoxModel(), new ActionSetTaggedValueModelElement()) )); } return modelElementSelector; } COM: <s> returns the modelelement selector </s>
funcom_train/3079494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void createArea() { myShape = new java.awt.geom.Area(new java.awt.geom.Ellipse2D.Double(location.getX() - (size.getWidth() / 2), location.getY() - (size.getHeight() / 2), size.getWidth(), size.getHeight())); } COM: <s> creates the shape of this object </s>
funcom_train/1174707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean cantWin() { CardList list = AllZoneUtil.getPlayerCardsInPlay(getOpponent()); list = list.getKeyword("You can't win the game."); if (list.size() > 0) return true; CardList oppList = AllZoneUtil.getPlayerCardsInPlay(this); oppList = oppList.getKeyword("Your opponents can't win the game."); return oppList.size() > 0; } COM: <s> p cant win </s>
funcom_train/13894002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIndexOfChild(Object p, Object n) { SymbolNode[] list = list((SymbolNode)p); for(int i = 0; i < list.length; i++) { if(list[i] == (SymbolNode)n) { return i; } } return -1; } COM: <s> retrieve the index of a child of a symbol </s>
funcom_train/32720110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void trim(int n) { if (n > 0) { if (n > value.length) { n = value.length; } int[] newValue = new int[value.length-n]; System.arraycopy(value, 0, newValue, 0, value.length-n); value = newValue; } } COM: <s> remove the n rightmost subidentifiers from this oid </s>
funcom_train/13810959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SipPort createSipPort(final String portName) { if(outstandingSipPortCount >= MAX_PORTS) throw new IllegalStateException("Featurebox has the maximum allowed outstanding SipPorts. Cannot create a new SipPort"); SipPort newPort = new SipPort(portName, this, factory); outstandingSipPortCount++; if(userAgentHeader != null){ newPort.setUserAgentHeader(userAgentHeader); } if(serverHeader != null){ newPort.setServerHeader(serverHeader); } return newPort; } COM: <s> create a sip port associated with this feature box </s>
funcom_train/23235220
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void profilesCB() { Profile profile; String host; profile = (Profile) profilesComboBox.getSelectedItem(); if (profile != null) { host = profile.getHost(); serverField.setText(host); serverPortField.setText(String.valueOf(profile.getPort())); usernameField.setText(profile.getUser()); passwordField.setText(profile.getPassword()); } else { serverPortField .setText(String.valueOf(Profile.DEFAULT_SERVER_PORT)); usernameField.setText(""); passwordField.setText(""); } } COM: <s> called when a profile selection is changed </s>
funcom_train/9367626
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BluetoothServerSocket listenUsingRfcommOn(int channel) throws IOException { BluetoothServerSocket socket = new BluetoothServerSocket( BluetoothSocket.TYPE_RFCOMM, true, true, channel); int errno = socket.mSocket.bindListen(); if (errno != 0) { try { socket.close(); } catch (IOException e) {} socket.mSocket.throwErrnoNative(errno); } return socket; } COM: <s> create a listening secure rfcomm bluetooth socket </s>
funcom_train/44695347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object modifyDocumentNow(final DocumentModifier modifier) { UpdateManager um = svgCanvas.getUpdateManager(); if (um == null) { System.err.println("before first rendering finished"); return null; } final Object [] result = new Object[1]; try { um.getUpdateRunnableQueue().invokeAndWait(new Runnable() { public void run() { result[0] = modifier.run(DocumentManager.this); } }); } catch (InterruptedException ie) { ie.printStackTrace(); return null; } return result[0]; } COM: <s> tries to mofify the document at once </s>
funcom_train/42760640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String parameterStringValue(String parameter) { // This javadoc is copied verbatim in // Action.java.tmplt. If you change this, // consider update the template. if (parameter.compareTo("actionID") == 0) return "" + getActionID(); else if (parameter.compareTo("playerID") == 0) return getPlayerID(); if (parameter.compareTo("entityID") == 0) return getEntityID(); else return null; } // parameterStringValue COM: <s> returns a parameter value converted into a string by its name </s>
funcom_train/18318407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCycle(Face f) { Chain ac = new Chain(f.getGraph()); SimpleVertex sv = (SimpleVertex) f.getVertices() .get(0); ac = GraphHelper.getInstance() .dfsChainSearchOri(f, ac, sv, sv); // removing unneeded association f.getGraph() .removePropertyAsc(GraphHelper.getInstance()); return (ac != null); } COM: <s> preverify that face is cyclic </s>
funcom_train/37768510
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IBuilder findComponent(String domain, String type) { List l = findComponents(type, domain); if(l.size() == 0) return null; if(l.size() != 1) { log.error("Mutiple Components For " + type + "/" + domain); // we'll just return the first one though return null; } return (IBuilder) l.get(0); } COM: <s> find a given component </s>
funcom_train/3304862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File resolveFile(String formname) throws FileNotFoundException { if (!formname.endsWith(".sxw")) formname+=".sxw"; File sxw = new File (Resources.getString("openoffice.document-location"), formname); if (!sxw.exists()) throw new FileNotFoundException("could not find .swx for form name="+formname+" file="+sxw.getAbsolutePath()+sxw.getName()); return sxw; } COM: <s> looks up the oo file that contains the form with the given name </s>
funcom_train/46758607
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createTableSchema(TableModel tableModel) throws Exception { IControlScript controlScript = ControlScriptFactory.getJavaScript(); controlScript.addReference(tableModel, "tableModel"); // add context parameters such as visitId, orderId, patientId etc. return (String) controlScript.execute(script, "createTableSchema"); } COM: <s> create table schema </s>
funcom_train/42401120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void overrideFactoryBeanCreateInstance(final Bean bean) { Checker.notNull("parameter:bean", bean); while (true) { if (bean instanceof Rpc) { this.overrideFactoryBeanCreateInstanceViaDeferredBinding((Rpc) bean); break; } final String factoryMethodName = bean.getFactoryMethod(); if (Tester.isNullOrEmpty(factoryMethodName)) { this.overrideFactoryBeanCreateInstanceNewConstructor(bean); break; } this.overrideFactoryBeanCreateInstanceFactoryMethod(bean); break; } } COM: <s> depending on the bean tag overrides the appropriate </s>
funcom_train/49626459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private K fixPositionsAndGet(final int index) { E element = null; Iterator<E> childrenIterator = getChildrenSet().iterator(); int pos = 0; while (childrenIterator.hasNext()) { E n = childrenIterator.next(); if (pos == index) { element = n; } n.position = pos++; } /* * cast is safe, as the inner list is finally bound to <E> upon * construction time */ @SuppressWarnings("unchecked") K castedE = (K) element; return castedE; } COM: <s> fixes the positions of the children set and returns the element at </s>
funcom_train/7640730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearLog() { try { synchronized (mLock) { mEvents.clear(); mNewEvents.clear(); mPendingDisplay = false; for (EventDisplay eventDisplay : mEventDisplays) { eventDisplay.resetUI(); } } } catch (SWTException e) { Log.e("EventLog", e); //$NON-NLS-1$ } } COM: <s> clears the log </s>
funcom_train/21730018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object invokeTriggersRemove(final MethodInvocation methodInvocation, final TriggersRemoveAttribute triggersRemoveAttribute) throws Throwable { if(When.BEFORE_METHOD_INVOCATION.equals(triggersRemoveAttribute.getWhen())) { invokeCacheRemove(methodInvocation, triggersRemoveAttribute); return methodInvocation.proceed(); } final Object methodInvocationResult = methodInvocation.proceed(); invokeCacheRemove(methodInvocation, triggersRemoveAttribute); return methodInvocationResult; } COM: <s> called if the </s>
funcom_train/45228644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ProjectCompileResult compile() { List<File> sourceFiles = null; try { sourceFiles = listSourceFiles(); } catch (Exception e) { log.error("Error getting source file list for compile for student [" + studentId + "]", e); } compileResult = ProjectCompiler.compile(studentId, sourceFiles, locator.getProjectDirectory().getAbsolutePath()); return compileResult; } COM: <s> compiles the source code in this project </s>
funcom_train/31110440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Level loadLevelFromElement(final Element element) { Element playerElement; Character player; Level level; if (element == null) { throw new IllegalArgumentException("Argument element is null."); } if (!element.getName().equals("level")) { throw new IllegalArgumentException("Element is not a level element."); } playerElement = element.getChild("character"); player = this.loadCharacterFromElement(playerElement); level = new Level(player); return level; } COM: <s> loads a level from a xml element </s>
funcom_train/21656546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtEliminarUsuario() { if (btEliminarUsuario == null) { btEliminarUsuario = new JButton(); btEliminarUsuario.setBounds(new Rectangle(500, 150, 130, 30)); btEliminarUsuario.setMnemonic('e'); btEliminarUsuario.setText("Eliminar Usuario"); btEliminarUsuario.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { eliminarUsuario(); } }); } return btEliminarUsuario; } COM: <s> this method initializes bt eliminar usuario </s>
funcom_train/20675153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object parse(final String text) throws DataParseException { try { final StringTokenizer st = new StringTokenizer(text, "\"[](){}, "); final float[] array = new float[st.countTokens()]; for (int i = 0; st.hasMoreTokens(); ++i) { final String tok = st.nextToken(); array[i] = Float.parseFloat(tok); } return array; } catch (final NumberFormatException e) { throw new DataParseException(e); } } COM: <s> parse an int array from a text string </s>
funcom_train/25501658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean terminateOnException( Exception ex ) { boolean result = false; if( ex == null ) return result; if( ex instanceof MultiplicityException ) { if( level >= 2 ) result = true; } else if( ex instanceof IncompatibleEntityTypesException ) { if( level >= 2 ) result = true; } else if( ex instanceof AlignmentParserException ) { if( level == 3 ) result = true; } return result; } COM: <s> checks whether parsing must terminate when a given exception is thrown </s>
funcom_train/13493734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean testRuleIntegrity(Rule r) throws ParseException { logger.debug("Checking integrity for rule: " + r.getHead() + " " + r + "..."); String ruleHead = extractHeadAsString(r, true); String query = ":-solve(testIntegrity(" + ruleHead + "))."; boolean successful = isConsultSuccessful(query); if (!successful) logger.info(query + " was not successful"); return successful; } COM: <s> checks the integrity for the given rule using test integrity </s>
funcom_train/35044026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void interruptPingerThread() { if(isPingerThreadRunning()) { regular_sock_close=true; // sendPingInterrupt(); // PATCH by Bruce Schuchardt (http://jira.jboss.com/jira/browse/JGRP-246) teardownPingSocket(); // will wake up the pinger thread. less elegant than Thread.interrupt(), but does the job } } COM: <s> interrupts the pinger thread </s>
funcom_train/3470272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCursorImages(Starter starter) { // Get the cursor images CursorImages cursorImages = replay.getCursorImages(); Hashtable<String, String> starterCursorImages = starter.getCursorImages(); for (String cursorName : starterCursorImages.keySet()) { String imageFilename = starterCursorImages.get(cursorName); cursorImages.addCursor(cursorName, imageFilename, new Point(0, 0)); } } COM: <s> adds cursor images stored in the starter to the cursor images </s>
funcom_train/9532450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean matchFilterList(List<String> filterList, String value) { final boolean foundElsewhere = filterList.size() > 1 ? this.matchFilterList(filterList.subList(1, filterList.size()), value) : true; return (value.toLowerCase().indexOf(filterList.get(0).toLowerCase()) != -1) && foundElsewhere; } COM: <s> match a value by matching every word in the list </s>
funcom_train/23872842
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object visit(CollectionLiteralExp host, Object data) { String kind = (String)host.getKind().accept(this,data); String result = kind + " {"; Iterator i = host.getParts().iterator(); while(i.hasNext()) { CollectionLiteralPart part = (CollectionLiteralPart)i.next(); result += (String)part.accept(this, data); if (i.hasNext()) result+=", "; } result+="}"; return result; } COM: <s> visit class collection literal exp </s>
funcom_train/28754853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAccessionnumber(String newVal) { if ((newVal != null && this.accessionnumber != null && (newVal.compareTo(this.accessionnumber) == 0)) || (newVal == null && this.accessionnumber == null && accessionnumber_is_initialized)) { return; } this.accessionnumber = newVal; accessionnumber_is_modified = true; accessionnumber_is_initialized = true; } COM: <s> setter method for accessionnumber </s>
funcom_train/47020059
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getRemoveBookmark() { if (removeBookmark == null) {//GEN-END:|58-getter|0|58-preInit // write pre-init user code here removeBookmark = new Command(getLocalizedString("Delete"), Command.OK, 3);//GEN-LINE:|58-getter|1|58-postInit // write post-init user code here }//GEN-BEGIN:|58-getter|2| return removeBookmark; } COM: <s> returns an initiliazed instance of remove bookmark component </s>
funcom_train/4008608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void keyPressed(int keyCode) { switch (getGameAction(keyCode)) { case UP: pointerPos = --pointerPos < 0 ? nrOfItems - 1 : pointerPos; break; case DOWN: pointerPos = ++pointerPos >= nrOfItems ? 0 : pointerPos; break; case FIRE: connect(); break; default: switch (keyCode) { case KEY_NUM2: pointerPos = --pointerPos < 0 ? nrOfItems - 1 : pointerPos; break; case KEY_NUM8: pointerPos = ++pointerPos >= nrOfItems ? 0 : pointerPos; break; case KEY_NUM5: connect(); break; } } repaint(); } COM: <s> checks which key was pressed and does the action for it </s>
funcom_train/37763017
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void performInquiry() throws ApplicationExceptions, FrameworkException { getUserSession().getWidgetCache(getComponentId()).clear(); try { m_finderOutDto = createTx().find(); m_error = null; } catch (Exception e) { // Render an empty screen with an error indicator m_finderOutDto = null; m_error = e; } } COM: <s> this performs the actual query to obtain the finder out dto </s>
funcom_train/38868592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testFsuHeader() { Assert.assertEquals("TK356", fsu.getStn()); Assert.assertEquals(2003, fsu.getYear()); Assert.assertEquals(1, fsu.getMonth()); Assert.assertEquals("34", fsu.getUrsi()); } COM: <s> test the get fsuheader routine in fsu format </s>
funcom_train/43667159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setBounds(new Rectangle(50, 67, 421, 151)); jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane.setViewportView(getJEditorPane()); } return jScrollPane; } COM: <s> this method initializes j scroll bar </s>
funcom_train/460446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTransform(String s, String systemId) throws Exception { StreamSource streamSource; //StringBufferInputStream is = new StringBufferInputStream(s); StringReader sr = new StringReader(s); streamSource = new StreamSource(sr, systemId); if (tFactory == null) tFactory = TransformerFactory.newInstance(); transformer = tFactory.newTransformer(streamSource); } COM: <s> set the transform by providing an xml string and string representing a uri </s>
funcom_train/50865813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IntPoint getCenterPoint() { int xCenter = (int) Math.round((foci1.getiX() + foci2.getiX()) / 2D); int yCenter = (int) Math.round((foci1.getiY() + foci2.getiY()) / 2D); return new IntPoint(xCenter, yCenter); } COM: <s> gets the center point of the ellipse </s>
funcom_train/8641084
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return vals[I11] + "\t" + vals[I12] + "\t" + vals[I13] + "\n" + vals[I21] + "\t" + vals[I22] + "\t" + vals[I13] + "\n" + vals[I31] + "\t" + vals[I32] + "\t" + vals[I33]; } COM: <s> generates a string representating of the matrix </s>
funcom_train/43098204
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCondition(Object handle, Object booleanExpression) { if (handle instanceof MExtend && booleanExpression instanceof MBooleanExpression) { ((MExtend) handle).setCondition( (MBooleanExpression) booleanExpression); return; } throw new IllegalArgumentException("handle: " + handle + " or booleanExpression: " + booleanExpression); } COM: <s> set the condition of an extend </s>
funcom_train/31200261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cacheResult(TileProvider tileProvider) { EntityCacheUtil.putResult(TileProviderModelImpl.ENTITY_CACHE_ENABLED, TileProviderImpl.class, tileProvider.getPrimaryKey(), tileProvider); FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ASSETCATEGORYID, new Object[] { Long.valueOf(tileProvider.getAssetCategoryId()) }, tileProvider); tileProvider.resetOriginalValues(); } COM: <s> caches the tile provider in the entity cache if it is enabled </s>
funcom_train/43605534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init() { passes = new ArrayList(getPasses()); passMap = new HashMap(); for (int i = 0; i < passes.size(); i++) { Pass pass = (Pass) passes.get(i); passMap.put(pass.id(), new Integer(i)); } } COM: <s> initialize the code passes code field and the </s>
funcom_train/22232963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRasterOp(int rasterOp) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_RASTER_OP_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes10")); if (isLive()) ((RenderingAttributesRetained)this.retained).setRasterOp(rasterOp); else ((RenderingAttributesRetained)this.retained).initRasterOp(rasterOp); } COM: <s> sets the raster operation function for this rendering attributes </s>
funcom_train/882700
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFindType() throws NamingException { om.createEntityType("testType5", "testTypeDescription5"); //$NON-NLS-1$ //$NON-NLS-2$ Type found = om.getTypeByName("testType5"); //$NON-NLS-1$ assertNotNull(found); assertEquals("testType5", found.getTypeName()); //$NON-NLS-1$ assertEquals("testTypeDescription5", found.getDescription()); //$NON-NLS-1$ } COM: <s> test find type </s>
funcom_train/15719755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInteger(double v) { double scale; if( orientation == HORIZONTAL ) { scale = (double)(amax.x - amin.x)/(maximum - minimum); return amin.x + (int)( ( v - minimum ) * scale); } else { scale = (double)(amax.y - amin.y)/(maximum - minimum); return amin.y + (int)( (maximum-v)*scale ); } } COM: <s> return the pixel equivalent of the passed data value </s>
funcom_train/31937934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadPreferenceStore() { String readWritePath = getStateLocation().append(FN_PREF_STORE).toOSString(); preferenceStore = new PreferenceStore(readWritePath); try { preferenceStore.load(); } catch (IOException e) { // Load failed, perhaps because the file does not yet exist. // At any rate we just return and leave the store empty. } return; } COM: <s> loads the preference store for this plug in </s>
funcom_train/28660489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createAlgoArea(final Composite parent) { final Composite g = new Composite(parent, SWT.SHADOW_NONE); g.setLayout(new GridLayout()); g.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); this.createKeyGroup(g); this.createTextGroup(g); this.createCalcGroup(g); this.createResultGroup(g); } COM: <s> create the main algorithm view </s>
funcom_train/23900591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMinMax(double mm0, double mm1, double mm2) { //set(-mm0, mm0, -mm1, mm1, -mm2, mm2); _min.set(-mm0, -mm1, -mm2); _max.set(mm0, mm1, mm2); } COM: <s> set the minimum and maximum values to the given parameters </s>
funcom_train/20825894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getPanelCoordinates(final Point wheelPoint) { int x = getOriginX() + GAP + (wheel.getSize() / 2) + wheelPoint.x; int y = getOriginY() + GAP + (wheel.getSize() / 2) + wheelPoint.y; return new Point(x, y); } COM: <s> translates wheel coordinates to panel coordinates </s>
funcom_train/18769381
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireTextAutocompleted( String typed, Object suggestion ) { Iterator iterator = _listeners.iterator(); AutocompleteEvent event = new AutocompleteEvent( this, typed, suggestion ); while( iterator.hasNext() ) { AutocompleteListener listener = (AutocompleteListener)iterator.next(); listener.textAutocompleted( event ); } } COM: <s> fires a text autocompleted event for the given typed text and suggested </s>
funcom_train/9679134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void ID(String id) throws ParseException { jj_consume_token(S_IDENTIFIER); if (!token.image.matches("(?i)" + id)) { {if (true) throw new ParseException("Encountered " + token.image + " at line " + token.beginLine + ", column " + token.beginColumn + "." + "\nWas expecting: " + id);} } } COM: <s> expect an s identifier with the given value </s>
funcom_train/12116801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connEtoC32(java.awt.event.ActionEvent arg1) { try { // user code begin {1} // user code end this.catImpegniJMenuItem_ActionPerformed(arg1); // user code begin {2} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {3} // user code end handleException(ivjExc); } } COM: <s> conn eto c32 cat impegni jmenu item </s>
funcom_train/42398417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Method findMostDerivedMethod(final String methodName, final List<Type> parameterTypes) { Checker.notNull("parameter:methodName", methodName); Checker.notNull("parameter:parameterTypes", parameterTypes); final MostDerivedMethodFinder finder = new MostDerivedMethodFinder(); finder.setMethodName(methodName); finder.setParameterTypes(parameterTypes); finder.start(this); return finder.getFound(); } COM: <s> searches this type for the most derived method with a signature that </s>
funcom_train/43282163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContainer(IWizardContainer newWizardContainer) { if (this.wizardContainer != newWizardContainer && this.wizardContainer != null) { this.wizardContainer.removePageChangedListener(this); } if (newWizardContainer instanceof WizardDialog) { this.wizardContainer = (WizardDialog) newWizardContainer; this.wizardContainer.addPageChangedListener(this); } super.setContainer(newWizardContainer); } COM: <s> set the wizard container </s>
funcom_train/43281854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void init() { IProject[] allWsProjects = ResourcesPlugin.getWorkspace().getRoot() .getProjects(); for (int i = 0; i < allWsProjects.length; i++) { IProject current = allWsProjects[i]; if (current.isOpen()) { Plugin project = plugins.newPlugin(); project.setId(current.getName()); } } } COM: <s> init the projects list </s>
funcom_train/10010347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unregisterProgressMeter(ProgressMeter progressMeter) { if (progressMeterMap.remove(progressMeter.getName()) == null) { throw new IllegalArgumentException("Progress meter: " + progressMeter.getName() + " does not exist."); } for(ProgressObserver progressObserver : progressObserverList) { progressObserver.unregisterProgressMeter(progressMeter); } } COM: <s> unregisters progress meter from the manager fires unregister event </s>
funcom_train/47983258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initSessionService() { sessionService = SessionService.getInstance(); sessionService.setContext(this); sessionService.setActivityManager(getLocalActivityManager()); sessionService.startIntentService(); sessionService.initializePreferences(); sessionService.setInfoViewer(infoBar); sessionService.initLoginLoop(); } COM: <s> creates a session service instance and stores the main views context for </s>
funcom_train/1996943
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void example(com.crosslogic.strata.htmlobject.Document aDoc) { // Create a body object and defines a background object... Body aBody = new Body(); aBody.setBackground( ((getPrefix() != null && getPrefix().length() > 0) ? "/" : "") + "images/poweredby.gif"); aBody.setLink("#AADDCC"); aDoc.add(aBody); aDoc.paragraph(); aDoc.text("Demonstrates Backround Object "); aDoc.add(new Link("CrossLogic Corporation", "http://www.crosslogic.com")); } COM: <s> generates an example body containing text and </s>
funcom_train/3760386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Integer getInteger(int n) { int idx = n + 1000; if (idx < 0 || idx >= integers.length) return new Integer(n); Integer num = integers[idx]; if (num == null) { num = new Integer(n); integers[idx] = num; } return num; } COM: <s> translate an integer into an integer returning a value from a </s>
funcom_train/51344354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setCommitTime(final long commitTime) { if (!lock.isHeldByCurrentThread()) { throw new IllegalMonitorStateException(); } if (commitTime == 0L) { throw new IllegalArgumentException(); } if (this.commitTime != 0L) { throw new IllegalStateException(); } this.commitTime = commitTime; } COM: <s> sets the assigned commit time </s>
funcom_train/44748319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Protease proteaseForName(String aName) throws Exception { Protease aProtease = (Protease) _registry.get(aName); if (aProtease==null) { logger.info("requested protease " + aName +" not available in registry"); throw new IllegalArgumentException("No such protease in registry: "+aName); } return aProtease; } COM: <s> gets a protease specified by name </s>
funcom_train/16525218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle lineToRect(Shape a, int line) { Rectangle r = null; if (metrics != null) { Rectangle alloc = a.getBounds(); r = new Rectangle(alloc.x, alloc.y + (line * metrics.getHeight()), alloc.width, metrics.getHeight()); } return r; } COM: <s> redefined from plain view private method to allow for redefinition of </s>
funcom_train/24379800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void callSetMQHelper(MQItemBody itemBodyHelper) { MQMain.logger.debug("MQModel: callSetMQHelper"); assessmentItemHelper = new MQContentPackage(assessmentItemHelper); String contentXML = itemBodyHelper.getContentXML(); ItemBodyType itemBodyType = mathqurateObjectFactory .createItemBodyType(contentXML); assessmentItemHelper.getAssessmentItemType().setItemBody(itemBodyType); setMQAssessmentItem(); callSetNodeIDs(); } COM: <s> calls the update item body </s>
funcom_train/8461310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Note getNoteFirstExtendedLineLow() { if (m_lowNote == null) { //A 7th (label=6) for 5 lines, //A 5th (label=4) for 3 lines, //A 3rd (label=2) for 1 line byte label = (byte) (getStaffLines() + 1); Interval interv = new Interval(label, label==5?Interval.PERFECT:Interval.MAJOR, Interval.DOWNWARD); m_lowNote = interv.calculateSecondNote(getMiddleNote()); m_lowNote.setAccidental(new Accidental());//Accidental.NONE } return m_lowNote; } COM: <s> return the low first note which needs an extended staff line </s>
funcom_train/46335833
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void testGetLocalUsername() { // System.out.println("getLocalUsername"); // // OpbContextPlsqlImpl instance = (OpbContextPlsqlImpl)OpbContextSource.getContext(""); // // String expResult = System.getProperty("user.name"); // String result = instance.getLocalUsername(); // assertEquals(expResult, result); // assertNotNull(result); // // } COM: <s> test of get local username method of class com </s>
funcom_train/31096010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gameOver() { super.gameOver(); if (tick != null) tick.cancel(); //tell clients we are off sys.cwrap.send(new Message(ComWrapper.SERVER, ComWrapper.BROADCAST, codePrefix+"finished", null)); // nach dem spiel ist for dem spiel (welcher trottel hat eigentlich den satz erfunden?) this.quit(); // does sys.stopSubsystem(); sys.startSubsystem("tetris", Controller.SERVER); } COM: <s> everyone is game over now </s>
funcom_train/2422594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FtpMode getFtpMode() { FtpSecurityOption so = getSecurityOption(); switch (so) { case NONE: return FtpMode.UNSECURE; case SFTP: return FtpMode.SFTP; case REQUIRE_SSL_FOR_ALL: return isExplicitFtps() ? FtpMode.EXPLICIT_FTPS : FtpMode.IMPLICIT_FTPS; default: return FtpMode.EXPLICIT_FTPS; } } COM: <s> returns the code ftp mode code used by this code ftp location code </s>
funcom_train/9763300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeUInt(final long val) { if (val < 0) { throw new IllegalArgumentException("Negative value (" + val + ") passed to unsigned writing method."); } if (val > MAX_UINT) { throw new IllegalArgumentException("Value (" + val + ") to large to be written as uint."); } byteBuffer.clear(); byteBuffer.putLong(val); writeByteBuffer(4); } COM: <s> write a 32 bit unsigned int </s>
funcom_train/33159600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUnion() { Set<Attribute> u = (Set<Attribute>)RuleFunctions.union(rmodel.getRelation("Author").getAttributes().keySet(), rmodel.getRelation("Book").getAttributes().keySet()); assertEquals(u.toString(), "[BookID, FirstName, AuthorID, Title, Name]"); } COM: <s> test method for </s>