__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/26558793
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { shutdown = false; firstCycle=true; while (!shutdown) { try { if (firstCycle) { if (startBySleeping) Thread.sleep(checkPeriodTime); firstCycle = false; } else Thread.sleep(checkPeriodTime); Object obj = getObjectToCheck(); try { Throwable t = doCheck(obj); notify(obj, t); } catch (WatchDogException e) { notify(obj, e); } } catch (InterruptedException e) { // Ignore, will exit on shutdown } } } COM: <s> run the watching loop until the thread is either </s>
funcom_train/21056766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ITopLevelJavaElement getNextResult() { try { long docID = sortedDocuments.get(resultIndex++); ObjectInputStream stream = new ObjectInputStream(new FileInputStream(indexDir + File.separator + docRepositoryMap.get(docID) + docID + ".j")); ITopLevelJavaElement element = (ITopLevelJavaElement) stream.readObject(); stream.close(); return element; } catch (Exception e) {} return null; } COM: <s> returns the next java result </s>
funcom_train/41210810
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector requestFriendsTimeline(String sinceId) throws TwitterException { if (sinceId != null && sinceId.length() > 0) { sinceId = "since_id="+StringUtil.urlEncode(sinceId); } HttpUtil.setBasicAuthentication(username, password); return requestTimeline(gateway+FRIENDS_TIMELINE_URL, prepareParam(sinceId)); } COM: <s> request public timeline from twitter api </s>
funcom_train/27951887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConfiguredAttribute(Attribute attr) { attributes.add(attr); if (attr.getElemNS() == null) { attr.setElemNS(namespace); } if (attr.getAttrNS() == null) { attr.setAttrNS(attr.getElemNS()); } } COM: <s> adds another attribute to this content type </s>
funcom_train/43245551
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetSpRetirementDate() { System.out.println("getSpRetirementDate"); EmploymentDataDG2Object instance = new EmploymentDataDG2Object(); Calendar expResult = null; Calendar result = instance.getSpRetirementDate(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get sp retirement date method of class org </s>
funcom_train/44421026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setMode(int mode){ switch( mode ){ case ORPGConstants.OPMODE_CLIENT:{ opMode = ORPGConstants.OPMODE_CLIENT; break; } case ORPGConstants.OPMODE_SERVER:{ opMode = ORPGConstants.OPMODE_SERVER; break; } default:{ opMode = ORPGConstants.OPMODE_DEFAULT; } } } COM: <s> sets the module managers operational mode </s>
funcom_train/32057707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPrint() { System.out.println("testPrint"); GPGraphpad pad = new GPGraphpad(); GPGraph graph = new GPGraph(); GraphUndoManager undo = new GraphUndoManager(); Graphics graphics = null; PageFormat pf = new PageFormat(); GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo); try { newDoc.print(graphics, pf, 0); } catch (Exception e) { fail(); } } COM: <s> test of print method of class gpdocument </s>
funcom_train/49160182
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(final E item) { list.add(item); int i = list.size() - 1; list.get(i).setIndex(i); while (i > 0) { if (comparator.compare(list.get((i - 1) / 2), list.get(i)) <= 0) break; swap((i - 1) / 2, i); i = (i - 1) / 2; } } COM: <s> add a new item to the heap </s>
funcom_train/45473745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object buildInstance() { QName_Root r = new QName_Root("{http://www.castor.org/Mapping/QName}a name","{http://blank.namespace.com}black"); r.setItem("{http://www.fooshop.com/Items}ball"); return r; } COM: <s> build the object we expect when we unmarshal input </s>
funcom_train/17773917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getButton(int movexxx){ if (movexxx < 0 || movexxx >= buttons.length){ throw new IllegalArgumentException("Argument must be one of one of"+ "MOVE_RIGHT, MOVE_LEFT, MOVE_UP"+ ", MOVE_DOWN, MOVE_START, "+ "MOVE_END"); } return buttons[movexxx]; } COM: <s> returns one of the buttons that manipulate the double list </s>
funcom_train/18518789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ValueBean importProperties(Object sourceBeanObj, boolean clear) { if (sourceBeanObj == null) { throw new IllegalArgumentException("Cannot import properties from null"); } if (this == sourceBeanObj) { return this; } DynaBean dbeanSource = BeanTools.wrapAsDynaBean(sourceBeanObj); BeanTools.copyDynaBeanProperties(dbeanSource, getDynaBean(), clear); return this; } COM: <s> this method imports into this value bean the homonymous properties from </s>
funcom_train/2288043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getGroups(CmsObject cms, String ouFqn, boolean includeSubOus) throws CmsException { CmsOrganizationalUnit orgUnit = readOrganizationalUnit(cms, ouFqn); return (m_securityManager.getGroups(cms.getRequestContext(), orgUnit, includeSubOus, false)); } COM: <s> returns all groups of the given organizational unit </s>
funcom_train/33881930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void findUnknownAreas() { unknownAreas = new ArrayList<Area>(); for(int i=mapXMin+basicX; i<=mapXMax+basicX; i++) { for(int j=mapYMin+basicY; j<=mapYMax+basicX; j++) { //check all land if(map[i][j] == UNKNOWN) { //check all neighbours checkNewAreas(new Point(i,j)); } } } } COM: <s> evaluate map which unknown area is more attractive </s>
funcom_train/46980018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getOperation(String name) { for(Iterator i = obsoleteFeatures.iterator(); i.hasNext(); ) { Object mFeature = i.next(); if(ModelFacade.isAOperation(mFeature) && name.equals(ModelFacade.getName(mFeature))) { return mFeature; } } return null; } COM: <s> get a operation from the current classifier not yet modeled </s>
funcom_train/5311060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept(final File dir) { if (dir.isDirectory() && acceptsDirectories()) { return true; } for (int i = 0; i < this.fileext.length; i++) { if (dir.getName().endsWith(this.fileext[i])) { return true; } } return false; } COM: <s> returns code true code if the specified file matches the requirements of this </s>
funcom_train/5669192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean _save() { if (_file != null) { try { _writeFile(_file); setModified(false); return true; } catch (IOException ex) { report("Error writing file", ex); return false; } } else { return _saveAs(); } } COM: <s> save the model to the current file if there is one and otherwise </s>
funcom_train/46617622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getOtherAdjustments() { return OrderReadHelper.calcItemAdjustments(new BigDecimal(quantity), new BigDecimal(getBasePrice()), this.getAdjustments(), true, false, false, false, false).doubleValue(); } COM: <s> returns the other adjustments </s>
funcom_train/119543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintSelectionBorder(Graphics g) { ((Graphics2D) g).setStroke(GraphConstants.SELECTION_STROKE); if (childrenSelected) g.setColor(graph.getGridColor()); else if (hasFocus && selected) g.setColor(graph.getLockedHandleColor()); else if (selected) g.setColor(graph.getHighlightColor()); if (childrenSelected || selected) { Dimension d = getSize(); g.drawRect(0, 0, d.width - 1, d.height - 1); } } COM: <s> provided for subclassers to paint a selection border </s>
funcom_train/13246634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JLabel getReNewPasswordLabel() { if (reNewPasswordLabel == null) { reNewPasswordLabel = new JLabel(RESOURCE_BUNDLE.getString(ConverterResource.NEW_PASSWORD_RE), SwingConstants.RIGHT); reNewPasswordLabel.setLabelFor(getReNewPasswordField()); } return reNewPasswordLabel; } COM: <s> returns the label prompting the user to re enter their new password </s>
funcom_train/37090546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NodeViewI getByNodeNameOrId(String nodeIdOrName) { for (NodeViewI n : _nodes) { if (n.getLabel().equalsIgnoreCase(nodeIdOrName)) return n; if (n.getID().equalsIgnoreCase(nodeIdOrName)) return n; } return null; } COM: <s> return null if no node with id or name </s>
funcom_train/49045303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JRadioButtonMenuItem getJRadioButtonAcan_Mallory() { if (buttAcan_Mallory == null) { buttAcan_Mallory = new JRadioButtonMenuItem(); buttAcan_Mallory.setText("Acan Mallory"); buttAcan_Mallory.setToolTipText("Acan Mallory"); buttAcan_Mallory.addActionListener(this); buttAcan_Mallory.setActionCommand("parameter"); buttAcan_Mallory.setEnabled(true); } return buttAcan_Mallory; } COM: <s> this method initializes the option acan mallory </s>
funcom_train/197914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getProperties() { Map map = new LinkedHashMap(); map.put("Object", objectTypeName()); map.put("X Location", new java.lang.Double(getX())); map.put("Y Location", new java.lang.Double(getY())); map.put("Layer", new java.lang.Integer(getMapLayer())); return map; } COM: <s> returns a map of the properties of this furniture </s>
funcom_train/39537348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double getLimitValue(DataLimit limit) { double value=Double.NaN; if(limit.isTag()){ if(dataNames.contains(limit.getTag())){ value=Toolkit.getNumber(getData(limit.getTag())); } }else if(limit.isAbsoluteValue()) { value=limit.getAbsoluteValue(); } return value; } COM: <s> returns the value of this limit </s>
funcom_train/32308114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { FieldPointer ptr; if (this==obj) return true; if (null==obj) return false; try { ptr = (FieldPointer)obj; } catch (ClassCastException ignore) { return false; } return (getBase()==ptr.getBase()) && (getOffset()==ptr.getOffset()); } COM: <s> returns true if code obj code is a code field pointer code </s>
funcom_train/2897880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumberOfObjects() { ByteArrayOutputStream baos = null; try { baos = new ByteArrayOutputStream(); ObjectOutputStream os = new ObjectOutputStream(baos); os.writeObject(this); os.flush(); } catch (IOException e) { } return baos.size() - 4; } COM: <s> returns the number of objects in the cache </s>
funcom_train/50575634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void runAutomated(XMLElement root) { Vector children = root.getChildren(); for(int i = 0; i < children.size(); i++) { XMLElement child = (XMLElement) children.get(i); map.put(child.getName(), child.getContent()); } } COM: <s> invoked when the installer is in the automated installation </s>
funcom_train/3847353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startSOAPMessage(String tName) { msgEnded = false; Logger.getRef().debug("soap message start.", tName); if (message != null) Logger.getRef().warn( "Received unfinished soap message : \n" + message.toString(), tName); message = new StringBuffer(); } COM: <s> called when a new soap messages has started </s>
funcom_train/7298186
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void paint(Graphics g) { super.paint(g); if (!isInitialized) { eventThread.fireNativeEvent(instanceNum, NativeEventData.EVENT_CREATEWINDOW); /** * Reset the URL before this instance was disposed. urlBeforeDispose * is set in {@link #disposed()}. */ if (urlBeforeDispose != null) { this.setURL(urlBeforeDispose); urlBeforeDispose = null; } } if (!autoDispose) { this.setVisible(true); } } COM: <s> could only get hwnd when this method is called </s>
funcom_train/15919258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPropertyNum(X10Def def, String name) throws SemanticException { Type t = xts.systemResolver().findOne(QName.make(name)); List<Type> ts = def.annotationsMatching(t); for (Type at : ts) { Type bt = Types.baseType(at); if (bt instanceof X10ClassType) { X10ClassType act = (X10ClassType) bt; return act.propertyInitializers().size(); } } return 0; } COM: <s> return the number of annotation properties </s>
funcom_train/9059288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void registerClientToChatServer(Client stub) { if (!this.chatServer.register(stub, this.player.getNickname()) .booleanValue()) { int i = 1; while (true) { if (this.chatServer.register(stub, this.player.getNickname() + "(" + i++ + ")") .booleanValue()) { break; } } this.player.setNickname(this.player.getNickname() + "(" + (i - 1) + ")"); } } COM: <s> register the current client to the chat server </s>
funcom_train/17845925
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCancelButton() { mGoButton = false; mGoOrCancelButton.setIcon(IconLoader.getInstance().getIconFromTheme("action", "process-stop", 16)); mGoOrCancelButton.setToolTipText(mLocalizer.msg("cancel.tooltip", "Cancel search")); } COM: <s> make a cancel button from the combined search cancel button </s>
funcom_train/25885278
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int safeRotate(int angle, int da) { int dy, add; while(da != 0) { add = (da > 0) ? 1 : -1; angle += add; da -= add; dy = (int) (mBallSpeed * Math.sin(angle * Math.PI / 180)); if(dy == 0) { return angle - add; } } return angle; } COM: <s> rotate the ball without extending beyond bounds which would create a case </s>
funcom_train/17665267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean resetPassword(AuthVO auth1, AuthVO auth2) { //find user based on their email UsersHome uh = new UsersHome(); final Users user = uh.findById(auth1.getUserName()); if(user != null) { if(user.getPassword().equals(auth1.getPassword())) { user.setPassword(auth2.getPassword()); uh.merge(user); } } return true; } COM: <s> resets a password to a new password </s>
funcom_train/47906440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CorpusVersion applyToCorpusVersion(CorpusVersion versionIn) { CorpusVersion newVersion=versionIn.makeCopy(); for (int i=0;i<newVersion.getCorpusSize();i++) { if (newVersion.tagAt(i)==_fromTag && conditionsApplyAtPosition(newVersion,i)) { newVersion.setTagAt(i,_toTag); } } return newVersion; } COM: <s> first version of this just goes all through the corpus without using </s>
funcom_train/42398083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSimpleClassName(final String fullyQualifiedClassName) { Checker.notEmpty("parameter:fullyQualifiedClassName", fullyQualifiedClassName); final String packageName = this.getPackageName(fullyQualifiedClassName); final String simpleClassNameWhichIsPossiblyAInnerClass = fullyQualifiedClassName.substring(packageName.length() + 1); return simpleClassNameWhichIsPossiblyAInnerClass.replace('.', '_'); } COM: <s> retrieves the simple class name from a fully qualified class name </s>
funcom_train/42718342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object waitUntilFinish(long timeout) throws Throwable { long killTime = -1; if (timeout > 0) killTime = System.currentTimeMillis() + timeout; do { try { Thread.sleep(50); } catch (InterruptedException e) { } } while (!hasCompleted && ((killTime > 0 && System.currentTimeMillis() < killTime) || killTime <= 0)); if (!hasCompleted) throw new javax.naming.TimeLimitExceededException(); if (null != thrownException) throw thrownException; else return returnValue; } COM: <s> wait until the transaction completes and return the value returned </s>
funcom_train/375420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTwoSameProperties() { ConfigString string = new ConfigString("before @{a.b} after @{a.b}", variables, properties); assertTrue("sub failed in expand", string .expand("mark", properties)); assertEquals("before A.B after A.B", string.toString()); string.reset(); // Reintialize } COM: <s> test two same properties </s>
funcom_train/50834869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendPGO(){ Enumeration enum1= PeerListManager.getBuddyList().elements(); enum1= PeerListManager.getBuddyList().elements(); while(enum1.hasMoreElements()){ Peer p=(Peer)enum1.nextElement(); PeerID pid=p.getPeerID(); InterCoreCommunicationProtocol.sendPGO(pid); } } COM: <s> this method sends a peer goes offline message to all peers in buddylist </s>
funcom_train/7277385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeGUID(byte[] guid) { if(_guids.size() == 0) { return; } else { synchronized(this) { if(_guids.size() > 0) { Set<byte[]> guids = new TreeSet<byte[]>(new GUID.GUIDByteComparator()); guids.addAll(_guids); guids.remove(guid); _guids = guids; } } } } COM: <s> removes a guid from the list of those scanned </s>
funcom_train/39949635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonDelete() { if (jButtonDelete == null) { jButtonDelete = new JButton(); jButtonDelete.setText("Delete"); jButtonDelete.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { RemoteDevice rem=(RemoteDevice)getJListRemoteDevices().getSelectedValue(); if(rem==null) { return; } DiscoveryAgent.getInstance().removeRemoteDevice(rem); } }); } return jButtonDelete; } COM: <s> this method initializes j button delete </s>
funcom_train/13769975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertEquals(int sheetIndex, String expectedRef, String formulaRef, double delta) { Cell cellExpected = getCell(expectedRef, sheetIndex); Cell cellFormula = getCell(formulaRef, sheetIndex); double exp = cellExpected.getNumericCellValue(); double actual = calculateNumericFormula(cellFormula); assertEquals(failedMessage(formulaRef), exp, actual, delta); } COM: <s> asserts two cell in workbook </s>
funcom_train/28749790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWfdid(Long newVal) { if ((newVal != null && this.wfdid != null && (newVal.compareTo(this.wfdid) == 0)) || (newVal == null && this.wfdid == null && wfdid_is_initialized)) { return; } this.wfdid = newVal; wfdid_is_modified = true; wfdid_is_initialized = true; } COM: <s> setter method for wfdid </s>
funcom_train/16451951
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createImages() { bufferedImage1 = new BufferedImage(image.getWidth(this), image .getHeight(this), BufferedImage.TYPE_INT_RGB); g2d = bufferedImage1.createGraphics(); g2d.drawImage(image, 0, 0, this); bufferedImage2 = new BufferedImage(image.getWidth(this), image .getHeight(this), BufferedImage.TYPE_INT_RGB); } COM: <s> creates the images </s>
funcom_train/26021236
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setCurrentRoute(ListView routeView) { SharedPreferences settings = getSharedPreferences(TransitConst.PREFS_NAME, 0); String current = settings.getString(TransitConst.ROUTE_PREF,""); Log.d(TAG,"current pref="+current); ListAdapter adapt= routeView.getAdapter(); int count =routeView.getCount(); for (int i=0;i<count;i++){ String s =adapt.getItem(i).toString(); if (s.equals(current) && s!=null){ Log.d(TransitConst.TAG,"found slection"+s); routeView.setSelection(i); return; } } } COM: <s> set the currently select rout item based on pref if it exist </s>
funcom_train/26398591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setEnv(final ExecBuilder eb, final String name, String value) { final Builder.EnvConf env = eb.createEnv(); /* Set the env variable, or mark it for delete */ env.setName(name); if (value != null) { env.setValue(value); } else { env.setDelete(true); } } COM: <s> sets the environment variable for the given exec builder </s>
funcom_train/28549136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void requestUpdate() { clearItems(); final DroolsNextTaskEngine nte = getDntEngine(); /* * Here, we only fire the rules; note that we assume that * the nte is using a valid ontology to generate suggestions. It is not * this class's responsibility to set this ontology. */ nte.fireRules(); for (final INextTaskSuggestion sug : nte.getTaskList().getSuggestions()) { addItem(createItemForObject(sug)); } doUpdateModel(); notifyUpdate(UIModel.MODEL_REFRESHED); } COM: <s> updates the items in this model </s>
funcom_train/27069590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String generateTest(String suite) { StringTemplate st; Map<String, Object> useModel = this.getModel(); if (useModel != null) st = stg.getInstanceOf(suite, useModel); else st = stg.getInstanceOf(suite); String js = st.toString(); return js; } COM: <s> generates a given test code </s>
funcom_train/9137407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPanePresupuestos() { if (jContentPanePresupuestos == null) { jContentPanePresupuestos = new JPanel(); jContentPanePresupuestos.setLayout(null); jContentPanePresupuestos.add(getJScrollPanePresupuestos(), null); jContentPanePresupuestos.add(getJScrollPaneItems(), null); } return jContentPanePresupuestos; } COM: <s> this method initializes j content pane presupuestos </s>
funcom_train/3619270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addBugIdPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Bug_bugId_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Bug_bugId_feature", "_UI_Bug_type"), EclipsesrsPackage.Literals.BUG__BUG_ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the bug id feature </s>
funcom_train/22895565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Mac getMac(Symbol key) throws Exception { if (false == this.allowKeyOverride) { return this.getMac(); // EARLY RETURN } String _spec = (String)key.getProperty(SymbolProperties.MACType); // No algorithmparameterspec, so if specs weren't derivable from // key properties, use default specs. if (null == _spec) { _spec = "HmacMD5"; } return Mac.getInstance(_spec); // EARLY RETURN } COM: <s> return a new mac object associated with the given key </s>
funcom_train/51642914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Statement createMethodInvocation(final MethodDeclaration declaration, final MethodInvocation invocation) { Assert.isNotNull(declaration); Assert.isNotNull(invocation); Statement statement= null; final Type type= declaration.getReturnType2(); if (type == null) statement= createExpressionStatement(invocation); else { if (type instanceof PrimitiveType) { final PrimitiveType primitive= (PrimitiveType) type; if (primitive.getPrimitiveTypeCode().equals(PrimitiveType.VOID)) statement= createExpressionStatement(invocation); else statement= createReturnStatement(invocation); } else statement= createReturnStatement(invocation); } return statement; } COM: <s> creates the corresponding statement for the method invocation based on </s>
funcom_train/42188993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCount(Object _key) { // Get the current List for this key. Object value = super.get(_key); // If we have something to work with, return the List's size. if(value != null) return ((List)value).size(); // Otherwise, return zero. else return 0; } COM: <s> returns the number of objects that have been </s>
funcom_train/14297214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasTaggedValue(Stereotype stereotype, String taggedValueName) { for (Iterator i = stereotype.getOwnedAttribute().iterator(); i.hasNext();) { Property p = (Property) i.next(); if (StringUtils.equals(p.getName(), taggedValueName)) { return true; } } return false; } COM: <s> checks if the stereotype provided the given tagged value </s>
funcom_train/16953386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(Class<? extends Event> c, GUIDispatcherListener l) { if (c == null || l == null) { throw new IllegalArgumentException(); } Collection<GUIDispatcherListener> objects; if (listeners.containsKey(c)) { objects = listeners.get(c); } else { objects = new HashSet<GUIDispatcherListener>(); } if (objects.contains(l)) { throw new IllegalStateException("WARNING: double registration of listener " + l + " for class " + c); } objects.add(l); listeners.put(c, objects); } COM: <s> registers the given listener to listen to the given event </s>
funcom_train/12713892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { try { MapPoint other = (MapPoint) super.clone(); other.lon = new Longitude(lon); other.lat = new Latitude(lat); return other; } catch (CloneNotSupportedException e) { // this shouldn't happen, since we are Cloneable throw new InternalError(); } } COM: <s> creates and returns a copy of this object </s>
funcom_train/40460104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBackgroundImage( int x, int y ){ if (imagePath != null) { DOM.setStyleAttribute(this.getElement(), "background", "url('" + imagePath + "') no-repeat " + ( initialWidth + x ) + "px " + y + "px"); } } COM: <s> set the background image of the element </s>
funcom_train/25505329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IntegerWidget getFirst() { if (first == null) { first = new IntegerWidget(BigInteger.ZERO, null); first.setColumns(10); first.setToolTipText(LocalizationData.get("checkbookDialog.first.tooltip")); //$NON-NLS-1$ first.addPropertyChangeListener(IntegerWidget.VALUE_PROPERTY, changeListener); } return first; } COM: <s> this method initializes first </s>
funcom_train/49789254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private EClass subTypeUses(Map<EClass, Set<EClass>> map, EClass source, EClass unused) { for (EClass cls : map.keySet()) { if (cls.getEAllSuperTypes().contains(source)) { if (!map.get(cls).contains(unused)) { // this class uses it return cls; } } } return null; } COM: <s> do any subtypes of this class use the given unused class </s>
funcom_train/42982161
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fillInstData() { Unit selUnit = (Unit) frame.cbInstUnit.getSelectedItem(); if (selUnit != null) { frame.cbInst.setModel(new DefaultComboBoxModel(selUnit.getInstances() .toArray(new Instance[0]))); fillSchedData(); } } COM: <s> fills the instance data on the gui of a unit </s>
funcom_train/25329789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isDeveloperRequest(TransactionContext context) { if (developmentSubnets == null) { return false; } InetAddress remoteAddr = null; try { remoteAddr = InetAddress .getByName(context.getEffectiveRemoteAddr()); } catch (Exception e) { return false; } for (IpRangeFilter su : developmentSubnets) { if (su == null) { continue; } if (su.isInRange(remoteAddr)) { return true; } } return false; } COM: <s> check if the current transaction comes from an ip address that is allowed </s>
funcom_train/329528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getEndGradient(int nBins) { int totBins = getNumSlices(); nBins = Math.min(nBins, totBins); return ((double) (sliceData.get(totBins-1).peakInfo[0][1]-sliceData.get(totBins-nBins).peakInfo[0][1])) / (double) (nBins-1); } COM: <s> gradient at the end of the shape for the first peak </s>
funcom_train/14081675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void arrayStore(CtClass type) { StackElem val = operandStack.pop(); checkType(type, val.opType); StackElem idx = operandStack.pop(); checkType(intType, idx.opType); StackElem arr = operandStack.pop(); checkArray(arr.opType, val.opType); } COM: <s> pops em value em em index em and em array em values </s>
funcom_train/50207291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParentList(Connections connection) { // FIXME reduce visibility to package // TODO get a reference to the RecordLedger here then use it to remove // the static MessageLedger.INSTANCE reference in AddRecordTask if (connection == null && state != State.STOPPED) throw new IllegalStateException("Connection not stopped!"); parentList = connection; } COM: <s> this is called by the connections list when this connection is added to </s>
funcom_train/25737916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCode() { if (nTerminusType == JPLNTerminus.ImmoY) { return IMMONIUM_CODE; } else if (nTerminusType.isFragment() && cTerminusType.isFragment()) { return nTerminusType.getCode() + cTerminusType.getCode(); } else { if (nTerminusType.isFragment()) { return nTerminusType.getCode(); } else if (cTerminusType.isFragment()) { return cTerminusType.getCode(); } else { return PRECURSOR_CODE; } } } COM: <s> get the peak type string representation code given the n c termini </s>
funcom_train/2581587
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buf = new StringBuffer("CategoryLabelEntity: "); buf.append("category="); buf.append(this.key); buf.append(", tooltip=" + getToolTipText()); buf.append(", url=" + getURLText()); return buf.toString(); } COM: <s> returns a string representation of this entity </s>
funcom_train/2985944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void activateScreen(String id) { if (m_screenInstancesById.containsKey(id)) { ScreenInstanceInfo sInstanceInfo = (ScreenInstanceInfo)m_screenInstancesById.get(id); m_layoutManager.activateScreen(sInstanceInfo); } else { throw new PerspectiveScreenException("Screen id '"+id+"' not found."); } } COM: <s> activate an already existing screen </s>
funcom_train/51347078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SPOPredicate setC(final IConstant<IV> c) { if(c == null) throw new IllegalArgumentException(); return new SPOPredicate(// relationName, // partitionId, // s,// p,// o,// c, // override. optional, // constraint,// expander// ); } COM: <s> constrain the predicate by setting the context position </s>
funcom_train/34061245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addVerticesToSweep(boolean isA, Vector[] verts) { for (int i = 0, j = verts.length - 1; i < verts.length; j = i, i++) { float dist = sweepDir.dot(verts[i]); insert(i, isA, dist); insert(j, isA, dist); } } COM: <s> insert a list of edges </s>
funcom_train/28016915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void characters(final char[] _ch, final int _start, final int _length) throws SAXException { try { String part; part = new String(_ch, _start, _length); tagBody_ = tagBody_ + part; } catch (final Exception e) { throw new SAXException(e.getMessage()); } } COM: <s> sax handler for characters just store and accumulate for later use </s>
funcom_train/26091020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { jLabel = new JLabel(); jLabel.setBounds(new Rectangle(30, 31, 145, 15)); jLabel.setText("Cadastro Espet\u00e1culos"); this.setLayout(null); this.setPreferredSize(new java.awt.Dimension(100,300)); this.setSize(319, 301); this.add(jLabel, null); } COM: <s> this method initializes this </s>
funcom_train/15716073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testParser() throws Exception { File[] fileInPlugin = Activator.getAllConfigFiles(); for (File file : fileInPlugin) { SimpleCharStream stream = new SimpleCharStream(new FileInputStream(file)); MycroftParserTokenManager manager = new MycroftParserTokenManager(stream); MycroftParser parser = new MycroftParser(manager); MycroftSearchEngineConfig config = parser.parse(); assertNotNull(config); URL url = config.createSearchURL("testString"); assertNotNull(url); } } COM: <s> tests parsing of sample mycroft files </s>
funcom_train/14181232
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PlayerStatus authenticatePlayer(String userID, String gameID) { Game g = (Game) games.get(gameID); User u = (User) players.get(userID); if ((g == null) || (u == null)) { return null; } return new PlayerStatus(u.getName(), g.isInGame(u), g.isCreator(u)); } COM: <s> authenticates a player i </s>
funcom_train/8093803
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(double[] preds, double[] input) { if (m_targetCategory == -1) { preds[0] += m_coefficient * Math.pow(input[m_miningSchemaAttIndex], m_exponent); } else { preds[m_targetCategory] += m_coefficient * Math.pow(input[m_miningSchemaAttIndex], m_exponent); } } COM: <s> adds this predictor into the sum for the </s>
funcom_train/40885929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize (Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB) { this.bodyA = bodyA; this.bodyB = bodyB; this.localAnchorA.set(bodyA.getLocalPoint(anchorA)); this.localAnchorB.set(bodyB.getLocalPoint(anchorB)); this.length = anchorA.dst(anchorB); } COM: <s> initialize the bodies anchors and length using the world anchors </s>
funcom_train/50871259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getList(boolean vebose) throws FileNotFoundException, IOException { JarInputStream zis = new JarInputStream(new FileInputStream(archiveFile)); JarEntry entry = null; ArrayList result = new ArrayList(); while ( (entry = zis.getNextJarEntry()) != null) { if (vebose) { System.out.println(entry.getName()); } result.add(entry.getName()); } return result; } COM: <s> opens up the zip and gets a list of the files in it </s>
funcom_train/45736906
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateEnum(TSEnum tsEnum) throws OdbgenException { //Imports. List<String> imports = new ArrayList<String>(); imports.addAll(this._globalImports); imports.addAll(this.buildImports(tsEnum.getElement())); tsEnum.getImports().addAll(imports); } COM: <s> adds additional elements to an already existing enum </s>
funcom_train/37230228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ORCSegment getORC() { ORCSegment orc = (ORCSegment)findSegment( "ORC" ); if( orc == null ) { orc = new ORCSegment( this ); orc.initialize(); if( vSegments == null ) vSegments = new Vector(); vSegments.add(0,orc); } return orc; } COM: <s> get the orc segment that should be located in this loop </s>
funcom_train/46759275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MedItemTypeModel getMedItemType(final long medItemTypeId, final IChainStore chain, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { return MedData.getMedItemType(medItemTypeId, chain, call); }}; return (MedItemTypeModel) call(method, call); } COM: <s> same transaction return the single med item type model for the primary key </s>
funcom_train/50846638
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNext() throws Exception { ResultSet rs = newFOROJdbcResultSet(); assertEquals(true, rs.next()); while (rs.next()) { } assertEquals(false, rs.next()); rs.close(); try { rs.next(); fail("Allowed next() after close()."); } catch (SQLException ex) { assertEquals( "error code", ex.getErrorCode(), -ErrorCode.X_24501); } } COM: <s> test of next method of interface java </s>
funcom_train/6289028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessageIDWithoutSpecCharacters() { String tempID = messageID.replace('/', '1'); tempID = tempID.replace('\\', '2'); tempID = tempID.replace('.', '3'); tempID = tempID.replace(MessageHeader.MSG_ID_SEPARATOR, '4'); return tempID; } COM: <s> gets the message id without special characters </s>
funcom_train/17269418
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetFontSizes() { /* System.out.println("getFontSizes"); JWP instance = null; int[] expResult = null; int[] result = instance.getFontSizes(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); */ } COM: <s> test of get font sizes method of class com </s>
funcom_train/39872102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void release() { mLength = 0; synchronized (sPool) { // Add the chunk back to the pool as a SoftReference so it can // be gc'd if needed. sPool.offer(new SoftReference<Chunk>(this, sQueue)); sPool.notifyAll(); } } COM: <s> release the chunk and make it available for reuse </s>
funcom_train/20897950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getGBEntryInfoByOrganism(String organismName, DBServerConnection dbConnection) throws SQLException { Vector eis = new Vector(); long taxonID = this.getTaxonByOrganismName(organismName, dbConnection); if (taxonID != -1){ eis = this.getGBEntryInfoByTaxonID(taxonID, dbConnection); } return eis; } COM: <s> the method code get gbentry info by organism code retrieves the </s>
funcom_train/4553796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkFileValidity(File image) throws TwitterException { if (!image.exists()) { //noinspection ThrowableInstanceNeverThrown throw new TwitterException(new FileNotFoundException(image + " is not found.")); } if (!image.isFile()) { //noinspection ThrowableInstanceNeverThrown throw new TwitterException(new IOException(image + " is not a file.")); } } COM: <s> check the existence and the type of the specified file </s>
funcom_train/44480926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHeader(String name, String originalValue) { String value; if (name.equalsIgnoreCase("location")) { value = rewriteLocation(originalValue); } else if (name.equalsIgnoreCase("set-cookie")) { value = rewriteSetCookie(originalValue); } else { value = originalValue; } super.addHeader(name, value); } COM: <s> checks if we have to rewrite the header and </s>
funcom_train/4557797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCartClickCloseButton() { repEng.newStep("287", "Cart-Click Close button in cart window"); //1. Launch http://hobbes.ontometrics.com/magnetportal/ //2. Click the Manage You Assets link. //3. Click the Publish Magnet link in the Albums/Tracks page. //4. Click the cart icon. //5. Click Close button. // The cart window will be closed successfully. } COM: <s> 287 cart click close button in cart window </s>
funcom_train/41385624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JCheckBox getJcbFechas() { if (jcbFechas == null) { jcbFechas = new JCheckBox(); jcbFechas.setBounds(new Rectangle(30, 90, 20, 20)); jcbFechas.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { selectAnyOne(jcbFechas, jcbCarrera, jcbProveedor, jcbRevista); } }); } return jcbFechas; } COM: <s> this method initializes jcb fechas </s>
funcom_train/49203198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Command routeConnection(List connections) { CompoundCommand cc = new CompoundCommand(""); //$NON-NLS-1$ ListIterator li = connections.listIterator(); while (li.hasNext()) { EditPart editpart = (EditPart) li.next(); if (editpart instanceof ConnectionNodeEditPart) { Command cmd = routeConnection((ConnectionNodeEditPart) editpart); if (cmd != null) cc.add(cmd); } } if (!cc.isEmpty()) return cc; return null; } COM: <s> method route connections </s>
funcom_train/4864819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String verifyModuleName(String module) { if (module == null || module.length() == 0) { return getDefaultModule(); } if (module.indexOf('/') != -1) { module = module.replace('/', '\\'); } return module; } COM: <s> returns the default module name if the module name is code null code </s>
funcom_train/22385683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void canonicalizeCells() { Collection s = dims.values(); for(Iterator i = s.iterator(); i.hasNext(); ) { ((Dim)i.next()).canonicalizeCells(); } // XXX SHould be SimpleTransientSpace's responsibility? cloneDim.canonicalizeCells(); // Clear caches translationCache = new HashMap(); Id.cleanCache(this); } COM: <s> go through all dims and call canonicalize cells on them </s>
funcom_train/48338586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object get(final String name) { Field f = (Field)Type.getFieldMap(getClass()).get(name); if (null == f) { return null; } else { try { return f.get(this); } catch (IllegalAccessException x) { throw new Bug("Access to field (" + f + ") denied"); } } } COM: <s> get the value of the specified field </s>
funcom_train/40359958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNonExistentProperty() throws Exception { Map<String, String>aliases = new HashMap<String, String>(); aliases.put("foo", "bar"); Document filter = createFilter(aliases, false); assertNull(filter.findProperty("foo")); assertNull(filter.findProperty("nonExistentProperty")); } COM: <s> tests for non existent property should return null </s>
funcom_train/42538128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o){ if(!(o instanceof NESepList))return false; if(o == this)return true; NESepList<Syn, X> oo = (NESepList<Syn, X>)o; return (((Object)first).equals(oo.first))&&(((Object)rest).equals(oo.rest)); } COM: <s> is the given object equal to this nesep list </s>
funcom_train/51811807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddListener() { introspector.addListener(producer, "TestListener", listener); producer.fireTestListenerMessage(getName()); assertEquals("Message not received", 1, messages.size()); assertEquals("Message not propogated", getName(), messages.get(0).getArguments()[1]); } COM: <s> test that verifies that a listener can be added via beans messaging </s>
funcom_train/18328244
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel createEditPanelByNodeType( Node attribNode ) { switch ( DOMHelper.getNodeMqatType(attribNode)){ case MqatXsTypesMapping.MQAT_STRING : case MqatXsTypesMapping.MQAT_INTEGER: return new InputTextTypePanel(attribNode); default: return new InputTextTypePanel(attribNode); } } COM: <s> created edit panel by type of node </s>
funcom_train/38306838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBoldFont(byte[] ttfAfm) throws IOException, DocumentException { // creating base font this.boldFont = BaseFont.createFont( name + "-bold.ttf", BaseFont.IDENTITY_H, embedded, cached, ttfAfm, null ); } COM: <s> setter method for the the property bold font </s>
funcom_train/5322183
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GizmoList extractSubsetByLeader(Entity leader) { GizmoList sub = new GizmoList(); for (Iterator i = set.iterator(); i.hasNext();) { GizmoElement e = (GizmoElement)(i.next()); if (e.owner.getLeader() == leader) { i.remove(); sub.set.add(e); } } return sub; } COM: <s> extracts and returns a subset of the gizmo list </s>
funcom_train/31890224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void editAction() { int i = list.getSelectedIndex(); if (i < 0) return; CategoryNameEditor d = new CategoryNameEditor(); String s = d.performEdit((String) data.get(i)); data.set(i, s); list.setListData(data.toArray()); } COM: <s> shows dialog for editing a category </s>
funcom_train/11651716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isProtocolDefaultPort() { final int port = getPortIfSpecified(); final String protocol = getProtocol(); if (port == UNSPECIFIED_PORT || (PROTOCOL_HTTP.equalsIgnoreCase(protocol) && port == DEFAULT_HTTP_PORT) || (PROTOCOL_HTTPS.equalsIgnoreCase(protocol) && port == DEFAULT_HTTPS_PORT)) { return true; } return false; } COM: <s> tell whether the default port for the specified protocol is used </s>
funcom_train/15955287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Context getContext(int type) { int liNo = fContexts_No; for(int i = 0; i < liNo ; i++) { Context lC = fContexts[i]; if( lC.getType() == type ) { return lC; } }/*for*/ return null; } COM: <s> retreives a context based on a context type </s>