__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/2711201
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getClassByResolvedName(String resolvedName) { Class result = null; //First check to see if this is an alias for a class ClassDefinition aClassDefinition = ClassDefinitionRegistry.getInstance().getClassDefinitionByAlias(resolvedName); if (aClassDefinition != null) { result = aClassDefinition.getDefinedClass(); } else { try { result = Class.forName(resolvedName); } catch (ClassNotFoundException e) { e.printStackTrace(); } } return result; } COM: <s> method get class by resolved name </s>
funcom_train/31800836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Event findDB(String eventId) throws DAOException { Event event = null; String queryString = "select event " + "from Event as event " + "where event.eventID='" + eventId + "'"; event = (Event) getOne(queryString); logger.info("Found object: " + event.getEventID()); return event; } /* findDB() */ COM: <s> method for finding event with given id </s>
funcom_train/29986794
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SerialFieldTag getSerialFieldTag(final SerialFieldTag originalTag) { if (originalTag == null) { return null; } Object found = get(originalTag); if (found == null) { found = this.factory.createSerialFieldTag(originalTag); put(originalTag, found); } return (SerialFieldTag) found; } COM: <s> returns a wrapped instance of the supplied serial field tag object </s>
funcom_train/303611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String isRolePresent(List<Prm06Prm01Prm02> userRoles,Prm02Role role) { for (Prm06Prm01Prm02 prm06Prm01Prm02 : userRoles) { if(prm06Prm01Prm02.getPk().getRoleIdPrm02().equals(role.getPk().getRoleId())) { return Db4WSConsts.CHECK_YES; } } return Db4WSConsts.CHECK_NO; } COM: <s> finds in the list of roles for the user the passed role </s>
funcom_train/25028777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getTextPads() { ArrayList pads = new ArrayList(); int lenGroup = getGroupTabbedPane().getTabCount(); for (int i = 0; i < lenGroup; i++) { MotherTabbedPane pane = getTabbedPaneAt(i); int padCount = pane.getTabCount(); for (int j = 0; j < padCount; j++) { pads.add(((JScrollPane) pane.getComponentAt(j)) .getViewport().getView()); } } return pads; } COM: <s> gets all of the text pads </s>
funcom_train/7634764
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int nextPower(int power) { switch (power) { case Criteria.POWER_LOW: return Criteria.POWER_MEDIUM; case Criteria.POWER_MEDIUM: return Criteria.POWER_HIGH; case Criteria.POWER_HIGH: return Criteria.NO_REQUIREMENT; case Criteria.NO_REQUIREMENT: default: return Criteria.NO_REQUIREMENT; } } COM: <s> returns the next looser power requirement in the sequence </s>
funcom_train/14094300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getChildCount() { int num = 0; if (m_component == null) { num = getAllWindows().size(); } else if (m_component instanceof Container) { Container container = (Container) m_component; num = container.getComponentCount(); if (container instanceof Window) { num += ((Window) container).getOwnedWindows().length; } } return num; } COM: <s> get the number of children </s>
funcom_train/28686718
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String generateFsString(TagVo tagVo) { return this.getDataFormatDecorator().getFormattedString_FirstSeen(tagVo); //return getIpicoUtil().generateIpxString(tagVo.getUid(), tagVo.getI_sum(), tagVo.getQ_sum(), tagVo.getLastTime()); } COM: <s> generate the first seen string to be send to all next nodes </s>
funcom_train/22829270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processChange(Database currentModel, Database desiredModel, AddIndexChange change) { writeExternalIndexCreateStmt(change.getChangedTable(), change.getNewIndex()); change.apply(currentModel, getDbDialectInfo().isDelimitedIdentifierModeOn()); } COM: <s> processes the change representing the addition of an index </s>
funcom_train/31293123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEnterScope() { assertNull(observer.currentScope()); observer.enterScope(Scope.SESSION); assertEquals(Scope.SESSION, observer.currentScope()); observer.enterScope(Scope.APPLICATION); assertEquals(Scope.APPLICATION, observer.currentScope()); observer.enterScope(null); assertEquals(Scope.APPLICATION, observer.currentScope()); } COM: <s> test method for </s>
funcom_train/28768717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MessageValidator validate(String schemaPath, String... schemaPaths) throws IOException { Resource[] schemas = new Resource[schemaPaths.length]; for (int i = 0; i < schemas.length; i++) { schemas[i] = resourceLoader.getResource(schemaPaths[i]); } return validate(resourceLoader.getResource(schemaPath), schemas); } COM: <s> validates if the message corresponds to given xsds </s>
funcom_train/9083138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCommitWaitsForDisco() throws Exception { replayMocks(); commit(); // No packets should have been sent yet. assertEquals(0, mockComponent.packetsSent); // Complete disco, the packet should be sent mockDisco.discoComplete(); checkCommitMessage(); } COM: <s> tests that the commit method waits for disco </s>
funcom_train/51711079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addExceptionPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_TryExp_exception_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_TryExp_exception_feature", "_UI_TryExp_type"), ImperativeoclPackage.Literals.TRY_EXP__EXCEPTION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the exception feature </s>
funcom_train/7238025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int markBitsetForGen(BitSet p) { // Is the bitset (or an identical one) already marked for gen? for (int i = 0; i < bitsetsUsed.size(); i++) { BitSet set = (BitSet)bitsetsUsed.elementAt(i); if (p.equals(set)) { // Use the identical one already stored return i; } } // Add the new bitset bitsetsUsed.appendElement(p.clone()); return bitsetsUsed.size()-1; } COM: <s> add a bitset to the list of bitsets to be generated </s>
funcom_train/37847609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImageButton(Composite parent, Image image,int style) { super(parent, style); Assert.isNotNull(image,"ImageButton default image can't be null!"); this.addMouseTrackListener(this); this.addMouseListener(this); this.addPaintListener(this); currImage = image; this.image = image; this.width = image.getImageData().width; this.height = image.getImageData().height; this.setSize(width,height); this.setBackground(parent.getBackground()); } COM: <s> constructor for image button </s>
funcom_train/11005748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParaTextPropVal(String propName, int val) { // Ensure we have the StyleTextProp atom we're going to need if(paragraphStyle == null) { parentRun.ensureStyleAtomPresent(); // paragraphStyle will now be defined } TextProp tp = fetchOrAddTextProp(paragraphStyle, propName); tp.setValue(val); } COM: <s> sets the value of the given character text prop add if required </s>
funcom_train/1779445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Class clazz) { Method[] methods = clazz.getMethods(); for (int i = 0; i < methods.length; i++) { Method m = methods[i]; if (!m.getDeclaringClass().getName().equals("java.lang.Object")) { add(m); } } } COM: <s> add all the public methods in the specified class </s>
funcom_train/13686074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ASTNode getNodeAt(int index) { if (!isParsed()) return null; if (sortedNodes == null) { sortedNodes = new ArrayList<Node>(); loadSortedNodes(rootNode); } Node result = sortedNodes.get(findLastNode(sortedNodes, index, 0, sortedNodes.size()-1)); while (!(result instanceof ASTNode)) result = result.getParent(); return (ASTNode)result; } COM: <s> returns the node in the abstract syntax tree </s>
funcom_train/20467769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String nativeSQL(String sql) throws SQLException { if (sql == null) { return null; } Object escapedSqlResult = EscapeProcessor.escapeSQL(sql, serverSupportsConvertFn(), getLoadBalanceSafeProxy()); if (escapedSqlResult instanceof String) { return (String) escapedSqlResult; } return ((EscapeProcessorResult) escapedSqlResult).escapedSql; } COM: <s> a driver may convert the jdbc sql grammar into its systems native sql </s>
funcom_train/51271830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertAfter(TokenList tokenList) throws MXQueryException { if (!tokenList.isEmpty()) { tokenList.getLastToken().setNext(this.getNext()); this.getNext().setPrev(tokenList.getLastToken()); tokenList.getFirstToken().setPrev(this); this.setNext(tokenList.getFirstToken()); } } COM: <s> inserts the elements of the passed token list after code this code </s>
funcom_train/41737570
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getUseGPSCheckBox() { if (useGPSCheckBox == null) { useGPSCheckBox = new JCheckBox(); useGPSCheckBox.setName("usegpscb"); useGPSCheckBox.setText("GPS"); useGPSCheckBox.setPreferredSize(new Dimension(90, 23)); useGPSCheckBox.addActionListener(VRMUIEventHandler.get()); } return useGPSCheckBox; } COM: <s> this method initializes use gpscheck box </s>
funcom_train/1906495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String encrypt(String value) throws Exception { if (value == null) value = ""; // Initialize the cryptography algorithm. this.rijndael.init(Cipher.ENCRYPT_MODE, this.key, this.initalVector); // Get a UTF-8 byte array from a unicode string. byte[] utf8Value = value.getBytes("UTF8"); // Encrypt the UTF-8 byte array. byte[] encryptedValue = this.rijndael.doFinal(utf8Value); // Return a base64 encoded string of the encrypted byte array. return Base64Encoder.encode(encryptedValue); } COM: <s> encrypts a string </s>
funcom_train/48408221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOwnedElementPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Element_ownedElement_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Element_ownedElement_feature", "_UI_Element_type"), SpemxtmethodPackage.Literals.ELEMENT__OWNED_ELEMENT, false, false, false, null, null, null)); } COM: <s> this adds a property descriptor for the owned element feature </s>
funcom_train/49018322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Device registerDevice(String sId, String sName, long lDeviceType, String sUrl) { synchronized (DeviceManager.getInstance().getLock()) { Device device = new Device(sId, sName); device.setProperty(XML_TYPE, lDeviceType); device.setUrl(sUrl); hmItems.put(sId, device); return device; } } COM: <s> register a device with a known id </s>
funcom_train/5260758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRolePlayedByPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Regulation_rolePlayedBy_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Regulation_rolePlayedBy_feature", "_UI_Regulation_type"), BmmPackage.Literals.REGULATION__ROLE_PLAYED_BY, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the role played by feature </s>
funcom_train/16401711
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean updateRemoteVersion(int value) { int current; // Use difference to handle version overflow, which assumes that // absolute difference is always less than 2^31. while (((current = mRemoteVersion) - value) < 0) { if (cRemoteUpdater.compareAndSet(this, current, value)) { return true; } } return false; } COM: <s> atomically updates the remote version number only if the given value is </s>
funcom_train/23998780
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node getNode(LinkedList<String> path, Node node) { if (path.isEmpty()) { return node; } else { NodeList ndList = node.getChildNodes(); for (int i = 0; i < ndList.getLength(); i++) { if (ndList.item(i).getNodeName() == path.getFirst()) { path.removeFirst(); return getNode(path, ndList.item(i)); } } } return null; } COM: <s> gets a special node in a xml document via dom </s>
funcom_train/47359002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean testConstraints(FractionConstraint... test) { if(test.length == 0) // not actually a test... return this.isConsistent(); if(consistent != null && !consistent) // constraints are already inconsistent as they are return false; if(frozen && !isConsistent()) // for frozen constraints, make sure they're not already inconsistent return false; FractionConstraints testConstraints = this.mutableCopy(); for(FractionConstraint c : test) testConstraints.addConstraint(c); return testConstraints.isConsistent(); } COM: <s> tests if the given constraints together with the existing constraints </s>
funcom_train/29927991
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void displayPluginInfo() { MenuHelpPluginsFrame frame = new MenuHelpPluginsFrame( "Current Plugins", this); File f_currdir = new File("."); try { frame.setSourceText(f_currdir.getCanonicalPath() + File.separator +"plugins" + File.separator); } catch (IOException e) { frame.setSourceText("Unable to read default plugins directory."); } frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.setVisible(true); } COM: <s> this method displays the current plugin info </s>
funcom_train/7426864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fullPaint(final PPaintContext paintContext) { if (validatingCache) { super.fullPaint(paintContext); } else { final Graphics2D g2 = paintContext.getGraphics(); g2.drawImage(getImageCache(), (int) getX(), (int) getY(), null); } } COM: <s> repaints this node using the cached result if possible </s>
funcom_train/19417417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SVGUser addUser(String name){ if(!(classifierRole.isEmpty())) endWidth = endWidth + ((new Integer(interval)).intValue()); String x = (new Integer(endWidth)).toString(); String y = (new Integer(margin)).toString(); SVGUser user = new SVGUser(x,y,name); user.createSVGUser(svgNS,doc,g); endWidth = endWidth + user.getWidth(); classifierRole.addElement(user); return user; } COM: <s> methode add user add a user with its name on the document </s>
funcom_train/18434300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFirstCategoryIndex(int first) { if (first < 0 || first >= this.underlying.getColumnCount()) { throw new IllegalArgumentException("Invalid index."); } this.firstCategoryIndex = first; fireDatasetChanged(new DatasetChangeInfo()); //TODO: fill in real change info } COM: <s> sets the index of the first category that should be used from the </s>
funcom_train/14402804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findHTTPHeaderLength(String pMessage) { String currentHeader = mHeaderBuffer.toString(); String fullMessage = currentHeader + pMessage; int headerLength = fullMessage.indexOf("\n\n"); int newlineLength = 2; if (headerLength == -1) { headerLength = fullMessage.indexOf("\n\r\n"); newlineLength = 3; } /* * otherwise no payload delivered ==> assume that only header has been * delivered */ return (headerLength == -1) ? -1 : headerLength + newlineLength - currentHeader.length(); } COM: <s> searches in the passed bytearray for a xml start tag indicating </s>
funcom_train/7607239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean touches(float x, float y, Circle other, float ox, float oy) { float totalRad2 = getRadius() + other.getRadius(); if (Math.abs(ox - x) > totalRad2) { return false; } if (Math.abs(oy - y) > totalRad2) { return false; } totalRad2 *= totalRad2; float dx = Math.abs(ox - x); float dy = Math.abs(oy - y); return totalRad2 >= ((dx*dx) + (dy*dy)); } COM: <s> check if this circle touches another </s>
funcom_train/44163560
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startWorking() { final Player player = getPlayer(); logger.finest("Entering method startWorking: " + player + ", year " + getGame().getTurn()); if (!player.isWorkForREF()) { logger.warning("No work for REF: " + player); return; } super.startWorking(); } COM: <s> tells this code refaiplayer code to make decisions </s>
funcom_train/34257498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void collectExternalReferences(CommunityMember aCommunityMember) { this.workPackageList = new ArrayList<WorkPackage>(); this.workPackageList.addAll(this.getWorkPackageList()); if(getTaskPlanWorkTaskLink() != null && getTaskPlan() != null) { //this.originalPrimaryPlanPackage = this.getPrimaryPlanPackage(); } } COM: <s> collects any external references to this object as well as possible </s>
funcom_train/11021952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateNextElement() { String value = null; boolean done = false; while (this.enumeration.hasMoreElements() && !done) { value = this.enumeration.nextElement(); if (value.equals(CUSTOM_SHARED_VARIABLE_FACTORIES_INIT_PARAM)) { value = null; } else { done = true; } } next = value; } COM: <s> updates the next element that will be passed </s>
funcom_train/5860909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initComponents() { setMaximizable(true); setIconifiable(true); setResizable(true); setClosable(true); /* create the table */ tileSetTable = new JTable(new TileSetTableModel(tileSet)); tileSetTable.createDefaultColumnsFromModel(); JScrollPane scrollPane = new JScrollPane(tileSetTable); getContentPane().add(scrollPane); setJMenuBar(createMenu()); pack(); } COM: <s> creates the components in this frame </s>
funcom_train/636334
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void connectionClosed(){ try { this.unregisterInternal(); } catch (Exception e) { logger.severe("Error unregistering for monitoring. error=" + e.getMessage()); } /* close the connection */ closeConnection(); /* need to re-establish the connection when the server comes up */ new EstablishConnection().start(); } COM: <s> called by the connection monitor thread when the connection goes down </s>
funcom_train/3546404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean oneTypeFI(Set<Integer> selectedFI) { int typeCount = 0; int previousType = 0; for (int id : selectedFI) { TreeSecurityItem item = fiMap.get(id); if (item.getParentId() != previousType) { // The current item type differs from the previous typeCount++; previousType = item.getParentId(); } } // Result return (typeCount == 1); } COM: <s> returns true if selected fi items have the same type </s>
funcom_train/48151348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { super.update(); String record = ""; for (int i = 0; i < n; i++) record = record + "\t" + deck.getCard(i).getValue() + "\t" + deck.getCard(i).getSuit(); getRecordTable().append(record); deck.showCards(n, true); } COM: <s> update the experiment show the cards in the sample and update the record </s>
funcom_train/11747156
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSelectLikeIgnoreCaseObjects1() throws Exception { createArtistsDataSet(); SelectQuery query = new SelectQuery(Artist.class); Expression qual = ExpressionFactory.likeIgnoreCaseExp("artistName", "ARTIST%"); query.setQualifier(qual); List<?> objects = context.performQuery(query); assertEquals(20, objects.size()); } COM: <s> test how like ignore case works when using uppercase parameter </s>
funcom_train/32280362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLeafCount() { // Variables Enumeration enum; int count; TreeNode current; // Get Enumeration of all descendants enum = depthFirstEnumeration(); // Process Nodes count = 0; while (enum.hasMoreElements() == true) { current = (TreeNode) enum.nextElement(); if (current.isLeaf() == true) { count++; } // if } // if return count; } // getLeafCount() COM: <s> get leaf count </s>
funcom_train/7678614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Drawable getDrawable(int id) { int resId = getPackageResourceId(id); if (resId != 0) { return mPackageRes.getDrawable(resId); } else if (mDefaultRes != null){ return mDefaultRes.getDrawable(id); } else { return null; } } COM: <s> gets a drawable object associated with a particular resource id defined </s>
funcom_train/44458671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ensureCapacity(int needed) { // Determine current capacity int current = _buffer.length; // Increase capacity if needed if (current < needed) { int newCapacity = needed << 2; Log.log_1250(current, newCapacity); char[] newBuffer = new char[newCapacity]; System.arraycopy(_buffer, 0, newBuffer, 0, current); _buffer = newBuffer; } } COM: <s> ensures that the specified needed capacity is actually available </s>
funcom_train/18590016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onReceiveBid(MessageBid bid){ synchronized (syncObj) { Collections.sort(asks,compAsks); if(asks.size() > 0){ MessageAsk ask = (MessageAsk)asks.getFirst(); double priceAsk = ask.getPrice(); double priceBid = bid.getPrice(); if(priceBid >= priceAsk){ double finalPrice = (priceAsk + priceBid) / 2; super.match(ask, bid, finalPrice); asks.remove(ask); } else{ bids.add(bid); } } else{ bids.add(bid); } } } COM: <s> called when a bid is received </s>
funcom_train/35285633
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImagePool put(final String name, final Image image) { if (name == null) { throw new IllegalArgumentException("null name"); } if (image == null) { throw new IllegalArgumentException("null image"); } synchronized (support) { support.check(); final Image previous = map.put(name, image); if (previous != null) { previous.flush(); } return this; } } COM: <s> put an entry </s>
funcom_train/9132565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveMeasure(PhpFile resource, Metric metric, Double measure) { if (LOG.isDebugEnabled()) { LOG.debug("Saving " + metric.getName() + " for resource " + resource.getKey() + " with value " + measure); } context.saveMeasure(resource, metric, measure); } COM: <s> saves on measure in the context </s>
funcom_train/9869849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHits(Integer newVal) { if ((newVal != null && this.hits != null && (newVal.compareTo(this.hits) == 0)) || (newVal == null && this.hits == null && hits_is_initialized)) { return; } this.hits = newVal; hits_is_modified = true; hits_is_initialized = true; } COM: <s> setter method for hits </s>
funcom_train/48358442
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node addNode(Node newNode) { if (logger.isDebugEnabled()) logger.debug("ENTER " + newNode); Node node; if (!nodes.containsKey(newNode.getID())) { nodes.put(newNode.getID(), newNode); node = newNode; } else node = nodes.get(newNode.getID()); if (logger.isDebugEnabled()) logger.debug("RETURN " + node); return node; } COM: <s> adds a disconnected node to the graph </s>
funcom_train/49874353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void drawTrail(Graphics pen) { pen.setColor(myColor); // draw trail PointD previous = myTrail.get(0); for (int k = 1; k < myTrail.size(); k++) { PointD current = myTrail.get(k); pen.drawLine((int) previous.getX(), (int) previous.getY(), (int) current.getX(), (int) current.getY()); previous = current; } } COM: <s> draws a trail connecting the shapes previous positions </s>
funcom_train/12155266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll(Collection<IDicomElement> collection) { if (logger.isDebugEnabled()) { logger.debug("Entering addAll(Collection<IDicomElement> collection)."); logger.debug("collection = " + (collection != null ? "[" + collection + "]" : null) + "."); } elements.addAll(collection); fireIntervalAdded(this, 0, getSize()-1); logger.debug("Exiting addAll(Collection<IDicomElement> collection)."); } COM: <s> adds all the elements in the specified collection to the </s>
funcom_train/18590717
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteRequiredFile(String filename) { boolean result = false; if (requiredFiles_ == null) { return result; } for (int i = 0; i < requiredFiles_.size(); i++) { String temp = (String) requiredFiles_.get(i); if (temp.equals(filename)) { requiredFiles_.remove(i); result = true; break; } } return result; } COM: <s> deletes the given filename from the list </s>
funcom_train/11019789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CellFormatCondition getCondition(Matcher m) { String mdesc = m.group(CONDITION_OPERATOR_GROUP); if (mdesc == null || mdesc.length() == 0) return null; return CellFormatCondition.getInstance(m.group( CONDITION_OPERATOR_GROUP), m.group(CONDITION_VALUE_GROUP)); } COM: <s> returns the condition specification from the matcher or tt null tt if </s>
funcom_train/35716900
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected TypedPosition findClosestPosition(int offset) { try { int index= fDocument.computeIndexInCategory(fPositionCategory, offset); Position[] category= fDocument.getPositions(fPositionCategory); if (category.length == 0) return null; if (index < category.length) { if (offset == category[index].offset) return (TypedPosition) category[index]; } if (index > 0) index--; return (TypedPosition) category[index]; } catch (BadPositionCategoryException x) { } catch (BadLocationException x) { } return null; } COM: <s> returns the position in the partitoners position category which is </s>
funcom_train/8662593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLstore(int n) { if (n < 4) addOpcode(63 + n); // lstore_<n> else if (n < 0x100) { addOpcode(LSTORE); // lstore add(n); } else { addOpcode(WIDE); addOpcode(LSTORE); addIndex(n); } } COM: <s> appends lstore or lstore lt n gt </s>
funcom_train/27749594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String readFile(File file) throws IOException { FileInputStream fileInputStream = new FileInputStream(file); DataInputStream dataInputStream = new DataInputStream(fileInputStream); byte[] byteArr = new byte[dataInputStream.available()]; dataInputStream.readFully(byteArr); dataInputStream.close(); return new String(byteArr); } COM: <s> reads a file and converts it to string </s>
funcom_train/17009077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void completedTask(String taskIdentifier) { completionOrder.add(taskIdentifier); if (completionOrder.size() > maxNumberOfCompletions) { String purgeTaskId = completionOrder.poll(); taskInfo.remove(purgeTaskId); deploymentRequests.remove(purgeTaskId); } reportTaskExecutionStatus(taskIdentifier); } COM: <s> process the completion of the task </s>
funcom_train/15858444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerClearMacro(KeyStroke keyStroke) { final String CLEAR_COMMAND_KEY = "hanzilookup.clear"; Action clearAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { HanziLookup.this.clearButton.doClick(); } }; this.registerMacro(keyStroke, this.clearMacro, CLEAR_COMMAND_KEY, clearAction); this.clearMacro = keyStroke; } COM: <s> register the key stroke as the macro for the clear button </s>
funcom_train/4312113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JProgressBar getJProgressBar() { if (jProgressBar == null) { jProgressBar = new JProgressBar(); jProgressBar.setBounds(new Rectangle(21, 14, 321, 25)); jProgressBar.setString("saving in progress..."); jProgressBar.setBackground(SystemColor.activeCaption); jProgressBar.setForeground(Color.red); jProgressBar.setStringPainted(true); jProgressBar.setIndeterminate(true); } return jProgressBar; } COM: <s> this method initializes j progress bar </s>
funcom_train/31740226
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { clear(); contractComponent.setVisible(false); contractComponent.setTrickNumbers(0, 0); for (int i=0; i<cardContainers.length; i++) { cardContainers[i].init(); } for (int i=0; i<bidContainers.length; i++) { bidContainers[i].setVisible(true); } validate(); } COM: <s> performs some initialisation </s>
funcom_train/3047588
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPuttable(long txTimestamp, Object newVersion, Comparator comparator) { if (timeout < txTimestamp) return true; if (multiplicity>0) return false; return version==null ? unlockTimestamp < txTimestamp : comparator.compare(version, newVersion) < 0; //by requiring <, we rely on lock timeout in the case of an unsuccessful update! } COM: <s> can the timestamped transaction re cache this </s>
funcom_train/3391738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeHeader() { printHtmlHeader(configuration.getText("doclet.Window_Deprecated_List"), null, true); printTop(); navLinks(true); hr(); center(); h2(); boldText("doclet.Deprecated_API"); h2End(); centerEnd(); hr(4, "noshade"); } COM: <s> print the navigation bar and header for the deprecated api listing </s>
funcom_train/31359776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private XMLObject getXML(XMLObject xml, String name) { // Variables int index; XMLObject entry; int numChildren; // Process Each Entry Looking for name numChildren = xml.size(); for (index = 0; index < numChildren; index++) { // Get Entry entry = xml.getChild(index); // Check Name if (entry.getName().equals(name) == true) { return entry; } // if } // for // Not found return null; } // getXML() COM: <s> search xml for a particular name specified by the provided name </s>
funcom_train/11725290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAccessByUUID() throws RepositoryException { removeItem.remove(); // check if the node has been properly removed try { superuser.getNodeByUUID(uuid); fail("Transiently removed node should no longer be accessible from parent node."); } catch (ItemNotFoundException e) { // ok , works as expected } } COM: <s> transiently removes a persisted node using </s>
funcom_train/3349438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAssignableFrom(VmType S) { final VmType[] superClassesArray = S.superClassesArray; final int length = superClassesArray.length; for (int i = 0; i < length; i++) { if (superClassesArray[i] == this) { return true; } } return false; } COM: <s> determines if the class or interface represented by this class object is </s>
funcom_train/2292676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasSingleActions() { Iterator itCols = m_columns.elementList().iterator(); while (itCols.hasNext()) { CmsListColumnDefinition col = (CmsListColumnDefinition)itCols.next(); if (!col.getDefaultActions().isEmpty() || !col.getDirectActions().isEmpty()) { return true; } } return false; } COM: <s> returns code true code if any column definition contains a single action </s>
funcom_train/11023903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSimplePropertyDate() { String value = null; try { bean.setDateProperty(testUtilDate); value = BeanUtils.getSimpleProperty(bean, "dateProperty"); } catch (Throwable t) { fail("Threw " + t); } assertEquals("java.util.Date --> String", testUtilDate.toString(), value); } COM: <s> test code get simple property code converting to a string </s>
funcom_train/4496843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "Matrix (" + "scaleX=" + scaleX + " scaleY=" + scaleY + " rotateSkew0=" + rotateSkew0 + " rotateSkew1=" + rotateSkew1 + " translateX=" + translateX + " translateY=" + translateY + ")"; } COM: <s> returns the string representation of the matrix </s>
funcom_train/39895056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findStepIndex(TestCase testCase, StepsInTestCase step) { int result = -1; for (StepsInTestCase stepInTestCase: testCase.getStepsintestcase()) { if (stepInTestCase.getStep().equals(step)) { result = stepInTestCase.getSequenceNumber(); break; } } return result; } COM: <s> finds location of current step in test case of current test case </s>
funcom_train/35669198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FuzzyRule addAntecedent(Variable variable, String termName, boolean negated) { if( variable.getMembershipFunction(termName) == null ) throw new RuntimeException("FuzzyRuleTerm '" + termName + "' does not exists in variable '" + variable.getName() + "'"); FuzzyRuleTerm fuzzyRuleTerm = new FuzzyRuleTerm(variable, termName, negated); antecedents.add(fuzzyRuleTerm); return this; } COM: <s> add a condition </s>
funcom_train/24153064
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testShowWeeks() { System.out.println("showWeeks"); AbstractDatePicker date_picker = getDatePicker(); date_picker.setShowWeeks(true); assertTrue("showWeeks must be true.", date_picker.getShowWeeks()); date_picker.setShowWeeks(false); assertFalse("showWeeks must be false.", date_picker.getShowWeeks()); } COM: <s> test of show weeks property of class com </s>
funcom_train/16947456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initControls() { // X movement KeyBindingManager.getKeyBindingManager().add("moveXPositive", KeyInput.KEY_K); KeyBindingManager.getKeyBindingManager().add("moveXNegative", KeyInput.KEY_H); // Y movement KeyBindingManager.getKeyBindingManager().add("moveZPositive", KeyInput.KEY_U); KeyBindingManager.getKeyBindingManager().add("moveZNegative", KeyInput.KEY_J); // Jump KeyBindingManager.getKeyBindingManager() .add("jump", KeyInput.KEY_SPACE); } COM: <s> method for creating the controls </s>
funcom_train/35779635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String consume(String name, boolean required) throws ParseException { String value = attrs.get(name); if (value == null) { if (required) { throw new ParseException("Missing attribute: '" + name + "'"); } return null; } attrs.remove(name); return value; } COM: <s> gets the value of an attribute and remove it from the list </s>
funcom_train/26475339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean after(SimpleDate when) { int other = when.getYear(); if (date.year > other) return true; if (date.year < other) return false; other = when.getMonth(); if (date.month > other) return true; if (date.month < other) return false; other = when.getDay(); if (date.day > other) return true; if (date.day < other) return false; return (this.nanoSeconds > when.getNanoSecondsSinceMidnight()); } COM: <s> tests if this timestamp is after the specified date </s>
funcom_train/16818536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String read(int length) { char[] cbuf = new char[ length ]; int off = 0, read = -1; while (length > 0) { try { read = input.read(cbuf, off, length); if (read < 0) break; // end of stream; return what we've got length -= read; off += read; } catch (IOException e) { // return whatever we've read? break; } } return new String(cbuf); } COM: <s> read a string of length or until eof </s>
funcom_train/28755506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDatepropagated(java.util.Date newVal) { if ((newVal != null && this.datepropagated != null && (newVal.compareTo(this.datepropagated) == 0)) || (newVal == null && this.datepropagated == null && datepropagated_is_initialized)) { return; } this.datepropagated = newVal; datepropagated_is_modified = true; datepropagated_is_initialized = true; } COM: <s> setter method for datepropagated </s>
funcom_train/39109935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void unset(int x, int y) throws ArrayIndexOutOfBoundsException { if (x >= dim[0] || y >= dim[1]) { throw new ArrayIndexOutOfBoundsException("("+x+','+y+')'); } else { matrix.remove(makeKey(x,y)); } } COM: <s> unsets the element x y </s>
funcom_train/2724324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createAbsoulutePaths(File projectDir) { pathMap.put("projectDir", projectDir.getAbsolutePath()); for (String dir : SUB_DIRS) { pathMap.put(dir, new File(projectDir.toString() + File.separator + dir).getAbsolutePath()); } } COM: <s> creates absoulte paths for the database source output directory and any </s>
funcom_train/6343723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Cache createSystemCache (String cacheName, ICache[] auxCaches, ICompositeCacheAttributes cattr, Attributes attr ) { if ( cmd ) { p( "called create cache in cachemanager" ); } return new Cache( cacheName, auxCaches, cattr, attr ); } COM: <s> method for internal system cache creation </s>
funcom_train/2380431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setup() { setupRefreshTimer(); // Sort folders first, files second, alphabetical setSorter(new ViewerSorter() { public int category(Object element) { if(element instanceof File) { File f = (File)element; return f.isDirectory() ? 0 : 1; } return 0; } }); } COM: <s> set things up </s>
funcom_train/28744443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TradeResult sell(String stockSymbol, int shares) { if (shares > tradeLimit) { log("Attempt to sell "+shares+" is greater than limit of "+tradeLimit); shares = tradeLimit; } log("Selling "+shares+" shares of "+stockSymbol); return new TradeResult(shares, stockSymbol); } COM: <s> sells shares of a stock </s>
funcom_train/27860086
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGeometry(double x, double y, double w, double h){ wnes[0] = x - w/2; wnes[1] = y + h/2; wnes[2] = x + w/2; wnes[3] = y - h/2; if (bounds != null){ bounds.moveTo(x, y); bounds.setWidth(w); bounds.setHeight(h); } } COM: <s> set this regions center x y coordinates width and height </s>
funcom_train/10910628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeRtfSuffix() throws IOException { super.writeRtfSuffix(); /* reset paragraph defaults to make sure list ends * but pard causes word97 (and sometimes 2000 too) to crash if the list * is nested in a table */ if (!parentList.getHasTableParent()) { writeControlWord("pard"); } } COM: <s> end the list group </s>
funcom_train/10593203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createId() throws SourceException { try { setup(); if (status != ST_COLLECTION) { throw new SourceNotFoundException("Collection for createId not found: " + getURI()); } return collection.createId(); } catch (XMLDBException xdbe) { throw new SourceException("Cannot get Id for " + getURI(), xdbe); } finally { cleanup(); } } COM: <s> create a new identifier for a resource within a collection </s>
funcom_train/5576594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFormatedTime() { String result = "00:00"; if (time > 0) { int secs = (int) (time % SECONDS_PER_MINUTE); int mins = (int) (time / SECONDS_PER_MINUTE); result = (mins < TWO_DIGIT ? "0" + mins : Integer.toString(mins)) + ":" + (secs < TWO_DIGIT ? "0" + secs : Integer.toString(secs)); } return result; } COM: <s> retrieves date as string </s>
funcom_train/40514258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addResult(final DescriptionContent dc) { data.add(dc); final TableModelEvent event = new TableModelEvent(this, this.getRowCount() - 1, this.getRowCount() - 1, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT); notice(event); } COM: <s> method to add a result </s>
funcom_train/18009942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addGameScore(Game game, Player player, Font font) { gameScore.setFont(font); setGameScore(game, player); JPanel panel = getBorderPanel(gameScore); add(panel, new TableLayoutConstraints(1,1,1,1,TableLayoutConstraints.FULL, TableLayoutConstraints.FULL)); } COM: <s> p adds the game score to this panel </s>
funcom_train/9057191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSavePositive() { StudyPlan testPlan = new StudyPlan("testSubject2"); CourseBase cb; try { cb = new CourseBase(); testPlan.add(new SelectedCourse(cb.findCourse("01005"), 1)); } catch (Exception e) { fail(e.toString()); } try { usr.saveStudyPlan(testPlan); } catch (Exception e) { fail(e.toString()); } } COM: <s> a positive test of the save function </s>
funcom_train/22687414
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getPnlOverrideType() { if (pnlOverrideType == null) { FlowLayout flowLayout3 = new FlowLayout(); flowLayout3.setAlignment(FlowLayout.LEFT); pnlOverrideType = new JPanel(); pnlOverrideType.setLayout(flowLayout3); pnlOverrideType.add(getChkOverride(), null); pnlOverrideType.add(getChkLastOverride(), null); } return pnlOverrideType; } COM: <s> this method initializes pnl override type </s>
funcom_train/28749936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDescription(String newVal) { if ((newVal != null && this.description != null && (newVal.compareTo(this.description) == 0)) || (newVal == null && this.description == null && description_is_initialized)) { return; } this.description = newVal; description_is_modified = true; description_is_initialized = true; } COM: <s> setter method for description </s>
funcom_train/48802729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void invokeModule(String methodName) throws LoginException { try { final String finalName = methodName; java.security.AccessController.doPrivileged (new java.security.PrivilegedExceptionAction() { public Object run() throws LoginException { invoke(finalName); return null; } }); } catch (java.security.PrivilegedActionException pae) { throw (LoginException)pae.getException(); } } COM: <s> invokes the login commit and logout methods </s>
funcom_train/19385930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.setContentPane(getJContentPane()); this.setSize(600, 400); this.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); this.setTitle("Interaction Recorder - COMPAS"); getJTree().setModel(new DefaultTreeModel(new DefaultMutableTreeNode("InteractionRoot"))); } COM: <s> this method initializes this </s>
funcom_train/2278901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNewSslProtocol(String newSslProtocol) { if ((newSslProtocol == null && this.newSslProtocol != null) || (newSslProtocol != null && this.newSslProtocol == null) || (newSslProtocol != null && !newSslProtocol.equals(this.newSslProtocol))) { isNewSslProtocol = true; } this.newSslProtocol = newSslProtocol; } COM: <s> sets the new ssl protocol </s>
funcom_train/3723862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Feature createEmptyFeature(ATLASType type, ATLASElement parent) { if (type instanceof FeatureType) { Feature feature = implementation.newFeature(type, parent); // feature.initWith((FeatureType) type, parent); return feature; } throw new IllegalArgumentException("An invalid feature type was given."); } COM: <s> creates an empty feature from the only mandatory information </s>
funcom_train/5954919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAccessFieldName() { final StringBuilder sb = new StringBuilder(); final Iterator<PathNode> it = path.iterator(); it.next(); //skip the 1st form property while(it.hasNext()) { sb.append('.').append(it.next().evaled); } return sb.substring(1); } COM: <s> returns the path as a string for form access purpose </s>
funcom_train/45519803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void adjustVelocity(Vector2f delta) { if ( Math.abs(delta.x) > 500 ) delta.x = 0; if ( Math.abs(delta.y) > 500 ) delta.y = 0; if (!isMoveable()) { return; } lastVelocity.set(velocity); velocity.add(delta); validateVelocity(); } COM: <s> adjust the velocity of this body </s>
funcom_train/31170302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Hashtable getAgentsAndTS (LimeServerID host) { Hashtable agents = new Hashtable(); AgentID[] a = LimeTSMgr.sysMgr.getAgents(host); if (a != null) { for (int i = 0; i < a.length; i++) agents.put(a[i], LimeTSMgr.sysMgr.getTupleSpaces(a[i])); } return agents; } COM: <s> find the agents and tuple spaces that are local to the passed host </s>
funcom_train/11120067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addNode(Node node) { if (this.nodelist == null) { this.nodelist = new Node[1]; this.nodelist[0] = node; } else { Node[] copy = new Node[this.nodelist.length+1]; System.arraycopy(this.nodelist, 0, copy, 0, this.nodelist.length); copy[copy.length-1] = node; this.nodelist = copy; } } COM: <s> add a node to list </s>
funcom_train/17136382
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void gotTextCopiedFromEditor(String copiedText) { // replace newlines and stuff... String formattedCopiedText = copiedText.replaceAll("\\n", " ").replaceAll("\"", "'").trim(); DebugUtils.println("Copied " + formattedCopiedText); SideCarVisualizations.getInstance().copiedTextFromEditor(formattedCopiedText); } COM: <s> todo should figure out </s>