__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/10980706
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rollback() { Iterator iter = elementsFile.values().iterator(); Object o; while (iter.hasNext()) { o = iter.next(); if (o instanceof List) { for (Iterator i = ((List)o).iterator(); i.hasNext(); ) { ((FormFile)i.next()).destroy(); } } else { ((FormFile)o).destroy(); } } } COM: <s> p cleans up when a problem occurs during request processing </s>
funcom_train/12589555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private float getAttractionEnergy(final int index) { float energy = 0.0f; for (int i = 0; i < attrIndexes[index].length; i++) { if (attrIndexes[index][i] != index) { float dist = getDist(pos[attrIndexes[index][i]], pos[index]); energy += attrWeights[index][i] * Math.pow(dist, attrExponent) / attrExponent; } } return energy; } COM: <s> returns the attraction energy of the node with the specified index </s>
funcom_train/3461231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createJarFile() { try { OutputStream out = new FileOutputStream(this.jarName); if ((this.beanName == null) && (this.dirName == null)) { create(out, this.fileNames); } else { create(out, this.dirName, this.beanName, this.fileNames); } } catch (Exception ex) { System.err.println("caught exception: "+ex); ex.printStackTrace(); System.exit(1); } } COM: <s> create a jar from parsed argument data </s>
funcom_train/35541738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConditionFigurativeConstants() { parseAndCheck( " 88 A VALUE ALL SPACES." , "(CONDITION (LEVEL 88) (NAME A) (LITERAL ALL SPACES))"); parseAndCheck( " 88 A VALUE ALL 'A' THROUGH ALL 'C'." , "(CONDITION (LEVEL 88) (NAME A) (RANGE ALL 'A' ALL 'C'))"); } COM: <s> conditions with figurative constants </s>
funcom_train/22290115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBuffered(boolean flag) { buffered = flag; if (flag && drawingBuffer == null /*&& ancestorWithDrawingBuffer() == null*/) { if (bounds.width != 0 && bounds.height != 0) { drawingBuffer = createBuffer(); } drawingBufferValid = false; } else if (!flag && drawingBuffer != null) { drawingBuffer.flush(); drawingBuffer = null; } } COM: <s> calling b set buffered true b causes the view to allocate </s>
funcom_train/869289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLanguage() throws XBRLException { Element root = getDataRootElement(); if (root.hasAttributeNS(Constants.XMLNamespace.toString(),"lang")) return root.getAttributeNS(Constants.XMLNamespace.toString(),"lang"); if (root.hasAttribute("xml:lang")) return root.getAttribute("xml:lang"); return null; } COM: <s> get the xlink title language code </s>
funcom_train/22639421
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addDependency(String className, String method) { className = checkType(className); if (className == null) { return; } Set<String> methods; if (!data.containsKey(className)) { methods = new HashSet<String>(); data.put(className, methods); } else { methods = data.get(className); } methods.add(method); } COM: <s> adds a new dependency </s>
funcom_train/32910606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { ApplicationControlModel rm = (ApplicationControlModel) o; if (rm == null) { return 0; } else if (this.getDisplaySequence() == rm.getDisplaySequence()) { return 0; } else if (this.getDisplaySequence() < rm.getDisplaySequence()) { return -1; } else { return 1; } } COM: <s> default sort for reference models is by the sequence </s>
funcom_train/34759007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rmdir(String name) { HardDrive d; d = currentServer == null ? hardware.getDrive() : currentServer.drive; Directory dir = d.loadDir(name); if (dir == null) { println("Error: "+name+" not a directory."); return; } d.rmdir(dir,true); } COM: <s> deleting a directory </s>
funcom_train/8090745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double normalizedKernel(char[] s, char[] t){ double k1 = unnormalizedKernel(s, s); double k2 = unnormalizedKernel(t, t); double normTerm = Math.sqrt( k1*k2 ); return unnormalizedKernel(s, t) / normTerm; } COM: <s> evaluates the normalized kernel between s and t </s>
funcom_train/10615928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_Milliseconds() throws IOException{ // Regression test for HARMONY-1252 long old_date = 11431151800000L; long new_date = ((Date) gtime.decode(gtime.encode(new Date(old_date)))) .getTime(); assertEquals(old_date, new_date); } COM: <s> tests milliseconds result of encoding decoding on the date after 2050 </s>
funcom_train/46628956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRegisterWithoutUsername() { User user = (User) applicationContext.getBean("userPrototype"); try { SecurityWebService service = getSecurityService(); RegistrationRequest request = new RegistrationRequest(); request.setPassword(user.getPassword()); service.register(request); fail("This test was supposed to fail."); } catch (Exception ex) { // This is what we are looking for. } } COM: <s> this will attempt a registration </s>
funcom_train/16524477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireTilesetAdded(TileSet tileset) { Iterator iterator = mapChangeListeners.iterator(); MapChangedEvent event = null; while (iterator.hasNext()) { if (event == null) event = new MapChangedEvent(this); ((MapChangeListener) iterator.next()).tilesetAdded(event, tileset); } } COM: <s> notifies all registered map change listeners about the addition of a </s>
funcom_train/42786323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDiscoverObject() throws ObjectNotKnown { rti.expects(once()).method("requestObjectAttributeValueUpdate").with( eq(1234), ANYTHING); HLAObject obj = cls.discoverObject(1234, "objName"); HLAObject luObj = model.lookupObject(1234); assertTrue(obj == luObj); assertTrue(obj.getHandle() == 1234); } COM: <s> test discovering an rti object with handle </s>
funcom_train/19827120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLastVisibleTab(int width) { setWidth(width); if (mdl.size() == 0) { return -1; } if (width < getMinimumLeftClippedWidth()) { int first = makeVisibleTab == -1 ? sel.getSelectedIndex() : makeVisibleTab; return first; } if (changed) { change(); } return lastVisibleTab; } COM: <s> returns the last visible tab which may or may not be clipped </s>
funcom_train/3525552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void lazyRemoveNotify() { if (notifySet && getParent() != null) { // Un-register with each Dispatcher in eventTypeList Iterator iter = eventTypeList.iterator(); while (iter.hasNext()) { Dispatcher dispatcher = getParent().getDispatcher((String)iter.next()); if (dispatcher != null) dispatcher.removeNotify(this); } notifySet = false; } } COM: <s> conditionally un registers this component from dispatcher for the event types </s>
funcom_train/44158640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String removePrefix(String prefix, String name) { String result = name; // Get rid of 'get' result = result.replace(prefix, ""); // lower first character result = result.substring(0, 1).toLowerCase().concat(result.substring(1)); return result; } COM: <s> transform name of getter to format we need </s>
funcom_train/49050456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean replaceVariation (VariationType inVariation, String inResourceId) { // Find the resource designated by <inResourceId>. // ResourceType aRez = getResource (inResourceId); if (aRez != null) { replaceVariation (inVariation, aRez); return true; } // No such resource. Can't replace the variation. // else return false; } // end replaceVariation (inVariation, inResourceId) COM: <s> replace the variation for a given resource with a new one </s>
funcom_train/49623768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getNativeType(String $1){ if( $1.equals("-Z") ){ return "boolean"; } else if( $1.equals("-I") ){ return "int" ; } else if( $1.equals("-L") ){ return "long" ; } else if( $1.equals("-D") ){ return "double" ; } else{ return $1; } } COM: <s> convert alef type to native type </s>
funcom_train/17206792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void startServer(boolean wait) { if (org.jikesrvm.VM.BuildWithGCSpy) { if (DEBUG) { Log.write("Starting GCSpy server, wait="); Log.writeln(wait); } Address serverOuterLoop = sysCall.gcspyMainServerOuterLoop(); sysCall.gcspyStartserver(server, wait?1:0, serverOuterLoop); } } COM: <s> start the server running its main loop in a pthread </s>
funcom_train/14141856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void detach() { WorkflowOperation.attachDecompositionToSpec( gateway, spec ); context.attachProxy( gatewayProxy, gateway, specProxy ); super.detach(); WorkflowOperation.attachVariablesToNet( netVariables, net ); for (int i = 0; i < varProxies.size(); i++) { context.attachProxy(varProxies.get(i), vars.get(i) , taskProxy); } } COM: <s> re attaches the task to its net </s>
funcom_train/50848196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUpdateBinaryStream() throws Exception { if (!isTestUpdates()) { return; } try { ResultSet rs = this.newUpdateableJdbcResultSet(); rs.next(); rs.updateBinaryStream( "binary_column", new java.io.ByteArrayInputStream( "updateBinaryStream".getBytes()), 10); } catch (Exception e) { fail(e.toString()); } } COM: <s> test of update binary stream method of interface java </s>
funcom_train/10281384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeTab(String title) { int index = productionTabs.indexOfTab(title); if (index != -1) { // Component c = // ProductionGUI.productionTabs.getComponentAt(index); try { productionTabs.remove(index); } catch (IndexOutOfBoundsException iob) { return false; } } return true; } COM: <s> remove the tab with a certain title </s>
funcom_train/46858482
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Animation createAnim(List<BufferedImage> images, int frameDuration, int startFrame, int totalFrameCount, boolean loop) { Animation anim = new Animation(loop, totalFrameCount); addFrames(anim, images, frameDuration, startFrame, totalFrameCount); return anim; } COM: <s> creates an animation </s>
funcom_train/21750868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof TeamPersonPickCommentPK)) { return false; } TeamPersonPickCommentPK c = (TeamPersonPickCommentPK) obj; return personId == c.personId && pickListPositionId == c.pickListPositionId; } COM: <s> implementation of equals method </s>
funcom_train/23391686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isAttributeYes(IXMLElement element, String attribute, boolean defaultValue) { String value = element.getAttribute(attribute, (defaultValue ? YES : NO)); if (value.equalsIgnoreCase(YES)) { return true; } if (value.equalsIgnoreCase(NO)) { return false; } return defaultValue; } COM: <s> returns whether the value to the given attribute is yes or not </s>
funcom_train/2288474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readFileContent(String filename) throws CmsException { filename = CmsLinkManager.getAbsoluteUri( filename, CmsResource.getFolderPath(m_cms.getRequestContext().getUri())); CmsFile file = m_cms.readFile(filename, CmsResourceFilter.IGNORE_EXPIRATION); return new String(file.getContents()); } COM: <s> returns the selected files contentsls as a string </s>
funcom_train/42830349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double distance(DataPoint p1, DataPoint p2) { // is p2 a CircleK double d; try { DataKCircle c = (DataKCircle) p2; DataPoint h = p1; // distance to the circle = distance to the center - radius d = Math.abs(super.distance(h, p2)-c.getRadius()); } catch (ClassCastException e) { e.printStackTrace(); return -1d; } return d; } COM: <s> the distance is always seen as the distance to the circle </s>
funcom_train/27903636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChild(String type, Node child) { if(child == null) { return; } super.setChild(type,child); clearCachedChildren(); if(child instanceof JTreeNodeAdapter) { JTreeNodeAdapter node = (JTreeNodeAdapter) child; node.setParent(this,type); } } COM: <s> sets a child </s>
funcom_train/34105132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConstraint(Vertex left, Vertex right) { // Creates a new constraint from left to right. // Adds it to the maps. Constraint c = new Constraint(left, right, dimension); List<Constraint> leftConstraints = outConstraints.get(left); if (leftConstraints == null) { leftConstraints = new Vector<Constraint>(); } leftConstraints.add(c); outConstraints.put(left, leftConstraints); List<Constraint> rightConstraints = inConstraints.get(right); if (rightConstraints == null) { rightConstraints = new Vector<Constraint>(); } rightConstraints.add(c); inConstraints.put(right, rightConstraints); } COM: <s> adds a new edge to this graph from left to right </s>
funcom_train/28178089
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRole(String roleName) throws RbacException{ try{ if(findRoleByName(roleName) != null){ throw new RbacException("error : this role already exists"); } //add the role RoleType role = of.createRbacModelTypeRbacTypeRolesTypeRoleType(); role.setId(generateRoleId()); role.setName(roleName); getRole().add(role); }catch(JAXBException jaxbe){ throw new RbacException("error : Can't create a new role"); } } COM: <s> create a new rbac role with role name as a name </s>
funcom_train/584286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJAddPackage() { if (jAddPackage == null) { jAddPackage = new JButton(); AbstractAction action = new AbstractAction(){ private static final long serialVersionUID = 1L; public void actionPerformed(ActionEvent e) { addPackage(); } }; jAddPackage.setAction( action ); jAddPackage.setIcon( GraphicInterface.icon( newPackageResource ) ); } return jAddPackage; } COM: <s> this method initializes j add package </s>
funcom_train/44705643
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setComponentAccess(String key, ComponentAccess access) { Assert.assertNotLocked(this); Component c = getComponent(key); Assert.assertNotNull(c, "the specified component"); Assert.assertTrue(access.getComponent().equals(c), "The specified component does not match the component that" + " id already in the PropertyEditor"); m_accessChecks.put(key, access); } COM: <s> specify a new </s>
funcom_train/3393046
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fill(Shape s) { try { shapepipe.fill(this, s); } catch (InvalidPipeException e) { revalidateAll(); try { shapepipe.fill(this, s); } catch (InvalidPipeException e2) { // Still catching the exception; we are not yet ready to // validate the surfaceData correctly. Fail for now and // try again next time around. } } finally { surfaceData.markDirty(); } } COM: <s> fills the interior of a path using the settings of the current </s>
funcom_train/31781441
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void transferData(PushBufferStream stream) { Buffer readBuffer = new Buffer(); try { stream.read(readBuffer); long time = readBuffer.getTimeStamp(); System.out.println("read buffer " + readBuffer.getFormat() + " " + time/1000000); } catch (IOException e) { System.out.println("Got Exception " + e); } } COM: <s> this will get called when theres data pushed from the </s>
funcom_train/50879835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void envelopeChanged(Envelope inEnvelope) { if (inEnvelope == null) return; if (myRecordExtents){ if (myArrayListEnvelopes.size() == 0) { myArrayListEnvelopes.add(inEnvelope); } if (myCurrentEnvelope != null) myArrayListEnvelopes.add(myCurrentEnvelope); myCurrentEnvelope = inEnvelope; } } COM: <s> extents have changed </s>
funcom_train/51538361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleInputMethodEvent(String inputText) { TextBox textBoxCopy = null; synchronized (LCDUILock) { if (current instanceof TextBox) { textBoxCopy = (TextBox) current; } } // SYNC NOTE: TextBox.insert() does its own locking so we // move the call outside of our lock using a local variable if (textBoxCopy != null) { textBoxCopy.insert(inputText, textBoxCopy.getCaretPosition()); } } // handleInputMethodEvent COM: <s> called from the event delivery loop when an input method </s>
funcom_train/17805160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addApplicationProtocolPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RemoteRuntimeConnection_ApplicationProtocol_feature"), getString("_UI_PropertyDescriptor_description", "_UI_RemoteRuntimeConnection_ApplicationProtocol_feature", "_UI_RemoteRuntimeConnection_type"), CtbPackage.Literals.REMOTE_RUNTIME_CONNECTION__APPLICATION_PROTOCOL, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the application protocol feature </s>
funcom_train/13274954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScaleDistance(Float scaleDistance) { if (scaleDistance != this.scaleDistance) { Float oldScaleDistance = this.scaleDistance; this.scaleDistance = scaleDistance; this.propertyChangeSupport.firePropertyChange( Property.SCALE_DISTANCE.name(), oldScaleDistance, scaleDistance); } } COM: <s> sets the scale distance of the background image </s>
funcom_train/31436038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean disableMonitorCM11A() throws RemoteException { if (this.isPortActive() && cm11a != null) { printMessage("Disabled monitoring CM11A gateway."); cm11a.removeAddressListener(x10Listener); cm11a.removeFunctionListener(x10Listener); return true; } else { printMessage("CM11A gateway not connected."); } return false; } COM: <s> this disables monitoring of the cm11a gateway by removing </s>
funcom_train/45622727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addApplicationManifestPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_UpdateManifestType_applicationManifest_feature"), getString("_UI_PropertyDescriptor_description", "_UI_UpdateManifestType_applicationManifest_feature", "_UI_UpdateManifestType_type"), MSBPackage.eINSTANCE.getUpdateManifestType_ApplicationManifest(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the application manifest feature </s>
funcom_train/10822813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void inBlockAdvance(long n) throws IOException { for (long i = 0; i < n; ++i) { checkKey(); if (!valueBufferInputStream.isClosed()) { valueBufferInputStream.close(); } klen = -1; currentLocation.incRecordIndex(); } } COM: <s> advance cursor by n positions within the block </s>
funcom_train/13847834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void discard() { synchronized(this) { bDiscarded = true; }//end sync /* Give group discovery priority to avoid race condition. When * appropriate, locator discard will eventually occur as a result * of the first group discard. */ if((from & FROM_GROUP) != 0) { lookupDisc.discard(proxy); } else if((from & FROM_LOCATOR) != 0) { locatorDisc.discard(proxy); }//endif }//end discard COM: <s> discards the registrar referenced in this class from either the </s>
funcom_train/43340755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addActionPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_PlayerMovement_action_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_PlayerMovement_action_feature", "_UI_PlayerMovement_type"), TacticsPackage.eINSTANCE .getPlayerMovement_Action(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the action feature </s>
funcom_train/43293386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected XMLTagScanner getXMLTagScanner() { // initialized? if (m_TagScanner == null) { m_TagScanner = new XMLTagScanner(m_ColorManager); m_TagScanner.setDefaultReturnToken(new Token(new TextAttribute( m_ColorManager.getColor(IColorConstants.TAG)))); } return m_TagScanner; } COM: <s> get the xml tag scanner </s>
funcom_train/26221339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { questionLabel = new JLabel(); questionLabel.setText("Question?"); questionLabel.setEnabled(false); this.setLayout(new BorderLayout()); this.add(questionLabel, java.awt.BorderLayout.WEST); this.add(getAnswerTextField(), BorderLayout.CENTER); this.add(getSubmitButton(), BorderLayout.EAST); } COM: <s> this method initializes this object answer text </s>
funcom_train/45452853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedDirectReports(final String[] selectedDirectReports) { if (selectedDirectReports == null) { this.selectedDirectReports = null; return; } this.selectedDirectReports = new String[selectedDirectReports.length]; for (int i = 0; i < selectedDirectReports.length; i++) { this.selectedDirectReports[i] = selectedDirectReports[i]; } } COM: <s> sets the indices of the selected direct reports </s>
funcom_train/34339477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getTextFieldPalabra() { if (textFieldPalabra == null) {//GEN-END:|19-getter|0|19-preInit // write pre-init user code here textFieldPalabra = new TextField("Palabra", null, 10, TextField.ANY);//GEN-LINE:|19-getter|1|19-postInit // write post-init user code here }//GEN-BEGIN:|19-getter|2| return textFieldPalabra; } COM: <s> returns an initiliazed instance of text field palabra component </s>
funcom_train/19371493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initVisibleOntologies(){ if (visibleOntologies == null){ //starting fresh, default to declared imports visibleOntologies = new HashSet<OWLOntology>(candidateVisibleOntologies().size()); for (IRI u : getLoadedOntologies()){ visibleOntologies.add(projectManager.getOntology(u)); } } } COM: <s> sets the visible ontologies to the candidates </s>
funcom_train/35742739
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addProto(ModuleClassID mcid, Object module) { if(null == mcid) { throw new IllegalArgumentException("Illegal ModuleClassID"); } if(null == module) { throw new IllegalArgumentException("Illegal module"); } transports.put(mcid, module); } COM: <s> add a protocol message transport to the set of protocol entries </s>
funcom_train/11765934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void schedule(TimerTaskClone task, long delay, long period) { if (delay < 0) { throw new IllegalArgumentException("Negative delay."); } if (period <= 0) { throw new IllegalArgumentException("Non-positive period."); } sched(task, System.currentTimeMillis() + delay, -period); } COM: <s> schedules the specified task for repeated i fixed delay execution i </s>
funcom_train/40946138
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setFF2CaretFixEnabled(boolean enable) { if (BrowserInfo.get().isFF2()) { if (enable) { DeferredCommand.addCommand(new Command() { public void execute() { DOM.setStyleAttribute(getElement(), "overflow", "auto"); } }); } else { DOM.setStyleAttribute(getElement(), "overflow", ""); } } } COM: <s> fix missing cursor browser bug workaround for ff2 in windows and linux </s>
funcom_train/18551026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMessageCollection_getMessagePM() { MessageContainer mc = null; try { mc = new MessageContainer(fileName); } catch (MessageException e) { fail(); } try { Message returned = mc.getMessage(null); } catch (MessageException e1) { try { Message returned = mc.getMessage("xxxx"); assertTrue(returned.getCode().equals(MessageContainer.NO_MESSAGE_CODE)); } catch (MessageException e2) { fail(); } } } COM: <s> tests the parameters of the get message method </s>
funcom_train/20175384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GWTRPCServiceExporter createServletInstance(Object service, Class[] serviceInterfaces) { GWTRPCServiceExporter exporter = new GWTHibernateRPCServiceExporter(beanManager); exporter.setServletContext(getServletContext()); exporter.setService(service); exporter.setServiceInterfaces(serviceInterfaces); try { exporter.afterPropertiesSet(); } catch (Exception e) { throw new RuntimeException(e); } return exporter; } COM: <s> creates a new service instance that can be called through its registered url </s>
funcom_train/16102264
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Document getDomDocument(String httpUrl) { try { new URL(httpUrl); String content = this.getHttpContent(httpUrl); return XercesHelper.string2Dom(content); } catch (MalformedURLException exception) { log.error("Invalid URL: " + httpUrl, exception); //$NON-NLS-1$ } catch (Exception exception) { log.error("Error creating DOM document for URL " + httpUrl, exception); //$NON-NLS-1$ } return null; } COM: <s> returns a dom document received from the specified url </s>
funcom_train/14464636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Font createNewFont(Font f) { // Font f= cloneFont(src); // use src to create new font f.setIdx(-1); // flag to insert anew (see Font.setWorkBook) int idx= wkbook.insertFont(f) + 1; // add 1 to handle font#4 craziness // myfont= wkbook.getFont(idx); //return idx; return f; } COM: <s> creates a new font based on an existing one adds to workbook recs </s>
funcom_train/31293662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanupSession(final Session session) { final ConnectionInformationController controller = sessions.get(session); if (session == null) { if (LOGGER.isDebugEnabled()) { LOGGER.info("no controller for session '" + session.getSessionID() + "'"); } return; } controller.cleanup(); } COM: <s> cleanup of the resources when creating the session </s>
funcom_train/3424495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { // Both this.eon and this.fractionalSecond are instances // of immutable classes, so they do not need to be cloned. return new XMLGregorianCalendarImpl(getEonAndYear(), this.month, this.day, this.hour, this.minute, this.second, this.fractionalSecond, this.timezone); } COM: <s> p creates and returns a copy of this object </s>
funcom_train/22130662
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char nextWordChar() throws ProtocolException { char next = nextChar(); while (next == ' ') { consume(); next = nextChar(); } if (next == '\r' || next == '\n') { throw new ProtocolException("Missing argument."); } return next; } COM: <s> reads the next regular non space character in the current line </s>
funcom_train/3481445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getChannelMessagesSqlSelect(String channelTableName) { return "Select " + "F_CHANNEL_ENTRY_ID" + ",F_PRIORITY" + ",F_MSG_ROUTABLE" + ",F_MSG_BEING_PROCESSED" + ",F_MSG_ON_CHANNEL" + ",F_XML_DETAILS" + ",F_XML_MESSAGE_SUBSCRIBERS" + " from " + channelTableName; } COM: <s> generate hsql sql to retrieve all channel entry details </s>
funcom_train/31486125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEquals_7() { //Must test for the following parameters! boolean BValues [] = { true, false }; assertTrue(PGPCompare.equals(true, true) ); assertTrue(!PGPCompare.equals(true, false) ); assertTrue(PGPCompare.equals(false, false) ); } COM: <s> test method boolean equals boolean boolean </s>
funcom_train/31872995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { if (this.size == 0) return "[IntList: empty]"; final StringBuffer b = new StringBuffer(); b.append("[IntList: "); int maxi = this.size-1; if (maxi > 10000) maxi = 10000; for (int i = 0; i < maxi; i++) { b.append(this.data[i]).append(", "); } b.append(this.data[this.size-1]).append("]"); return b.toString(); } COM: <s> retuns string representation of this list </s>
funcom_train/50219729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public boolean canFindHelp() { String name = getHelpFileName(); File f = new File(name); if (!f.exists()) { JOptionPane.showMessageDialog(null, "Help file: " + f.getPath() + " not found", "Moses", JOptionPane.ERROR_MESSAGE); return false; } return true; } COM: <s> return true is there is a valid html file to display </s>
funcom_train/8347573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeString(int size, String s) throws IOException { int len = s.length(); if (len >= size) throw new IllegalArgumentException( "String length cannot be greater or equal to size"); writeBytes(s); for (int i = 0; i < size - len; i++) writeByte(0); } COM: <s> method which writes a null terminated string to the underlying data </s>
funcom_train/10906620
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PDFRoot makeRoot(PDFPages pages) { //Make a /Pages object. This object is written in the trailer. PDFRoot pdfRoot = new PDFRoot(++this.document.objectcount, pages); pdfRoot.setDocument(getDocument()); getDocument().addTrailerObject(pdfRoot); return pdfRoot; } COM: <s> make a catalog root object </s>
funcom_train/3005890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConsolidation( int p_consolidatingColumnIndexInModel, Consolidator p_consolidator ) { // Can we consolidate ? if ( canConsolidate( p_consolidatingColumnIndexInModel ) ) { ( (ConsolidatingTableModel) getTableModel() ).addConsolidation( p_consolidatingColumnIndexInModel, p_consolidator ); } } COM: <s> make a consolidation if possible on the table model using the given column </s>
funcom_train/3274546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createHelpFile() throws IOException { File dest = new File("fiwcli.txt"); if (dest.exists()) return; try { PrintWriter w = new PrintWriter(new BufferedWriter (new FileWriter(dest))); for (int i=0;i<100;i++) { String desc = FileUtil.getWizardDesc(i); if (desc.startsWith("[")) break; w.println("======================"); w.println("STEP "+i); w.println("======================"); w.println(desc); w.println(); } w.flush(); w.close(); } catch (IOException ex) { ex.printStackTrace(); } } COM: <s> creates a help file containing all the wizard step help texts </s>
funcom_train/14228392
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addMediaState(int newState) { if ((this.getPrivateMediaState() & newState) == 0) { this.mediaState |= newState; // do we need to notify any call listeners if ((newState & PLAY_REC) != 0) { ((FreeCall)this.getTermConn().getConnection().getCall()).sendToObservers(new StateEv(this.getTermConn())); } } } COM: <s> add this state flag from the media state holder </s>
funcom_train/45539349
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getName() { switch (getTypeCode()) { // case INIT: // return CompareMessages.JSCNode_initializer; // case IMPORT_CONTAINER: // return CompareMessages.JSCNode_importDeclarations; case CU: return CompareMessages.JSCNode_compilationUnit; // case PACKAGE: // return CompareMessages.JSCNode_packageDeclaration; } return getId().substring(1); // we strip away the type character } COM: <s> returns a name which is presented in the ui </s>
funcom_train/8667002
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setParent (XMLReader parent) { super.setParent(parent); if(null != parent.getContentHandler()) this.setContentHandler(parent.getContentHandler()); // Not really sure if we should do this here, but // it seems safer in case someone calls parse() on // the parent. setupParse (); } COM: <s> set the parent reader </s>
funcom_train/7274216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PingReply createPingReply(byte[] guid) { GUESSEndpoint endpoint = queryUnicaster.getUnicastEndpoint(); if(endpoint == null) { if(networkManager.isIpPortValid()) return pingReplyFactory.create(guid, (byte)1); else return null; } else { return pingReplyFactory.createGUESSReply(guid, (byte)1, endpoint.getPort(), endpoint.getInetAddress().getAddress()); } } COM: <s> creates a new tt ping reply tt from the set of cached </s>
funcom_train/48338371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void release() { // Cancel scan notifications. if (null != scan) { scan.cancel(); scan = null; } // Release user resources. Iterator iter = users.values().iterator(); while (iter.hasNext()) { User user = (User)iter.next(); user.release(); } users.clear(); // Release main resources. if (null != lm) { lm.cancel(); lm = null; } } COM: <s> release the resources used by the emcee application </s>
funcom_train/19624982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMode(Object parameter) { mode = (Integer)parameter; // When this state is switched to, reset the focus. if(mode == HOST) { focused = Multitris.LOBBY_HOST_PLAYERNAME; lobbyGfx = Multitris.lobbyHost; } if(mode == LIST) { focused = Multitris.LOBBY_LIST_GAMENAME-1; lobbyGfx = Multitris.lobbyList; selected = 0; scroll = 0; serverList = new String[0]; serverStarted = new boolean[0]; if(serverList.length >= 1) gameName.setText(serverList[selected]); Multitris.clientCommunication.requestServerList(); } } COM: <s> sets a mode for the state </s>
funcom_train/4396939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deliverRemoteMessage( EmailAddress address, SMTPMessage message ) throws NotFoundException { if( log.isDebugEnabled() ) { log.debug( "Delivering Message to remote user: " + address ); } //Delegate this request to the SMTPRemoteSender class. new SMTPRemoteSender().sendMessage( address, message ); } COM: <s> handles delivery of messages to addresses not handled by this server </s>
funcom_train/43324895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadCommandMaps() { createNumericMap(); createMainMap(); createCommonMapsAndInverses(); registerFinancialMap(); _commandManager.addCommand(new CalcCommand("x<->y", RpnCalcKeys.SWAP, CalcCommand.OTHER)); _commandManager.addCommand(new CalcCommand("ROLL", RpnCalcKeys.ROLL, CalcCommand.OTHER)); _commandManager.finaliseMaps(); } COM: <s> maps commands to keys and shift levels </s>
funcom_train/51604735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanelPicture() { if (jPanelPicture == null) { jPanelPicture = new JPanel(); jPanelPicture.setLayout(new BorderLayout()); jPanelPicturePanel=new PicturePanel(); jPanelPicture.add(jPanelPicturePanel,BorderLayout.CENTER); jPanelPicture.add(getJPanelPictureButtons(), BorderLayout.EAST); } return jPanelPicture; } COM: <s> this method initializes j panel picture </s>
funcom_train/37830923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(final String name, final String item, final int price) { Map<String, Integer> shop; if (contents.containsKey(name)) { shop = contents.get(name); } else { shop = new LinkedHashMap<String, Integer>(); contents.put(name, shop); } shop.put(item, Integer.valueOf(price)); } COM: <s> add an item to a shop </s>
funcom_train/12175088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PaneAttributes getAttributes() { if (attributes == null) { attributes = new PaneAttributes(); } if (logger.isDebugEnabled()) { logger.debug("Getting pane attributes for reference " + index); // logger.debug("Style class is " + getStyleClass()); } // attributes.setStyleClass(getStyleClass()); return attributes; } COM: <s> get the attributes which are passed to the pane related protocol </s>
funcom_train/3644948
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean get(int bitIndex) { if (bitIndex < 0) { throw new IndexOutOfBoundsException("bitIndex < 0: " + bitIndex); } boolean result = false; int unitIndex = unitIndex(bitIndex); if (unitIndex < unitsInUse) { result = ((bits[unitIndex] & bit(bitIndex)) != 0); } return result; } COM: <s> returns the value of the bit with the specified index </s>
funcom_train/45505380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Point getNextRasterPoint( Point p ) { int rasterWidth = CoordinateTools.translateToScreen( rasterSnap ); return new Point( (int)Math.round( p.getX() / (double)rasterWidth ) * rasterWidth, (int)Math.round( p.getY() / (double)rasterWidth ) * rasterWidth ); } COM: <s> returns a raster point that is closest to the given point </s>
funcom_train/9006105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setup(String localAddress, int localPort) { if (!DHTAPI.propertiesLoaded) { // Load properties file. de.uniba.wiai.lspi.chord.service.PropertiesLoader.loadPropertyFile(); DHTAPI.propertiesLoaded = true; } // Needed later. chord = new ChordImpl(); try { localURL = new URL(protocol + "://"+localAddress+":"+localPort+"/"); localPort = localURL.getPort(); } catch (MalformedURLException e) { throw new RuntimeException(e); } } COM: <s> performs setup functions required by new nodes </s>
funcom_train/43827680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTrueValuePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CPNBool_trueValue_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CPNBool_trueValue_feature", "_UI_CPNBool_type"), CpntypesPackage.Literals.CPN_BOOL__TRUE_VALUE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the true value feature </s>
funcom_train/13961623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WODisplayGroup displayGroup() { if (_displayGroup == null) { createDisplayGroup(); _displayGroup.setSelectsFirstObjectAfterFetch(false); if (ERD2WFactory.erFactory().defaultListPageDisplayGroupDelegate() != null) { _displayGroup.setDelegate(ERD2WFactory.erFactory().defaultListPageDisplayGroupDelegate()); } } return _displayGroup; } COM: <s> returns the display group creating one if there is none present </s>
funcom_train/4745440
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ConsoleOutput getConsoleOutput(String instanceId) { // initialize the interface Jec2 ec2 = new Jec2(getCredentials().getAwsAccessKeyId(), getCredentials().getSecretAccessKey()); try { return ec2.getConsoleOutput(instanceId); } catch (Exception ex) { Logger logger = Logger.getLogger(this.getClass().getName()); logger.log(Level.SEVERE, "Retrieving console output for instance " + instanceId + " failed: " + ex.getMessage()); return null; } } COM: <s> get console ouput for a particular instance </s>
funcom_train/25855459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLocalName(String name) { String tmp = null; int pos = name.lastIndexOf("#"); if(pos == -1) { pos = name.lastIndexOf("/"); tmp = name.substring(pos + 1,name.length()); } else { tmp = name.substring(pos + 1,name.length()); } tmp = URLDecoder.decode( tmp.toLowerCase().substring(0,tmp.length() - 1) ); return Stemmer.stemWord(tmp); } COM: <s> get the local name of a term </s>
funcom_train/6408503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setTarget(Node target) { if (target.getChildren() != null) { for(int i = 0; i < target.getChildren().size(); i++) { processTarget(this, target.getChild(i)); } } copyNode(target, this); UserDataManager.getInstance().bind(this, target); } COM: <s> code set target code sets the shared data </s>
funcom_train/23867797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isIsosceles() { return CDouble.equals(lineAtoB.getLength(), lineBtoC.getLength(), DELTA) || CDouble.equals(lineBtoC.getLength(), lineCtoA.getLength(), DELTA) || CDouble.equals(lineAtoB.getLength(), lineCtoA.getLength(), DELTA); } COM: <s> determines whether this triangle is isosceles which is the case when two </s>
funcom_train/22600372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getZoomPanel() { if (zoomPanel == null) { zoomPanel = new JPanel(); zoomPanel.setLayout(new GridBagLayout()); zoomPanel.add(getJButton2(), new GridBagConstraints()); zoomPanel.add(getJButton(), new GridBagConstraints()); zoomPanel.add(getJButton1(), new GridBagConstraints()); zoomPanel.add(getJButton3(), new GridBagConstraints()); zoomPanel.setBackground(Color.gray); } return zoomPanel; } COM: <s> this method initializes zoom panel </s>
funcom_train/2287658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CmsResource createSibling(String source, String destination, List properties) throws CmsException { CmsResource resource = readResource(source, CmsResourceFilter.IGNORE_EXPIRATION); return getResourceType(resource).createSibling(this, m_securityManager, resource, destination, properties); } COM: <s> creates a new sibling of the source resource </s>
funcom_train/11749769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateSQLTemplate(SQLTemplate query) { Map<String, String> customSQL = sqlMap.get(query.getDefaultTemplate()); if (customSQL != null) { String key = adapter.getClass().getName(); String template = customSQL.get(key); if (template != null) { query.setTemplate(key, template); } } } COM: <s> customizes sqltemplate injecting the template for the current adapter </s>
funcom_train/1559466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void itemStateChanged(ItemEvent e) { GeoElement geo; Object source = e.getItemSelectable(); // show object value changed if (source == showObjectCB) { for (int i = 0; i < geos.length; i++) { geo = (GeoElement) geos[i]; geo.setEuclidianVisible(showObjectCB.isSelected()); geo.updateRepaint(); } } updateSelection(geos); } COM: <s> listens to checkboxes and sets object and label visible state </s>
funcom_train/42994140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize(boolean showTime, GCalGUI parent) { events = new ArrayList<EventShape>(); this.start = new SimpleTime(6, 0); this.end = new SimpleTime(18, 0); this.showTimeField = showTime; this.parent = parent; this.updateDataSet(); this.addMouseListener(this); this.addMouseMotionListener(this); this.addMouseWheelListener(this); this.addComponentListener(this); this.setFocusable(true); } COM: <s> called by the constructors to initialize the day canvas </s>
funcom_train/2577348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitle(String text) { if (text != null) { if (this.title == null) { setTitle(new TextTitle(text, JFreeChart.DEFAULT_TITLE_FONT)); } else { this.title.setText(text); } } else { setTitle((TextTitle) null); } } COM: <s> sets the chart title and sends a </s>
funcom_train/13814609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFuzzyShootTime( FuzzyDate v ) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); this.shootTime = (java.util.Date) v.getDate().clone(); this.timeAccuracy = v.getAccuracy(); modified(); txw.commit(); } COM: <s> set both shooting time accuracy directly using a fuzzy time object </s>
funcom_train/44733346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCustomTzName(String tzname) { if (!customTzName.equals("")) { // TODO: Fred Find the java property equivalent to TZ // set the TZ environment variable and update c locale stuff //putenv(strdup("TZ=" + customTzName)); //tzset(); } } COM: <s> set a custom time zone </s>
funcom_train/17001870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAsGatewayAtLevel(int level) { gatewayIndicator[level] = true; if (level !=0) { matchingTreeVector.setElementAt(new XPathMatching(level,systemLevel,this), level); ((XPathMatchingTree)matchingTreeVector.elementAt(level)).setNodeDestination(thisDestination); } } COM: <s> this designates this node as a gateway at level i level i </s>
funcom_train/20949707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hookContextMenu() { MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$ menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(new IMenuListener() { public void menuAboutToShow(IMenuManager manager) { ContentView.this.fillContextMenu(manager); } }); Menu menu = menuMgr.createContextMenu(viewer.getControl()); viewer.getControl().setMenu(menu); getSite().registerContextMenu(menuMgr, viewer); } COM: <s> hooks context menu </s>
funcom_train/2949871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { out.writeByte(0); out.writeUTF(getName()); out.writeObject(dashArray); out.writeFloat(dashPhase); out.writeFloat(getScale()); out.writeFloat(stroke.getLineWidth()); out.writeInt(stroke.getEndCap()); out.writeInt(stroke.getLineJoin()); out.writeFloat(stroke.getMiterLimit()); } COM: <s> writes objects fields to the code object output stream code </s>
funcom_train/36958680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IPreferenceStore getCombinedPreferenceStore() { if (fCombinedPreferenceStore == null) { IPreferenceStore generalTextStore = EditorsUI.getPreferenceStore(); fCombinedPreferenceStore = new ChainedPreferenceStore(new IPreferenceStore[] { getPreferenceStore(), new PreferencesAdapter(RubyCore.getPlugin().getPluginPreferences()), generalTextStore }); } return fCombinedPreferenceStore; } COM: <s> returns a combined preference store this store is read only </s>
funcom_train/27843301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPointersConfig(PointersConfig config) { // Set the default values if (_pointerCacheSize == -1) { _pointerCacheSize = config.getDefaultPointerCacheSize(); } if (_modelAccessCacheSize == -1) { _modelAccessCacheSize = config.getDefaultModelAccessCacheSize(); } } COM: <s> sets the parent pointers config and use it to initialise the default values </s>