__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/36770262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Defect getDefect() { assert (target != null); Defect theDefectChanged = null; // Cast target as Defect try { theDefectChanged = (Defect) target; } catch (ClassCastException e) { System.err.println("ClassCastException:"); System.err.println("\tChanging title on defect failed."); System.err.println("\tTarget could not be cast as Defect."); System.err.println("\tclass: gui.defects.DefectEditor"); System.exit(-1); } return theDefectChanged; } COM: <s> utility method to handle casting the target to defect </s>
funcom_train/20675419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void intersection(final Clip c) { if (status == INVALID) return; if (status == EMPTY) { setClip(c); status = INUSE; return; } clip[0] = Math.max(clip[0], c.clip[0]); clip[1] = Math.max(clip[1], c.clip[1]); clip[6] = Math.min(clip[6], c.clip[6]); clip[7] = Math.min(clip[7], c.clip[7]); } COM: <s> intersect this clip with another region </s>
funcom_train/51821702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeColumn(int index) { alterDataTitles = ArrayTools.removeFromArray(alterDataTitles, index); // Remove the data. for (int i = 0; i < alterData.size(); i++) { String[] dat = (String[])alterData.get(i); alterData.set(i, ArrayTools.removeFromArray(dat, index)); } } COM: <s> removes a column of data within the ego </s>
funcom_train/38762684
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void borrarIniciacion(Long id) { Session session = getSession(); try { Iniciacion tipo = (Iniciacion) session.load(Iniciacion.class, id); session.delete(tipo); session.flush(); } catch (HibernateException he) { throw new EJBException(he); } finally { close(session); } } COM: <s> borra un tipo iniciacion </s>
funcom_train/18092279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String translateMethodDescriptor(final String descriptor) { Type[] argTypes = Type.getArgumentTypes(descriptor); for (int i = 0; i < argTypes.length; ++i) { argTypes[i] = getMirrorType(argTypes[i]); } final Type returnType = getMirrorType(Type.getReturnType(descriptor)); return Type.getMethodDescriptor(returnType, argTypes); } COM: <s> translates a descriptor specifically </s>
funcom_train/10522500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEchoStringHeaderAndResult() throws Exception { String header = "xxxx"; String param = "Hello Service!"; StringHolder gh = new StringHolder(header); String result = client.echoStringHeaderAndResult(gh, param); assertEquals(param, result); String headerResult = gh.value; assertEquals("Header Set By Service!", headerResult); } COM: <s> test echoing a headers value </s>
funcom_train/19107329
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Date getDate() { try { String strDate = getDocument().getRootElement().getAttributeValue("date"); return strDate == null ? new Date() : sDateFormatSong.parse(strDate); } catch (Exception e) { e.printStackTrace(); return null; } } COM: <s> gets the creation date </s>
funcom_train/5781922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMapSection() { System.out.println("testGetMapSection"); // Add your test code below by replacing the default call to fail. MapSection dummy = new MapSection(); event1.setMapSection(dummy); Assert.assertTrue(event1.getMapSection().equals(dummy)); } COM: <s> test of get map section method of class jolo </s>
funcom_train/32721015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireEngineChanged(SnmpEngineEvent engineEvent) { if (snmpEngineListeners != null) { Vector listeners = snmpEngineListeners; int count = listeners.size(); for (int i = 0; i < count; i++) { ((SnmpEngineListener) listeners.elementAt(i)).engineChanged(engineEvent); } } } COM: <s> fires a snmp engine event the registered listeners </s>
funcom_train/6206547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void updateAttributes() { disposeAttributes(); IProcessFlowAttribute[] atts = getWorkingCopy().getAttributes().getAttributes(); // Create model wrappers for the attributes. for (int i = 0; i < atts.length; i++) { IGaijinWebFlowAttribute attribute = new GaijinWebFlowAttribute(atts[i], this); getAttributesMap().put(attribute.getId(), attribute); } } COM: <s> update the map of attributes from the working copy </s>
funcom_train/31944184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setStopbits(String stopbits) { if (stopbits.equals("1")) { m_Stopbits = SerialPort.STOPBITS_1; } if (stopbits.equals("1.5")) { m_Stopbits = SerialPort.STOPBITS_1_5; } if (stopbits.equals("2")) { m_Stopbits = SerialPort.STOPBITS_2; } }//setStopbits COM: <s> sets the number of stop bits from the given tt string tt </s>
funcom_train/46759438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ApplicationControlModel getApplicationControl(final long controlId, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { ApplicationControlModel acm = (ApplicationControlModel) BaseData.get(ApplicationControlModel.class, controlId, call); return acm; }}; return (ApplicationControlModel) call(method, call); } COM: <s> returns the control model for the given id </s>
funcom_train/13816054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void viewChanged( PhotoInfoView view, String field, Object newValue ) { FieldController fieldCtrl = (FieldController) modelFields.get( field ); if ( fieldCtrl != null ) { fieldCtrl.viewChanged( view, newValue ); } else { log.warn( "No field " + field ); } } COM: <s> this method must be called by a view when it has been changed </s>
funcom_train/3122464
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addListener(Map map, String str, EventListener l) { //// 0.1. Lazily instantiate the set if it does not exist. Set setListeners = (Set) map.get(str); if (setListeners == null) { setListeners = new WeakHashSet(); map.put(str, setListeners); } //// 1. Add the listener to the set. setListeners.add(l); } // of method COM: <s> add a listener on a specific property </s>
funcom_train/1567224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FakeHttpServletRequest setParameter(String name, boolean isPost, String... values) { if (isPost) { postParameters.add(name); } parameters.put(name, values); // Old query string no longer matches up, so set it to null so it can be // regenerated on the next call of getQueryString() queryString = null; return this; } COM: <s> sets the a parameter in this fake request </s>
funcom_train/16852752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void putInGroup(K key, String group, V value) { try { JCS.getInstance(this.cacheName).putInGroup(key, group, value); } catch (CacheException e) { String msg = "Failure to add " + key + " to cache " + this.cacheName + ":" + e.getMessage(); log(msg); } } COM: <s> implements group based addition of cache elements </s>
funcom_train/46749018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRecordItemRef(DisplayModel recordItemRef) { if (Converter.isDifferent(this.recordItemRef, recordItemRef)) { DisplayModel oldrecordItemRef= new DisplayModel(this); oldrecordItemRef.copyAllFrom(this.recordItemRef); this.recordItemRef.copyAllFrom(recordItemRef); setModified("recordItemRef"); firePropertyChange(String.valueOf(APPLICATIONCONTROLS_RECORDITEMREFID), oldrecordItemRef, recordItemRef); } } COM: <s> record item for a bound form record control </s>
funcom_train/42439903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringBuffer toNewick(ClusterNode n, StringBuffer s){ if(n._lChild==null && n._rChild==null) s.append(n._id); else{ s.append("("); if(n._lChild!=null){ toNewick(n._lChild,s); s.append(":"+(n._height-n._lChild._height)+",\n"); }if(n._rChild!=null){ toNewick(n._rChild,s); s.append(":"+(n._height-n._rChild._height)); } s.append(")"); } return s; } COM: <s> function to generate a newick string from a cluster node structure missing final </s>
funcom_train/35577625
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private RegistrationRequest getRegistrationRequestByCode(final String code) { final Query query = em .createNamedQuery("RegistrationRequest.GetByCode"); query.setParameter("code", code); final List<RegistrationRequest> list = query.getResultList(); if (list.size() == 1) { return list.get(0); } return null; } COM: <s> if there is exactly one registration request with this code we return the </s>
funcom_train/37224612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInputLayer(LayerInterface input){ //find the layer LayerInterface find = (Layer)_layersList.remove(_layersList.indexOf(input)); //move the layer to the correct spot _layersList.add(0, find); //set the layers type find.setLayerType("Input"); } COM: <s> sets the input layer for the network </s>
funcom_train/12643666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawArc(int x, int y, int w, int h, int startAngle, int endAngle) { pDrawArc(psd, x + originX, y + originY, w, h, startAngle, endAngle); } COM: <s> draws an arc bounded by the given rectangle from start angle to </s>
funcom_train/38473228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeModelChangeListener(Object container, IModelChangeListener l) { LinkedList containerListeners = (LinkedList) modelListeners.get(container); if (containerListeners == null) return; containerListeners.remove(l); if (containerListeners.isEmpty()) { modelListeners.remove(container); } } COM: <s> method remove model change listener </s>
funcom_train/37042096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTransactionsOccured() { try { assertTrue(!auction.transactionsOccurred()); auction.begin(); auction.step(); assertTrue(!auction.transactionsOccurred()); auction.step(); assertTrue(!auction.transactionsOccurred()); auction.step(); assertTrue(auction.transactionsOccurred()); } catch (AuctionClosedException e) { fail("we tried to step through an market past its closure"); } catch (ShoutsNotVisibleException e) { fail("test is configured incorrectly: we must use an auctioneer that permits shout visibility"); } } COM: <s> test that transactions occur only in the final 3rd round </s>
funcom_train/50368271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireAction(String name) { Action[] actions = renderPane.getActions(); Hashtable actionHash = new Hashtable(); for (int i = 0; i < actions.length; i++) { actionHash.put(actions[i].getValue(Action.NAME), actions[i]); } Action action = (Action) actionHash.get(name); action.actionPerformed(new ActionEvent(this, 0, "null")); } COM: <s> perform an action given a string name </s>
funcom_train/19392124
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void locateOnScreenCenter(Component component) { Dimension paneSize = component.getSize(); Dimension screenSize = component.getToolkit().getScreenSize(); component.setLocation( (screenSize.width - paneSize.width) / 2, (screenSize.height - paneSize.height) / 2); } COM: <s> locates the given component on the screens center </s>
funcom_train/45486356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton4Del() { if (jButton4Del == null) { jButton4Del = new JButton(); jButton4Del.setBounds(new Rectangle(951, 88, 64, 26)); Font font = new Font("Serif", Font.BOLD, 16); jButton4Del.setFont(font); jButton4Del.setForeground(Color.red); jButton4Del.setText("4"); } return jButton4Del; } COM: <s> this method initializes j button4 del </s>
funcom_train/4947493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(SearchLabel slabel, Object val) { if(!this.isValid(val.toString())) { throw new NewJob.InvalidOptionValueException(getOptionKey().getKey(), val.toString()); } else { setValue(slabel, val, true); } } COM: <s> this method checks to see if the value passed to the option is </s>
funcom_train/32647356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TypeSet getTypeSet(ProgramElement pe) throws TypeInfoNotReadyException { if (mainClassName == null) { // no mainClassName set throw new TypeInfoNotReadyException(); } if (!areTypeSetsComputed) { // TypeSets have to be computed computeTypeInfo(); } return (TypeSet)AST2TypeSet.get(pe); } COM: <s> returns a code type set code of possible types the specified </s>
funcom_train/29829274
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void restorePresence() { if (presenceBeforeAuto != null) setPresence(presenceBeforeAuto.getFriendlyShow(), presenceBeforeAuto.getStatus(), true); /*else setPresence(SHOW_ONLINE_STR, null, true);*/ presenceBeforeAuto = null; } COM: <s> restores presence saved when changing it automatically using set auto presence </s>
funcom_train/31056619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doLocalSetup() throws AgentInitializationException { super.doLocalSetup(); // get our handle to our agent component manager shadow try { cms = getComponentManagerShadow(); } catch( ShadowNotFoundException error ) { Debug.warning( "this agent cannot start on a cell that does not have graphical capabilities.", error ); myCell.killAgent( (AgentImpl)this ); } } COM: <s> do our local setup which just involves letting the base uiagent </s>
funcom_train/39106231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processPRINT() { try { setStatusText(currToken.toString()); QASHToken tokenToPrint = resolveExpression(getStatements()); printStream.println(HtmlPrintStream.GREEN,tokenToPrint.toString()); } catch (Exception ex) { printError(PRINT,"Print syntax incorrect :"+ex.getMessage(),currToken); } } COM: <s> process a line containing a print statement </s>
funcom_train/3039270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void generateTablesAllTablesList() { DocFile docFile = docFileManager.getAllTablesDocFile(); File file = docFile.getFile(); Map parameters = new HashMap(); parameters.put("docFile", docFile); parameters.put("title", "All Tables"); parameters.put("tableList", docHelper.getTables() ); processTemplate(parameters, VM_TABLES_TABLE_LIST, file); } COM: <s> generate a file with a list of all the tables in the configuration </s>
funcom_train/2886579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getFilesystemName(ManagedConfiguration conf) throws SFHadoopException { String fsName = conf.get(ConfigurationAttributes.FS_DEFAULT_NAME); if (fsName == null) { String text = ERROR_NO_START + getServiceName() + " -undefined attribute " + ConfigurationAttributes.FS_DEFAULT_NAME; throw new SFHadoopException(text, null, this, conf); } return fsName; } COM: <s> get the filesystem name </s>
funcom_train/4360491
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer sb = new StringBuffer(); if (getParent() != null) { sb.append(getParent().toString()); sb.append("."); } sb.append("StandardHost["); sb.append(getName()); sb.append("]"); return (sb.toString()); } COM: <s> return a string representation of this component </s>
funcom_train/40429322
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isInitializable() { if ( backgroundColor == null ) return false; if ( borderColor == null ) return false; if ( colors == null ) return false; if ( width == null ) return false; if ( height == null ) return false; if ( legendPosition == null ) return false; if ( legendBackgroundColor == null ) return false; if ( legendTextColor == null ) return false; if ( title == null ) return false; if ( titleColor == null ) return false; return true; } COM: <s> override to check if all options have been set </s>
funcom_train/4189879
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void init(FilterConfig config) throws ServletException { // TODO Auto-generated method stub rf.setServletContext(config.getServletContext()); String routes = config.getInitParameter("routes"); String restConfig = config.getInitParameter("restConfig"); restConf = (RestConfig)rf.getResource(RestConfig.class); restConf.setConfigFile(restConfig); restConf.setRoutesFile(routes); restConf.loadAndValidate(); routeBuilder = (RouteBuilder)rf.getResource(RestRouteBuilder.class); routeBuilder.buildAllRoutes(); } COM: <s> loads and validates routes and rest config </s>
funcom_train/46193939
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (!(o instanceof NUTF8)) return false; NUTF8 that = (NUTF8)o; if (this.length != that.length) return false; else return NWritableComparator.compareBytes(bytes, 0, length, that.bytes, 0, that.length) == 0; } COM: <s> returns true iff code o code is a utf8 with the same contents </s>
funcom_train/37034836
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isLoaded( String id ){ try { if ( super.findSession(id) != null ) return true; } catch (IOException e) { log("checking isLoaded for id, " + id + ", "+e.getMessage(), e); } return false; } COM: <s> return true if the session id is loaded in memory </s>
funcom_train/28125933
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSpliceDate() throws ParseException { Date source = _dateFormat.parse("11/20/2002 11:11:11.000"); Date target = _dateFormat.parse("12/25/2003 23:34:56.129"); Date expectedResult = _dateFormat.parse("11/20/2002 23:34:56.129"); assertEquals(expectedResult, _utilities.spliceDate(source, target)); } COM: <s> tests the code splice date date date code method </s>
funcom_train/40433916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBuyerReceipt() { try { Thread.sleep(3000); SeleniumUtil.waitForTextPresent( seleniumRC, "Get up-to-date order progress", 3000); seleniumRC.click("link=Get up-to-date order progress"); return seleniumRC.getHtmlSource(); } catch (InterruptedException e) { throw new RuntimeException("Error trying to get the buyer receipt", e); } } COM: <s> get the buyer receipt as html </s>
funcom_train/1111480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModel(GraphModel newModel) { GraphModel oldModel = graphModel; graphModel = newModel; firePropertyChange(GRAPH_MODEL_PROPERTY, oldModel, graphModel); // FIX: Use Listener if (graphLayoutCache != null && graphLayoutCache.getModel() != graphModel) graphLayoutCache.setModel(graphModel); clearSelection(); invalidate(); } COM: <s> sets the code graph model code that will provide the data </s>
funcom_train/36552892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addPlayerHandPanel(JPanel myPanel) { JPanel playerHandPanel = new JPanel(); playerHandPanel.setPreferredSize(new Dimension(190,75)); playerHandPanel.setOpaque(false); playerHandPanel.setLayout(new FlowLayout()); // addCard(playerHandPanel); // addCard(playerHandPanel); playersHandPanels.add(playerHandPanel); myPanel.add(playerHandPanel); } COM: <s> creates players hand area </s>
funcom_train/45622203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setIndexWriterParameters(IndexWriter writer) { writer.setUseCompoundFile(useCompoundFile); writer.setMaxBufferedDocs(maxBufferedDocs); writer.setMaxFieldLength(maxFieldLength); writer.setMaxMergeDocs(maxMergeDocs); writer.setMergeFactor(mergeFactor); writer.setTermIndexInterval(termIndexInterval); writer.setWriteLockTimeout(writeLockTimeout); } COM: <s> sets all the values of parameters specified on the index writer </s>
funcom_train/45088295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processExecutionResults(final List<JPPFTask> results) { // process the results for (JPPFTask task: results) { // if the task execution resulted in an exception if (task.getException() != null) { // process the exception here ... } else { // process the result here ... } } } COM: <s> process the execution results of each submitted task </s>
funcom_train/37565531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addProhibitedPhrase(String[] terms) { if (terms.length == 0) { // ignore empty phrase } else if (terms.length == 1) { addProhibitedTerm(terms[0]); // optimize to term query } else { clauses.add(new Clause(new Phrase(terms), false, true)); } } COM: <s> add a prohibited phrase </s>
funcom_train/46519993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void invoke(MessageContext messageContext) throws AxisFault { try { URL url = new URL(messageContext.getStrProp(MessageContext.TRANS_URL)); URLConnection conn = url.openConnection(); writeToConnection(conn, messageContext); readFromConnection(conn, messageContext); } catch (Exception e) { throw AxisFault.makeFault(e); } } COM: <s> invoke a remote call using an urlconnection </s>
funcom_train/2357559
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (o instanceof Phrase) { Phrase other = (Phrase) o; if(this.size() != other.size()) return false; for (int i=0; i < size(); i++) { if(this.getWordID(i) != other.getWordID(i)) return false; } return true; } else { return false; } } COM: <s> two phrases are their word ids are the same </s>
funcom_train/14655031
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initValues() { try { getAttribute("logMode").setValue("normal"); getAttribute("objectIDIncrement").setValue("20"); getAttribute("objectIDIncrement").setValue("20"); } catch (IllegalArgumentException e) { getLogger().debug("Could not set value for Attribute!!!", e); } } COM: <s> init values of attributes </s>
funcom_train/3562683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeContainer(Integer containerID) throws DbException { NVPair[] parms; parms = new NVPair[1]; parms[0] = new NVPair("containerID", containerID.toString()); simpleRequest(REMOVE_CONTAINER_PAGE, "Cannot remove container", parms); } COM: <s> deletes a container </s>
funcom_train/50214490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextField getJTextFieldSampleTime() { if (jTextField == null) { jTextField = new JTextField(); jTextField.setMinimumSize(new java.awt.Dimension(4,16)); jTextField.setPreferredSize(new java.awt.Dimension(4,16)); } return jTextField; } COM: <s> this method initializes j text field </s>
funcom_train/11653061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initTextNode(Text node, DefaultMutableTreeNode mTreeNode) throws SAXException { String text = node.getNodeValue().trim(); if (text != null && text.length() > 0) { XMLDefaultMutableTreeNode textNode = new XMLDefaultMutableTreeNode(text, node); mTreeNode.add(textNode); } } COM: <s> init the text node </s>
funcom_train/13273844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isPointInImage(int x, int y) { Point translation = getImageTranslation(); float scale = getImageScale(); return x > translation.x && x < translation.x + Math.round(getImage().getWidth() * scale) && y > translation.y && y < translation.y + Math.round(getImage().getHeight() * scale); } COM: <s> returns code true code if point at code x code code y code </s>
funcom_train/40445825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean visit(ClassloaderRunner service) { try { while (!service.isStarted()) { CacheFactory.log("Waiting for " + service, CacheFactory.LOG_DEBUG); Thread.sleep(1000); } return false; } catch (Exception e) { throw Base.ensureRuntimeException(e, "Error while waiting for service to start - service=" + service); } } COM: <s> wait until the specified classloader runners is started method returns true </s>
funcom_train/2628487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEquals() { System.out.println("equals"); Object obj = null; GUITypeWrapper instance = null; boolean expResult = false; boolean result = instance.equals(obj); 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 equals method of class guitype wrapper </s>
funcom_train/50892469
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIntFieldMaxValid() throws Exception { IntField field = new IntField(1234567890); String msg = field.toMessageString(); assertEquals("Must be I01234567890", msg, "I01234567890"); int value = field.getValue(); assertEquals("Must be 1234567890", value, 1234567890); } COM: <s> test the value of an int field with a maximum </s>
funcom_train/26509275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean le(Object f1, Object f2) { if (!(isElement(f1) && isElement(f2))) return false; for (int i=0; i<((TabledFunction)f1).fValues.length; i++) if (!((POSet)range).le(((TabledFunction)f1).fValues[i], ((TabledFunction)f2).fValues[i])) return false; return true; } COM: <s> the method code le code checks if a function is less or equal </s>
funcom_train/46857894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImages(List<BufferedImage> imgRow) { if (imgRow != null && imgRow.size() > 0) { this.imgRow = imgRow; fitToScreen(imgRow); } else { throw new IllegalArgumentException("imgRow is null or contans no images"); } } COM: <s> set the images to be painted </s>
funcom_train/28867522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void recomputeMinDistrib(int newMin) { int mindiff = distribMin - newMin; int newsize = mindiff + distrib.length; int[] newdistrib = new int[newsize]; // copy the old data to the new array System.arraycopy(distrib, 0, newdistrib, mindiff, distrib.length); newdistrib[0] = 1; distrib = newdistrib; distribMin = newMin; } COM: <s> resize the occurences table with the given new minimum </s>
funcom_train/11647447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void executeUpdate(Context context, Object bean, Object value) throws Exception { if (bean instanceof DynaBean) { DynaBean dynaBean = (DynaBean) bean; dynaBean.set(propertyName, value); } else { handleException(context, new IllegalArgumentException("DynaBean required.")); } } COM: <s> executes the update on the given code dyna bean code </s>
funcom_train/7232358
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void throwCompilationErrors () throws CompilationException { String compilerMessages = outputStream.toString(); String errorMessage = "compilation failed"; if (compilerMessages.length () > 0) errorMessage += "\n\nError messages:" + "\n\n========================" + "\n\n" + compilerMessages + "\n\n========================\n"; throw new CompilationException (errorMessage); } COM: <s> throws an exception with a message containing the compilation error messages </s>
funcom_train/4015073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setData(FormDef formDef, QuestionDef questionDef, SkipRule skipRule){ lbAllQtns.clear(); lbSelQtns.clear(); for(int index = 0; index < formDef.getPageCount(); index++) loadPageQnts(formDef.getPageAt(index),questionDef,skipRule); if(skipRule != null && skipRule.getActionTargets() != null) loadSelQuestions(formDef, questionDef, skipRule.getActionTargets()); } COM: <s> sets the form and currently selected question for the skip rule </s>
funcom_train/25513362
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean checkFields () throws Exception { boolean check = true; //Verify Portlet's dir field File d = new File(txtPortletDir.getText()); if(!d.exists()){ check = false; setStatusLabel(true,"Invalid portlet dir"); txtPortletDir.requestFocusInWindow(); } //Verify Xml file field File f = new File(txtXmlDefinition.getText()); if(!f.exists()) { check = false; setStatusLabel(true,"Invalid xml file"); txtXmlDefinition.requestFocusInWindow(); } return check; } COM: <s> check that the fields are ok </s>
funcom_train/8336972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHeight(int height) { int oldHeight = this.height; this.height = height; firePropertyChange("height", oldHeight, height); if (WabitUtils.getWorkspace(this).isMagicEnabled()) { adjustMarginForPageHeight(oldHeight, height); } } COM: <s> sets the apparent height of the page </s>
funcom_train/28368651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void render(Document index) throws java.io.IOException { File indexFile = new File(_destdir, "index.html"); Transformer trans = getTransformer("antdoc.xsl.index", DEFAULT_STYLE_INDEX); Source src = new DOMSource(index); Result dest = new StreamResult(indexFile); try { trans.transform(src, dest); } catch (javax.xml.transform.TransformerException te) { throw new AntdocException(te); } } COM: <s> render the indexes amp detail pages for the files </s>
funcom_train/44168090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RandomRange getPlunderRange(Unit attacker) { if (canBePlundered()) { int upper = (owner.getGold() * (getUnitCount() + 1)) / (owner.getColoniesPopulation() + 1); if (upper > 0) return new RandomRange(100, 1, upper+1, 1); } return null; } COM: <s> gets the plunder range for this colony </s>
funcom_train/3865722
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPFileCaching(boolean pFileCaching) { pFileCachingEnabledB = pFileCaching; for (int i = 0; i < this.functionLoaders.size(); i++) { FunctionLoader l = (FunctionLoader) functionLoaders.elementAt(i); l.setPFileCaching(pFileCaching); } } COM: <s> set caching of p file to on of off </s>
funcom_train/32354967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void display() { loadWindowProperties(); final int width = Integer.valueOf((String) prop.get("login.width")); final int height = Integer.valueOf((String) prop.get("login.height")); final boolean center = Boolean.valueOf((String) prop .get("login.center")); final boolean resizable = (Boolean.valueOf((String) prop .get("login.resizable"))); gui4jView = createGui4jView(); gui4jView.maximize(width, height); gui4jView.prepare(); gui4jView.center(center); gui4jView.setResizable(resizable); gui4jView.show(); } COM: <s> sets the visual appearence of the main window </s>
funcom_train/10670957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Result testAddListenersForSelectedProperty() { try { for (int i = 0; i < 5; i++) { certainProperties[1].addListener(1); } certainProperties[1].fireAndVerify("old value", "new value"); return passed(); } catch (Exception e) { e.printStackTrace(); return failed(e.toString()); } } COM: <s> verify that listeners registered for selected property are notified </s>
funcom_train/17295590
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String readString(DataInputStream in) throws SocketException{ byte[] dataString = new byte[256]; int length = readShort(in); try{ if(length>=0) inputStream.read(dataString, 0, length); else return null; }catch(SocketException se){ }catch(IOException ie){ ie.printStackTrace(); } return (new String(dataString, 0, length)); } COM: <s> function to read a strring from the socket </s>
funcom_train/7296880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getReason(int status, Locale loc) { if ((status < 100) || (status >= 700)) { throw new IllegalArgumentException ("Unknown category for status code " + status + "."); } // Unlike HTTP status codes, those for SIP are not compact // in each category. We therefore use a map for lookup. return REASON_PHRASES.get(Integer.valueOf(status)); } COM: <s> obtains the reason phrase for a status code </s>
funcom_train/45450465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDiscriminators() { StringBuilder discriminators = new StringBuilder(); for (Iterator<SimpleUserRelationship> i = userRelationships.iterator(); i.hasNext();) { SimpleUserRelationship relationship = i.next(); discriminators.append(relationship.getDiscriminator()); if (i.hasNext()) { discriminators.append(","); } } return discriminators.toString(); } COM: <s> returns a comma separated list of simple user relationship discriminators representing this </s>
funcom_train/5427928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void parseRepeatLevel() { parsePrimaryLevel(); while (true) { if (tryToken("?")) { wrapTopObject(new OptionalOp(), field(RepeatOp.class, "syntax")); endObject(); } else if (tryToken("*")) { wrapTopObject(new ZeroOrMoreOp(), field(RepeatOp.class, "syntax")); endObject(); } else if (tryToken("+")) { wrapTopObject(new OneOrMoreOp(), field(RepeatOp.class, "syntax")); endObject(); } else { break; } } } COM: <s> parse operators at repeat level </s>
funcom_train/34520019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTargeter(InstructionTargeter tar){ if (tar==null) return; for (int i=0;i<targeters.size();i++){ if (targeters.get(i)==tar) return; } targeters.add(tar); tar.updateTarget(null, this); } COM: <s> adds a targeter to this handle </s>
funcom_train/32056853
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetTarget() { System.out.println("testSetTarget"); Object obj = null; JGraph jgraph = new JGraph(); CellMapper cellmapper = null; EdgeView edge = new EdgeView(obj, jgraph, cellmapper); PortView portview = null; edge.setTarget(portview); } COM: <s> this function tests set target function of edge view class </s>
funcom_train/6289420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getBodyPartContentTypeString() { switch (bodypartContentType) { case TYPE_TEXT: return "TEXT"; case TYPE_HTML: return "HTML"; case TYPE_MULTIMEDIA: return "MULTIMEDIA"; case TYPE_APPLICATION: return "APPLICATION"; case TYPE_OTHER: return "OTHER"; } return "unknown type"; } COM: <s> gets the type of the content as human readable string </s>
funcom_train/23793126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AttemptAddr (Operand result, Operand address, Operand offset, Operand oldValue, Operand newValue, FieldOperand field, Operand guard) { super (result, address, offset, oldValue, newValue, field, guard); } COM: <s> constructor for attempt addr </s>
funcom_train/4744446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateTabs() { this.availableTabs.clear(); GetPermittedViewsAction getTabsAction = actionRegistry.getCoreAction(GetPermittedViewsAction.class); getTabsAction.setProperties(authenticator.getUsername(), authenticator.getHash()); try { this.availableTabs.addAll(getTabsAction.call()); } catch (Exception e) { messageHandler.throwExceptionMessage(e); } } COM: <s> updates the internal list of visible tabs </s>
funcom_train/25392913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void VideoErase(int ofs, int count) { // memcpy (screens[0]+ofs, screens[1]+ofs, count); System.arraycopy(V.getScreen(DoomVideoRenderer.SCREEN_BG), ofs, V.getScreen(DoomVideoRenderer.SCREEN_FG), ofs, count); } COM: <s> copy a screen buffer </s>
funcom_train/9877772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void jumpToLocation(int y) { if(y > maxY || !parent.isVisible()) return; int [] yClipBounds = parent.getYClipBounds(); float loc = (float)Math.min(canvas.start[y], canvas.end[y]); framework.setContentLocation(0, (int)(loc)); canvas.viewerY1 = y; canvas.viewerY2 = y + Math.round(maxY * ((yClipBounds[1]- yClipBounds[0])/(float)canvas.parentHeight)); canvas.repaint(); } COM: <s> jumps to indiated location y is the y pixel on the parent </s>
funcom_train/39184635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveTaskUp(int num){ if(canMoveUp(num)){ Task t = (Task)tasks.elementAt(num-1); tasks.setElementAt(tasks.elementAt(num),num-1); tasks.setElementAt(t,num); this.fireContentsChanged(this,num-1,num); } } COM: <s> moves a task up the scheduled list if it is possible </s>
funcom_train/37657501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void resetButtonInit() { LOGGER.entering(getClass().getName(), "resetButtonInit"); assert resetButton == null : "resetButton already initialized."; resetActionInit(); resetButton = new JButton(resetAction); LOGGER.exiting(getClass().getName(), "resetButtonInit"); } COM: <s> initializes the reset button </s>
funcom_train/7758242
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean send(PeerViewElement dest, PeerViewElement pve, boolean response, boolean failure) { Message msg = makeMessage(pve, response, failure); boolean result = dest.sendMessage(msg, SERVICE_NAME, uniqueGroupId); if (LOG.isEnabledFor(Level.DEBUG)) { LOG.debug("Sending " + msg + " to " + dest + " success = " + result); } return result; } COM: <s> send a peer view message to the specified peer </s>
funcom_train/47106719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getJMenuItemWeapon23() { JMenuItem menuItem = new JMenuItem(); menuItem.setText(Weapon.W_23.getItemName()); menuItem.setEnabled(false); menuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setPlrReadiedWeapon(Weapon.W_23); } }); return menuItem; } COM: <s> creates the twenty fourth choice for the weapon menu </s>
funcom_train/32093953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private SolutionStep findEmptyRectangles(boolean onlyOne) { for (int i = 1; i <= 9; i++) { SolutionStep step = findEmptyRectanglesForCandidate(i, onlyOne); if (step != null && onlyOne && ! Options.getInstance().isAllowDualsAndSiamese()) { return step; } } return null; } COM: <s> finds all empty rectangles that provide eliminations only simple case </s>
funcom_train/39878893
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setToDefaults() { fontScale = 1; mcc = mnc = 0; locale = null; userSetLocale = false; touchscreen = TOUCHSCREEN_UNDEFINED; keyboard = KEYBOARD_UNDEFINED; keyboardHidden = KEYBOARDHIDDEN_UNDEFINED; hardKeyboardHidden = HARDKEYBOARDHIDDEN_UNDEFINED; navigation = NAVIGATION_UNDEFINED; navigationHidden = NAVIGATIONHIDDEN_UNDEFINED; orientation = ORIENTATION_UNDEFINED; screenLayout = SCREENLAYOUT_SIZE_UNDEFINED; uiMode = UI_MODE_TYPE_UNDEFINED; seq = 0; } COM: <s> set this object to the system defaults </s>
funcom_train/18104251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isKeyboardAccessible() { //#if polish.api.windows //# return de.enough.polish.windows.Keyboard.isKeyboardAccessible(); //#elif polish.key.supportsAsciiKeyMap.condition == open //# return getWidth() > getHeight(); //#elif polish.key.supportsAsciiKeyMap && !polish.key.supportsAsciiKeyMap.condition:defined return true; //#elif polish.key.maybeSupportsAsciiKeyMap //# return true; //#else //# return false; //#endif } COM: <s> checks if the keyboard if any is currently accessible by the application </s>
funcom_train/51148267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setNumChildren( int num ) { try { IJavaThread thread = (IJavaThread)stackFrame.getThread(); IJavaDebugTarget target = (IJavaDebugTarget)stackFrame.getDebugTarget(); oneArgsArray[ 0 ] = target.newValue( num ); modelNode.sendMessage( "setNumChildren", "(I)V", oneArgsArray, thread, false ); } catch( Exception ex ) { ex.printStackTrace(); } } COM: <s> sets the number of children of this node </s>
funcom_train/40621521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void put(MappedType uiObject) { int index; if (freeList == null) { index = uiObjectList.size(); uiObjectList.add(uiObject); } else { index = freeList.index; uiObjectList.set(index, uiObject); freeList = freeList.next; } setIndex(uiObject.getElement(), index); } COM: <s> adds the mapped type </s>
funcom_train/41510949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendMessage(Client client, Message message) throws IOException, JSONException { String text = message.getText(); String user = message.getUser().getFirstname(); JSONObject json = new JSONObject(); json.put("type", message.getType()); json.put("user", user); json.put("text", text); json.put("timestamp", message.getDate()); OutputStream out = client.getOutputStream(); out.write(json.toString().getBytes()); out.flush(); } COM: <s> sends a message to a specific client </s>
funcom_train/8231825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getOkCommand4() { if (okCommand4 == null) {//GEN-END:|63-getter|0|63-preInit // write pre-init user code here okCommand4 = new Command("Ayuda", Command.OK, 0);//GEN-LINE:|63-getter|1|63-postInit // write post-init user code here }//GEN-BEGIN:|63-getter|2| return okCommand4; } COM: <s> returns an initiliazed instance of ok command4 component </s>
funcom_train/37447423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addResourceBundleName(final String resourceBundleName) { CDebug.checkParameterNotEmpty(resourceBundleName, "resourceBundleName"); if (resources == null) { resources = new CResourceBundle(resourceBundleName, getLocale()); } else { resources.addResourceBundle(resourceBundleName); } } COM: <s> adds the supplied resource bundle name to the list of resources </s>
funcom_train/4692140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getB_limpiar() { if (b_limpiar == null) { b_limpiar = new JButton(); b_limpiar.setText("Limpiar"); b_limpiar.setBounds(new Rectangle(49, 197, 91, 29)); b_limpiar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { a_datos.setText(""); } }); } return b_limpiar; } COM: <s> this method initializes b limpiar </s>
funcom_train/25437594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initMetaFile (String fileName, long fileSize, long fileBlockSize, long offset) { if(offset == 0){ createMetaFile(fileName,fileSize,fileBlockSize); } else { long oldFileBlockSize = this.getOldFileBlockSize(fileName); if (oldFileBlockSize == fileBlockSize) { // do nothing. } else { recreateMetaFile(fileName,fileSize,fileBlockSize, oldFileBlockSize, offset); } } } COM: <s> initializes a em data transfer meta file em for a current transfer </s>
funcom_train/13499259
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddRelationshipRelationshipsPartFailure() { Package pkg = Package.create("DELETEIFEXISTS.docx", true); PackagePartName name1 = null; try { name1 = PackagingURIHelper .createPartName("/test/_rels/document.xml.rels"); } catch (InvalidFormatException e) { fail("This exception should never happen !"); } try { pkg.addRelationship(name1, TargetMode.INTERNAL, PackageRelationshipTypes.CORE_DOCUMENT); } catch (InvalidOperationException e) { return; } fail("Fail test -> M1.25: The Relationships part shall not have relationships to any other part"); } COM: <s> try to add a relationship to a relationship part </s>
funcom_train/3786909
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int lookupIdxBySample(String sName) { /* lookupIdxBySample */ if(sampleNames==null) return(-1); for(int i=0;i<nSamples;i++) if(sampleNames[i].equals(sName)) return(i); return(-1); } /* lookupIdxBySample */ COM: <s> lookup idx by sample lookup index of sample name in condition </s>
funcom_train/6273658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String read_index(long offset, RandomAccessFile fp) { try { fp.seek(offset); int size = Search.fgets(fp, lineBuf); return new String(lineBuf, 0, 0, size); } catch (Exception e) { e.printStackTrace(); } return null; } COM: <s> general purpose binary search function to get the line starting at offset </s>
funcom_train/6268035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { if (other.getClass() != getClass()) { return false; } Authority otherAuth = (Authority) other; if (!this.hostPort.equals(otherAuth.hostPort)) { return false; } if (this.userInfo != null && otherAuth.userInfo != null) { if (!this.userInfo.equals(otherAuth.userInfo)) { return false; } } return true; } COM: <s> retruns true if the two objects are equals false otherwise </s>
funcom_train/31415628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String format(String content, String style) { if (m_Styles.isDefinedInThisGroup(style)) { StringTemplate st = m_Styles.lookupTemplate(style); st.reset(); st.setAttribute("it", content); return st.toString(); } else { return content; } }//format COM: <s> formats a given content with the given style </s>
funcom_train/5378176
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getSessionTimestamp() { // Main should have set the session start-up timestamp so return that. // Return the "now" time if not available. String ts = System.getProperty("eclipse.startTime"); //$NON-NLS-1$ if (ts != null) { try { return getDate(new Date(Long.parseLong(ts))); } catch (NumberFormatException e) { // fall through and use the timestamp from right now } } return getDate(new Date()); } COM: <s> returns the session timestamp </s>
funcom_train/26268265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFirstValue(String headerName) throws CCPPException { if(!myMap.containsKey(headerName)) { throw new CCPPException("Header name not in map"); } else { HeaderEntry mapEntry = (HeaderEntry)myMap.get(headerName); return mapEntry.getFirstValue(); } } COM: <s> gets the first value associated with a header name </s>