__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/13390340
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkData(int count, StopWatch watch) throws RemoteException { //logger.info("Expected: " + count); Calculable[] calcs = watch.getWatchDataSource().getCalculable(); Assert.assertEquals(count, calcs.length); for (Calculable calc : calcs) { Assert.assertTrue(calc.getValue() >= 0); } } COM: <s> checks that the only watch of this jsb holds a given number </s>
funcom_train/35461080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMapStructuresMultipleElementary() { assertEquals("[name : A, alignment : FULLWORD, offset : 3, length : 13, padding : 0]", mapStructures("dcl 1 A," + " 2 B char(1)," + " 2 C float decimal(2)," + " 2 D character(5)," + " 2 E bin fixed(15);")); } COM: <s> try a major structure with multiple elementary items </s>
funcom_train/20656466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JProgressBar getProgressBar() { if (ProgressBar == null) { ProgressBar = new JProgressBar(); ProgressBar.setPreferredSize(new Dimension(100, 25)); // Generated ProgressBar.setMinimum(100); // Generated ProgressBar.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); // Generated } return ProgressBar; } COM: <s> this method initializes progress bar </s>
funcom_train/17492967
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void visitList(List l) { Node n; ListIterator it = l.listIterator(); while (it.hasNext()) { Object o = (n = (Node)it.next()).acceptVisitor(this); if (o != null) { if (o instanceof ReferenceType) { throw new ExecutionError("malformed.expression", n); } it.set(o); } } } COM: <s> visits a list of node </s>
funcom_train/44787202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean match(String password) { if (digest == null) return false; // not initialized byte[] test = createDigest(password); if (digest.length != test.length) return false; for (int i = 0; i < test.length; i++) if (digest[i] != test[i]) return false; return true; } COM: <s> compares the digest of the password with the stored digest </s>
funcom_train/2577040
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Font getTickLabelFont(Comparable category) { if (category == null) { throw new IllegalArgumentException("Null 'category' argument."); } Font result = (Font) this.tickLabelFontMap.get(category); // if there is no specific font, use the general one... if (result == null) { result = getTickLabelFont(); } return result; } COM: <s> returns the font for the tick label for the given category </s>
funcom_train/46150256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { this.thread = Thread.currentThread(); while (!this.isTerminated()) { try { synchronized (this.buffer) { while (this.buffer.isEmpty()) this.buffer.wait(); int out = this.buffer.get(); //Debug.message(this, "TX :" + out); this.out.write(out); this.buffer.notifyAll(); } } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { Log.debug("Interrupted!"); } } this.cleanUp(); } COM: <s> runnable implementation this is where the the buffer is read and stuff </s>
funcom_train/13381936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setSemanticRelation(long propA, long propB, SemanticRelationAction type){ ISetSemanticRelationRequest request = RequestFactory.instance().createSetSemanticRelationRequest(debateId, type); request.setActionType(type); request.setRelata(propA, propB); lastResponse = ControllerChain.instance().processRequest(request); return lastResponse.isPositive(); } COM: <s> sets or unsets a semantic relation between two propositions </s>
funcom_train/14241639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BOTLObjectSourceDiagramEdge getInstance(Object f) { if(f instanceof FigEdge) { if (f instanceof FigBOTLLink) return (new BOTLObjectSourceDiagramLinkEdge((FigBOTLLink) f)); System.out.println("Do not know how to deal with: " + f.getClass().getName() + "\nUsing standard layout"); } return null; } COM: <s> create layouter object from a fig </s>
funcom_train/21606308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addArgumentValues(ConstructorArgumentValues other) { if (other != null) { for (Map.Entry<Integer, ValueHolder> entry : other.indexedArgumentValues.entrySet()) { addOrMergeIndexedArgumentValue(entry.getKey(), entry.getValue().copy()); } for (ValueHolder valueHolder : other.genericArgumentValues) { if (!this.genericArgumentValues.contains(valueHolder)) { this.genericArgumentValues.add(valueHolder.copy()); } } } } COM: <s> copy all given argument values into this object using separate holder </s>
funcom_train/17592674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getConfidenceInterval(double sigLevel) { // sample mean +/- t(a/2,N-1)s/sqrt(N) int N = getNumberOfTrials(); if (N < 2) return Double.POSITIVE_INFINITY; double s = getStdDev(); return Distributions.uc_stDist(sigLevel / 2, N - 1) * s / Math.sqrt(N); } COM: <s> returns the confidence interval of the normalized times with the given </s>
funcom_train/48581666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getItemCommand() { if (itemCommand == null) {//GEN-END:|547-getter|0|547-preInit // write pre-init user code here itemCommand = new Command("Item", Command.ITEM, 0);//GEN-LINE:|547-getter|1|547-postInit // write post-init user code here }//GEN-BEGIN:|547-getter|2| return itemCommand; } COM: <s> returns an initiliazed instance of item command component </s>
funcom_train/137133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSpot(double spot) { focus = spot; //visible_range.setSpot(focus); // instead of using the visible_range, directly call hairline.setRange() hairline.setRange((int) focus, (int) focus + 1); map.setZoomBehavior(NeoMap.X, NeoMap.CONSTRAIN_COORD, focus); //map.updateWidget(); } COM: <s> sets the location of the hairline </s>
funcom_train/24121935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void popState() { logger.log(Level.FINER, "pop state"); //$NON-NLS-1$ // cleanup the current state if (!states.empty()) { states.pop().exit(); } // resume previous state if (!states.empty()) { states.peek().resume(); } } COM: <s> pop the current state </s>
funcom_train/1589325
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Period plusDays(int days) { if (days == 0) { return this; } int[] values = getValues(); // cloned getPeriodType().addIndexedField(this, PeriodType.DAY_INDEX, values, days); return new Period(values, getPeriodType()); } COM: <s> returns a new period plus the specified number of days added </s>
funcom_train/36660093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp() throws Exception { System.err.println("Testcase: " + getName()); serverNode = new SgsTestNode("TestIdGenerator", null, null); txnProxy = serverNode.getProxy(); txnScheduler = serverNode.getSystemRegistry(). getComponent(TransactionScheduler.class); taskOwner = txnProxy.getCurrentOwner(); } COM: <s> creates and configures the session service </s>
funcom_train/39534648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setSelectedItemId(String tabId, String itemId) { if(tabId!=null && ! tabId.equals("") && itemId!=null && ! itemId.equals("")){ itemsMap.put(tabId, itemId); } } COM: <s> sets the id of the selected item for the given tab </s>
funcom_train/31208276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isCurrency(int column) throws SQLException { try { if(Trace.isDetailed()) Trace.trace(getId(),column); // checkColumnIndex already calls checkClosed rs.checkColumnIndex(column); return false; } catch(Throwable e) { throw convertThrowable(e); } } COM: <s> checks if this is a currency column </s>
funcom_train/25504468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Level getLevelProperty(LogManager lm, String key, Level defaultProperty) { final String property = getProperty(lm, key, null); Level levelProperty = defaultProperty; if (property != null) { try { levelProperty = Level.parse(property.trim()); } catch (final Exception e) { errorMessage(e, "Error while parsing level property {0} = \"{1}\".", key, property); } } return levelProperty; } COM: <s> get a level property from the logging configuration </s>
funcom_train/31028205
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void killSession(SessionID sessionID) throws RemoteException { RMISession session = this.sessions.getRMISession(sessionID); if(session == null) { Logger.error(RMISessionSystemCodes.UKNOWN_SESSION_ID_USED, new Object[] {sessionID}); } else { session.kill(); update(); } } COM: <s> kills the session specified by the session id </s>
funcom_train/2759615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dumpXml(File file, boolean formatted) throws IOException { FileWriter fw = null; try { fw = new FileWriter(file); WriteContext writeContext = new WriteContext(fw, formatted); writeContext.getWriter().write("<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>"); writeContext.writeNewLine(); dumpXml(writeContext); } finally { if(fw != null) { fw.close(); } } } COM: <s> dumps the tag to the supplied file </s>
funcom_train/16603768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void releaseAll(ParticleEmitter emitter) { if( !particlesByEmitter.isEmpty() ) { Iterator it= particlesByEmitter.values().iterator(); while( it.hasNext()) { ParticlePool pool= (ParticlePool)it.next(); for (int i=0;i<pool.particles.length;i++) { if (pool.particles[i].inUse()) { if (pool.particles[i].getEmitter() == emitter) { pool.particles[i].setLife(-1); release(pool.particles[i]); } } } } } } COM: <s> release all the particles owned by the specified emitter </s>
funcom_train/3361913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return new StringBuilder() .append(this.getClass().getName()) .append("(compositeType=") .append(compositeType.toString()) .append(",contents=") .append(contents.toString()) .append(")") .toString(); } COM: <s> returns a string representation of this code composite data support code instance </s>
funcom_train/14082465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ArrayList getItems(HttpServletRequest request, HashMap categories) { ArrayList allowed = new ArrayList(); for (Iterator it= sortOrdering.values().iterator(); it.hasNext(); ) { String itemName = (String) it.next(); ArrayList roles = ((MenuCategory) categories.get(itemName)).getRoles(); if (accessAllowed(request, roles)) allowed.add(itemName); } return allowed; } COM: <s> return a list of menu categories </s>
funcom_train/51633471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean hasSource(IJavaElement je) { if (je == null || !je.exists()) return false; try { return je instanceof ISourceReference && ((ISourceReference)je).getSource() != null; } catch (JavaModelException ex) { IStatus status= new Status(IStatus.ERROR, JavaUI.ID_PLUGIN, IStatus.OK, "Error in JDT Core during AST creation", ex); //$NON-NLS-1$ JavaPlugin.getDefault().getLog().log(status); } return false; } COM: <s> checks whether the given java element has accessible source </s>
funcom_train/5414067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getInt(int row, int col) { Number i = (Number)getObject(row, col); if (i == null) { throw new IllegalStateException("null value at (" + row + ", " + col + ")"); } return i.intValue(); } COM: <s> returns the integer at the specified </s>
funcom_train/3702495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clear(String strPath) { //// 1. Fix the path. if (KEY_ALL.equals(strPath) == false) { strPath = InfoSpaceHttpLib.canonicalizePath(strPath); } //// 2. Clear. mapInfoSpaceListeners.removeKey(strPath); } // of method COM: <s> clear out all listeners on this info space </s>
funcom_train/3387050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int parse(char c, CharBuffer in) { if (Surrogate.isHigh(c)) { if (!in.hasRemaining()) { error = CoderResult.UNDERFLOW; return -1; } char d = in.get(); if (Surrogate.isLow(d)) { character = toUCS4(c, d); isPair = true; error = null; return character; } error = CoderResult.malformedForLength(1); return -1; } if (Surrogate.isLow(c)) { error = CoderResult.malformedForLength(1); return -1; } character = c; isPair = false; error = null; return character; } COM: <s> parses a ucs 4 character from the given source buffer handling </s>
funcom_train/1296197
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CompensationHandler xml2CompensationHandler(CompensationHandler compensationHandler, Element activityElement) { if (compensationHandler == null) { compensationHandler = ModelFactory.eINSTANCE.createCompensationHandler(); compensationHandler.setElement(activityElement); } // Save all the references to external namespaces saveNamespacePrefix(compensationHandler, activityElement); compensationHandler.setActivity(getChildActivity(compensationHandler, activityElement)); return compensationHandler; } COM: <s> converts an xml compensation handler element to a bpel compensation handler </s>
funcom_train/3832577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Point3d calcObserverPosition( double distance ) { Debug.debugMethodBegin( this, "calcObserverPosition" ); double height = Math.tan( -vdir ) * distance; height += targetPoint.y; double x = -Math.sin( hdir ) * distance; double y = -Math.cos( hdir ) * distance; Debug.debugMethodEnd(); return new Point3d( x+targetPoint.x, height, y+targetPoint.z ); } COM: <s> calculates the observers position for a given target point distance and view </s>
funcom_train/35842241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setToolBar(JToolBar toolbar) { if (!Arrays.asList(getComponents()).contains(toolbar)) { if (target != null) { remove(((UMLDiagram) getTarget()).getJToolBar()); } add(toolbar, BorderLayout.NORTH); toolBar = toolbar; invalidate(); validate(); repaint(); } } COM: <s> sets the toolbar </s>
funcom_train/6476675
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List query(FOS fos) { List list = new ArrayList(); Goal goal = null; for (int i=0; i<goals.size(); i++) { goal = (Goal) goals.get(i); if (goal.matches(fos)) { list.add(goal); } } return list; } COM: <s> required by the queryable interface and used to return a list of </s>
funcom_train/5275085
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void add(CharSequence cs) { if (cs.equals(SEP_CHARSEQ)) { return; } NGramEntry nge = (NGramEntry) ngrams.get(cs); if (nge == null) { nge = new NGramEntry(cs); ngrams.put(cs, nge); } nge.inc(); } COM: <s> add ngrams from a single word in this profile </s>
funcom_train/35682070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalidAttributesFile() { try { new HostProgramProperties("tarzan.jane"); fail("testInvalidAttributesFile failed"); } catch (HostProgramException e) { assertEquals("java.io.FileNotFoundException: tarzan.jane", e.getMessage()); } } COM: <s> test with invalid program properties file </s>
funcom_train/13720316
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initSockets(Properties p) throws IOException { // acquire a ServerSocketChannel SelectorProvider provider = SelectorProvider.provider(); ssc = provider.openServerSocketChannel(); // acquire and bind the socket to the request hostname/port socket = ssc.socket(); socket.bind(new InetSocketAddress(InetAddress.getByName(p .getProperty("bindIP")), new Integer(p.getProperty("bindPort")))); // turn on blocking ssc.configureBlocking(true); } COM: <s> initializes socket connections </s>
funcom_train/45026241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int countMethodTests() { int testCount = 1; if (this.classDataSet != null && this.classDataSet.size(this.getName()) > 0) { testCount = this.classDataSet.size(this.getName()); } else if (this.classDataSet == null) { testCount = -1; } return testCount; } COM: <s> count number of test datasets provided for method method name </s>
funcom_train/8520669
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void populateLists() { super.populateLists(); OPTIONS_VISIBLE.clear(); OPTIONS_KEY_TYPE.clear(); // set up visibility options OPTIONS_VISIBLE.put("Visible", PDFSignatureActionExecuter.VISIBILITY_VISIBLE); OPTIONS_VISIBLE.put("Hidden", PDFSignatureActionExecuter.VISIBILITY_HIDDEN); //set up valid key type options OPTIONS_KEY_TYPE.put("Default", PDFSignatureActionExecuter.KEY_TYPE_DEFAULT); OPTIONS_KEY_TYPE.put("PKCS12", PDFSignatureActionExecuter.KEY_TYPE_PKCS12); } COM: <s> populates lists for ui </s>
funcom_train/29829142
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BSPresenceInfo getResourcePresence(JID jid) { if (jid == null) return null; // gets list of presences for jid without resource BSPresencesOfJID jp = getJIDPresences(jid); BSPresenceInfo pi; // if no list if (jp == null) { pi = null; } else { pi = jp.getJIDPresence(jid); } return pi; } COM: <s> returns code bspresence info code for specified jid with resource </s>
funcom_train/45018477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNXmirrorPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NXinstrument_nXmirror_feature"), getString("_UI_PropertyDescriptor_description", "_UI_NXinstrument_nXmirror_feature", "_UI_NXinstrument_type"), NexusPackageImpl.Literals.NXINSTRUMENT__NXMIRROR, true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the nxmirror feature </s>
funcom_train/2029333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addBeanPostProcessor(String key, Class type, Component bpp){ if(DestructionAwareBeanPostProcessor.class.isAssignableFrom(type)){ destructions.addBeanPostProcessor(key, bpp); } if(BeanPostProcessor.class.isAssignableFrom(type)){ processors.addBeanPostProcessor(key, bpp); } } COM: <s> report an existence of a component that instantiates bean post processor </s>
funcom_train/42095119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initList() { setList.setModel(setModel); setList.setPreferredSize(new Dimension(150, 300)); scrollPane.setPreferredSize(new Dimension(150, 300)); setList.addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { director.widgetChanged(DirectedAgentSetPanel.this); } }); } COM: <s> adds the jlist to jscroll pane and sets properties like size </s>
funcom_train/28473273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getOkButton() { if (okButton == null) { okButton = new JButton(); okButton.setText("OK"); okButton.setPreferredSize(new Dimension(87, 20)); okButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setResults(); dispose(); } }); } return okButton; } COM: <s> this method initializes ok button </s>
funcom_train/39780444
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void postMessage() { ChatApp app = ChatApp.getApp(); if (postField.getText().trim().length() != 0) { app.postMessage(postField.getText()); } postField.setText(""); app.setFocusedComponent(postField); // messagePane.update(); } COM: <s> posts the text currently entered as a new message </s>
funcom_train/27952323
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPort(int port) throws IllegalArgumentException { if(port <=0 || port > 65535) { log(DEBUG, "Port number not in range 1-65535"); throw new IllegalArgumentException(); } else { this.port = port; log(DEBUG, "Port number set to "+this.port); } } COM: <s> sets the port number on which the socket has to listen </s>
funcom_train/45692150
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addNoteOffsetPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SongPattern_noteOffset_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SongPattern_noteOffset_feature", "_UI_SongPattern_type"), EsxPackage.Literals.SONG_PATTERN__NOTE_OFFSET, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the note offset feature </s>
funcom_train/19338564
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeCategory (Category c) { boolean operationSuccess = false; if (categories.remove(c)) { ArrayList filteredItems = getItemsOfCategory(c); for (int i = 0; i < filteredItems.size(); i++) { items.remove(filteredItems.get(i)); } operationSuccess = true; } return operationSuccess; } COM: <s> remove a category and all the item that belongs </s>
funcom_train/17788653
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isBypass(int component) { if ((cocParametersList != null) && cocParametersList.containsKey(component)) { return cocParametersList.get(component).bypass; } else if (codParameters != null) { return codParameters.bypass; } else { return parent.isBypass(component); } } COM: <s> check if the bypass flag is active </s>
funcom_train/38414956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void itemStateChanged(ItemEvent e) { Object source = e.getItemSelectable(); if(cButton==source) TextDrawable.setHighQualityTextDisplay( (e.getStateChange() == ItemEvent.SELECTED) ); else if(savePassButton==source) ClientManager.setRememberPasswords( (e.getStateChange() == ItemEvent.SELECTED) ); } COM: <s> invoked when check box state is changed </s>
funcom_train/25563922
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCurveToTrace(int curveIndex){ TraceSwitcher s = (TraceSwitcher)getActions().get(TraceSwitcher.ACTION); if(s==null)return;//might be if addDefaultActions are overriden InterpCurveRenderer r = (InterpCurveRenderer)((Plot)getGraph()).getCurve(curveIndex).getRenderer(); s.setFunction(r.getInterpolator()); } COM: <s> sets function to use in trace controller </s>
funcom_train/37230101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int size() { int iCurIndex = 0; int iSize = 0; while( iCurIndex < nlData.getLength() ) { if( nlData.item(iCurIndex).getNodeType() == Node.ELEMENT_NODE ) { iSize++; } iCurIndex++; } return iSize; } COM: <s> return the number of elements in the list </s>
funcom_train/1169477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public Combat getAttackers() { ComputerUtil_Attack2 att = new ComputerUtil_Attack2(AllZoneUtil.getPlayerCardsInPlay(AllZone.getComputerPlayer()), AllZoneUtil.getPlayerCardsInPlay(AllZone.getHumanPlayer()), AllZone.getHumanPlayer().getLife()); return att.getAttackers(); } COM: <s> p get attackers </s>
funcom_train/3362829
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setComponentPopupMenu(JPopupMenu popup) { if(popup != null) { enableEvents(AWTEvent.MOUSE_EVENT_MASK); } JPopupMenu oldPopup = this.popupMenu; this.popupMenu = popup; firePropertyChange("componentPopupMenu", oldPopup, popup); } COM: <s> sets the code jpopup menu code for this code jcomponent code </s>
funcom_train/14055357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAttributeImpl(String name, String value) throws DOMException { String normalName = this.normalizeAttributeName(name); Map<String, String> attribs = this.attributes; if (attribs == null) { attribs = new HashMap<String, String>(2); this.attributes = attribs; } this.assignAttributeField(normalName, value); attribs.put(normalName, value); } COM: <s> fast method to set attributes </s>
funcom_train/21186426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void visit_newarray(Instruction inst) { Type type = (Type) inst.operand(); Expr size = stack.pop(Type.INTEGER); Expr top = new NewArrayExpr(size, type, type.arrayType()); //Xiangyu if (type.equals(Type.BOOLEAN)) { top.range.add(Expr.BARRAY); } stack.push(top); } COM: <s> pushes a new array expr onto the operand stack </s>
funcom_train/14519854
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CAInfo getCAInfoOrThrowException(Admin admin, int caid) throws CADoesntExistsException{ CAInfo caInfo = getCAInfo(admin, caid); if (caInfo == null) { String msg = "No CA with id " + caid + " was found."; log.debug(msg); throw new CADoesntExistsException(msg); } return caInfo; } COM: <s> returns a value object containing nonsensitive information about a ca give its caid </s>
funcom_train/15607499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Alignment createContigAlignment(FeatureBean bean, OID axisOID) { Contig contigEntity = new Contig(bean.getOID(), bean.getDescription(), bean.getEnd() - bean.getStart()); return new GeometricAlignment(null, contigEntity, new Range(bean.getStart(), bean.getEnd())); } // End method: createContigEntity COM: <s> create a contig out of a known contig bean </s>
funcom_train/25420069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addElement(Collection<Resource> records, ServiceInfo serviceInfo, DataElement element) { records.add(new DataElementRecord(serviceInfo, element)); DataElement [] children = element.getChildren(); if (children!=null) { for (DataElement child: children) { addElement(records, serviceInfo, child); } } } COM: <s> adds a single element </s>
funcom_train/24089942
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean treeViewChanged() { // log // .info("StorageBackingBean treeValueChanged() currentConfiguration: " // + currentConfiguration); // log // .info("StorageBackingBean treeValueChanged() selectedRegistry: " // + selectedRegistry + ", selectedRegistryOld: " + selectedRegistryOld); if(selectedRegistry.equalsIgnoreCase(selectedRegistryOld)){ return false; } return true; } COM: <s> indicates if the selected registry was changed </s>
funcom_train/10006747
/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("SharedSessionBean[lifecycle="); sb.append(this.lifecycle); sb.append(",dateProperty="); sb.append(dateProperty); sb.append(",stringProperty="); sb.append(this.stringProperty); sb.append("]"); return (sb.toString()); } COM: <s> return a string representation of this bean </s>
funcom_train/7972427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getZipFile() { JFileChooser chooser = new JFileChooser(); chooser.setFileFilter(new FileFilter() { @Override public boolean accept(File arg0) { return arg0.isDirectory() || arg0.getName().toLowerCase().endsWith(".zip"); } @Override public String getDescription() { return "Zip Files"; } }); int returnVal = chooser.showOpenDialog(this); if (returnVal == JFileChooser.APPROVE_OPTION) return chooser.getSelectedFile().getAbsolutePath(); return ""; } COM: <s> launch a chooser and get a zip file </s>
funcom_train/6265378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getProp(String name) { //If properties aren't loaded yet. We also need to make this thread //safe, so synchronize... if (properties == null) { synchronized (propertiesLock) { //Need an additional check if (properties == null) { loadProps(); } } } String property = properties.getProperty(name); if (property == null) { return null; } else { return property.trim(); } } COM: <s> gets a yazd property </s>
funcom_train/10016886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Icon getIcon(FileObject f) { Icon icon = null; if (f != null) { if (getFileView() != null) { icon = getFileView().getIcon(f); } if ((icon == null) && (uiFileView != null)) { icon = uiFileView.getIcon(f); } } return icon; } COM: <s> returns the icon for this file or type of file depending </s>
funcom_train/48613665
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PersonalItem createPersonalItem(PersonalCollection parentCollection, IrUser owner, String nameArticles, String name) { GenericItem genericItem = new GenericItem(nameArticles, name); genericItem.setOwner(owner); VersionedItem versionedItem = new VersionedItem(owner, genericItem); PersonalItem personalItem = parentCollection.addVersionedItem(versionedItem); personalItemDAO.makePersistent(personalItem); return personalItem; } COM: <s> create a personal item </s>
funcom_train/43393115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String buildXMLStr(StorageWorkflowNamesBean bean) throws Exception { try { String retStr = realBuildXMLStr(bean); // mindig meg kell hivni... workflowXMLService.closeConnection(); return retStr; } catch (Exception e) { // mindig meg kell hivni... workflowXMLService.closeConnection(); e.printStackTrace(); throw e; } } COM: <s> a parameterek ben bean megadott azonositok </s>
funcom_train/36236393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GroupOrientation getGroupOrientation() { PropertyEntity p = getPropertyByName(GROUP_ORIENTATION); if(p.getId() == 0 || p == null) { setGroupOrientation(GroupOrientation.VERTICAL); // standard value = 0 p = getPropertyByName(GROUP_ORIENTATION); } if(p.getValue().equals(GroupOrientation.VERTICAL.toString())) { return GroupOrientation.VERTICAL; } else { return GroupOrientation.HORIZONTAL; } } COM: <s> gets the property for the orientation of groups </s>
funcom_train/20881433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasValue(boolean kind, int beamernumber) { if (kind) { return !(this.BeamerValues[beamernumber - 1].get(0).equals("" + Integer.MAX_VALUE)); } else { return !(this.GUIValues[beamernumber - 1].get(0).equals("" + Integer.MAX_VALUE)); } } COM: <s> returns whether a setting is already saved in the array </s>
funcom_train/10801530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInFetchGroup(String fg) { if (_manage != MANAGE_PERSISTENT || isPrimaryKey() || isVersion()) return false; if (FetchGroup.NAME_ALL.equals(fg)) return true; if (FetchGroup.NAME_DEFAULT.equals(fg)) return isInDefaultFetchGroup(); return _fgSet != null && _fgSet.contains(fg); } COM: <s> whether this field is in the given fetch group </s>
funcom_train/27822639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Predicate generateRule(String expressionName) { if (expressionName==null) expressionName=generateExpressionName(); Term[] headTerms=getFreeTerms(); Predicate headPredicate=m_predicateFactory.getPredicate(expressionName,headTerms.length); m_rules.add(new Rule(null,new Literal(headPredicate,true,headTerms),getLiterals())); return headPredicate; } COM: <s> generates a rule from the current state of the builder </s>
funcom_train/21437763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean areValidPositions(Collection<Character> poss) { for( Character pos : poss ) { boolean found = false; for( int i=0; i<linkage_pos.length && !found; i++ ) { if( linkage_pos[i]==pos ) found = true; } if( !found ) return false; } return true; } COM: <s> return code true code if code poss code contains only </s>
funcom_train/20870155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String deleteInvoice() throws Exception { invoiceDetailForm = (InvoiceDetailForm) getForm(INVOICE_DETAIL_FORM); try { dataServiceLocator.getInvoiceService().deleteInvoice(new Long(invoiceDetailForm.getInvoiceId())); CustomerMapperFactory.getInvoiceMapper().mapToBean(new InvoiceVO(), invoiceDetailForm); } catch (InvoiceServiceException ex) { logger.error("DAO exception occured, cause: ", ex); MessageUtils.addErrorMessage("error.dataSource"); } return "invoiceDetail"; } COM: <s> deletes a invoice entry </s>
funcom_train/3590917
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AmgMetadataG addMetadata(FileDataSource lo, AmgMetadataG metadata) { Logger.getLogger(SamgiConstantsG.LOGGER).info("DocbookGeneratorG::addMetadata(FileDataSource, AmgMetadataG): " + lo.getName()); getDocbookInternalMetadata(lo, metadata); return metadata; } COM: <s> generate the docbook specific metadata that can be derived from the docbook file </s>
funcom_train/38306732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAreaLabel(int areaIdx) { String areaLabel = null; String[] areaLabels = getAreaLabels(); if ((areaLabels != null) && (areaIdx < areaLabels.length)) { areaLabel = areaLabels[areaIdx]; } else { areaLabel = ""; } return areaLabel; } COM: <s> gets the area label for the given index </s>
funcom_train/45250305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh(JobInfo info) { if (isUpdateJob(info.getJob())) { return; } synchronized (updateLock) { currentInfo.refresh(info); GroupInfo group = info.getGroupInfo(); if (group != null) { currentInfo.refresh(group); } } //Add in a 100ms delay so as to keep priority low scheduleUpdate(); } COM: <s> refresh the supplied job info </s>
funcom_train/46877809
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Document doGetDocumentWithInputStream(Map description,InputStream inputStream) { Document document = new Document(); //The text is analyzed and indexed but not stored document.add(Field.Text("contents", new InputStreamReader(inputStream))); if( description.get(FILENAME)!=null ) { document.add(Field.Keyword("type", "file")); document.add(Field.Keyword("filename", (String)description.get(FILENAME))); } return document; } COM: <s> this method indexes an input stream and specifies some additional </s>
funcom_train/26492753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String preHanldeInputString(String contentString) { if (DEBUG) logStream.println("DOMHolder.preHanldeInputString(): started..."); contentString = BabylonUtil.removeISOControl(contentString); contentString = BabylonUtil.dirtyMe(contentString); if (DEBUG) logStream.println("DOMHolder.preHanldeInputString(): complete."); return contentString; } COM: <s> this method removes bad characters in the input file </s>
funcom_train/25791981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double getYPosEndSwimlaneRectangle(VisualItem visualEntity) { int endTick = (Integer) visualEntity.get(Entity.ENDTICK_FIELDNAME); double endY; if (endTick > -1) { // Process are ended one tick later than the executed statement int actualEndTick = endTick + 1; endY = getYTimeTick(visualEntity.getVisualization(), actualEndTick); } else { endY = m_maxY; } if (endY < 0) { return 0; } return endY; } COM: <s> return the vertical position of the end of the rectangle on </s>
funcom_train/13531963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getProperty(String name,String lang) { ResourceBundle prop=null; Locale loc; if (lang == null) { prop = ResourceBundle.getBundle(KACOMA); } else { loc = new Locale(lang.toLowerCase(),""); prop = ResourceBundle.getBundle(KACOMA,loc); } return prop.getString(name); } COM: <s> get value from properties file </s>
funcom_train/3339690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File createDisk(File directory, String name, long size) throws IOException { if (!directory.isDirectory()) { throw new IllegalArgumentException(directory.getAbsolutePath() + " is not a directory"); } if (!directory.canWrite()) { throw new IllegalArgumentException(directory.getAbsolutePath() + " must be writable"); } return createDiskImpl(directory, name, size); } COM: <s> generic method for creating a vmware disk </s>
funcom_train/8685287
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void accountForIncludedDir(String name, File file, boolean fast) { processIncluded(name, file, dirsIncluded, dirsExcluded, dirsDeselected); if (fast && couldHoldIncluded(name) && !contentsExcluded(name)) { scandir(file, name + File.separator, fast); } } COM: <s> process included directory </s>
funcom_train/42418899
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e){ try{ //the current page is the last, remove it String curl = (String)history.lastElement(); history.removeElement(curl); curl = (String)history.lastElement(); System.out.println("Back to " + curl); setPage(jep,curl); label.setText("<html><b>URL:</b> "+ curl); if (history.size() == 1) backButton.setEnabled(false); } catch (Exception ex){ System.out.println("Exception " + ex); } } COM: <s> the action is to show the last url in the history </s>
funcom_train/9280501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isSlaveFactorySet() { if (slaveFac != null) { return true; } try { slaveFac = (SlaveFactory)Monitor. findServiceModule(this, SlaveFactory.MODULE); return true; } catch (StandardException se) { // We get a StandardException if SlaveFactory has not been // booted yet. Safe to retry later. return false; } } COM: <s> if slave fac the reference to the slave factory has not already </s>
funcom_train/37152546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public NeuralNetwork configuredNetworkFactory() { try { NeuralNetwork res = (NeuralNetwork) getBindedNetworkClass().newInstance(); res.setup(this); return res; } catch (ConfigurationException e) { throw new YawnRuntimeException(e); } catch (InstantiationException e) { throw new YawnRuntimeException(e); } catch (IllegalAccessException e) { throw new YawnRuntimeException(e); } } COM: <s> a factory of ready to train and use neural networks </s>
funcom_train/31929615
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void executeTrace(List<Interpreter.Instruction> trace, int pc) { Iterator<Interpreter.Instruction> instructions = trace.iterator(); while (true) { Interpreter.Instruction instr = instructions.next(); instr.execute(); if (instructions.hasNext()) { pc = instr.getSuccessor(pc); ps.setCurrentInstructionAddress(pc); } else break; } } COM: <s> executes a list of instructions </s>
funcom_train/51206185
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeGroupItemActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_removeGroupItemActionPerformed {//GEN-HEADEREND:event_removeGroupItemActionPerformed if(lastNode != null && lastNode.getUserObject() instanceof Group) removeNode(lastNode); }//GEN-LAST:event_removeGroupItemActionPerformed COM: <s> p called when remove group is selected in the group popup menu </s>
funcom_train/1663969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getSelectedQueries() { final Vector queries = new Vector(); final Vector initialQueries = tableModel.getQueries(); if(selectedRows == null) return queries; /* Create a separate vector to avoid collisions */ for(int i = 0 ; i < selectedRows.length; i++) { if (initialQueries.size() > selectedRows[i]) queries.add(initialQueries.get(selectedRows[i])); } return queries; } COM: <s> return a vector made of fcptransfer queries </s>
funcom_train/24000674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDoBind() { NullLiteralAst instance = new NullLiteralAst(-1, TokenFactory.createToken(-1), null); assertEquals(OclTypeRegistry.OCLVoid,instance.doBind(null)); instance = new NullLiteralAst(-1, TokenFactory.createToken(-1), "Boolean"); assertEquals(OclTypeRegistry.OclBooleanType,instance.doBind(null)); } COM: <s> test of do bind method of class null literal ast </s>
funcom_train/3785557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFileName(String file) { /* getFileName */ String sR= file; int i= file.lastIndexOf('/'); if(i!=-1) sR= file.substring(i+1); /* move last last '/' */ return(sR); } /* getFileName */ COM: <s> get file name get the file name after last if any </s>
funcom_train/2884315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initiateConnection(Identity id, MessageConnection con, HeartbeatMsg hb) { BlockingConnectionInitiator initiator = null; try { initiator = new BlockingConnectionInitiator(id, con, connectionSet, hb, wireSecurity); } catch (Exception ex) { if( log.isErrorEnabled() ) log.error("Error initiating a blocking connection", ex); return; } initiator.setDaemon(true); initiator.start(); } COM: <s> asynchronously initiate a new connection </s>
funcom_train/31839398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructionParser(){ StringBuffer wikiContent = new StringBuffer(); wikiContent.append("|first cell(1)|second cell(1)|third cell(1)\n"); wikiContent.append("|first cell(2)|second cell(2)|third cell(2)\n"); wikiContent.append("|first cell(3)|second cell(3)|third cell(3)\n"); WikiTable table = new WikiTable(wikiContent.toString()); assertEquals(wikiContent.toString(), table.render()); } COM: <s> read in the wiki content and render the table object without modification </s>
funcom_train/130170
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void readState () { try { sendHeader (PLAYER_MSGTYPE_REQ, 1); /* 1 byte payload */ os.writeByte (PLAYER_LOG_GET_STATE_REQ); os.flush (); } catch (Exception e) { System.err.println ("[Log] : Couldn't send PLAYER_LOG_GET_STATE_REQ " + "command: " + e.toString ()); } } COM: <s> configuration request get state </s>
funcom_train/31236832
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void goHome() { InputStream is = null; try { mjEditorPane.setContentType("text/html"); // is = getClass().getClassLoader().getResourceAsStream(ABOUT_PAGE); // if (is != null) { // mjEditorPane.read(is, null); mjEditorPane.setPage(ABOUT_PAGE); // } } catch(IOException ex) { } finally { IoUtils.close(is); } } COM: <s> display about page </s>
funcom_train/29391754
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void writeXml(Object aObject) { writeHeader(); String xmlData = XmlUtils.xstream.toXML(aObject); out.println(xmlData); writeFooter(); if ( LOG.isDebugEnabled()){ LOG.debug("\n" + xmlData + "\n"); } } COM: <s> writes an object with xstream parser to the response </s>
funcom_train/43106932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setGeoPosition(String lat, String lng) { String regex = "-?([0-9]{1,3})\\.([0-9]{3,6})"; if(!lat.matches(regex) || !lng.matches(regex)) { return false; } double dlat = Double.parseDouble(lat), dlng = Double.parseDouble(lng); if(Math.abs(dlat) > 90D && Math.abs(dlng) > 180D) return false; start_coords[0] = lat; start_coords[1] = lng; return true; } COM: <s> set the users default latitude and longitude </s>
funcom_train/4193494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onTransSuccessResponse(TransactionClient tc, Message resp) { printLog("onTransSuccessResponse()",LogLevel.MEDIUM); StatusLine status_line=resp.getStatusLine(); if (listener!=null) listener.onDlgNotificationSuccess(this,status_line.getCode(),status_line.getReason(),resp); } COM: <s> when the transaction client goes into the completed state receiving a 2xx response </s>
funcom_train/29287598
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected VisualModel getVisualForModel(List children, Object model) { VisualModel retVisual = null; for (Iterator iter=children.iterator(); iter.hasNext() && retVisual == null;) { VisualModel visual = (VisualModel) iter.next(); if (visual.getSemanticModel() == model) retVisual = visual; else retVisual = getVisualForModel(visual.getChildren(), model); } return retVisual; } COM: <s> resturns the visual model that has as its semantic model the parameter model </s>
funcom_train/18097959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean deleteFrame(int frameOrientation) { Container frame; switch (frameOrientation) { case Graphics.TOP: frame = this.topFrame; this.topFrame = null; break; case Graphics.BOTTOM: frame = this.bottomFrame; this.bottomFrame = null; break; case Graphics.LEFT: frame = this.leftFrame; this.leftFrame = null; break; case Graphics.RIGHT: frame = this.rightFrame; this.rightFrame = null; break; default: return false; } if (frame == null) { return false; } if (frame == this.currentlyActiveContainer) { setActiveFrame( this.container ); } frame.hideNotify(); requestInit(); return true; } COM: <s> deletes a complete frame </s>
funcom_train/6439850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stopCM(String cmSession) { StringBuffer cmdstr = new StringBuffer("ccm stop"); try { msgReceiver.addLog(cmSession); execCM(cmdstr, cmSession, null); } catch (CMExitCodeException e) { msgReceiver.addError(e); // throw e; } } COM: <s> logoff the current user from the cm server </s>
funcom_train/6268216
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SIPHeader parse() throws ParseException { if (debug) dbg_enter("SIPEtag.parse"); SIPETag sipEtag = new SIPETag(); try { headerName(TokenTypes.SIP_ETAG); this.lexer.SPorHT(); this.lexer.match(TokenTypes.ID); Token token = lexer.getNextToken(); sipEtag.setETag(token.getTokenValue()); this.lexer.SPorHT(); this.lexer.match('\n'); return sipEtag; } finally { if (debug) dbg_leave("SIPEtag.parse"); } } COM: <s> parse the string header </s>
funcom_train/39537256
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void concatenateMatrix(SVGTransformMatrix matrix){ AffineTransform newTransform=new AffineTransform( matrix.getA(), matrix.getB(), matrix.getC(), matrix.getD(), matrix.getE(), matrix.getF()); transform.preConcatenate(newTransform); } COM: <s> concatenates a transform matrix to the matrix </s>
funcom_train/23931823
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TreeMapNode buildLeaf(Object value, TreeMapNode parent) { TreeMapNode node = new TreeMapNode(value, getWeight(value)); if (parent != null) { parent.add(node); } else if (this.root == null) { this.root = node; } return node; } COM: <s> add a leaf to the tree </s>