__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3704175
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected LocationContextTuple getCurrentLocation() { //// 1. Get the location from the active properties. Tuple t = props.getAsTuple(USER, LOCATION); LocationContextTuple ltuple; //// 2. Convert to a LocationContextTuple. ltuple = LocationContextTuple.createLocationContextTuple(t); //// 3. Return. return (ltuple); } // of method COM: <s> get the clients current location from the active properties </s>
funcom_train/50062330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String selectLastSegmentOfWildCard(String designatorStr, HL7Message msg) { String returnStr = designatorStr; HL7Designator hl7Designator = new HL7Designator(designatorStr); if (hl7Designator.getSegIndex() <= 0) { hl7Designator.setSegIndex(msg.countSegment(hl7Designator.getSegID()) - 1); returnStr = hl7Designator.toString(); } // if return returnStr; } // selectLastSegmentOfWildCard COM: <s> re evaluate wild card segment index to refer to the last segment </s>
funcom_train/43268876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer buf = new StringBuffer("SectionInfo"); buf.append("( "); buf.append(header); buf.append(", "); buf.append(label); buf.append(", "); buf.append(information); buf.append(" )"); return (buf.toString()); } COM: <s> returns a string representation of this code section info code </s>
funcom_train/36108824
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void buildParameterStorage(List<ExternalModuleBridge> listOfBlocks) { oldListOfBlocks = blocks; blocks = listOfBlocks; //Some checks will be done in getListOfBlocks(). getParameterStorage().buildSharedStorage(getListOfBlocks()); //Here we know all blocks and got blocks may be seporated over Processors //of MacroSolver if necessary. } COM: <s> building shared storage for parameters </s>
funcom_train/36950907
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void down(IStructuredSelection selection) { Set libraries= getSelectedLibraries(selection); for (int i= fLibraries.length - 1; i > 0; i--) { if (libraries.contains(fLibraries[i - 1])) { LibraryStandin temp= fLibraries[i]; fLibraries[i]= fLibraries[i - 1]; fLibraries[i - 1]= temp; } } fViewer.refresh(); fViewer.setSelection(selection); } COM: <s> move the libraries of the given selection down </s>
funcom_train/42291493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ImagePanel getDigitalFiscalImagePanel() { if (digitalFiscalImagePanel == null) { digitalFiscalImagePanel = new ImagePanel(); digitalFiscalImagePanel.setLayout(new GridBagLayout()); digitalFiscalImagePanel.setMinimumSize(new Dimension(240, 320)); digitalFiscalImagePanel.setPreferredSize(new Dimension(240, 320)); } return digitalFiscalImagePanel; } COM: <s> this method initializes fingerprint fiscal panel </s>
funcom_train/36341145
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isConceptuallyTableScan(Operator op) { if (op.getID() == OperatorID.TABLE_SCAN) { return true; }else if ((op.getID() == OperatorID.RENAME || op.getID() == OperatorID.EXCHANGE) && op.getChildCount() == 1) { return isConceptuallyTableScan(op.getChild(0)); }else { return false; } } COM: <s> checks if an operator is conceptually a scan </s>
funcom_train/4366485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveNestedVariables() { if (nestedVars != null) { Iterator iter = nestedVars.iterator(); while (iter.hasNext()) { String varName = (String) iter.next(); varName = findAlias(varName); Object obj = invokingJspCtxt.getAttribute(varName); if (obj != null) { originalNestedVars.put(varName, obj); } } } } COM: <s> saves the values of any nested variables that are present in the invoking </s>
funcom_train/32958484
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected InputStream openXSLT(AccountUser accountUser, DocBase doc, String brand, ServletContext servletContext) { String key = "tolven.xslt/" + doc.getSchemaURI(); String value = accountUser.getBrandedProperty(brand).get(key); if (value==null) return null; InputStream xsltStream = new StringInputStream( value ); return xsltStream; } COM: <s> open the appropriate xslt for a document </s>
funcom_train/5343210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void sendPingReply(PingReply pong, ReplyHandler handler) { if(pong == null) { throw new NullPointerException("null pong"); } if(handler == null) { throw new NullPointerException("null reply handler"); } handler.handlePingReply(pong, null); } COM: <s> uses the ping route table to send a ping reply to the appropriate </s>
funcom_train/26039473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OntProperty getSubProperty() { checkProfile( getProfile().SUB_PROPERTY_OF(), "SUB_PROPERTY_OF" ); return getModel().listStatements( null, getProfile().SUB_PROPERTY_OF(), this ) .nextStatement() .getSubject() .as( OntProperty.class ); } COM: <s> p answer a property that is the sub property of this property </s>
funcom_train/1905049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInertDataFile() throws PropertyNotFoundException { debug("\nRunning: testInertDataFile test"); String name = "john" + PropertyService.getProperty("document.accNumSeparator") + serialNumber + PropertyService.getProperty("document.accNumSeparator") + "1"; debug("insert data file docid: " + name); debug("insert data file "); File hello = new File("test/jones.204.22.xml"); assertTrue(insertDataFile(name, hello)); } COM: <s> test insert a data file successfully </s>
funcom_train/44718144
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDataObjectChangeParent() { VersionedTstObject master = new VersionedTstObject(); initVersionedTstObject(master); master.save("M0"); VersionedTstObject child = new VersionedTstObject(); initVersionedTstObject(child); child.save("C0"); assertTxnCount(master, 1); assertTxnCount(child, 1); child.setMaster(master); child.setParent(master); child.save(); assertTxnCount(master, 3); } COM: <s> test the reparenting of transactions on master change </s>
funcom_train/44851725
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized private void start_objectDef( String inName, Attributes inAttributes ) { this.objectDef = new JoinedObjectDefImpl(); for (int i = 0; i < inAttributes.getLength(); i++) { try { objectDef.set(inAttributes.getQName(i), inAttributes.getValue(i).intern()); } catch (Exception exc) { DefaultExceptionWriter.printOut(this, exc, true); } } } COM: <s> handles the start of the joined object def tag </s>
funcom_train/24243104
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSON getConnectionList() throws DBException { JSON connectionList = null; DatasourceManager manageDatasource = null; try { manageDatasource = new DatasourceManager(DbSource.getConnection(), Integer.valueOf(user_id)); connectionList = manageDatasource.getConnectionList(); } finally { if (manageDatasource != null) { manageDatasource.release(); } } return connectionList; } COM: <s> retrieve the connection list </s>
funcom_train/49145786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refresh() { weekNumber = currentWeek.get(Calendar.WEEK_OF_YEAR); itWeekNumber.setValue(weekNumber); itWeekNumber.setSubmittedValue(weekNumber); Calendar cal = (Calendar) currentWeek.clone(); for (DayEntry dayEntry : (List<DayEntry>) colDataModel.getWrappedData()) { Date date = cal.getTime(); dayEntry.setDate(date); cal.add(Calendar.DAY_OF_YEAR, 1); } } COM: <s> synchronizes states of view components </s>
funcom_train/46591450
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String evaluateXPath(String xPathExpression) { try { XPathExpression expr = xPathInstance.compile(xPathExpression); return (String) expr.evaluate(document, XPathConstants.STRING); } catch (Exception e) { //since this will be used in the actual tests, I prefer to catch/rethrow //a RuntimeException to avoid try/catch blocks throw new RuntimeException(e); } } COM: <s> evaluates an xpath expression against the document instance </s>
funcom_train/28983483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public TextField getSendText () { if (sendText == null) {//GEN-END:|103-getter|0|103-preInit // write pre-init user code here sendText = new TextField ("Text:", null, 1000, TextField.ANY);//GEN-LINE:|103-getter|1|103-postInit // write post-init user code here }//GEN-BEGIN:|103-getter|2| return sendText; } COM: <s> returns an initiliazed instance of send text component </s>
funcom_train/8207825
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertItem(List<ItemToDisplay> items) { SQLiteDatabase db = mOpenHelper.getWritableDatabase(); for (ItemToDisplay item:items) { if (item instanceof ItemCategory) insertCategoryCore(db, ItemCategory.class.cast(item)); if (item instanceof ItemWebcam) insertWebcamCore(db, ItemWebcam.class.cast(item)); } db.close(); } COM: <s> add an entire list of </s>
funcom_train/25378374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setNumericPriorsFromBuffer() { m_PriorEstimator = new UnivariateKernelEstimator(); for (int i = 0; i < m_NumTrainClassVals; i++) { m_PriorEstimator.addValue(m_TrainClassVals[i], m_TrainClassWeights[i]); } } COM: <s> sets up the priors for numeric class attributes from the </s>
funcom_train/48385298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeFriend(User self, String friend) { User fr = loadByUsername(friend); String query = "DELETE FROM FriendsOf " + "WHERE frdUser1 = " + self.getId() + " AND frdUser2 = " + fr.getId() + ";" ; sql.executeQuery(query); query = "DELETE FROM FriendsOf " + "WHERE frdUser1 = " + fr.getId() + " AND frdUser2 = " + self.getId() + ";" ; sql.executeQuery(query); } COM: <s> remove friend relationship between </s>
funcom_train/26454870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void getBackContent(Cache map, Object content, int refresh, boolean exceptionExpected) { try { assertEquals(content, map.getFromCache(ENTRY_KEY, refresh)); if (exceptionExpected) { fail("NeedsRefreshException should have been thrown!"); } } catch (NeedsRefreshException nre) { map.cancelUpdate(ENTRY_KEY); if (!exceptionExpected) { fail("NeedsRefreshException shouldn't have been thrown!"); } } } COM: <s> retrieve the content in the cache </s>
funcom_train/9101130
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BufferedReader getBufferedReader() throws IOException { BufferedReader reader = null; synchronized (lock) { if (!this.getFile().exists()) { this.load(this.root); } } try { reader = new BufferedReader(new InputStreamReader(new FileInputStream(this.getFile()), "UTF8")); } catch (UnsupportedEncodingException e) { reader = new BufferedReader(new FileReader(this.getFile())); } return reader; } COM: <s> returns this entrys data in a buffered reader </s>
funcom_train/8907707
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept() { try { serverSocket = new ServerSocket(address.getPort()); socket = serverSocket.accept(); } catch (IOException ex) { Logger.getLogger(TCPTransport.class.getName()).log(Level.SEVERE, null, ex); return false; } return true; } COM: <s> method to a server that needs to accept the client requests </s>
funcom_train/51538983
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { return "MIDletProxy: suite id = " + suiteId + "\n class name = " + className + "\n display name = " + displayName + "\n isolate id = " + isolateId + ", display id = " + displayId + ", midlet state = " + midletState + ", wantsForeground = " + wantsForegroundState + "\n alertWaiting = " + alertWaiting; } COM: <s> print the state of the proxy </s>
funcom_train/50912396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCMLXAttribute(String attName, String attValue) { if (attValue == null) { Attribute attribute = this.getAttribute(attName, CMLX_NS); if (attribute != null) { this.removeAttribute(attribute); } } else { addCMLXAttribute(this, attName, attValue); } } COM: <s> convenience method to add cmlx foo attributes </s>
funcom_train/9470456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNextCleanHashComments() throws JSONException { JSONTokener tokener = new JSONTokener("A # B */ /* C */ \nD #"); assertEquals('A', tokener.nextClean()); assertEquals('D', tokener.nextClean()); assertEquals('\0', tokener.nextClean()); } COM: <s> some applications rely on parsing to lead an end of line comment </s>
funcom_train/14629926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selfDestruct() { try { disconnectFromModule(); myKey.channel().close(); myKey.cancel(); System.out.println("Client #" + idNum + " has been disconnected."); } catch (Exception e) { //The connection was already closed if this block is reached } } COM: <s> this function attempts to cleanly bring down a client </s>
funcom_train/25289667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEnable(boolean state) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_ENABLE_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("TexCoordGeneration0")); if (isLive()) ((TexCoordGenerationRetained)this.retained).setEnable(state); else ((TexCoordGenerationRetained)this.retained).initEnable(state); } COM: <s> enables or disables texture coordinate generation for this </s>
funcom_train/8632293
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection getConnection(String user, String password) throws SQLException { if (isDebugEnabled()) { debugCode("getConnection("+quote(user)+", \"\");"); } return getJdbcConnection(user, convertToCharArray(password)); } COM: <s> open a new connection using the current url and the specified user name </s>
funcom_train/36924522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AudioInputStream getAudioInputStream(File file) throws UnsupportedAudioFileException, IOException { if (TDebug.TraceAudioFileReader) TDebug.out("getAudioInputStream(File file)"); InputStream inputStream = new FileInputStream(file); try { return getAudioInputStream(inputStream); } catch (UnsupportedAudioFileException e) { if (inputStream != null) inputStream.close(); throw e; } catch (IOException e) { if (inputStream != null) inputStream.close(); throw e; } } COM: <s> returns audio input stream from file </s>
funcom_train/37566357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean next(Writable key, Writable value) throws IOException { long pos = in.getPos(); if (pos >= end) return false; ((LongWritable)key).set(pos); // key is position ((UTF8)value).set(readLine(in)); // value is line return true; } COM: <s> read a line </s>
funcom_train/24186400
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AtLeaves (Element parameters, DCOPProblemInterface<V, U> problem) { super(parameters, problem); if (this.proj != null && this.proj != WhereToProject.LEAVES) System.err.println("Warning! Incorrect value for option `whereToProject' for module SamplingPhase$AtLeaves being overridden with default value `leaves'"); this.proj = WhereToProject.LEAVES; } COM: <s> constructor in statistics gatherer mode </s>
funcom_train/20875632
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long jenrl(Lecture variable, Placement value) { Lecture anotherLecture = (first().equals(variable) ? second() : first()); if (anotherLecture.getAssignment() == null) return 0; return (isInConflict(anotherLecture.getAssignment(), value, getDistanceMetric()) ? Math.round(iJenrl) : 0); } COM: <s> number of joined enrollments if the given value is assigned to the given </s>
funcom_train/32215731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean load(Integer id) throws UsersException, SQLException { ResultSet rs = MySQL.connection.createStatement().executeQuery("SELECT * FROM users WHERE id = '" + id + "'"); if (rs.next()) { this.id = rs.getInt("id"); this.username = rs.getString("username"); this.password = rs.getString("password"); this.email = rs.getString("email"); return true; } else { throw new UsersException(UsersException.IdDoesNotExist); } } COM: <s> loads a user specified by its id </s>
funcom_train/49406988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SemanticNode resolve(final Vertex vertex) { if (vertex == null) { return null; } else if (!vertex.isPersistent()) { throw new IllegalStateException("cannot resolve transient vertex: " + vertex); } final Long id = vertex.getId(); if (idMap.containsKey(id)) { return idMap.get(id); } else { final SemanticNode node = wrap(vertex); idMap.put(id, node); invokeLoadingHandler(node); return node; } } COM: <s> looks first in cache than creates a new node based on vertex </s>
funcom_train/43340708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addDefensivePropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory) .getRootAdapterFactory(), getResourceLocator(), getString("_UI_Tactic_defensive_feature"), getString( "_UI_PropertyDescriptor_description", "_UI_Tactic_defensive_feature", "_UI_Tactic_type"), TacticsPackage.eINSTANCE.getTactic_Defensive(), true, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the defensive feature </s>
funcom_train/42040492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getInvQualityText() { switch (invQuality) { case 0: return QUAL_VPOOR; case 1: return QUAL_POOR; case 2: return QUAL_AVG; case 3: return QUAL_GOOD; case 4: return QUAL_VGOOD; case 5: return QUAL_EXCEL; default: return QUAL_UNDEF; } } COM: <s> string get inv quality method </s>
funcom_train/47980527
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerXMPPBean(XMPPBean prototype) { String namespace = prototype.getNamespace(); String childElement = prototype.getChildElement(); synchronized (this.beanPrototypes) { if (!this.beanPrototypes.keySet().contains(namespace)) this.beanPrototypes.put(namespace, Collections.synchronizedMap( new HashMap<String,XMPPBean>() )); this.beanPrototypes.get(namespace).put(childElement, prototype); } } COM: <s> register a prototype of an xmppbean </s>
funcom_train/3123935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void stateChanged(ChangeEvent ce){ Object actionSource = ce.getSource(); if (actionSource == mGUI.HT_Components.get("Slider_Radius")){ ((JLabel)mGUI.HT_Components.get("Label_RadiusValue")).setText(mGUI.TEXT_LABEL_RADIUSVALUE.replaceFirst("%RADIUSVALUE%",((JSlider)mGUI.HT_Components.get("Slider_Radius")).getValue()+"")); } } COM: <s> implemented methods for the changelistener </s>
funcom_train/4814029
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void endTurn() { if (turnsLeft <= END_GAME_TURNS) turnsLeft--; if (turnsLeft > END_GAME_TURNS && board.areAllTilesFaceUp()) { // Start the end-game and notify observers turnsLeft = END_GAME_TURNS; setChanged(); notifyObservers(END_GAME_STARTED); } } COM: <s> performs any necessary processing after a players turn </s>
funcom_train/41431923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { shutdownServer = true; for (TransferActivityImpl xfer : activities.values()) xfer.getSource().shutdown(); try { serverTftp_.close(); } catch (RuntimeException e) { // noop } try { serverThread.join(); } catch (InterruptedException e) { // we've done the best we could, return } } COM: <s> stop the tftp server and any currently running transfers and release all </s>
funcom_train/23788117
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void flushBase64() throws java.io.IOException { if (position < 1) { return; } if (encode == false) { throw new java.io.IOException( "Base64 input not properly padded."); } out.write(encode3to4(b4, buffer, position)); position = 0; } COM: <s> method added by phil </s>
funcom_train/3763852
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleText(char[] data, int pos) { lastText = new String(data); addValue(lastText); if (!foundSummary) { if (isInBody && !isInScript) { summaryText.append(lastText); if (summaryText.length() > getMaxLengthDesc()) { foundSummary = true; setDescription(summaryText.toString()); } } } } COM: <s> take care of text between tags check against keyword list for </s>
funcom_train/41162861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoMultipleChoiceE2 entity) { EntityManagerHelper.log("saving CoMultipleChoiceE2 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 co multiple choice e2 </s>
funcom_train/20874691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double progress() { double ret = 0.0; double mx = 1.0; for (int i = size() - 1; i >= 0; i--) { ret += mx * (iSequence[i]) / iBase; mx *= 1.0 / iBase; } return ret; } COM: <s> if a sequence of all zeros is considered as 0 and the highest </s>
funcom_train/22155319
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColor(Color c) { color = c; double r = ((double)c.getRed())/255.0; double g = ((double)c.getGreen())/255.0; double b = ((double)c.getBlue())/255.0; c(); // This ensures any paths are drawn in the previous colours pw.println(""+r+" "+g+" "+b+" rg "+r+" "+g+" "+b+" RG"); } COM: <s> sets the colour for drawing </s>
funcom_train/9817212
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void inst_module() throws ParseException { jj_consume_token(MODULE); label_5: while (true) { module_name(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NONWHITESTRING: case QUOTESTRING: ; break; default: jj_la1[16] = jj_gen; break label_5; } } } COM: <s> parses the declaration of a module instance related with this logic </s>
funcom_train/32636346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void initializeProject() { if (ProjectBuilder.instance().isNewProject() == true) commitDatabase(); commitProject(); if (projectError == false) { if (connectionFormThread != null) connectionFormThread.cleanup(); ProjectBuilder.instance().showInformationDialog(this, "The project has been successfully configured!"); ProjectBuilder.shutdown(); } else { this.setVisible(true); connectionFormThread.getForm().setVisible(false); projectError = false; dbError = false; } } COM: <s> this method is called after the database connection has been successfully established </s>
funcom_train/31151812
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void receiveMessage(short[] netBuf) { log.fine("received broadcast message"); char[] msg = new char[netBuf.length]; for (int i = 2; i < netBuf.length; i++) { msg[i - 2] = (char) netBuf[i]; } rw.client.broadcastMessage(new String(msg).trim()); //j.paintWindowMessage(); } COM: <s> processes broadcast message </s>
funcom_train/15409904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialise() { if (encryptKeyManager != null) { encryptKeyManager.initialise(); } List<BeanDescriptor<?>> list = beanDescriptorManager.getBeanDescriptorList(); for (int i = 0; i < list.size(); i++) { list.get(i).cacheInitialise(); } } COM: <s> run any initialisation required before registering with the cluster manager </s>
funcom_train/37468844
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPrimaryAc( String primaryAc ) { if ( primaryAc == null ) { throw new IllegalArgumentException( "A splice variant must have a primary AC." ); } if ( primaryAc.trim().equals( "" ) ) { throw new IllegalArgumentException( "A splice variant must have a non empty primary AC." ); } this.primaryAc = primaryAc; } COM: <s> sets accession number of the splice variant </s>
funcom_train/22359143
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public FileType checkConnection() throws IOException { try { // if(readonly) { createInputStream().close(); // } else { // createOutputStream().close(); // } } catch (FileNotFoundException e) { // if file is readonly, this will be a problem // if not, it may be ok that the file does not exist if (readonly) throw e; } return this; } COM: <s> tests if an input stream can be opened for this file type </s>
funcom_train/3447307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float distance(float x, float y) { if (!transformingX) { return metric.distance(0, y - lensY); } else if (!transformingY) { return metric.distance(x - lensX, 0); } return metric.distance(x - lensX, y - lensY); } COM: <s> returns the distance of the specified point from the focus </s>
funcom_train/19747305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected GridTag getParentGridTag() throws JspTagException { GridTag parentGridTag = (GridTag) findAncestorWithClass(this, GridTag.class); if ( parentGridTag == null ) { JspTagException e = new JspTagException("Parent tag is invalid! " + "This tag is only valid when nested within 'grid' tag"); throw e; } return parentGridTag; } COM: <s> returns a parent grid tag </s>
funcom_train/40120703
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertColor() { Color color = JColorChooser.showDialog(this, source.getText(), Color.BLACK); if (color != null) { String s = "#" + Integer.toHexString(color.getRGB() & 0xFFFFFF); replaceSelection(s); } } COM: <s> shows a jcolor chooser dialog and pastes the result as a hexidecimal </s>
funcom_train/35838263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /*public void setParentNodeType(UINode node, int type) { if (node == null) return; UINode oNode = (UINode)oViewPane.get(node.getNode().getId()); if (oNode != null) { //oNode.setLocalType(type); //oNode.refreshIcon(oNode.getIcon()); } }*/ COM: <s> sets the uinode type on the main view </s>
funcom_train/20205540
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void render(HtmlStringBuffer buffer) { buffer.elementStart(getTag()); buffer.appendAttribute("name", getName()); buffer.appendAttribute("id", getId()); buffer.appendAttribute("src", getSrc()); appendAttributes(buffer); buffer.closeTag(); buffer.elementEnd(getTag()); } COM: <s> render the html representation of the image </s>
funcom_train/7265597
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRandomOrder() throws Exception { Set s = new RandomOrderHashSet(50); for (int i = 0; i < 50; i++) s.add(i); String out1 = ""; String out2 = ""; for (Object o : s) out1 = out1 + o; for (Object o : s) out2 = out2 + o; assertNotEquals(out1, out2); } COM: <s> tests that two subsequent iterations over the same set </s>
funcom_train/47281946
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String rhsOriginalNodeName(ResultSet rs) throws SQLException, SQLObjectException { List<String> colNames = new ArrayList<String>(); for (int i = 0; i < project.getSourceTableIndex().getChildCount(); i++) { colNames.add("DUP_CANDIDATE_2"+i); } return nodeName(rs, colNames); } COM: <s> calls node name with the correct parameters to get the unique identifier </s>
funcom_train/15954477
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInsertLong() throws BMLException{ String lsValue = "Good"; DataString ldString = new DataString(fBlank); ldString.setString(lsValue); long lValue = 1234567; ldString.insert(1,lValue); assertEquals("G1234567ood",ldString.toString()); } COM: <s> test of insert method using offset long </s>
funcom_train/46384257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected DeploymentPlan getSessionDeploymentPlan(HttpServletRequest request) { HttpSession session = request.getSession(); DeploymentPlan dp = (DeploymentPlan) session.getAttribute(DEPLOYMENT_PLAN_SESSION_KEY); if (dp == null) { DeploymentManager dm = DeploymentManager.getInstance(); dp = dm.getPlan().clone(); session.setAttribute(DEPLOYMENT_PLAN_SESSION_KEY, dp); } return dp; } COM: <s> get the deployment plan stored in the session or copy the current </s>
funcom_train/8012903
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getBeans(Collection dataRows) throws DataStoreException { try { Vector result = new Vector(); Iterator iter = dataRows.iterator(); while (iter.hasNext()) { DSDataRow dataRow = (DSDataRow) iter.next(); result.add(dataRow.getBean()); } return result; } catch (Exception e) { throw new DataStoreException("Error collecting beans.", e); } } COM: <s> return the collection of beans from the collection of data rows </s>
funcom_train/22326107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isValidMeasure(String text) { if (text != null) { String[] parts = splitMeasure(text); try { Integer.parseInt(parts[0]); return parts[1].length() == 0 || LayoutUnits.nameToUnit(parts[1]) >= 0; } catch (NumberFormatException ex) { } } return false; } COM: <s> test if a string is a valid measure </s>
funcom_train/37555993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getGrayed () { checkWidget (); if ((parent.style & SWT.CHECK) == 0) return false; int hwnd = parent.handle; TVITEM tvItem = new TVITEM (); tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE; tvItem.stateMask = OS.TVIS_STATEIMAGEMASK; tvItem.hItem = handle; int result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem); return (result != 0) && ((tvItem.state >> 12) > 2); } COM: <s> returns code true code if the receiver is grayed </s>
funcom_train/27822999
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OIModelInfo addOIModel(OIModel oimodel) throws KAONException { String newURI=m_registryOIModelInstance.createNewURI(); OIModelInfo oimodelInfo=getOIModelInfo(newURI); oimodelInfo.setLogicalURI(oimodel.getLogicalURI()); oimodelInfo.setPhysicalURI(oimodel.getPhysicalURI()); oimodelInfo.create(); return oimodelInfo; } COM: <s> creates a new entry for the oi model </s>
funcom_train/45644658
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fillKeyStoresTable() { keyStoreTable.removeAll(); logger.debug("size: " + availableKeyStores.size()); for (int i=0; i < availableKeyStores.size(); i++) { logger.debug("Entry: " + availableKeyStores.get(i)); newKeyStoreTableItem(availableKeyStores.get(i), i); } } COM: <s> fills the provider table with the installed crypto providers and sets the parameters </s>
funcom_train/7441354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getRowNumber(double lat) { if (!latWithinFeatureExtent(lat)) { return -1; } if (lat == metadata.getMaxLat()) { // return metadata.getRowCount(); return 1; } else { return (int) Math.ceil(((metadata.getMaxLat() - lat) / metadata .getResolution())); } } COM: <s> maps a latitude to the corresponding row number starting at 1 in the </s>
funcom_train/12642470
/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 == this) return true; if (! (obj instanceof FilePermission)) return false; FilePermission that = (FilePermission) obj; return (this.mask == that.mask) && this.cpath.equals(that.cpath) && (this.directory == that.directory) && (this.recursive == that.recursive); } COM: <s> checks two file permission objects for equality </s>
funcom_train/37182462
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enableManualRatio(final boolean hide){ if(display == null || display.isDisposed()) return; display.asyncExec( new Runnable() { public void run() { manualLabel1.setEnabled(hide); manualRatioTextField.setEnabled(hide); manualLabel2.setEnabled(hide); } }); } COM: <s> little method to turn on and off the manually set ratio </s>
funcom_train/18551731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createJTree(BSBeanCollection pBSBeanCollection) { DefaultTreeModel treeModel = new DefaultTreeModel(createRootNode(pBSBeanCollection)); this.setModel(treeModel); this.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); // Set the Cell Renderer this.setCellRenderer(new CustomTreeCellRenderer()); } COM: <s> method create jtree </s>
funcom_train/45692140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addLengthPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SongEventKeyboardNote_length_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SongEventKeyboardNote_length_feature", "_UI_SongEventKeyboardNote_type"), EsxPackage.Literals.SONG_EVENT_KEYBOARD_NOTE__LENGTH, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the length feature </s>
funcom_train/25854022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Carrier getCarrier(String name) throws Exception { Carrier carrier = null; List<Carrier> carriers = gateway.getCarriers(); assertNotNull(carriers); assertTrue(carriers.size() > 0); // set the carrier for other tests to use for (Carrier c : carriers) { log.debug("carrier: " + c); if (name.equalsIgnoreCase(c.getName())) { carrier = c; break; } } assertNotNull(carrier); return carrier; } COM: <s> utility method to get the given carrier name </s>
funcom_train/3374127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void positionCaret(MouseEvent e) { Point pt = new Point(e.getX(), e.getY()); Position.Bias[] biasRet = new Position.Bias[1]; int pos = component.getUI().viewToModel(component, pt, biasRet); if(biasRet[0] == null) biasRet[0] = Position.Bias.Forward; if (pos >= 0) { setDot(pos, biasRet[0]); } } COM: <s> tries to set the position of the caret from </s>
funcom_train/47321110
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void paintScreen(){ Graphics g; try{ g = this.getGraphics(); g.clearRect(0, 0, mScreenWidth,mScreenWidth); if(g != null && dbImage != null){ g.drawImage(dbImage, 0,0, null); Toolkit.getDefaultToolkit().sync(); g.dispose(); dbImage = null; } }catch(Exception e ){ System.err.println("Graphics conetex error" + e.toString()); } } COM: <s> renders the buffered image to the screen </s>
funcom_train/40418815
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String highlightTerm(String originalTermText, TokenGroup tokenGroup) { UseCase uc = MonitorFactory.startUseCase( "Highlight.PhraseBolder.highlightTerm()"); if (tokenGroup.getTotalScore() <= 0) { uc.stop(); return originalTermText; } uc.stop(); return highlightPrefix + originalTermText + highlightPostfix; } COM: <s> highlights terms by enclosing them with lt b gt term lt b gt </s>
funcom_train/42364312
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printMatrix() { for (int i=0; i < this.B.length; i++) { for (int j=0; j < this.B.length; j++) { if (this.B[i][j] > 9) { System.out.print(" "+B[i][j]); } else { System.out.print(" "+B[i][j]); } } System.out.println(); } } COM: <s> print the entire matrix which shows how the computation of </s>
funcom_train/7661303
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReducePermits() { PublicSemaphore s = new PublicSemaphore(10, false); assertEquals(10, s.availablePermits()); s.reducePermits(1); assertEquals(9, s.availablePermits()); s.reducePermits(10); assertEquals(-1, s.availablePermits()); } COM: <s> reduce permits reduces number of permits </s>
funcom_train/48685680
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRTEntry(RTKey key_, int interfaces, Object entryExtension_, double timeout) { RTConfig.add(key_, new RTEntry(RTConfig.NEXT_HOP_NO_CHANGE, new drcl.data.BitSet(new int[]{interfaces}), entryExtension_), timeout, rtconfigPort); } COM: <s> adds replaces a route entry via </s>
funcom_train/7978714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected UURI validityCheck(UURI uuri) throws URIException { if (uuri.getRawURI().length > UURI.MAX_URL_LENGTH) { throw new URIException("Created (escaped) uuri > " + UURI.MAX_URL_LENGTH +": "+uuri.toString()); } return uuri; } COM: <s> check the generated uuri </s>
funcom_train/9805105
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initLookupTable() { _lookupTable = new int[_numBits]; byte[] byteArrayOne = new byte[1]; byteArrayOne[0] = 1; BigInteger bigIntOne = new BigInteger(byteArrayOne); for (int i=0; i<_numBits; i++) { _lookupTable[i] = (byte)(_initValue.shiftRight(i)).and(bigIntOne).intValue(); } } COM: <s> initializes the lookup table from the init value </s>
funcom_train/8231583
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int AddMovie(String movieId) { UpdateLeastLoadedDiskIndex(); if (currLeastLoadedDisk == Consts_2nd.eINVALID) return Consts_2nd.eINVALID; int tmpDisk = currLeastLoadedDisk; while (!diskArray[currLeastLoadedDisk].AddMovie(movieId)) { currLeastLoadedDisk = (currLeastLoadedDisk + 1) % arraySize; if (currLeastLoadedDisk == tmpDisk) return Consts_2nd.eINVALID; } tmpDisk = currLeastLoadedDisk; return tmpDisk; } COM: <s> adds a movie to the cluster </s>
funcom_train/38566386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetWordIntegerLocale() { for (int i = 0; i < lengths.length; i++) { String test = this.composeDictionaryWordGenerator.getWord(new Integer(this.lengths[i]), Locale.FRENCH); assertNotNull(test); assertTrue(test.length() > 0); assertEquals(lengths[i], test.length()); } } COM: <s> this testcase verify if the class works normaly </s>
funcom_train/14462731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getZAxisLabel() { for (int i=0;i<chartArr.size();i++) { BiffRec b = (BiffRec)chartArr.get(i); if (b.getOpcode()==TEXTDISP) { TextDisp td = (TextDisp)b; if (td.isZAxisLabel())return td.toString(); } } return null; } COM: <s> return z axis label if present </s>
funcom_train/14266338
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Connection getTCPRedirectUltrapeer() { Iterator ultrapeers = getInitializedConnections().iterator(); while (ultrapeers.hasNext()) { ManagedConnection currMC = (ManagedConnection) ultrapeers.next(); if (currMC.remoteHostSupportsTCPRedirect() >= 0) return currMC; } return null; } COM: <s> accessor for the tt connection tt that supports tcpredirect </s>
funcom_train/16684888
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendNavigationInterface(XmlClient xmlClient) { String rootIntrfaceClass = xmlClient.getClientInfo().getRootInterfaceClass(); Interface rootIF = ifManager.getInterface(rootIntrfaceClass); if (rootIF != null) xmlClient.sendTextResponse(rootIF.getContent()); } COM: <s> sends navigation interface for client </s>
funcom_train/26632227
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Node configure(Document nodeFactory, String componentName) throws ConfigurationException { Element component = ConfigHelper.newComponent(nodeFactory, componentName, this); ConfigHelper helper = new ConfigHelper(component, nodeFactory, true); helper.newProperty(CONFIG_FILE, DEFAULT_CONFIG_FILE); configure(component, nodeFactory); return component; } COM: <s> configure the component </s>
funcom_train/12663010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Map toMap() { final Map map = new HashMap(); map.put("entityName", entityName); map.put("entityType", getEntityType()); map.put("depot", getDepot()); //map.put("isObjectContext", Boolean.toString(isObjectContext())); return map; } COM: <s> returns fields as a map of key value pairs </s>
funcom_train/31529737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDraggable(boolean pDraggable) { draggable_flag = pDraggable; //Setup DragSource and DragRecognizer dragSource = (DragSource)DCDragSource.getDefaultDragSource(); dragRecognizer = dragSource.createDefaultDragGestureRecognizer(this,DnDConstants.ACTION_COPY_OR_MOVE, new DragListenerAdapter(this, dragSourceListener)); //Setup the Default Transfer Object transferObject = new DCTransferObject(this); } COM: <s> true if this component can be dragged </s>
funcom_train/14002472
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initialize(int channels, int slices) { m_nchannels = channels; m_slice = 0; m_slices = slices; m_bits = new ByteBuffer[channels][slices]; m_channelmin = new double[channels]; m_channelmax = new double[channels]; m_datatype = new DataType[channels]; } COM: <s> initializes the arrays for the given number of channels </s>
funcom_train/50776082
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Type get(int pos) throws IndexException { if (pos < 0 || pos >= content.size()) { throw new IndexException(); } Object element = ScriptUtil.convertFromJava(content.get(pos)); if (element instanceof Type) { return (Type)element; } // really shouldn't happen, as primitive (i.e. non-weavepoint) types are converted above! throw new RuntimeException("Invalid element in list - type is " + element.getClass().getName() + " , should be subclass Type"); } COM: <s> returns the element at the given position </s>
funcom_train/51348892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dumpIndex(final String indexName) throws InterruptedException { final IMetadataIndex metadataIndex; try { metadataIndex = fed.getMetadataIndex(indexName, ts); } catch (Throwable t) { final Throwable t2 = InnerCause.getInnerCause(t, ClassNotFoundException.class); if (t2 != null) { log.error("CODEBASE/CLASSPATH problem:", t2); return; } throw new RuntimeException(t); } dumpIndexLocators(indexName, metadataIndex); } COM: <s> generates the dump record for the specified scale out index </s>
funcom_train/10662246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testExportObjectRemoteActivationIDInt010() { try { Activatable .exportObject(new EchoWithStubActivatable_Imp(), null, 0); fail("object has just exported"); } catch (RemoteException e) { } catch (Throwable e) { fail("Failed with:" + e); } } COM: <s> export a echo with stub activatable object </s>
funcom_train/25329624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEventOut(String eventOutName, Field f) { if (loader.debug) { System.out.println("Adding eventOut " + f.toStringId() + "\n with name " + eventOutName + "\n to script node " + this.toStringId()); } f.init(this, FieldSpec, Field.EVENT_OUT, f.baseName(eventOutName)); } COM: <s> sets the event out attribute of the script object </s>
funcom_train/1095416
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRequest(HttpServletRequest aRequest) throws Exception { super.setRequest(aRequest); if (isMultiPartContent(getRequest())) { uploadFile(getRequest(), getResponse()); if (!isErrorDetail()) { Map attributes = convertXml(getAttributeXml()); if (!isErrorDetail()) { addAttachment(attributes); setStatusCode(SUCCESS); } } } else { setStatusCode(IGNORE); } } COM: <s> sets the current http servlet request into this bean </s>
funcom_train/12561486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean intersects(CLayer l) { int x = bounds[X]; int y = bounds[Y]; int lx = l.bounds[X]; int ly = l.bounds[Y]; return !(lx >= x + bounds[W] || lx + l.bounds[W] <= x || ly >= y + bounds[H] || ly + l.bounds[H] <= y); } COM: <s> check whether the layer is intersected with another one </s>
funcom_train/4970961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Source getStylesheetSource() { Source source; Resource resource = new ServletContextResource(getServletContext(), "/WEB-INF/xsl/homePage.xslt"); try { source = new StreamSource(resource.getInputStream()); } catch (IOException e) { logger.error("IOException"); source = null; } return source; } COM: <s> returns associated stylesheet </s>
funcom_train/2389330
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComboBox getCboxPerspectiveSelection() { if (cboxPerspectiveSelection == null) { cboxPerspectiveSelection = new JComboBox(); cboxPerspectiveSelection.setBounds(new java.awt.Rectangle(114,150,195,20)); cboxPerspectiveSelection.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(java.awt.event.MouseEvent e) { int selPersIndex = cboxPerspectiveSelection.getSelectedIndex(); updatePerspectiveList(); cboxPerspectiveSelection.setSelectedIndex(selPersIndex); } }); updatePerspectiveList(); } return cboxPerspectiveSelection; } COM: <s> this method initializes cbox perspective selection </s>
funcom_train/49790302
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSessionRemains() throws Exception { IFile sitemap = beginAtSitemapThenPage("Page 2"); assertNoProblem(); gotoSitemapThenPage(sitemap, "External Page", "Advertisement"); assertNoProblem(); gotoSitemapThenPage(sitemap, "External Page", "External Page"); assertNoProblem(); // go to page 2 gotoSitemapThenPage(sitemap, "Page 3"); assertNoProblem(); gotoSitemapThenPage(sitemap, "Home", "Home"); assertNoProblem(); } COM: <s> once the ad is viewed once it persists until the session </s>
funcom_train/17484320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void fini() { /* * In embedded mode, an application should shut down Derby. * Shutdown throws the 08006 exception to confirm success. */ boolean gotSQLExc = false; try { DriverManager.getConnection(connectionURL + ";shutdown=true"); } catch (SQLException se) { // NOTE for entire Derby shutdown the expected code is "XJ015" if ( se.getSQLState().equals("08006") ) { gotSQLExc = true; } } if (!gotSQLExc) { System.out.println("Database did not shut down normally"); } instance = null; } COM: <s> should be called when done with the database </s>