__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/24379205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node getTypeAsNode(Node node, TemplateBlockType type){ if (type != null) { QName qname = new QName("http://www.imsglobal.org/xsd/imsqti_v2p1", "templateBlock"); JAXBElement<TemplateBlockType> jaxbe = new JAXBElement<TemplateBlockType>(qname, TemplateBlockType.class, type); node = getNode(node, jaxbe); } return node; } COM: <s> gets the template block type as a dom node </s>
funcom_train/3114752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GraphicalObject setAttachedGraphicalObject(GraphicalObject gob) { super.setAttachedGraphicalObject(gob); Iterator it = listViews.iterator(); View v; while (it.hasNext()) { v = (View) it.next(); v.setAttachedGraphicalObject(gob); } return (gob); } // of method COM: <s> also modify the attached graphical object for every contained view </s>
funcom_train/5001671
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean run(String pathToExecutable, String pathToData, String inputFile, String pathToRegistry, String[] pAttributes, String[] sAttributes) throws ServerNotFoundException{ boolean ret = run(pathToExecutable, pathToData, inputFile, pathToRegistry, pAttributes, sAttributes, false); return ret; } COM: <s> instantiates a new cqi server </s>
funcom_train/8342942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRecord(final Data record) { RecordTableModel model = tblAvailable.getModel(); for (int i = 0; i < model.getDataRowCount(); i++) { Data currentRec = model.getRecord(i); if (DataSetUtils.attribsEqual(record, currentRec)) { tblApplicable.addRecord(currentRec); tblAvailable.removeRecord(i); tracker.itemAdded(currentRec); } } } COM: <s> if the given record exists in the available table add it to the </s>
funcom_train/45473225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMethodSuffix() { if (_name.startsWith("_")) { return _memberAndAccessorFactory.getJavaNaming().toJavaClassName(_name.substring(1)); } return _memberAndAccessorFactory.getJavaNaming().toJavaClassName(_name); } COM: <s> returns the method suffix for creating method names </s>
funcom_train/41417036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void explode(Integer bombId, Bomb b) { Logger.log("explode: " + bombId); Player p = b.getPlayer(); if (p != null) { p.setBombs(p.getBombs() + 1); } // TODO: check which bombs have to explode if (!b.isTriggered()) { b.setTriggered(true); } } COM: <s> let a bomb explode </s>
funcom_train/8639761
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void next(PdfAction na) { PdfObject nextAction = get(PdfName.NEXT); if (nextAction == null) put(PdfName.NEXT, na); else if (nextAction.isDictionary()) { PdfArray array = new PdfArray(nextAction); array.add(na); put(PdfName.NEXT, array); } else { ((PdfArray)nextAction).add(na); } } COM: <s> add a chained action </s>
funcom_train/33289969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object remove(Object p_key, Object p_value) { Object x_object = null; Vector x_vector = (Vector) o_hashtable.get(p_key); if (x_vector != null) { if (x_vector.contains(p_value)) { x_vector.remove(p_value); } if (x_vector.size() == 0) { return o_hashtable.remove(p_key); } } return x_object; } COM: <s> remove a particular value from the vector associated with a particular key </s>
funcom_train/50340672
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLayoutEditor(LayoutEditor panel) { // add to the panels list if not already there if (panels.size()>0) { for (int i=0;i<panels.size();i++) { LayoutEditor ed = panels.get(i); // simply return if already in list if (ed == panel) return; } } // not found, add it panels.add(panel); } COM: <s> keeps track of layout editor panels that are using this layout block </s>
funcom_train/18935117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refreshTable( Map<Integer,HashSet<WorkerStatusInfo>> workers ) { data = new BidimensionalArray<String>( MIN_SIZE ); int i = 0; for ( Entry<Integer,HashSet<WorkerStatusInfo>> entry : workers.entrySet() ) { for ( WorkerStatusInfo worker : entry.getValue() ) { updateTable( worker, i ); i++; } } rowCount = i; refreshData(); } COM: <s> refreshes information in data table reseting the old worker list and </s>
funcom_train/31959467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addReport(HttpServletRequest request, LoginManager manager) throws RemoteException{ String standardSel = request.getParameter("standardselect"); String reportId = manager.addReport(standardSel); this.actionBean.setSelectedListItem(manager.getReportList(), reportId); } // end of AddReport COM: <s> this methods adds a report to the person </s>
funcom_train/43245946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetSpinalCordInjury() { System.out.println("setSpinalCordInjury"); String spinalCordInjury = ""; PatientDataObject instance = new PatientDataObject(); instance.setSpinalCordInjury(spinalCordInjury); // 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 spinal cord injury method of class org </s>
funcom_train/15937223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String randomString(int length) { StringBuffer randomName = new StringBuffer(); int c; Random random = new Random(); for (int i = 0; i < length; i++) { if (random.nextBoolean()) c = random.nextInt(26) + 97; else c = random.nextInt(10) + 48; randomName.append((char) c); } return randomName.toString(); } COM: <s> this method creates and returns a random string with length size </s>
funcom_train/3619198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAlignPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ImageData_align_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ImageData_align_feature", "_UI_ImageData_type"), EclipsesrsPackage.Literals.IMAGE_DATA__ALIGN, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the align feature </s>
funcom_train/28292903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getConstrainChoice() { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - " + "getConstrainChoice"); System.out.println(" ::--> " + mConstrainChoice); System.out.println(" :: SeqActivity --> END - " + "getConstrainChoice"); } return mConstrainChoice; } COM: <s> retrieves the value of the choice constraint constrain choice sequencing </s>
funcom_train/48502612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CopyOptions exclude(CharSequence... propertyNames) { final int length = propertyNames.length; excludedPropertyNames = new String[length]; for (int i = 0; i < length; i++) { excludedPropertyNames[i] = propertyNames[i].toString(); } return this; } COM: <s> specifies the excluded property names </s>
funcom_train/7423048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Copy prepareCopyForHeaderMetaData(String variableName, String property) { Copy copy = new Copy(); FromSpec from = new FromSpec(); from.setType(fromTypes.VARIABLE); from.setPart("payload"); from.setVariableName("input"); from.setQueryLanguage("urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"); from.setQuery("<![CDATA[tns:" + property + "]]>"); copy.setFromSpec(from); ToSpec to = new ToSpec(); to.setType(toTypes.VARIABLE); to.setVariableName(variableName); to.setHeader(property); copy.setToSpec(to); return copy; } COM: <s> creates a copy object to copy token and reporting service url to the </s>
funcom_train/39314652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetImage(){ System.out.println("testSetImage"); BufferedImage image = new BufferedImage(10,10,BufferedImage.TYPE_INT_RGB); printerTest.setImage(image); System.out.println("Done - testSetImage"); //printer p = new printer(Frame parent); } COM: <s> test of set image method of class printer </s>
funcom_train/46629136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Graphics2D paintImage(Graphics g) { Graphics2D g2d = (Graphics2D) g; //draw the lower layers image g2d.drawImage(projectTabs.getLowerLayers(), 0, 0, null); //pass the g2d so the selected tab will draw the currentLayer image projectTabs.drawCurrentLayer(g2d); //draw the upper layers image g2d.drawImage(projectTabs.getUpperLayers(), 0, 0, null); //return the Graphics2D for further use return g2d; } COM: <s> paint the various image layers using the given graphics </s>
funcom_train/41164573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(ToForum entity) { EntityManagerHelper.log("saving ToForum instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved to forum entity </s>
funcom_train/1710777
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleUnsaveForms() { if((commonValues.isFormsChanged())&&(commonValues.isItextOnClasspath())){ int n = currentGUI.showConfirmDialog(Messages.getMessage("PdfViewerFormsUnsavedOptions.message"),Messages.getMessage("PdfViewerFormsUnsavedWarning.message"), JOptionPane.YES_NO_OPTION); if(n==JOptionPane.YES_OPTION) saveChangedForm(); } commonValues.setFormsChanged(false); } COM: <s> warns user forms unsaved and offers save option </s>
funcom_train/8088111
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object readMatrixOld(Element node) throws Exception { weka.core.Matrix matrix; weka.core.matrix.Matrix matrixNew; // for debugging only if (DEBUG) trace(new Throwable(), node.getAttribute(ATT_NAME)); m_CurrentNode = node; matrixNew = (weka.core.matrix.Matrix) readMatrix(node); matrix = new weka.core.Matrix(matrixNew.getArrayCopy()); return matrix; } COM: <s> builds the matrix old from the given dom node </s>
funcom_train/26052858
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean logEvent(AppSensorIntrusion currentIntrusion) { ASUser user = currentIntrusion.getUser(); logger.debug("Response Action: Logging issue performed by " + user.getAccountId()); logger.fatal("INTRUSION - Multiple intrusions observed by AppSensorUser:" + user.getAccountName() + ", UserID:" + user.getAccountId() + ", Action: Logging Event with code: " + currentIntrusion.getEventCode()); return true; } COM: <s> log the current event </s>
funcom_train/22557033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadLearningPath (){ try{ MetadataProvider metadataProvider = new MetadataProviderImpl(); LearningPathProvider l = new CurrBasedLearningPathProvider(metadataProvider); Set<String> goal = new HashSet<String>(); goal.add("Behaviour"); goal.add("Learning Theories"); //an empty knowledge: Set<String> knowledge = new HashSet<String>(); LearningPath lpd; lpd = l.computeLearningPath( metadataProvider.getAllCurrentUnitsOfLearning(), knowledge, goal); m_CDProgramMgr.setLearningPath(lpd); }catch(Exception e){ e.printStackTrace(); } } COM: <s> retrieves all current learning objects from the </s>
funcom_train/20481207
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanSingletons() { int s = intervals.size(); for (int i = 0; i < s; i++) { Interval interv = (Interval) intervals.get(i); if (interv.getLength() == 0) { intervals.remove(i); i--; s--; } } } COM: <s> clean all singleton interval n n from this list </s>
funcom_train/45502887
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cell getCell( int x, int y ) throws IllegalArgumentException { if( (x < 0) || (x > this.width - 1) ) { throw new IllegalArgumentException( "Invalid x-value!" ); } if( (y < 0) || (y > this.height - 1) ) { throw new IllegalArgumentException( "Invalid y-value!" ); } return this.cells[x][y]; } COM: <s> returns the cell referenced at position x y </s>
funcom_train/11735306
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStatus(int newStatus) { switch (newStatus) { case STATUS_NEW: case STATUS_EXISTING: case STATUS_EXISTING_REMOVED: case STATUS_EXISTING_MODIFIED: case STATUS_STALE_DESTROYED: case STATUS_UNDEFINED: status = newStatus; return; default: String msg = "illegal status: " + newStatus; log.debug(msg); throw new IllegalArgumentException(msg); } } COM: <s> sets the new status of this item </s>
funcom_train/6452123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removePercept(String agName, Literal per) { if (per != null && agName != null) { List<Literal> agl = agPercepts.get(agName); if (agl != null) { uptodateAgs.remove(agName); return agl.remove(per); } } return false; } COM: <s> removes a perception for an agent </s>
funcom_train/20846151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(String key, Object value, long duration) { if (value != null) { synchronized (this) { long currentSysTime = System.currentTimeMillis(); keysToTimeout.put(key, new Long(currentSysTime + duration)); keysToValues.put(key, value); // do we now hit the upper access count limit? - If so, start // cleanup. if (++accessCount == CLEANUP_ACCESS_COUNT) { cleanUp(currentSysTime); accessCount = 0; } } } } COM: <s> put a key value pair into the cache </s>
funcom_train/3362758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processMenuKeyEvent(MenuKeyEvent e) { if (DEBUG) { System.out.println("in JMenuItem.processMenuKeyEvent for " + getText()+ " " + KeyStroke.getKeyStrokeForEvent(e)); } switch (e.getID()) { case KeyEvent.KEY_PRESSED: fireMenuKeyPressed(e); break; case KeyEvent.KEY_RELEASED: fireMenuKeyReleased(e); break; case KeyEvent.KEY_TYPED: fireMenuKeyTyped(e); break; default: break; } } COM: <s> handles a keystroke in a menu </s>
funcom_train/13994234
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object makeRestrictionMenu(String curVal, boolean editable) { if (editable) { Object[] menu = null; Object[] templateMenu = null; if (containmentOnly) { templateMenu = getContainmentRestrictionMenu(); } else { templateMenu = getNonContainmentRestrictionTypeMenuObjProp(); } menu = new Object[3]; menu[0] = curVal; menu[1] = templateMenu[1]; menu[2] = templateMenu[2]; return menu; } else { return curVal; } } COM: <s> call this method to make a restriction menu </s>
funcom_train/34343430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getArticulo1() { if (articulo1 == null) {//GEN-END:|34-getter|0|34-preInit // write pre-init user code here articulo1 = new TextField("Ingrese codigo del Pedido 1", null, 5, TextField.NUMERIC);//GEN-LINE:|34-getter|1|34-postInit // write post-init user code here }//GEN-BEGIN:|34-getter|2| return articulo1; } COM: <s> returns an initiliazed instance of articulo1 component </s>
funcom_train/48653288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Integer eval(Operand op) { if (op instanceof Immediate) { int val = ((Immediate)op).val; return new Integer(val); } else { if (localOpToVal.containsKey(op)) { Integer val = localOpToVal.get(op); return val; } else if (globalOpToVal.containsKey(op)) { Integer val = globalOpToVal.get(op); return val; } else { throw new RuntimeException("Operand " + op + " was not found in environment. " + "Possibly used before defined!"); } } } COM: <s> returns the value of the operand in the current environment </s>
funcom_train/32733590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void incAvailable(int incr) { if (incr > 0) { int oldUnits = availUnits; if (availUnits + incr > maxUnits) { availUnits = maxUnits; } else { availUnits += incr; } firePropertyChange(this.availUnitsPropertyName, oldUnits, availUnits); } } COM: <s> increase the number of available units by a specific amount </s>
funcom_train/41984871
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("BookingServiceWSPort".equals(portName)) { setBookingServiceWSPortEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/42944044
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean supportsEncoding(int encoding) { // 'encoding' is a mask containing one (or more) of the following: // Encoding.SUPPORTED_ENCODING_BINARY // Encoding.SUPPORTED_ENCODING_BASE64 // Encoding.SUPPORTED_ENCODING_HEX // Encoding.SUPPORTED_ENCODING_CSV int vi = this.device.getSupportedEncodings(); return ((vi & encoding) != 0); } COM: <s> determine if an encoding method is supported by the device </s>
funcom_train/4357934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void applicationAnnotationsConfig() { long t1=System.currentTimeMillis(); WebAnnotationSet.loadApplicationAnnotations(context); long t2=System.currentTimeMillis(); if (context instanceof StandardContext) { ((StandardContext) context).setStartupTime(t2-t1+ ((StandardContext) context).getStartupTime()); } } COM: <s> process the application classes annotations if it exists </s>
funcom_train/11728159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testChildAxisRoot() throws RepositoryException, NotExecutableException { String sql = getStatement("/%"); sql += " AND NOT " + jcrPath + " LIKE '/%/%'"; Node[] nodes = toArray(session.getRootNode().getNodes()); executeSqlQuery(session, sql, nodes); } COM: <s> tests if and not returns the child nodes of the root node </s>
funcom_train/3113874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDashPhase(float newDashPhase) { //// 1. Set the value. Creating a new object because BasicStroke is //// missing modifier methods. drawStroke = new SatinStroke(getLineWidth(), getEndCap(), getLineJoin(), getMiterLimit(), getDashArrayImpl(), newDashPhase); } // of method COM: <s> set the dash phase for the pen used to draw with this style </s>
funcom_train/31124827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int available(){ if (readPosition <= writePosition){ // any space between the first read and // the first write is available. In this case it // is all in one piece. return (writePosition - readPosition); } else { // space at the beginning and end. return (buffer.length - (readPosition - writePosition)); } } COM: <s> characters available for reading </s>
funcom_train/33725955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBlending(int channels, float volumeDecrease, float volumeFadeOut, float fadeOutTime) { this.channels = channels; stopAll(); playing = new StereoSample[channels]; this.immediateFadeOutRatio = volumeDecrease; this.fadeOutRatio = volumeFadeOut; this.fadeOutTime = fadeOutTime; } COM: <s> describes how the samples must be played together in this sound set </s>
funcom_train/1060019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addGraphElementPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DiagramLink_graphElement_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DiagramLink_graphElement_feature", "_UI_DiagramLink_type"), Di2Package.Literals.DIAGRAM_LINK__GRAPH_ELEMENT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the graph element feature </s>
funcom_train/29682579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void append(LLRPBitList other) { int oldLength = length; for (int i = 0; i < other.length; i++) { length++; // the used BiSet adjust the length of the underlying BitSet // automatically if (other.bits.get(i)) { bits.set(oldLength + i); } else { bits.clear(oldLength + i); } } } COM: <s> appends other bit list to this </s>
funcom_train/36534422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public void makeConnection(String servername, String username, String password) { String driverName = "org.gjt.mm.mysql.Driver"; try { Class.forName(driverName); String mydatabase = "240db"; String url = "jdbc:mysql://" + servername + "/" + mydatabase; con = DriverManager.getConnection(url, username, password); } catch (ClassNotFoundException e) { System.out.println(e); } catch (SQLException e) { System.out.println(e); } } COM: <s> initialises the con static field with a connection to the 240db database </s>
funcom_train/37521077
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void closeConnection(String name) throws MappingException,SQLException{ logger.log(Level.INFO,Messages.format("ConnectionManager.closeConn",name)); ConnectionSource conn = (ConnectionSource)conns.get(name); if(conn == null){ logger.throwing(CLASS_NAME,"closeConnection()", new MappingException("mapping.connNotFound",name) ); throw new MappingException("mapping.connNotFound",name); } else conn.closeConnection(); } COM: <s> closes the connection specified in name </s>
funcom_train/21439385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Processor getNextProcessor(Processor processor) { SortedSet tail = processors.tailSet(processor); Processor nextProcessor; if (tail.size() > 1) { Iterator iterator = tail.iterator(); iterator.next(); nextProcessor = (Processor) iterator.next(); } else if (tail.size() == 1) { nextProcessor = (Processor) processors.first(); } else { throw new RuntimeException("Processor not in set: " + processor); } return nextProcessor; } COM: <s> returns the processor object in the set that comes </s>
funcom_train/14007584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("SAR".equals(portName)) { setSAREndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/25069249
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAllXML(final ServiceInfoForClient service){ List<GateRuntimeParameter> paramsList = service.getParams(); System.out.println(service.getServiceName() + " has " + paramsList.size() + " params."); StringBuffer buffer = new StringBuffer(); buffer.append("<RTParams>"); for(GateRuntimeParameter param: paramsList){ buffer.append(getXML(param)); } buffer.append("</RTParams>"); return buffer.toString(); } COM: <s> returns the xml representation of all rtparams of a specific services </s>
funcom_train/13508973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CommentedImageObject getCheckedCommentedImage(){ if (this.getCommentedImagePanel().getComment().check()){ return ((CIWizardModel) this.getWizardModel()).getCiObject(); } else { MessagePaneManager.showCheckErrorPane(); return null; } } COM: <s> get the commented image object but check this one before </s>
funcom_train/25659467
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sortUp(String columnId,String table, DTOFlowConfiguration conf, Long sessionId) { int cid = Integer.parseInt(columnId); SearchConfiguration searchConf = getSearchConfigurationForTable(conf, table); if ( searchConf==null ) return; searchConf.setAsc(true); searchConf.setSortColumn(cid); doSearch(conf,sessionId); } COM: <s> applies a sort filter to database searches </s>
funcom_train/44693731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelGeoButtonEnabled( boolean enabled ) { selecGeoButton.setEnabled( enabled ); // noCritButton.setSelected( ); if ( !enabled ) { if ( noCritButton.isSelected() ) { noCritButton.doClick(); } else { bboxCritButton.doClick(); } } } COM: <s> turns the selected geometry button on off </s>
funcom_train/17292830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doAction() { String callId = callIdGenerator.generateCallId(); // Create a new call from factory Call call = callFactory.createCall(); phone.addCall(callId, call); // Configure the call parameters Map<String, Object> callParameters = new HashMap<String, Object>(); callParameters.put("address", phoneView.getAddressTextField().getText()); call.setParameters(callParameters); // Initiate the call call.initiate(); } COM: <s> do the controller action </s>
funcom_train/5016749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Page nextPage() { int processErr = actualPage.processPage(); if (processErr == 0) { // OK if (actualPage.hasNextPage()) { actualPage = actualPage.getNextPage(); showActualPage(); } else { disableNextButton(); } } else { // error actualPage.showErrorDialog(processErr); } return actualPage; } COM: <s> show next page </s>
funcom_train/16082435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDirection(String direction) { if (DIRECTION_SENT.compareToIgnoreCase(direction) == 0 || DIRECTION_RECEIVED.compareToIgnoreCase(direction) == 0 || DIRECTION_SYSTEM.compareToIgnoreCase(direction) == 0) { this.direction = direction.toUpperCase(); } else { throw new IllegalArgumentException( "Invalid direction: " + direction); } } COM: <s> sets the direction of the message </s>
funcom_train/18127141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void subtract(YearMonthDuration duration) { if (duration.getDuration().toString().charAt(0) == '-') { this.xmlCalendar.add(new YearMonthDuration(duration.getDuration() .toString().substring(1)).getDuration()); } else { this.xmlCalendar.add(new YearMonthDuration("-" + duration.getDuration().toString()).getDuration()); } } COM: <s> subtracts the given </s>
funcom_train/22154934
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init(PDFPage page) { this.page = page; // We are the parent instance child = false; // Now create a stream to store the graphics in PDFStream stream = new PDFStream(); page.getPDF().add(stream); page.add(stream); pw = stream.getWriter(); // initially, we are limited to the page size clipRectangle = new Rectangle(page.getMedia()); // finally initialise the stream init(); } COM: <s> this is called by pdfpage when creating a graphcis instance </s>
funcom_train/24430462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFirstLine(int firstLine) { if (firstLine == this.firstLine) { return; } int oldFirstLine = this.firstLine; this.firstLine = firstLine; maxHorizontalScrollWidth = 0; if (firstLine != vertical.getValue()) { updateScrollBars(); } painter.repaint(); gutter.repaint(); } COM: <s> sets the line displayed at the text areas origin without </s>
funcom_train/50076373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSourceFrameVisible(boolean isVisible) { sourceF.setVisible(isVisible); Iterator iter = mainFrames.iterator(); while(iter.hasNext()) { MainFrame mf = (MainFrame) iter.next(); mf.getMainMenuBar().setSourceCheckBox(isVisible); } if(isVisible) { sourceF.refresh(); } } COM: <s> changes the status of source frame </s>
funcom_train/10642388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIconifiable(final boolean b) { boolean oldValue = isIconifiable(); iconable = b; LookAndFeel.markPropertyNotInstallable(this, StringConstants.INTERNAL_FRAME_ICONABLE_PROPERTY); firePropertyChange(StringConstants.INTERNAL_FRAME_ICONABLE_PROPERTY, oldValue, b); } COM: <s> sets the code iconable code property </s>
funcom_train/31650526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private File resolve(String location){ File f = new File( System.getProperty("xbotts.home") +File.separator+"packages" +File.separator+location+".ser"); f.getParentFile( ).mkdirs( );//make the needed directories if they dont exist return f.getAbsoluteFile(); } COM: <s> creates an absolute path to an extension attributes document </s>
funcom_train/4956539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addHeader(String name, String value) { List<String> valueList = headers.get(name); if (valueList == null) { valueList = new ArrayList<String>(1); headers.put(name, valueList); } valueList.add(value); } COM: <s> adds a header to the map </s>
funcom_train/4657407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Link getLink(String rel, String type) { for (Link link: srcState.links) { String linkRel = link.getRel(); String linkType = link.getType(); if ((rel == null || (linkRel != null && linkRel.equals(rel))) && (type == null || (linkType != null && linkType.equals(type)))) { return link; } } return null; } COM: <s> retrieves the first link with the supplied </s>
funcom_train/46142699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // public void setBGImage( String url ) { // tk = Toolkit.getDefaultToolkit(); // try { // imageURL = new URL(url); // } catch (MalformedURLException e) { // println("URL Error!"); // e.printStackTrace(); // } // BG_IMAGE = tk.getImage(imageURL); // BGImageON(); // repaint(); // } COM: <s> used to set the background image of the touchgraph panel that is </s>
funcom_train/35657678
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addActionListenerToButtons(GameController gController){ for(int i=0; i<Model.Board.SIZE; i++){ for(int j=0; j<Model.Board.SIZE; j++){ bButtons[j][i].addActionListener((ActionListener)gController); } } } COM: <s> add action listener to buttons method adds action listener to all buttons </s>
funcom_train/3394710
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasDeprecatedAnnotation(List<JCAnnotation> annotations) { for (List<JCAnnotation> al = annotations; al.nonEmpty(); al = al.tail) { JCAnnotation a = al.head; if (a.annotationType.type == syms.deprecatedType && a.args.isEmpty()) return true; } return false; } COM: <s> check if a list of annotations contains a reference to </s>
funcom_train/2027741
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetPrefix() throws Exception { String prefix = this.registry.getPrefix(uri_jcr); assertEquals(prefix_jcr, prefix); prefix = this.registry.getPrefix(uri_empty); assertEquals(prefix_empty, prefix); prefix = this.registry.getPrefix(uri_mix); assertEquals(prefix_mix, prefix); } COM: <s> tests get prefix using this built in uris </s>
funcom_train/40793582
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getMessageCommand() { if (messageCommand == null) {//GEN-END:|151-getter|0|151-preInit // write pre-init user code here messageCommand = new Command("Message", Command.ITEM, 0);//GEN-LINE:|151-getter|1|151-postInit // write post-init user code here }//GEN-BEGIN:|151-getter|2| return messageCommand; } COM: <s> returns an initiliazed instance of message command component </s>
funcom_train/39363168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object transform(Object arg0) { Validate.notNull(arg0, "Argument must not be null"); Validate.isTrue(arg0 instanceof DataValue, "Argument must be a DataValue"); DataValue value = (DataValue) arg0; DataValueDecorator decorator = new DataValueDecorator(value); decorator.setDataValueTransformer(dataValueTransformer); return decorator; } COM: <s> decorate a data row with a data row decorator </s>
funcom_train/11381971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TaskType getTaskType(TaskInProgress tip) { if (tip.isJobCleanupTask()) { return TaskType.JOB_CLEANUP; } else if (tip.isJobSetupTask()) { return TaskType.JOB_SETUP; } else if (tip.isMapTask()) { return TaskType.MAP; } else { return TaskType.REDUCE; } } COM: <s> get the task type for logging it to </s>
funcom_train/31976735
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int DB_CALL_SETOUT(CommandEvent event, String context, String where, String paramnum, String type) throws Exception{ int qset = 0; int i = context.indexOf(":"); if (i >= 0){ qset = Integer.parseInt(context.substring(i+1)); context = context.substring(0,i); } DatabaseContext dc = (DatabaseContext) event.instance.nv.get(context); //this could be null! QuerySet qs = dc.getQuerySet(qset); qs.setParameter(Integer.parseInt(paramnum),type,where,true); return 1; } COM: <s> declare an output variable from the prepared statement </s>
funcom_train/13272159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFloorTexture(HomeTexture floorTexture) { if (floorTexture != this.floorTexture || (floorTexture != null && !floorTexture.equals(this.floorTexture))) { HomeTexture oldFloorTexture = this.floorTexture; this.floorTexture = floorTexture; this.propertyChangeSupport.firePropertyChange(Property.FLOOR_TEXTURE.name(), oldFloorTexture, floorTexture); } } COM: <s> sets the floor texture of this room </s>
funcom_train/29092413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(final Object o) { return o == this || (o instanceof Dependency && ((Dependency) o).getName().equals(this.getName()) && ((Dependency) o).getImplementation(). equals(this.getImplementation()) && ((Dependency) o).getSpecification(). equals(this.getSpecification())); } COM: <s> indicates whether some other object is equal to this one by comparing </s>
funcom_train/5346235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeGUID(byte[] guid) { if(_guids.size() == 0) { return; } else { synchronized(this) { if(_guids.size() > 0) { Set guids = new TreeSet(new GUID.GUIDByteComparator()); guids.addAll(_guids); guids.remove(guid); _guids = guids; } } } } COM: <s> removes a guid from the list of those scanned </s>
funcom_train/45623112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addQuietPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CodeAnalysisType_quiet_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CodeAnalysisType_quiet_feature", "_UI_CodeAnalysisType_type"), MSBPackage.eINSTANCE.getCodeAnalysisType_Quiet(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the quiet feature </s>
funcom_train/50813654
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNextLongSequence() { testNextIntSequence() ; long[] result = new long[ 3 ] ; for ( int i = 0 ; i < 3 ; i++ ) { result[ i ] = deterministicRandom.nextLong() ; } boolean theResult = ( result[ 0 ] == 3l ) && ( result[ 1 ] == 4l ) && ( result[ 2 ] == 5l ) ; assertEquals( theResult, true ) ; } COM: <s> test the next long method of the </s>
funcom_train/46824297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void draw(final Graphics graphics) { synchronized(dirtyAreas) { for (final Shape shape : dirtyAreas) { graphics.setClip(shape); graphics.drawImage(backgroundImage, 0, 0, null); for(final Set<GameObject> gameObjects : zBuffer.values()) { synchronized(gameObjects) { for(final GameObject gameObject : gameObjects) { gameObject.draw(graphics); } } } } } dirtyAreas.clear(); } COM: <s> draw this level on the specified graphics instance </s>
funcom_train/1560812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean cut(int column1, int row1, int column2, int row2) { copy(column1, row1, column2, row2, false); // null out the external buffer so that paste will not do a relative copy cellBufferStr = null; return delete(column1, row1, column2, row2); } COM: <s> copies the contents of the cell block defined by upper left corner </s>
funcom_train/25855169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sortFile() throws IOException { { if (!this.exists()) throw new IOException("File not exists."); } boolean fileIsBig = new FileInputStream(fileName).available() > maxSingleFileSizeInKB * 1024; if (fileIsBig) { List<String> subFiles = departFile(); for (String file : subFiles) sortSingleFile(file); mergeSort(subFiles, fileName); if (deleteTempFileAfterFinish) deleteFiles(subFiles); } else { sortSingleFile(fileName); } } COM: <s> sort current file </s>
funcom_train/3644314
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void consumeSignal(DataSample<Double> signal) { String name = signal.sourceName + ".signal"; String signature = new MessageDigestFactory().getMD5(name).substring(0, 19); DataSample<Double> output = new DataSample<Double>(signal.timestamp, name, signature, signal.sample, null); dataBroadcaster.broadcast(output); } COM: <s> consume the process controller signal </s>
funcom_train/18654245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public MockEjbContext getEjbContext(){ if ( interceptorInvoker.getContext( MockEjbContext.class.getName())== null ) throw new IllegalStateException( "Context does not exist. Most likely this EJB has not been created yet"); return (MockEjbContext) interceptorInvoker.getContext( MockEjbContext.class.getName()); } COM: <s> returns code mock ejb context code object for the bean backed by this </s>
funcom_train/18788503
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTree(int index, Node element) { trees.add(index, element); update.addUpdate(new ItemInsertionUpdate(element.getUpdate(), "trees", index)); setModified(true); setForeignKey(element, "forestTreesHandle", getId()); } COM: <s> inserts the given child at the select position in the relation trees </s>
funcom_train/29717083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Integer getCharStart(final int lineNumber, final int columnNumber) { try { final int lineOffset = this.document.getLineOffset(lineNumber - 1); final ITypedRegion typedRegion = this.document .getPartition(lineOffset + columnNumber); if (typedRegion == null) { return new Integer(lineOffset); } else { return new Integer(typedRegion.getOffset()); } } catch (final BadLocationException e) { e.printStackTrace(); return null; } } COM: <s> gets the char start </s>
funcom_train/25841611
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FBMethod users_getInfo(String uids, String fields) { Log.d(LOG, "Creating facebook.users.getInfo method."); TreeMap<String, String> parameters = new TreeMap<String, String>(); parameters.put("uids", uids); parameters.put("fields", fields); return getMethodFactory().create("facebook.users.getInfo", parameters, true); } COM: <s> create a method to get information about a user or users </s>
funcom_train/19310464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getValue(final int pointSize) { if (this.value.canEvalLength()) { return this.value.evalLength(pointSize); } if (this.value.canEvalKeyword()) { return this.getKeywordValue(); } throw new IllegalStateException("Error retrieving value from " + this.getClass().getName()); } COM: <s> returns this border widths length in millipoints </s>
funcom_train/19250512
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTabbedPane buildMainJTabbedPane() { mainTabbedPane = new JTabbedPane(); mainTabbedPane.setPreferredSize( new Dimension(X_FRAME -30,Y_FRAME-30)); mainTabbedPane.setTabPlacement( SwingConstants.NORTH); int x1 = 20; mainTabbedPane.setBorder( BorderFactory.createEmptyBorder(x1,x1,x1,x1)); dataPanel = new UIDataPanel(this); settingsPanel = new UISettingsPanel(); mainTabbedPane.add( I18N.CHARACTER, dataPanel); mainTabbedPane.add( I18N.SETTINGS, settingsPanel); return( mainTabbedPane); } COM: <s> builds the tabbed pane </s>
funcom_train/45248143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IPreferenceNode getPreferenceNode(String pageId) { Iterator iterator = PlatformUI.getWorkbench().getPreferenceManager() .getElements(PreferenceManager.PRE_ORDER).iterator(); while (iterator.hasNext()) { IPreferenceNode next = (IPreferenceNode) iterator.next(); if (next.getId().equals(pageId)) { return next; } } return null; } COM: <s> get the preference node with page id </s>
funcom_train/23747393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* public void testGetUpdResponseLen() { System.out.println("GetUpdResponseLen"); GetUpdResponse instance = new GetUpdResponse(); int expResult = 0; int result = instance.GetUpdResponseLen(); 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 upd response len method of class get upd response </s>
funcom_train/17007078
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NtpInfo getInfo() throws IOException { NtpInfo ntpInfo = new NtpInfo(); NtpDatagramPacket dpReceive = new NtpDatagramPacket(); NtpDatagramPacket dpSend = new NtpDatagramPacket(ntpServer, ntpPort); send(dpSend); receive(dpReceive); ntpInfo = dpReceive.getInfo(); return ntpInfo; } COM: <s> exchanges ntp datagram packet with the server and generates ntp info object </s>
funcom_train/19733016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attach(DSPComponent component) throws DSPException { log.info("attach dsp component " + component.getComponentNodeId()); // Save reference components.put(component.getComponentNodeId(), component); String type = component.getComponentType(); componentsByType.put(type, component); } COM: <s> inform the broker a new dsp component is available </s>
funcom_train/39050155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void report(ProfileReport profileReport) { if (profileReport.wasTaskSuccessful()) { String name = profileReport.getTask().getBaseTaskType(); if (!name.startsWith("com.sun.sgs.impl.kernel")) { numSuccessfulNonKernelTasks++; } } } COM: <s> update statistics about particular tasks </s>
funcom_train/42385605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runSheet(String sheetName) throws Exception { run(manager, sheetName, true); run(manager, sheetName, false); run(stub_manager, sheetName, true); run(stub_manager, sheetName, false); } COM: <s> runs four tests on one sheet </s>
funcom_train/165849
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Path findCurrentWelcome(Path dirPath) { File dirFile = getFile(dirPath); if (dirFile.isDirectory()) { for (int i = 0; i < welcomeFiles.length; i++) { Path wPath = dirPath.add(welcomeFiles[i]); if (getFile(wPath).exists()) { return wPath; } } } return null; } COM: <s> returns the current welcome file path for the given folder </s>
funcom_train/50939890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Icon getIcon(String key) { String path = getProperties(key); if (path != UNKNOWN_STRING) { //URL url = ClassLoader.getSystemResource(path); URL url = classLoader.getResource(path); if (url != null) { return new ImageIcon(url); } } return null; } COM: <s> get the icon for the specify key </s>
funcom_train/22929287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetCommandHandler_NullCommandName() { CommandHandler commandHandler = (CommandHandler) createMock(CommandHandler.class); try { ftpServer.setCommandHandler(null, commandHandler); fail("Expected AssertFailedException"); } catch (AssertFailedException expected) { LOG.info("Expected: " + expected); } } COM: <s> test the set command handler method when the command name is null </s>
funcom_train/45459744
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void firePlaylistChange(String prop, Object old, Object newValue){ if ((this.playListChangeListeners.hasListeners(prop)) && (_boEventsPropagationEnabled)) { this.playListChangeListeners.firePropertyChange(prop, old, newValue); } } COM: <s> notify all listeners to a playlist change </s>
funcom_train/17592474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getFlattened() { List result = new LinkedList(); for (Iterator i = list.iterator(); i.hasNext(); ) { Object o = i.next(); if (o instanceof Collection) { result.addAll((Collection) o); } else { result.add(o); } } return result; } COM: <s> return the flattened version of this list </s>
funcom_train/42225863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand() { if (backCommand == null) {//GEN-END:|29-getter|0|29-preInit // write pre-init user code here backCommand = new Command("Voltar", Command.BACK, 0);//GEN-LINE:|29-getter|1|29-postInit // write post-init user code here }//GEN-BEGIN:|29-getter|2| return backCommand; } COM: <s> returns an initiliazed instance of back command component </s>
funcom_train/8085726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateExperiment() { Classifier[] cArray = new Classifier[m_AlgorithmListModel.size()]; for (int i=0; i<cArray.length; i++) { cArray[i] = (Classifier) m_AlgorithmListModel.elementAt(i); } m_Exp.setPropertyArray(cArray); } COM: <s> updates the classifiers in the experiment </s>
funcom_train/28421356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load( Properties props ) { for( int i=0; i < filenames.length; i++ ) { String key = ("RecentFile" + i); String name = props.getProperty( key ); if (name != null) filenames[i] = name; else filenames[i] = null; } updateMenuItems(); } COM: <s> load the recent filenames from a properties object </s>
funcom_train/29372705
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItem_ColorSchemeEditor() { if (jMenuItem_ColorSchemeEditor == null) { jMenuItem_ColorSchemeEditor = new JMenuItem(); jMenuItem_ColorSchemeEditor.setActionCommand("ColorSchemeEditor"); jMenuItem_ColorSchemeEditor.setText("Colorscheme editor"); } return jMenuItem_ColorSchemeEditor; } COM: <s> this method initializes j menu item color scheme editor </s>