__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/2901959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getExtensionPoints() { try { Session hSession = HibernateSession.openSession(); List extPoints = hSession.find("from ExtensionPoint as ep"); HibernateSession.closeSession(hSession); return extPoints; } catch (HibernateException e) { log.error("Unable to get extension points!", e); } return Collections.EMPTY_LIST; } COM: <s> returns list of extension points saved in database </s>
funcom_train/964896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addGriddedGrowing(JComponent component) { getLayout().appendColumn(FormFactory.GROWING_BUTTON_COLSPEC); getLayout().addGroupedColumn(getColumn()); component.putClientProperty(NARROW_KEY, Boolean.TRUE); add(component); nextColumn(); } COM: <s> adds a gridded component that grows </s>
funcom_train/18112471
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private XMLTextPane getXmlEditorPane() { if (xmlEditorPane == null) { xmlEditorPane = new XMLTextPane(); xmlEditorPane.setEditable(false); xmlEditorPane.setProgressBar(getJProgressBar()); //xmlEditorPane.setFont(new java.awt.Font("Courier New", java.awt.Font.PLAIN, 12)); } return xmlEditorPane; } COM: <s> this method initializes xml editor pane </s>
funcom_train/25205371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PlWriter addFixWord(TfmFixWord fw, String name) { if (fw != null && fw.getValue() != 0) { plopen(name).addReal(fw).plclose(); } else { if (printZeroWidth && "CHARWD".equals(name)) { plopen(name).addReal(0.0d).plclose(); } } return this; } COM: <s> add a fixword </s>
funcom_train/4022036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* * public void QuestSecondFase(G_Player player){ S_Client client = * S_Server.getInstance().getNetworkModule().getClient(player); * * if(client==null) return; * * String packetData = "qt nt\n"; * S_Server.getInstance().getNetworkModule().SendPacket * (client.networkId,packetData); } COM: <s> quest points reached zero </s>
funcom_train/34999165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Pagination forPostReports(int totalRecords) { this.recordsPerPage = this.config.getInt(ConfigKeys.TOPICS_PER_PAGE); this.totalRecords = totalRecords; this.totalPages = this.calculeTotalPages(); this.thisPage = this.calculeThisPage(this.start); this.start = this.calculeStart(this.start, this.recordsPerPage); this.baseUrl = String.format("/%s/%s", Domain.POST_REPORT, Actions.LIST_RESOLVED); this.id = 0; return this; } COM: <s> create pagination for post reports </s>
funcom_train/39107768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HTMLDiv breadcrumbTrail(String breadcrumbs) { HTMLDiv bc = new HTMLDiv(); if (breadcrumbs != null && breadcrumbs.length() > 0) { bc.setCLASS(StylesheetClasses.BREADCRUMB_CLASS); HTMLSpan bcs = new HTMLSpan(breadcrumbs); bc.add(bcs); return bc; } else { return new HTMLInvisibleDiv(); } } COM: <s> returns breadcumb menu in a div unless there are no breadcrumbs </s>
funcom_train/29031295
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handle(BuildTowerMessage m) { String type = m.getTowerType(); Point position = m.getPosition(); BuildTowerRoundMessage n = new BuildTowerRoundMessage(); n.setRoundId(this.maxTick + IConstants.USER_ACTION_DELAY); n.setPlayerId(m.getClientId()); n.setTowerType(type); n.setTowerPosition(position); n.setTowerId(this.nextTowerId++); this.getGame().sendAll(n); } COM: <s> handles the build tower message </s>
funcom_train/3763579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void executeFullWorkflow(ProcessInstance processInstance){ // After construction the process execution has one main path // of execution (the root token). Token token = processInstance.getRootToken(); // Also after construction the main path of execution is positioned // in the startstate of the process definition. log.debug(token.getNode()); // Let's start the process execution leaving the startstate // over its default transition. while (!processInstance.hasEnded()) { token.signal(); } } COM: <s> this does the actual hard work but by delegating to it allows </s>
funcom_train/34289209
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processCell(HSSFCell cell, StringBuilder builder) { String value = ""; switch (cell.getCellType()) { case HSSFCell.CELL_TYPE_NUMERIC: value = Double.toString(cell.getNumericCellValue()); break; case HSSFCell.CELL_TYPE_STRING: value = cell.getRichStringCellValue().getString(); break; default: break; } if (!value.equals("")) { builder.append(value); builder.append(" "); } } COM: <s> add the cellss content to the stringbuilder if appropiate content i </s>
funcom_train/38541238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setValue(int col, int row, double val) { if (col < 0 || col >= this.colCount) throw new IllegalArgumentException("column index is out of range"); if (row < 0 || row >= this.rowCount) throw new IllegalArgumentException("row index is out of range"); int cidx = this.colId[col]; int ridx = this.rowId[row]; setInternalValue(cidx, ridx, val); } COM: <s> changes a value at a corresponding row and index </s>
funcom_train/28694141
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeLayoutComponent( Component component) { if ( component != null) { if ( centerComponent != null && centerComponent.equals( component)) { centerComponent = null; } else if ( topLeftComponent != null && topLeftComponent.equals( component)) { topLeftComponent = null; } else if ( bottomRightComponent != null && bottomRightComponent.equals( component)) { bottomRightComponent = null; } } } COM: <s> removes the specified component and constraints from the layout </s>
funcom_train/24000736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUpdateState() throws Exception { IteratorAst instance = new TestIterator(); LoopState state = new LoopState(); instance.updateState(null, state, null, null); assertEquals("Update",state.results); assertTrue(state.exitEarly); } COM: <s> test of update state method of class iterator ast </s>
funcom_train/32057080
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBarValue() { System.out.println("testGetBarValue"); GPBarEntry be = new GPBarEntry( "barkey", 10, "barvalue" ); String str = be.getBarValue(); assertEquals( str, "barvalue" ); } COM: <s> test of get bar value method of class gpbar entry </s>
funcom_train/4923962
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMatchByListenerType() { this.recordEvent(1, MockOneListener.class, "EVENT", null); this.recordInit(new CometInterest(MockOneListener.class.getName(), null)); this.recordResponse(new CometEvent(1, MockOneListener.class.getName(), "EVENT", null)); this.doTest(); } COM: <s> ensure pick up published event </s>
funcom_train/43475271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void leave() { Iterator[] c = { incommingSet.iterator(), outcommingSet.iterator(), neighbourSet.getNeighbourSet().iterator(), }; int[] msgtype = { CLOSE_LONG_CONNECT, CLOSE_LONG_CONNECT, CLOSE_NEIGHBOUR_CONNECT, }; for(int i = 0; i < c.length; i++) { Iterator it = c[i]; while (it.hasNext()) { NodeHandle current = (NodeHandle) it.next(); sendMessage(nodeHandle, current, current, msgtype[i], REFRESH, null); } } this.fixedNeighbours = true; this.alive = false; } COM: <s> leaves the node from the overlay network </s>
funcom_train/13272155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPointAt(float x, float y, float margin) { for (float [] point : getPoints()) { if (Math.abs(x - point[0]) <= margin && Math.abs(y - point[1]) <= margin) { return true; } } return false; } COM: <s> returns code true code if one of the corner of this piece is </s>
funcom_train/37833128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notifyOffline(final String who) { boolean found = false; if (containsKey("buddies", who)) { put("buddies", who, false); found = true; } if (found) { if (has("offline")) { put("offline", get("offline") + "," + who); } else { put("offline", who); } } } COM: <s> notifies this player that the given player has logged out </s>
funcom_train/1842599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getModifiersString() { StringBuffer s = new StringBuffer(); // public: all events are public // abstract: scheduled events can not be abstract // final: not important, omit // native: not important, omit if (Modifier.isStatic(method.getModifiers())) { s.append("static "); } return s.toString().trim(); } COM: <s> return event target method modifiers as string </s>
funcom_train/50569666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveParameters(Breakpoint bp) { LineBreakpoint lb = (LineBreakpoint) bp; String l = lineTextField.getText(); try { Integer i = Integer.parseInt(l); lb.setLineNumber(i); } catch (NumberFormatException nfe) { // Input should have already been validated. ErrorManager.getDefault().notify(nfe); } } COM: <s> saves the values from the fields of this editor to the given breakpoint </s>
funcom_train/2882261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changeDA(String da) { String tmp = da; int index = tmp.indexOf(" "); dirAgent = tmp.substring(0, index); append("--Using " + dirAgent + " as DA"); if (tcp != null) { // close previous tcp connection tcp.close(); tcp = null; } } COM: <s> sets the currently used da </s>
funcom_train/19088158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getClassFromJar(File jarfile, String classname,ClassFileRepository rep) { Class cl=null; String classfilename=classname.replace('.','/').concat(".class"); byte[] classbytes=getBytesFromJar(jarfile,classfilename); if(classbytes!=null) { try { GOAClassLoader l=getClassRepositoryLoader(rep.getRepositoryPath()); cl = l.defineClass(classname, classbytes, 0, classbytes.length ); } catch(ClassFormatError cfe) { cl=null; } } return cl; } COM: <s> returns a class from a jar file </s>
funcom_train/39166203
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getFMeasureLenient(double beta){ double precision = getPrecisionLenient(); double recall = getRecallLenient(); double betaSq = beta * beta; double answer = (double)(((double)(betaSq + 1) * precision * recall) / ((double)betaSq * precision + recall)); if(Double.isNaN(answer)) answer = 0.0; return answer; } COM: <s> gets the lenient f measure f measure where the lenient precision and </s>
funcom_train/39315191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testZoom1ActionPerformed() { System.out.println("testZoom1ActionPerformed"); f.zoom1ActionPerformed(actionEvent); //t.zoom1ActionPerformed(actionEvent); assertEquals(1,(int) f.center.getZoom()); //assertEquals(1,(int) t.center.getZoom()); assertEquals(f.zoom1, f.curZoom); } COM: <s> test of zoom1 action performed method of class terp paint </s>
funcom_train/3698527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { Log.log(Level.INFO,"Processing","run","start run"); try { handleRequest(allRequests); user.addResponses(getResponses()); } catch(Exception e){ e.printStackTrace(); } Log.log(Level.INFO,"Processing","run","end run"); } COM: <s> the runs method of the thread </s>
funcom_train/20798175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void postGrammarEvent(final GrammarEvent event) { final SpeechEventExecutor executor = recognizer.getSpeechEventExecutor(); final Runnable runnable = new Runnable() { public void run() { fireGrammarEvent(event); } }; try { executor.execute(runnable); } catch (RuntimeException ex) { ex.printStackTrace(); } } COM: <s> utility function to generate grammar event and post it to the event </s>
funcom_train/33352729
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getChooseFileButton() { if (chooseFileButton == null) { chooseFileButton = new JButton(); chooseFileButton.setText("Choose File..."); chooseFileButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { selectStickFigureFile(); } }); } return chooseFileButton; } COM: <s> this method initializes choose file button </s>
funcom_train/7518272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(Cargo entity) { EntityManagerHelper.log("saving Cargo instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved cargo entity </s>
funcom_train/36547450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean validateRequestParameterToken( String requestToken ) { boolean tokenOk = true; // check if the parameter is an integer if ( !Pattern.matches( "^[0-9]+$", requestToken ) ) { // reset the parameter id level idLevel = 0; // validate and initialise the parameter tokenOk = initRequestParameterString( requestToken ); } else { // validate and initialise the parameter tokenOk = initRequestParameterInteger( requestToken ); } return tokenOk; } COM: <s> validate request parameter token </s>
funcom_train/8632146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertRow() throws SQLException { try { debugCodeCall("insertRow"); checkUpdatable(); if (insertRow == null) { throw Message.getSQLException(ErrorCode.NOT_ON_UPDATABLE_ROW); } getUpdatableRow().insertRow(insertRow); insertRow = null; } catch (Exception e) { throw logAndConvert(e); } } COM: <s> inserts the current row </s>
funcom_train/3729804
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public abstract class RepositoryType{ /** * RepositoryType name */ private String name; /** * Construct a RepositoryType * @param name */ protected RepositoryType(String name){ setName(name); } /** * Returns the name. * @return String */ public String getName() { return name; } /** * Sets the name. * @param name The name to set */ private void setName(String name) { this.name = name; } /** * Subclasses should implement this method * for checking type consistency of Repository operations * @return boolean True if Repository operation could be done */ public abstract boolean fuelCanChange(); } COM: <s> repository type defines repository behavior </s>
funcom_train/5402734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeKey(String key) { for (Iterator iter = bundles.keySet().iterator(); iter.hasNext();) { Locale locale = (Locale) iter.next(); Bundle bundle = getBundle(locale); BundleEntry entry = getBundleEntry(locale, key); if (entry != null) { bundle.removeEntry(entry); refreshKeys(); fireModify(bundle); } } } COM: <s> removes bundle entries matching the given key in all bundles </s>
funcom_train/22024179
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hingeComputeInitialRelativeRotation() { if (getBody(0) != null) { if (getBody(1) != null) { Quaternion q = new Quaternion( getBody(0).getQuaternion() ); q.invert(); q.mul( getBody(1).getQuaternion(), qrel ); } else { qrel.set( getBody(0).getQuaternion() ); qrel.invert(); } } } COM: <s> sets qrel to the current orientation of body 0 relative to </s>
funcom_train/37648613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testEquals3() { Property p1 = new Property(); p1.setName("p1"); p1.setValue("value1"); Property p2 = new Property(); p2.setName("p1"); p2.setValue("value2"); assertFalse("2 properties must be different if their values are different", p1.equals(p2)); } COM: <s> 2 properties are diffrent if their value are different </s>
funcom_train/36048026
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void configurationChanged(ConfigurationChangeEvent evt) { if (evt.getPropertyName().equals(EDITOR_EXECUTED_LINE_COLOR) || evt.getPropertyName().equals(EDITOR_BREAKPOINT_COLOR) || evt.getPropertyName().equals(EDITOR_SYNTAX_ERROR_COLOR)) { reloadConfiguration(); repaint(); } } COM: <s> inmplementation of the configuration change listener which is called </s>
funcom_train/48407251
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addKeyPraticesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MaturityElementLevel_keyPratices_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MaturityElementLevel_keyPratices_feature", "_UI_MaturityElementLevel_type"), SpemxtcompletePackage.eINSTANCE.getMaturityElementLevel_KeyPratices(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the key pratices feature </s>
funcom_train/2272465
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSession( KerberosSession session) { kerbSessionsByThumbprint.put( session.getThumbPrintEncoded(), session); kerbSessionsByPrincipalNames.put( session.getPrincipalKey(), session); localSession = new ThreadLocal<KerberosSession>(); localSession.set( session); } COM: <s> add a kerberos session to the cache </s>
funcom_train/38517938
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isInScope( SaveConfigEnvironment env ) { String [] savePkgs = env.pkgNames(); for( int i=0; i<savePkgs.length; i++ ) for( int j=0; j<packages.length; j++ ) if( savePkgs[i].equals( packages[j] ) ) return true; return false; } COM: <s> does the config environment imply this config file must be saved </s>
funcom_train/15930974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ParallelDoubleArray allUniqueElements() { PAS.UniquifierTable tab = new PAS.UniquifierTable (fence - origin, this, false); PAS.FJDUniquifier f = new PAS.FJDUniquifier (this, origin, fence, null, tab); ex.invoke(f); double[] res = tab.uniqueDoubles(f.count); return new ParallelDoubleArray(ex, res); } COM: <s> returns a new parallel double array containing only unique </s>
funcom_train/19978074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int insert(QueryData what, String jobmessage) { String query = query = "INSERT INTO " + table + " (" + what.getKeysString() + " ) VALUES (" + what.getValuesString() + ") "; return freeUpdateQuery(query, mpv5.usermanagement.MPSecurityManager.CREATE_OR_DELETE, jobmessage).getId(); } COM: <s> insert values to db </s>
funcom_train/50576498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sortByTitle() { ft.setRootObject(null); ((DirectoryContents)contents).sortByAlbum(true); ft.setRootObject(contents); ft.fireDataChanged(); sortField = TITLE_FIELD; TuneologyPrefs.setChildValue(prefs, "sortField", Integer.toString(sortField)); } COM: <s> sort the display by title </s>
funcom_train/33731273
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Point screenCornerToCenter(Point screenCorner) { double x = screenCorner.getX() - (DEBUG_WIDTH - 2 * DEBUG_RADIUS) / 2 - DEBUG_RADIUS; double y = screenCorner.getY() - (DEBUG_HEIGHT - 2 * DEBUG_RADIUS) / 2 - DEBUG_RADIUS; return new Point((int) x, (int) y); } COM: <s> translate the screen points with origin at the top left corner to </s>
funcom_train/24558013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Activity findById(java.lang.String id) { log.debug("getting Activity instance with id: " + id); try { Activity instance = (Activity) getHibernateTemplate().get("org.actioncenters.activitylog.db.data.Activity", id); return instance; } catch (RuntimeException re) { log.error("get failed", re); throw re; } } COM: <s> find by id </s>
funcom_train/39255964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValue(String property) { try { //Attempt to find the property Object o = this.getClass().getDeclaredField(property).get(this); //If we have it, return it if(o!=null) return o; } catch(Exception e) { } try { //Otherwise, lets check for a superclass Object o = this.getClass().getSuperclass().getDeclaredField(property).get(this); //Return it return o; } catch(Exception e) { return null; } } COM: <s> this returns a property value for the property name passed in </s>
funcom_train/4508567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void processIQ(IQ packet) throws UnauthorizedException { // Ensure that connection was secured if TLS was required if (connection.getTlsPolicy() == Connection.TLSPolicy.required && !connection.isSecure()) { closeNeverSecuredConnection(); return; } router.route(packet); session.incrementClientPacketCount(); } COM: <s> process the received iq packet </s>
funcom_train/8288036
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getApplicationContext(){ String url = ""; if (null==serverPort || "80".equals(serverPort) || "".equals(serverPort)){ url+="http://"+serverName+urlBinding; } else { url+="http://"+serverName+":"+serverPort+urlBinding; } return url; } COM: <s> get the server application context </s>
funcom_train/42516826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void die() { // System.out.println(instanceName+"/"+abstractName+": die at "+relativetime); for(ConnectionStore connectionStore:connections){ DestinationStore dest=connectionStore.getDestination(); Disconnectable el=(Disconnectable)dest.getElement(); el.disconnect(connectionStore); } for(EventMixer mx:mixerConnections)try{ ((Disconnectable)(mx.conn.getDestination().getElement())).disconnect(mx.conn); }catch(Exception ex){ // cannot help it right now } connections.clear(); mixerConnections.clear(); } COM: <s> die cleanup everything </s>
funcom_train/32719606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (obj instanceof ByteArrayWindow) { ByteArrayWindow other = (ByteArrayWindow) obj; if (other.length != length) { return false; } for (int i=0; i<length; i++) { if (other.value[i] != value[i]) { return false; } } return true; } return false; } COM: <s> indicates whether some other object is equal to this one </s>
funcom_train/50695701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void calculateStructuresAllExcept(BitSet alreadyDefined, boolean addFileData) { freezeModels(); for (int i = modelCount; --i >= 0;) if (models[i].isPDB && !alreadyDefined.get(i)) models[i].calculateStructures(); setStructureIds(); if (addFileData) propagateSecondaryStructure(); } COM: <s> allows rebuilding of pdb structures </s>
funcom_train/50440223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPath(String path){ String m_strFileSep=System.getProperty("file.separator"); String m_strHomeDir=System.getProperty("user.home"); this.m_strPath=m_strHomeDir+m_strFileSep+"bin"+m_strFileSep+path; // System.out.println(m_strPath); } COM: <s> sets the root path string </s>
funcom_train/18594221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp() throws Exception { if (oldContext == null) { oldContext = new AWTFixtureHelper(); } runner = new StepRunner(oldContext); // Support for deprecated ComponentTester.assertFrameShowing usage // only. Eventually this will go away. AWTHierarchy.setDefault(runner.getHierarchy()); } COM: <s> saves the current ui state for restoration when the </s>
funcom_train/34608008
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Action getAction() { double toCall = gi.getAmountToCall(ourSeat); if (getAlwaysCallMode()) { return Action.checkOrFoldAction(toCall); } if (gi.isPreFlop()) { return preFlopAction(); } else { return postFlopAction(); } } COM: <s> requests an action from the player </s>
funcom_train/2868873
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TerminalState createTerminalState() { boolean useKeypad = false; if (isPropertyDefined (KEYPAD)) { useKeypad = getBooleanProperty(KEYPAD); } String schemeName = getStringProperty(COLORSCHEME, h3270Config.getColorSchemeDefault()); ColorScheme scheme = h3270Config.getColorScheme (schemeName); return new TerminalState (useKeypad, scheme); } COM: <s> creates a new terminal state object initialized from the default </s>
funcom_train/22261070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int handle_mdtm(String line, StringTokenizer st) { if (checkLogin() && checkRead()) { String filename = null; filename = line.substring(4); if (filename.equals("\\")) return sendReply(550, "File not found."); File file = new File(createNativePath(filename)); long time = file.lastModified(); Date date = new Date(time); SimpleDateFormat dtgFormat = new SimpleDateFormat("yyyyMMddHHmmss"); return sendReply(213, dtgFormat.format(date)); } else return sendReply(530, "Please login with USER and PASS."); } COM: <s> handler for the mdtm command 213 </s>
funcom_train/15607519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CompoundFeatureBean getModelForInternalAccession(String accession) { try { OID featureOID = mInternalAccessionRegistry.get(accession); if (featureOID != null) return (CompoundFeatureBean)getOrLoadBeanForOid(featureOID); else return null; } catch (ClassCastException cce) { FacadeManager.handleException(new IllegalArgumentException("Requested transcript accession for non-transcript feature", cce)); } // End catch block for getter. return null; } // End method: getModelForInternalAccession COM: <s> returns a transcript model given accession number </s>
funcom_train/2675297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Ping decodePing(ByteBuffer in) { final Ping ping = new Ping(); ping.setDebug(in.getHexDump()); ping.setValue1(in.getShort()); ping.setValue2(in.getInt()); if (in.hasRemaining()) { ping.setValue3(in.getInt()); } if (in.hasRemaining()) { ping.setValue4(in.getInt()); } return ping; } COM: <s> decodes ping event </s>
funcom_train/49159786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Match getMatch(Team team) { for (int i = 0; i < matches.size(); i++) { Match tmp = matches.get(i); if (tmp.getTeamHome().equals(team) || tmp.getTeamAway().equals(team)) { return tmp; } } return null; } COM: <s> returns match of a team </s>
funcom_train/43134895
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateLoadingScreen() { if (this.loadingThread.isAlive()) { this.loadingCount = (++this.loadingCount) % 4; try { Thread.sleep(Resources.GAME_DELAY); } catch (InterruptedException e) { // Do nothing. } } else { if (this.loadingThread != null) { this.loadingThread = null; this.loadingOnBackground = false; this.showLoading = false; this.screenToPaintLoading.freeLoadingScreenResources(); this.screenToPaintLoading = null; } } } COM: <s> updates the loading screen state </s>
funcom_train/18104952
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { synchronized (mutex) { systemShutdown = true; for (int i = 0; i < nmidlets; i++) { if (midlets[i].getState() != MIDletState.DESTROYED) { midlets[i]. setStateWithoutNotify(MIDletState.DESTROY_PENDING); } } mutex.notify(); } } COM: <s> shutdown all running midlets and prepare the midp runtime </s>
funcom_train/17915294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InputStream getResourceAsStream(String name) { ClassLoader parent = getParent(); if(parent != null) { InputStream stream = parent.getResourceAsStream(name); if(stream != null) { return stream; } } try { CDRArchiveEntry cdrarEntry = cdrarStore.getEntry(name); return new ByteArrayInputStream(cdrarEntry.getEntryBytes()); } catch (CDRArchiveEntryNotFoundException e) { // OK, return null. } return null; } COM: <s> overriding get resource as stream to provide access to the cdrar loaded </s>
funcom_train/26631093
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initPropertyCreated(PropertyInit init) { super.initPropertyCreated(init); Class[] beanTypes = init.getPropertyTypes(); // Validation.isTrue(beanTypes[2].isInterface(), "Bean type must be an interface"); Validation.isTrue(Bean.class.isAssignableFrom(beanTypes[2]), "Bean type " + beanTypes[2] + " must implement Bean"); } COM: <s> initialize the map after the constructor </s>
funcom_train/17048666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleHit(int rank, float score, int docID, Document doc) { final Map<String, String> storedFields = (luceneFields == null) ? null : luceneFields.getStoredFields(doc); this.searchHits.add(new SearchHit(rank, score, docID, storedFields)); } COM: <s> handle the given hit </s>
funcom_train/18050049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JdxInterface getJdxInterface(InputStream in) { d.method("getJdxInterfaceDoc(InputStream in)"); d.out("stream at " + in); JdxInterface jdxI = null; try{ SAXBuilder builder = new SAXBuilder(); builder.setEntityResolver(new JdxEntityResolver()); Document doc = builder.build(in, Constants.XML_SAX_SYSTEM_ID); //TODO: Add a validator here! jdxI = new JdxInterface(doc); } catch (Exception ex) { JdxLog.logError(ex); } return jdxI; } COM: <s> retrieve the configuration object from the given xml input stream </s>
funcom_train/34950029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateGeometricState(float time, boolean initiator) { if (newSkeletonAssigned) { assignSkeletonBoneInfluences(); } if (skin != null && needsRefresh) { updateSkin(); if (recalcBounds) { skin.updateModelBound(); } needsRefresh = false; } super.updateGeometricState(time, initiator); } COM: <s> update geometric state overrides spatials update geometric state to update </s>
funcom_train/39117073
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPriority(String priority) throws IllegalArgumentException { if (priority == null) { throw new IllegalArgumentException("The priority must not be null."); } if (priority.compareTo(HIGH_PRIORITY) == 0 || priority.compareTo(NORMAL_PRIORITY) == 0 || priority.compareTo(LOW_PRIORITY) == 0) { this.priority = priority; } } COM: <s> set the priority of the message to send </s>
funcom_train/23652302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeHeader(final Writer out) throws IOException { boolean first = true; for (Statistic statistic : group.getStatistics()) { if (!first) { out.append(" "); } first = false; String name = statistic.getName(); assert name != null : "Statistic name cannot be null."; out.append(statistic.getName().replaceAll("\\s", "-")); } out.append(String.format("%n")); } COM: <s> writes out the headers </s>
funcom_train/20827326
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int channelIndex(final Dimmer dimmer) { int channelIndex = -1; if (dimmer.getChannel() != null) { channelIndex = dimmer.getChannel().getId(); } else if (isPrePatch()) { channelIndex = dimmer.getId() + PRE_PATCH_START; } return channelIndex; } COM: <s> gets the channel index that can be used to fade in the dimmer </s>
funcom_train/2546896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getTargetWorkflowConnections() { ArrayList connList = new ArrayList(); for (int i = 0; i < targetConnections.size(); i++) { if (targetConnections.get(i) instanceof WorkflowConnectionModel) { connList.add(targetConnections.get(i)); } } return connList; } COM: <s> gets a list of workflow connections for which this element is the target </s>
funcom_train/28494586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createLongEditor() { GridData gridData1 = new GridData(); gridData1.grabExcessHorizontalSpace = true; gridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL; longEditor = new LatLongEditor(group, _cols, SWT.NONE); longEditor.setLayoutData(gridData1); longEditor.addModifyListener(new ModifyListener(){ public void modifyText(ModifyEvent e) { onModified(e); }}); } COM: <s> this method initializes long editor </s>
funcom_train/27866652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void configure() throws InitializationException { try { Property prop = Property.load(Constants.MSH_CLIENT_PROPERTY_FILE); configure(prop); } catch (IOException e) { throw new InitializationException("Cannot open property file " + Constants.MSH_CLIENT_PROPERTY_FILE); } isConfigured = true; } COM: <s> configure the class if and only if it has not been configured </s>
funcom_train/2878004
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean onChildTerminated(TerminationRecord status, Prim comp) { try { sfDetachAndTerminate(status); } catch (Exception e) { if (sfLog().isErrorEnabled()) { sfLog().error(sfCompleteNameSafe() + " - error handling child termination ", e); } } return false; } COM: <s> it simply detaches itself from its parent and then terminates </s>
funcom_train/45075140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logout() throws AuthenticationFailure { // org.omg.CORBA.Principal p1 = _principal(); // byte[] prinName = p1.name(); byte[] prinName = new String("nobody").getBytes(); if (debug) { String sName = new String(prinName); System.out.println("Logout called with Principal, " + "Num val users = " + validatedUsers.howMany()); } validatedUsers.deleteUser(prinName); } COM: <s> logs out the validated user on this connection </s>
funcom_train/51773828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNUserSessions(int days) { try { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("Select count(*) from log where application='WEBSDE' AND event LIKE'UserSession%' AND DATE_SUB(CURDATE(),INTERVAL " + days + " DAY) <= start"); if (rs.next()) return rs.getInt(1); } catch (Exception e) { e.printStackTrace(); } return 0; } COM: <s> it returns the number of user sessions in the days specified </s>
funcom_train/21609838
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getQuery(String key) { if (query == null) return null; Object val = query.get(key); if (val == null) return null; else if (val instanceof String) return (String)val; else { Vector vec = (Vector)val; return (String)vec.elementAt(0); } } COM: <s> return the value associated with the given query key </s>
funcom_train/16892573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected PartnerLinks getPartnerLinks() { if (lastSelection instanceof Scope) { Scope scope = (Scope) lastSelection; if ( scope.getPartnerLinks() == null) { scope.setPartnerLinks( BPELFactory.eINSTANCE.createPartnerLinks() ); } return scope.getPartnerLinks(); } Process process = getProcess(); if (process.getPartnerLinks() == null) { process.setPartnerLinks( BPELFactory.eINSTANCE.createPartnerLinks() ); } return process.getPartnerLinks(); } COM: <s> we show scoped partner links if a scope is the current selection </s>
funcom_train/4970452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveValueToXML(TransformerHandler handler) throws SAXException { if (!inputModel.hasValue()) return; Attributes2Impl atts = new Attributes2Impl(); handler.startElement("", "", name, atts); if (inputModel.hasValue()) { char[] chars = inputModel.getStringValue().toCharArray(); handler.characters(chars, 0, chars.length); } handler.endElement("", "", name); } COM: <s> stores the parameters value in an xml document using the given </s>
funcom_train/18018215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void testExpectedType(RoundEnvironment roundEnv, String name) { if (!roundEnv.getRootElements().isEmpty()) { for(TypeElement type : typesIn(roundEnv.getRootElements())) { if (!name.contentEquals(type.getSimpleName())) throw new RuntimeException("Unexpected type " + type.getSimpleName()); } } else throw new RuntimeException("Unexpected empty root elements."); } COM: <s> test that the single expected expected type name is the root </s>
funcom_train/32969061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButton7() { if (jButton7 == null) { jButton7 = new JButton(); jButton7.setToolTipText("Races"); jButton7.setRolloverIcon(new ImageIcon(getClass().getResource("/buttons1/races2.gif"))); jButton7.setPressedIcon(new ImageIcon(getClass().getResource("/buttons1/races3.gif"))); jButton7.setIcon(new ImageIcon(getClass().getResource("/buttons1/races1.gif"))); jButton7.setBounds(new java.awt.Rectangle(50,70,34,34)); jButton7.setBorderPainted(false); jButton7.setDoubleBuffered(true); } return jButton7; } COM: <s> this method initializes j button7 </s>
funcom_train/5345591
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean allowAddition(RemoteFileDesc other) { //Like "_incompleteFile.equals(_incompleteFileManager.getFile(other))" //but more efficient since no allocations in IncompleteFileManager. return IncompleteFileManager.same( _name, _size, downloadSHA1, other.getFileName(), other.getSize(), other.getSHA1Urn()); } COM: <s> overrides managed downloader to allow any remote file desc that would </s>
funcom_train/23467531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIfConditionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_IfThenElse_ifCondition_feature"), getString("_UI_PropertyDescriptor_description", "_UI_IfThenElse_ifCondition_feature", "_UI_IfThenElse_type"), TemplatePackage.Literals.IF_THEN_ELSE__IF_CONDITION, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the if condition feature </s>
funcom_train/13187915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testCalculateMean2() { Number[] values = new Number[3]; values[0] = new Double(1); values[1] = new Double(2); values[2] = new Double(3); double mean = Statistics.calculateMean(values); assertEquals(2.0, mean, 0.0000001); } COM: <s> a simple test for the calculate mean number method </s>
funcom_train/8631353
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getBoolean(int columnIndex) throws SQLException { Object o = get(columnIndex); if (o != null && !(o instanceof Boolean)) { o = Boolean.valueOf(o.toString()); } return o == null ? false : ((Boolean) o).booleanValue(); } COM: <s> returns the value as a boolean </s>
funcom_train/4025957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CodeModel cm, String modelId, File persistenceFile) throws IOException { checkParameters( cm, modelId, persistenceFile); Model jenaModel = ( (JenaCodeModel) cm).getJenaModel(); FileWriter fw = new FileWriter( persistenceFile ); jenaModel.write(fw); fw.flush(); fw.close(); } COM: <s> saves the model into a file </s>
funcom_train/44497268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object visit(NameTest e) { QName name = e.name(); // get the arguments Pair arg = (Pair) _param; String type = (String) arg._one; ResultSequence rs = (ResultSequence) arg._two; for(Iterator i = rs.iterator(); i.hasNext();) { NodeType nt = (NodeType) i.next(); // check if node passes name test if(!name_test(nt, name, type)) i.remove(); } return rs; } COM: <s> visit a name test expression </s>
funcom_train/48506982
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private double earthHeliocentricLongitude(double jme) { L_COUNT = (byte) LTERMS.length; double[] sum = new double[L_COUNT]; int i; for (i = 0; i < L_COUNT; i++) { sum[i] = earthPeriodicTermSummation(LTERMS[i], LTERMS[i].length, jme); } return limitDegrees(Math.toDegrees(earthValues(sum, L_COUNT, jme))); } COM: <s> calculate the earth heliocentric longitude l in degrees </s>
funcom_train/51119605
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTab(Component c, String caption, Resource icon) { if (c != null) { tabs.addLast(c); tabCaptions.put(c, caption != null ? caption : ""); if (icon != null) tabIcons.put(c, icon); if (selected == null) { selected = c; fireSelectedTabChange(); } super.addComponent(c); requestRepaint(); } } COM: <s> add a new tab into tab sheet </s>
funcom_train/46759808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ApplicationPanelTreeModel getTreeModel(final long childPanelId, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { ApplicationPanelTreeModel criteria = new ApplicationPanelTreeModel(); criteria.setChildPanelId(childPanelId); IBaseModel model = BaseData.getReference().getFirstSearchResult(criteria, call); return model; }}; return (ApplicationPanelTreeModel) call(method, call); } COM: <s> return the tree model with this panel as a child </s>
funcom_train/4124597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean confirm() { try { Object result = invokeAndWait(); return ((Boolean) result).booleanValue(); } catch (InvocationTargetException e) { if (e.getCause() instanceof RuntimeException) { throw (RuntimeException) e.getCause(); } else { throw new RuntimeException(e.getCause()); } } } COM: <s> show dialog and wait for selection </s>
funcom_train/27738368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private QueryRequest createQuery(QueryRequest query, byte ttl) { if (ttl < 1 || ttl > MAX_QUERY_TTL) throw new IllegalArgumentException("ttl too high: " + ttl); if (query == null) { throw new NullPointerException("null query"); } return queryRequestFactory.createQuery(query, ttl); } COM: <s> factory method for creating new tt query request tt instances with </s>
funcom_train/36621240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateEffPriorityTo(int donatedPriority){ if (effPriority < donatedPriority){ effPriority = donatedPriority; if (queueWaitedOn != null) //if this is waiting on any thread, queueWaitedOn.owner.updateEffPriorityTo(this.effPriority); //update that thread's priority to take into account the change } } COM: <s> receives any donated priority from threads waiting on this thread </s>
funcom_train/7620083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setResponseHeader(String name, String value) { if (Config.LOGV) { Log.i(LOG_TAG, "Set response header " + name + ": " + value); } String mapValue[] = { name, value }; mResponseHeaders.put(name.toLowerCase(), mapValue); } COM: <s> set a response header and associated value </s>
funcom_train/42398136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createResource(final byte[] contents, final String suffix) { Checker.notNull("parameter:contents", contents); Checker.notEmpty("parameter:suffix", suffix); final String hash = Util.computeStrongName(contents); final String filename = hash + suffix; OutputStream outputStream = this.createResource(filename); if (null != outputStream) { try { outputStream.write(contents); outputStream.flush(); } catch (final IOException io) { InputOutput.throwIOException(io); } finally { InputOutput.closeIfNecessary(outputStream); } } return filename; } COM: <s> helper which writes a resource if it doesnt already exist generating a </s>
funcom_train/46376007
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public interface DarkstarServerListener { /** * Notification that the server has started up * @param runner the DarkstarRunnerImpl that started up * @param sessionManager a server sesssion manager that can be * used to connect to this server */ public void serverStarted(DarkstarRunner runner, ServerSessionManager sessionManager); /** * Notification that the server has shut down * @param runner the DarkstarRunnerImpl that shut down */ public void serverStopped(DarkstarRunner runner); } COM: <s> listener to notify of server connects and disconnects </s>
funcom_train/15607539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireKeyTyped(SequenceKeyEvent e) { if (sequenceKeyListeners != null) { Vector listeners = sequenceKeyListeners; int count = listeners.size(); for (int i = 0; i < count; i++) { ((SequenceKeyListener) listeners.elementAt(i)).keyTyped(e); } } } COM: <s> notifies all code sequence key listener code s of a sequence key </s>
funcom_train/36935513
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void load(final String theDocument) { final CCXMLElement myGuiXML = CCXMLIO.createXMLElement(theDocument); loadFonts(myGuiXML.child("fonts")); final CCXMLElement myClassesXML = myGuiXML.child("classes"); if(myClassesXML!= null)loadClasses(myClassesXML); loadStyles(myGuiXML.child("styles")); loadBehaviors(myGuiXML.child("behaviors")); loadTemplates(myGuiXML.child("templates")); loadActions(myGuiXML.child("actions")); } COM: <s> loads the gui templates from the given xml document </s>
funcom_train/45242241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JButton getJButtonPesos() { if (jButtonPesos == null) { jButtonPesos = new JButton(); jButtonPesos.setLocation(new Point(245, 55)); jButtonPesos.setBackground(new Color(173, 200, 226)); jButtonPesos.setIcon(new ImageIcon(getClass().getResource("/br/uesc/computacao/estagio/apresentacao/figuras/folder.png"))); jButtonPesos.setSize(new Dimension(31, 28)); jButtonPesos.setCursor(new Cursor(Cursor.HAND_CURSOR)); } return jButtonPesos; } COM: <s> this method initializes j button pesos </s>
funcom_train/36991346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int max() { int temp; int maximum = m[0]; for (int row = 0; row < xSize; row++) for (int col = 0; col < ySize; col++) if (m[at(row, col)] > maximum) maximum = m[at(row, col)]; return maximum; } COM: <s> get the maximum value stored into the grid </s>
funcom_train/3493127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleSimpleTag(HTML.Tag tag, MutableAttributeSet attributes, int position) { if (tag == HTML.Tag.META) { if (attributes.isDefined(HTML.Attribute.NAME)) { String name = (String) attributes.getAttribute(HTML.Attribute.NAME); if (name.compareToIgnoreCase("robots") == 0) { if (attributes.isDefined(HTML.Attribute.CONTENT)) robotRules = ((String) attributes.getAttribute(HTML.Attribute.CONTENT)).toLowerCase(); } } } } COM: <s> checks for robots meta tags </s>
funcom_train/42538088
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String methodBody(String pkg){ if(pkg.length()>0)pkg += "."; return ("return "+(Diff.isCS()?"global::":"")+pkg+fileName()+ "."+fileName()+"M(this);"); } COM: <s> the body of the stub method </s>
funcom_train/22167539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public NodeList getElementsNamed(Element parent, String name) { ElementNodeList nl = new ElementNodeList(); for(Node node = parent.getFirstChild(); node != null; node = node.getNextSibling()) if(node.getNodeType() == node.ELEMENT_NODE && node.getNodeName().equals(name)) nl.append(node); return nl; } COM: <s> returns a node list of all matches through the immediate child element nodes </s>