__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/45844892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addHair(int row, int col) { avatarCheck(); Vector data = (Vector) meshNames.get(row); Manipulator.swapHairMesh(character, true, new File(data.get(1).toString()), data.get(0).toString()); } COM: <s> grabs the selected hair </s>
funcom_train/43866488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSet getTargetMessageTypes(int target) { try { statement = connection.createStatement(); resultSet = statement.executeQuery("SELECT MessageType FROM transaction WHERE TargetId=" + target); } catch (SQLException ex) { Logger.getLogger(DatabaseConnection.class.getName()).log(Level.SEVERE, null, ex); } return resultSet; } COM: <s> function for getting the message types received by target node </s>
funcom_train/43358127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean usesReg(Integer reg) { if ((loads != null) && (loads.containsKey(reg))) { return true; } if ((stores != null) && (stores.containsKey(reg))) { return true; } if (children != null) { for (ScopeBlock child : children) { if (child.usesReg(reg)) { return true; } } } return false; } COM: <s> returns whether this block either loads or stores into the register </s>
funcom_train/4751205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { GridLayout gridLayout1 = new GridLayout(); gridLayout1.setRows(1); jLabel = new JLabel(); jLabel.setText("Choose folder:"); jLabel.setName("jLabel"); jContentPane = new JPanel(); jContentPane.setLayout(gridLayout1); jContentPane.add(getJSplitPane(), null); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/37104519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public EutilParser getHandler(String url) throws Exception{ // System.setProperty("org.xml.sax.driver","org.apache.xerces.parsers.SAXParser"); EutilParser handler =new EutilParser(); // XMLReader xr = XMLReaderFactory.createXMLReader(); XMLReader xr = new org.apache.xerces.parsers.SAXParser(); xr.setContentHandler(handler); xr.setErrorHandler(handler); xr.parse(url); return handler; } COM: <s> the method to get the handler of the eutil parser </s>
funcom_train/19544315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void callLoadCharacterScript() { // Call the load character script Script script = CharToolGameSettings.getInstance().getEventScripts().getScript(GameSettingsScripts.CHARACTER_LOAD); if (script != null) { Bindings context = new SimpleBindings(); context.put("character", character); script.execute(context); } // endif } COM: <s> call the load character script if needed </s>
funcom_train/3904415
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DweezilTreeNode getNode(Object object) { if(object == null) { return null; } Enumeration nodes = getNodes(); if(nodes != null) { // Drill into and find it while(nodes.hasMoreElements()) { DweezilTreeNode node = (DweezilTreeNode) nodes.nextElement(); Object o = node.getUserObject(); if(object.equals(o)) { return node; } } } return null; } COM: <s> get a node on the tree given the contained object </s>
funcom_train/23453125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addValueFromPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Binding_valueFrom_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Binding_valueFrom_feature", "_UI_Binding_type"), ProcessPackage.Literals.BINDING__VALUE_FROM, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the value from feature </s>
funcom_train/3461188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(int index, Collection c) { int numNew = c.size(); if (numNew == 0) { return false; } Iterator it = c.iterator(); for (int i = 0; i < numNew; i++) { try { add(index, it.next()); index++; } catch (InvalidDataTypeException e) { // skipping... } } return true; } COM: <s> inserts all of the elements in the specified collection into this </s>
funcom_train/10484730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() throws InterruptedException{ synchronized(runable){ shutdown=true; //the check on the thread is done //because a call to iterate can result in //shutDown() being called, which would wait forever //waiting for iterating to finish if(runningThread!=Thread.currentThread()){ while(iterating==true){ runable.wait(); } } } } COM: <s> shut down the task </s>
funcom_train/20308193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testArithmetic() { doTestArithmetic("sum", 3, 5, 8); doTestArithmetic("difference", 5, 3, 2); doTestArithmetic("product", 3, 5, 15); doTestArithmetic("quotient", 12, 3, 4); doTestArithmetic("min", 3, 5, 3); doTestArithmetic("max", 3, 5, 5); } COM: <s> more extensive check of arithmetic which checks that binding to an </s>
funcom_train/14009014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(ServletConfig servletConfig, BlojsomConfiguration blojsomConfiguration) throws BlojsomException { _context = servletConfig.getServletContext(); _baseConfigurationDirectory = blojsomConfiguration.getBaseConfigurationDirectory(); _templatesDirectory = blojsomConfiguration.getTemplatesDirectory(); _logger.debug("Using templates directory: " + _templatesDirectory); _logger.debug("Initialized JSP dispatcher"); } COM: <s> initialization method for blojsom dispatchers </s>
funcom_train/777596
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAlternative() { Duration d = new Duration("P1Y2M3DT4H5M6.7S"); assertFalse( d.isAlternative() ); assertFalse( d.isExtended() ); d.setAlternative( true ); assertTrue( d.isAlternative() ); assertFalse( d.isExtended() ); assertEquals("P00010203040506.7", d.toString()); } COM: <s> test alternative format </s>
funcom_train/20113280
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MObject createMObject(Object idValue) { MObject newObject = new MObject( this.getConfigObject(), this.getFilterMap() ); if (idValue!=null) { newObject.getAttribute("id").setDBValue(new MValue(idValue)); } return newObject; } COM: <s> create new mobject with empty attributes </s>
funcom_train/18370104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGraphViewIsLinkedToNGS() { Graph graph = this.set.asJenaGraph(node1); assertFalse(graph.contains(foo, bar, baz)); this.set.addQuad(new Quad(node2, foo, bar, baz)); assertTrue(graph.contains(foo, bar, baz)); } COM: <s> checks if the as jena graph view is linked back to the </s>
funcom_train/1147014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void abortQueueEntry(String queueEntryID) throws QueueBeanException { try { queue.abortQueueEntry(queueEntryID); } catch (QueueEntryException ex) { throw new QueueBeanException(String.format("Could not abort QueueEntry '%s': %s", queueEntryID, ex.getMessage()), ex); } } COM: <s> aborts a queue entry </s>
funcom_train/25685270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadFieldConstraints(Field field, FieldDefinition fieldDefinition) { Constraints constraints = (Constraints) field.getAnnotation(Constraints.class); if (constraints != null) { FieldConstraints fieldConstraints = new FieldConstraints(); fieldConstraints.setRequired(constraints.required()); fieldConstraints.setMinLength(constraints.minLength()); fieldConstraints.setMaxLength(constraints.maxLength()); fieldConstraints.setRegExpRule(constraints.regExpRule()); fieldDefinition.setFieldConstraints(fieldConstraints); } } COM: <s> loads declared field constraints and populates them into the object used by generator </s>
funcom_train/6453658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IToken doEvaluate(ICharacterScanner scanner, boolean resume) { if (resume) { if (sequenceDetected(scanner)) return token; } else { int c = scanner.read(); if (c == word[0] || Character.toLowerCase((char)c) == word[0]) { if (sequenceDetected(scanner)) return token; } } scanner.unread(); return Token.UNDEFINED; } COM: <s> evaluates this rules without considering any column constraints </s>
funcom_train/18874585
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LobbyClientInterface getClientForName(String name){ UserClientContainer ret =null; for(int i=0;i<mMemberList.size();i++){ ret = (UserClientContainer)mMemberList.get(i); if(ret.getMUser().getName().equals(name)){ return ret.getMLobbyClientInterface(); } } return null; } COM: <s> method get client for name </s>
funcom_train/19543880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setItems(List<T> theItems) { if (theItems == null) theItems = new ArrayList<T>(); items = theItems; setModel(); if (items.size() > 0) getPanel().getList(getComponentNames()[COMPONENT]).setSelectedIndex(0); } COM: <s> set the items that are being edited </s>
funcom_train/51344390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HS getSubtaskStats(final L locator) { synchronized (sinkStats) { HS t = sinkStats.get(locator); if (t == null) { t = newSubtaskStats(locator); sinkStats.put(locator, t); // tmp.add(t); maximumPartitionCount.set(Math.max(maximumPartitionCount.get(), sinkStats.size())); } return t; } } COM: <s> return the statistics object for the specified index partition and never </s>
funcom_train/33552577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void executeOperation() { if (this.queries.size()==0) return; // execute(false); this.asynchronized=false; executeOperationAsyn(); synchronized (lock){ try { lock.wait(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } // for (PosterThread pt : threadPool) { // try { // pt.join(); // // Finished // } catch (InterruptedException e) { // // Thread was interrupted // e.printStackTrace(); // } // } } COM: <s> execute all queries in the background and wait for them to finish </s>
funcom_train/1058654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSource(IFigure fig) { if (sourceFigure == fig) return; if (sourceFigure != null) sourceFigure.getUpdateManager().removeUpdateListener(this); sourceFigure = fig; if (sourceFigure != null) { setScales((float)getSize().width / (float)getSourceRectangle().width, (float)getSize().height / (float)getSourceRectangle().height); sourceFigure.getUpdateManager().addUpdateListener(this); repaint(); } } COM: <s> sets the source figure </s>
funcom_train/8208352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(Event eventId, String tag) { EventTag eventTag = lookup(eventId, tag); if (eventTag != null) { try { if (!Transaction.isActive()) // If the former transaction does not end normally Transaction.begin(); // Begin a new transaction factory.delete(eventTag); Transaction.commit(); } catch (RollbackException e) { e.printStackTrace(); } } } COM: <s> delete a tuple with primary key as composing of event and tag </s>
funcom_train/2558516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void scan(Method method) { if(commit == null) { commit(method); } if(validate == null) { validate(method); } if(persist == null) { persist(method); } if(complete == null) { complete(method); } if(replace == null) { replace(method); } if(resolve == null) { resolve(method); } } COM: <s> scans the provided method for a persister callback method </s>
funcom_train/3923536
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains( VRObject obj ) { boolean ret = false; for( int i = 0; i < members.length && !ret ; i++ ) { ret = (members[i].className == obj.getClassName() && members[i].id == obj.db_id ); } return ret; //return members != null && members.contains( obj.getID() ); } COM: <s> true if b obj b is member of this transform </s>
funcom_train/18789555
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void append(StringBuilder buffer, String key, String value) { if ((value != null) && (value.trim().length() > 0)) { buffer.append(" ").append(key).append("=\"").append(value).append("\""); } } COM: <s> appends a key value pair if the value is not null </s>
funcom_train/43245618
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetReturnCode() { System.out.println("getReturnCode"); RegistrationResponseObject instance = new RegistrationResponseObject(); int expResult = 0; int result = instance.getReturnCode(); 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 return code method of class org </s>
funcom_train/33006471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run(){ boolean succeeded=record(); if(!succeeded) return; while(!bufferingDone){ try{ recorderThread.sleep(1); } catch(InterruptedException ie){ ie.printStackTrace(); } } try{ Thread.sleep(100); } catch(InterruptedException ie){ ie.printStackTrace(); } //Clean up System.err.println("closing datasource" ); try{ ds.stop(); } catch(IOException ioe){ ioe.printStackTrace(); } ds.disconnect(); System.err.println("closing processor" ); p.close(); p.removeControllerListener(this); recorderThread=null; System.err.println("closing handler" ); handler.close(); System.err.println("...done Buffering."); bufferingDone=false; } COM: <s> the process of recording the voice </s>
funcom_train/28292905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConstrainChoice(boolean iConstrainChoice) { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - " + "setConstrainChoice"); System.out.println(" ::--> " + iConstrainChoice); } mConstrainChoice = iConstrainChoice; if (_Debug) { System.out.println(" :: SeqActivity --> END - " + "setConstrainChoice"); } } COM: <s> sets the value of the choice constraint constrain choice sequencing </s>
funcom_train/38514000
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element makeAbstractNode(Element pNode, AbstractItem pItem) { pNode.setAttribute(XMLConstants.NAME, "" + pItem.getName()); String desc = pItem.getDescription(); if (desc != null && desc.length() > 0) { Element annoNode = new Element(XMLConstants.DESCRIPTION); annoNode.addContent(desc); pNode.addContent(annoNode); } return pNode; } COM: <s> creates a xml node out of a project instance </s>
funcom_train/34505028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (dlg==null) { dlg=new JDialog(ApplicationContext.getInstance().getDefaultDialogOwner(), ResourceFactory.getString(ACTION_SCALE_PANE_NAME), false); dlg.setLayout(new BorderLayout()); dlg.add(new ScalePane(), BorderLayout.CENTER); dlg.setSize(new Dimension(550, 220)); } if (dlg.isVisible()) { dlg.toFront(); } else { dlg.setVisible(true); } } COM: <s> possibly creates the dialog and displays </s>
funcom_train/45019383
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOutOfRangeData2dPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Histogram2d_outOfRangeData2d_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Histogram2d_outOfRangeData2d_feature", "_UI_Histogram2d_type"), HistogramPackageImpl.Literals.HISTOGRAM2D__OUT_OF_RANGE_DATA2D, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the out of range data2d feature </s>
funcom_train/4537162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toXML() { StringBuffer buf = new StringBuffer(); buf.append("<scratchpad xmlns=\"scratchpad:notes\">"); if (getNotes() != null) { buf.append("<text>").append(getNotes()).append("</text>"); } buf.append("</scratchpad>"); return buf.toString(); } COM: <s> returns the xml reppresentation of the private data </s>
funcom_train/39140939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void forward(float theSpeed) { updateRotationMatrix(); _myInternalForwardVector.scale(theSpeed); if (!_myInternalForwardVector.isNaN()) { position.add(_myInternalForwardVector); } else { _myInternalForwardVector.set(0, 0, -1); } updateRotationMatrix(); } COM: <s> move the camera along its forward direction </s>
funcom_train/44079885
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle2D getLabelBounds(EdgeView view) { Point2D p = getLabelPosition(this.view); Dimension d = getLabelSize(this.view); if (p != null && d != null) return GraphConstants.createRect(p.getX() - (d.width / 2), p.getY() - (d.height / 2), d.width + 1, d.height + 1); return null; } COM: <s> returns the label bounds of the specified view in the given graph </s>
funcom_train/11729798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUndefinedProperty() throws RepositoryException { Session session = getHelper().getReadOnlySession(); try { Property prop = PropertyUtil.searchProp(session, session.getRootNode().getNode(testPath), PropertyType.UNDEFINED, null); assertNull("Property with type Undefined found.", prop); } finally { session.logout(); } } COM: <s> tests that no actual property with type undefined exists </s>
funcom_train/46477776
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCanOccurInPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Event_CanOccurIn_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Event_CanOccurIn_feature", "_UI_Event_type"), SecurityContextPackage.Literals.EVENT__CAN_OCCUR_IN, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the can occur in feature </s>
funcom_train/22107325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWhenEnabled(int whenEnabled) { switch (whenEnabled) { case EventConstants.FREQ_EVERYTIME: case EventConstants.FREQ_DURATION: case EventConstants.FREQ_COUNTER: case EventConstants.FREQ_ONCE: break; default: throw new IllegalArgumentException("invalid whenEnabled property value"); } this.whenEnabled = whenEnabled; } COM: <s> set when to enable the actions </s>
funcom_train/23792003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void minibeeMapCustom(int nodeId, int minibeeId) { if(isRegistered) { Object[] arg = {incoming_port, name, nodeId, minibeeId}; OSCMessage msg = new OSCMessage("/map/minibee/custom", arg); out.send(msg); } else { if(verbo > 2) System.err.println("\nSenseWorldDataNetwork warning: the client is not yet registered. Cannot map MiniBees."); } } COM: <s> handles the mapping to a mini bee using a custom message format </s>
funcom_train/11381910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void kill() { boolean killNow = false; synchronized(jobInitKillStatus) { jobInitKillStatus.killed = true; //if not in middle of init, terminate it now if(!jobInitKillStatus.initStarted || jobInitKillStatus.initDone) { //avoiding nested locking by setting flag killNow = true; } } if(killNow) { terminate(JobStatus.KILLED); } } COM: <s> kill the job and all its component tasks </s>
funcom_train/25578806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void focusLost(FocusEvent e) { Object src = e.getSource(); if (src == null) return; if (src == currentPageNumberTextField) { String fieldValue = currentPageNumberTextField.getText(); String modelValue = Integer.toString(documentDocumentViewController .getCurrentPageDisplayValue()); if (!fieldValue.equals(modelValue)) currentPageNumberTextField.setText(modelValue); } } COM: <s> pdfcontroller takes awt swing events and maps them to its own events </s>
funcom_train/3858830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLinkedTransitiveReflexive() { connect(thingA, thingB); connect(thingB, thingC); LinkFilter filter = new AsRoleFilter(LinkTest.TestLink.Source.class); // with a transitive and reflexive relation all things must be contained // in the result. Set result = thingA.linked(filter, true, true); assertEquals(3, result.size()); assertTrue(result.contains(thingA)); assertTrue(result.contains(thingB)); assertTrue(result.contains(thingC)); } COM: <s> with a transitive and reflexive relation all things must be contained </s>
funcom_train/13916652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getParamaterLists(String strParameterListName) { ArrayList tmp = this.getJobExecutor().getCurrentETLJob().getParameterLists(strParameterListName); ArrayList res = new ArrayList(); for (Object o : tmp) { if (this.hasCompleteParameterSet((com.kni.etl.ParameterList) o, null)) { res.add(o); } } if (res.size() == 0) return 5; this.maParameters = res; return 0; } COM: <s> gets the paramater lists </s>
funcom_train/51162802
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object executef(Object x, LexicalEnvironment lexenv) { if (x instanceof DynamicVariable) return ((DynamicVariable)x).getDynamicValue(); else if (x instanceof LocalVariable) return lexenv.get((LocalVariable)x); else if (x instanceof Closure) return ((Closure)x).copy(lexenv); else return execute(x, lexenv); } COM: <s> specialized execute where x is the function of an application </s>
funcom_train/27840055
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void showLoginView() { if (getView() == null) { DefaultLoginView view = new DefaultLoginView(); setView(view); view.initNls(getResourceProvider().getMessages()); } SwingUtil.runFromSwingEventThread(new Runnable() { public void run() { showView(); } }); } COM: <s> shows the username password dialog </s>
funcom_train/40910492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateMethod(String access, boolean isStatic, String methodType, String methodName, String methodParameters, String methodContent, StringBuilder outSb) { //Build the getter. outSb.append(String.format( "%1$s %2$s %3$s %4$s(%5$s){", access, isStatic?"static":"", methodType, methodName, methodParameters )); outSb.append(methodContent); outSb.append("}"); } COM: <s> use this to generate a method </s>
funcom_train/39998684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Node getNativeTree() { IIOMetadataNode node; // scratch node IIOMetadataNode root = new IIOMetadataNode(nativeMetadataFormatName); // Image descriptor node = new IIOMetadataNode("imageDimensions"); node.setAttribute("numberImages", Integer.toString(numberImages)); root.appendChild(node); return root; } COM: <s> returns the stream metadata in a tree using the following format </s>
funcom_train/18032564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMenuWorkspaceChange() { if (m_menuWorkspaceChange == null) { m_menuWorkspaceChange = new JMenuItem(); m_menuWorkspaceChange.setText(Messages.getString("FBMenu.58")); //$NON-NLS-1$ m_menuWorkspaceChange.setMnemonic(Messages.getString("FBMenu.59").charAt(0)); //$NON-NLS-1$ } return m_menuWorkspaceChange; } COM: <s> returns the workspace change item </s>
funcom_train/22132785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int first() { int val; int i; for (i = 0; i < data.length; i++) { if (data[i] != 0) { val = data[i]; i <<= SHIFT; while ((val & 1) == 0) { val >>>= 1; i++; } return i; } } return -1; } COM: <s> gets the first element of the set </s>
funcom_train/48506999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double earthRadiusVector(double jme) { R_COUNT = (byte) RTERMS.length; double[] sum = new double[R_COUNT]; int i; for (i = 0; i < R_COUNT; i++) { sum[i] = earthPeriodicTermSummation(RTERMS[i], RTERMS[i].length, jme); } return earthValues(sum, R_COUNT, jme); } COM: <s> calculate the earth radius vector r in astronomical units au </s>
funcom_train/28365079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GenericRecord record( final Map<String, ?> bindings ) throws NonUniqueRecordException { Collection<GenericRecord> records = records( bindings ); if ( records.size() > 1 ) { throw new NonUniqueRecordException( bindings ); } Iterator<GenericRecord> recordIter = records.iterator(); if ( recordIter.hasNext() ) { return recordIter.next(); } return null; } COM: <s> bindings should include all primary keys to ensure a unique record </s>
funcom_train/19056319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContour(XContour[] contour) { this.contour_.clear(); for (int i = 0;i < contour.length;i++) { addContour(contour[i]); } for (int i = 0;i < contour.length;i++) { contour[i].rSetParentRNode(this); } } COM: <s> sets the xcontour property b contour b </s>
funcom_train/11301386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testZero() { NameAbbreviator abbrev = NameAbbreviator.getAbbreviator("0"); StringBuffer buf = new StringBuffer("DEBUG - "); int fieldStart = buf.length(); buf.append("org.example.foo.bar"); abbrev.abbreviate(fieldStart, buf); assertEquals("DEBUG - ", buf.toString()); } COM: <s> check that 0 drops all name content </s>
funcom_train/33609417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMarker(Color c,int style){ ToggleButton tb=new ToggleButton(false,BoundedShape.PEN_SHAPE,c); add(tb); group.add(tb.getModel()); markers.put(tb.getModel(),new DrawnPath(c,style)); adjustBounds(); performLayout(); } COM: <s> adds a marker to the plot </s>
funcom_train/5480454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDependency(String mainCommand,String dependent) { Vector dep=null; if (this.cmdDependencies.containsKey(mainCommand)) dep=(Vector) this.cmdDependencies.get(mainCommand); if (dep==null) { dep=new Vector(); this.cmdDependencies.put(mainCommand,dep); } dep.addElement(dependent); } COM: <s> a command dependency </s>
funcom_train/12836806
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Registry getRegistry() throws ServiceException { if (theREGISTRY == null) { try { theREGISTRY = LocateRegistry.createRegistry(1099); } catch (Exception ignored) { // Registry seems to be running, lets get the handle try { theREGISTRY = LocateRegistry.getRegistry(); } catch (Exception e) { throw new ServiceException( "Cannot obtain local Registry handle.", e); } } } return theREGISTRY; } COM: <s> returns the default registry for this platform </s>
funcom_train/9545901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getDocument(int rank){ OverlayKey key = node.getNewOverlayKey(rank); log.debug(localOverlayID+" - Start procedure to get the document with rank "+rank+" (key: "+key+")"); QueryForDocumentOperation operation = new QueryForDocumentOperation(this, key , new OperationCallback(){ @Override public void calledOperationFailed(Operation op) { // TODO Auto-generated method stub } @Override public void calledOperationSucceeded(Operation op) { // TODO Auto-generated method stub }}); operation.scheduleImmediately(); } COM: <s> queries for document and transfers it to this host </s>
funcom_train/10506984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List createVFSUriSet(String resource) { List set = new ArrayList(); for (int i = 0; i < VfsURI.SUPPORTED_SCHEMES.length; i++) { set.add(VfsURI.vfsURIFactory(VfsURI.SUPPORTED_SCHEMES[i], resource, ivy)); } return set; } COM: <s> generate a set of well formed vfs resource identifiers </s>
funcom_train/16748773
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IWorkbenchWindow getActiveWorkbenchWindow() { IWorkbench myWB = getDefault().getWorkbench(); IWorkbenchWindow myWBW = null; IWorkbenchWindow[] wbWindows = myWB.getWorkbenchWindows(); int i = 0; if (myWB.getWorkbenchWindowCount() > 0) { while (wbWindows[i] == null) { i++; } myWBW = wbWindows[i]; } return myWBW; } COM: <s> helper method that determines the active </s>
funcom_train/12191949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkFields() { if (methodAccessor == null) { throw new IllegalStateException("HTTP Method was not set"); } if (requestTime == null) { throw new IllegalStateException("Request time was not set"); } if (responseTime == null) { throw new IllegalStateException("Response time was not set"); } } COM: <s> checks if all of the fields contain non null values </s>
funcom_train/25218114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void store(RawIndexentry raw, int depth) throws IndexerException { String[] sortKey = raw.getSortKey(); IndexEntry entry = map.get(sortKey[0]); if (entry == null) { entry = new IndexEntry(raw, sortKey[0]); map.put(sortKey[0], entry); } entry.store(sortKey, 1, depth, raw); } COM: <s> store a raw index entry </s>
funcom_train/39914737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetLabel15() { System.out.println("getLabel15"); Page1 instance = new Page1(); Label expResult = null; Label result = instance.getLabel15(); 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 label15 method of class timesheetmanagement </s>
funcom_train/46950399
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JScrollPane getJScrollPaneCountries() { if (jScrollPaneCountries == null) { jScrollPaneCountries = new JScrollPane(); jScrollPaneCountries .setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); jScrollPaneCountries.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, Color.black)); jScrollPaneCountries .setViewportView(getJListParentalRatingCountries()); } return jScrollPaneCountries; } COM: <s> this method initializes j scroll pane countries </s>
funcom_train/28592218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testChangeValue3() { addManyTestInt(); iTest[9].value = -1; heap.changeValue(iTest[9]); TestInt temp = null; while (!heap.isEmpty()) { temp = (TestInt) heap.getTop(); heap.removeTop(); } assertEquals(temp, iTest[9]); } COM: <s> changes the value to the smallest and then ensures that the particular </s>
funcom_train/10409114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void destroy() { // Wait for polltime before doing anything, so that the poller threads // exit, otherwise parallel descturction of sockets which are still // in the poller can cause problems close = true; events.clear(); selector.wakeup(); try { stopLatch.await(5,TimeUnit.SECONDS); } catch (InterruptedException ignore ) {} } COM: <s> destroy the poller </s>
funcom_train/20655484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String next() throws NoSuchElementException { String token = null; if (this.hasNext()) { // Wenn letztes Element von Vector -> neue Zeile laden! if (currentTokenPos >= vsLine.size()) { try { this.nextLine(); } catch (IOException e) { e.printStackTrace(); throw new NoSuchElementException(); } } token = this.getLineToken(currentTokenPos); currentTokenPos++; } else throw new NoSuchElementException(); return token; } COM: <s> returns the next element in the iteration </s>
funcom_train/18811218
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void registerZXKeyRelease(int pZXKeyCode) { //Subtract one from number of "pressers" of this key int count = ivZXKeyCounts[pZXKeyCode]--; //If no more "pressers", map key to ZX keyboard row masks if (count <= 1) { ivZXKeyRows[pZXKeyCode>>4] &= ((1<<(pZXKeyCode & 0x0F)) ^ 0xFF); ivZXKeyCounts[pZXKeyCode]=0; } } COM: <s> register a key released on the virtual zx keyboard </s>
funcom_train/40712691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void onBrowse() { JFileChooser choose = new JFileChooser(); choose.setDialogTitle("Select SGF Editor"); if(choose.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { sgfTF.setText(choose.getSelectedFile().getAbsolutePath()); } } COM: <s> browse for an sgf editor </s>
funcom_train/12649977
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getPreferredSize() { Font f = getFont(); if(f != null) { FontMetrics fm = getFontMetrics(getFont()); int max = Math.max(fm.stringWidth(label) + 40, fm.getHeight() + 40); return new Dimension(max, max); } else { return new Dimension(100, 100); } } COM: <s> the preferred size of the button </s>
funcom_train/14378719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stop() { velocity.setTo(0, 0, 0); velocityMovement.set(0, 0); velocityAngleX.set(0, 0); velocityAngleY.set(0, 0); velocityAngleZ.set(0, 0); } COM: <s> stops this transform3 d </s>
funcom_train/8640723
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BaseFontParameters getBaseFontParameters(String name) { String alias = (String)aliases.get(name); if (alias == null) return (BaseFontParameters)mapper.get(name); BaseFontParameters p = (BaseFontParameters)mapper.get(alias); if (p == null) return (BaseFontParameters)mapper.get(name); else return p; } COM: <s> looks for a base font parameter associated with a name </s>
funcom_train/31900668
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init() { try { setName("RendererPanel"); setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5)); setLayout(new java.awt.BorderLayout()); setSize(425, 276); reloadComboBox(); add(getPDetails(), "Center"); add(getCHeader(), "North"); } catch (java.lang.Throwable ivjExc) { handleException(ivjExc); } } COM: <s> initialize the class </s>
funcom_train/45623267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEvidenceFilePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ALType_evidenceFile_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ALType_evidenceFile_feature", "_UI_ALType_type"), MSBPackage.eINSTANCE.getALType_EvidenceFile(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the evidence file feature </s>
funcom_train/590777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isFieldUnderListener( String table, String field ){ if( tableList.get( new Integer(1) ) != null ){ return true; } else { Hashtable fieldList = (Hashtable)tableList.get( table ); if( fieldList == null ){ return false; } Object item = fieldList.get( new Integer(1) ); if( item != null ){ return true; } else { item = fieldList.get( field ); if( item != null ){ return true; } } } return false; } COM: <s> check for table and field for a listener </s>
funcom_train/1344004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { gameState = GameStates.PLAYER_COLLECTING_NOT_CONNECTED; while ( true ) { // The game loop: every iteration of this loop is one game. if ( requestedToCancel ) break; collectPlayers(); if ( requestedToCancel ) break; gameState = GameStates.PLAYING; handleGame(); gameState = GameStates.PLAYER_COLLECTING_CONNECTED; } } COM: <s> the run method of the server controlled thread </s>
funcom_train/18940807
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Object loadObject(String filePath, String objectTitle) throws IOException, ClassNotFoundException { ObjectInputStream in = null; try { in = new ObjectInputStream( new FileInputStream( filePath ) ); Object loadedObject = in.readObject(); return loadedObject; } catch ( IOException e ) { throw e; } catch (ClassNotFoundException e) { throw e; } finally { if (in != null) { in.close(); } } } COM: <s> load an object from a file </s>
funcom_train/39803117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setKeyPreview(boolean flag) { Toolkit.getDefaultToolkit().removeAWTEventListener(keyEventListener); if (flag) { Toolkit.getDefaultToolkit().addAWTEventListener(keyEventListener, AWTEvent.KEY_EVENT_MASK); } boolean old = keyPreview; keyPreview = flag; firePropertyChange("keyPreview", old, keyPreview); } COM: <s> if enabled the </s>
funcom_train/2804300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMeTo(Vector container) { // only add the file if it does not already exist for (int i = 0; i < container.size(); i++) { if (getName().equals(((UninsFileInfo)container.elementAt(i)).getName())) { return; } } container.addElement(this); } COM: <s> add this object to a vector if it doesnt already exist </s>
funcom_train/37563866
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initializeChromosome() { int i; for(i=0;i<myLength;i++) { myBody[i] = new Genome(myConf,i, this); if(myConf.getGenomeType(i)==0) myBody[i].setRandomBody(); else if(myConf.getGenomeType(i)==1) myBody[i].setUnivocalBody(); else System.err.println("Wrong genomeType parameter. It must be 0=random or 1=univocal"); } } COM: <s> initialize the chromosome with generated genomes </s>
funcom_train/28418775
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String strip(String s, char c) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < s.length(); i++) { if (s.charAt(i) != c) { sb.append(s.charAt(i)); } } return sb.toString(); } COM: <s> strips the string s from the char c </s>
funcom_train/41758619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateCellValue(String value) { tmpCellValue = value; getCellEntry().changeInputValueLocal(value); if(columnTag!=null && columnTag.length()!=0) ((ListEntry)this.getParentRow().getBaseEntry()).getCustomElements().setValueLocal(this.columnTag, value); this.setDirty(); } COM: <s> update content value of this cell </s>
funcom_train/7891917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element toXml(Document document) { Element prop = DomUtil.createElement(document, XML_PROP, NAMESPACE); Iterator<?> it = getContent().iterator(); while (it.hasNext()) { Object content = it.next(); if (content instanceof XmlSerializable) { prop.appendChild(((XmlSerializable) content).toXml(document)); } else { log .debug("Unexpected content in PropContainer: should be XmlSerializable."); } } return prop; } COM: <s> returns the xml representation of a property related set with the </s>
funcom_train/35896224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Token getToken() throws IOException { if (tokenPosition < extractedTokens.size()) { return extractedTokens.get(tokenPosition++); } else { Token token = extractToken(); // If there's a transaction in progress, store the token in extractedTokens. if (isTransactionInProgress()) { extractedTokens.add(token); tokenPosition += 1; } return token; } } COM: <s> gets a token from the token source calling </s>
funcom_train/44011584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetSalary() { System.out.println("setSalary"); double salary = 0.0; PositionBO instance = new PositionBO(); instance.setSalary(salary); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set salary method of class edu </s>
funcom_train/44386609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JMenu createImagesMenu() { cat.debug("CREATEIMAGESMENU"); CommandMenu menu = new CommandMenu("Images"); File imagesDirectory = new File(fgSampleImagesPath); try { String[] list = imagesDirectory.list(); for (int i = 0; i < list.length; i++) { String name = list[i]; String path = fgSampleImagesResourcePath + name; menu.add(new UndoableCommand( new InsertImageCommand(name, path, this))); } } catch (Exception e) { cat.error("Exception: " + e.getMessage()); } return menu; } COM: <s> description of the method </s>
funcom_train/38286868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void moveSelectionBar(FManagerTreeItem item) { if (item == null || item.isShowing() == false) { UIObject.setVisible(focusable, false); return; } // focusable is being used for highlight as well. // Get the location and size of the given item's content element // relative // to the tree. Element selectedElem = item.getContentElem(); moveElementOverTarget(focusable, selectedElem); UIObject.setVisible(focusable, true); } COM: <s> moves the selection bar around the given </s>
funcom_train/51295813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PropertyChangeListener getEnableBlocker() { if (enablingBlocker == null) { enablingBlocker = new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName().equals("enabled") && (Boolean) evt.getNewValue() == true) { ((Action) evt.getSource()).setEnabled(false); } } }; } return enablingBlocker; } COM: <s> change object properties </s>
funcom_train/3733113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset(ActionMapping mapping, HttpServletRequest request) { action = null; sByte = null; sShort = null; sInteger = null; sLong = null; sFloat = null; sFloatRange = null; sDouble = null; sDate = null; sCreditCard = null; //lNames = initNames(); } COM: <s> reset all properties to their default values </s>
funcom_train/47827443
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBundleContext(BundleContext osgiContext) { assert (osgiContext != null) : "The OSGi context of infrastructure SLA manager != null."; this.osgiContext = osgiContext; IsSLAMTracer tracer = new IsSLAMTracer(); osgiContext.registerService(tracer.getClass().getName(), tracer, null); } COM: <s> sets the osgi context of infrastructure sla manager </s>
funcom_train/173838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { Attribute attribute = null; try { attribute = (Attribute) super.clone(); } catch(CloneNotSupportedException ce) { // Won't happen } // Name, namespace, and value are references to imutable objects // and are copied by super.clone() (aka Object.clone()) // super.clone() copies reference to set parent to null attribute.parent = null; return attribute; } COM: <s> this will return a clone of this code attribute code </s>
funcom_train/34563324
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyNamespacesDecl() throws QueryException { if(declPres) error(DUPLCOPYNS); boolean nsp = consumeWS(PRESERVE); if(!nsp) check(NOPRESERVE); ctx.nsPreserve = nsp; declPres = true; consume(','); nsp = consumeWS(INHERIT); if(!nsp) check(NOINHERIT); ctx.nsInherit = nsp; } COM: <s> 16 parses a copy namespaces decl </s>
funcom_train/34823379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSchedulable() throws SDF4JException { if (this.getPropertyBean().getValue(SCHEDULABLE) != null) { return (Boolean) this.getPropertyBean().getValue(SCHEDULABLE); } TopologyVisitor checkTopo = new TopologyVisitor(); boolean result; try { this.accept(checkTopo); result = checkTopo.result(); } catch (SDF4JException e) { throw (e); } this.getPropertyBean().setValue(SCHEDULABLE, result); return result; } COM: <s> check the schedulability of the graph </s>
funcom_train/25119814
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void defineElement(String namespaceUri, String localName, Class<?> clazz) { if (!XMLSerializable.class.isAssignableFrom(clazz)) { throw new IllegalArgumentException("The " + clazz + " must implement XMLSerializable interface"); } defineElement(namespaceUri, localName, clazz.getName()); } COM: <s> add the definition of an element to this factory </s>
funcom_train/5379377
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void firePostSelectionChanged(final SelectionChangedEvent event) { Object[] listeners = postSelectionChangedListeners.getListeners(); for (int i = 0; i < listeners.length; ++i) { final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i]; SafeRunnable.run(new SafeRunnable() { public void run() { l.selectionChanged(event); } }); } } COM: <s> notifies any post selection listeners that a post selection event has </s>
funcom_train/40729573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testServer() throws RepositoryException { connector.login(); MockClientFactory clientFactory = (MockClientFactory) connector.getClientFactory(); Map values = clientFactory.getValues(); assertTrue(values.toString(), values.containsKey("setServer")); assertEquals(System.getProperty("connector.server"), values.get("setServer")); } COM: <s> a simple test that verifies that at least one of the connecion </s>
funcom_train/20920678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkTrailingSpace() { if (PropertyStore.getBoolean(file, P_TRAILING_SPACE)) { for (int i = 0; i < fileLines.length; i++) { String l = fileLines[i]; if (l.trim().length() != 0 && (l.endsWith(" ") || l.endsWith("\t"))) { checker.notifyListeners(Messages.LineChecker_8, i + 1); } } } } COM: <s> checks if a line contains whitespaces at the end </s>
funcom_train/34971289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createText() { Text label = Text.createDefaultTextLabel( "instructions", "Use arrows to drive. Use the mouse wheel to control the chase camera. S to reset the car." ); label.setLocalTranslation( 0, 20, 0 ); statNode.attachChild( label ); statNode.updateRenderState(); } COM: <s> simple instructions on screen </s>
funcom_train/18759289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setKey( String strArg ) { oInstRow.getField( "key_string" ).set( strArg ); java.util.Iterator<Node> it = getNodes(); while ( it.hasNext() ) { Node oNode = it.next(); if ( oNode.getNodeType() == NODE_STEP && !oNode.isEnded() ) oNode.setSimpleURL( oNode.getPage(), strArg ); } } COM: <s> experimental use to change the key string of the workflow in mid flow </s>
funcom_train/1526602
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopRecordingShow() { IConnection conn = Red5.getConnectionLocal(); logger.debug("Stop recording show for: {}", conn.getScope().getContextPath()); // Get a reference to the current broadcast stream. ClientBroadcastStream stream = (ClientBroadcastStream) app.getBroadcastStream(conn.getScope(), "hostStream"); // Stop recording. stream.stopRecording(); } COM: <s> stops recording the publishing stream for the specified code iconnection code </s>