__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/48430683
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getPort() { Properties prop= new Properties(); try { InputStream is = getClass().getResourceAsStream(ConfFile); prop.load(is); if(is!=null) is.close(); } catch(Exception e) { System.out.println(e+"file "+ConfFile+" not found"); } return prop.getProperty("Port"); } COM: <s> get password 1433 </s>
funcom_train/10790930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getBatchLimit() { int limit = super.getBatchLimit(); if (limit == UNLIMITED) { limit = defaultBatchLimit; if (log.isTraceEnabled()) log.trace(_loc.get("batch_unlimit", String.valueOf(limit))); } return limit; } COM: <s> return the batch limit </s>
funcom_train/9998785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Reader getReader(WVTDocumentInfo d, WVTConfiguration config) throws WVToolException { WVTDocumentLoader loader = null; WVTInputFilter infilter = null; loader = (WVTDocumentLoader) config.getComponentForStep(WVTConfiguration.STEP_LOADER, d); infilter = (WVTInputFilter) config.getComponentForStep(WVTConfiguration.STEP_INPUT_FILTER, d); return infilter.convertToPlainText(loader.loadDocument(d), d); } COM: <s> create a reader from a document info given a configuration </s>
funcom_train/8810331
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String requireParameter(String name) throws ExportException { final String[] param = (String[]) parametersMap.get(name); if (param == null) { throw new ExportException("The parameter '" + ExportUtils.PARAM_EXPORT_PROJECT_ID + "' 'id missing."); } return param[0]; } COM: <s> retrieves a parameter with the given name </s>
funcom_train/50862881
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasMaintenanceEntity(String entityName) { if (entityName == null) { throw new IllegalArgumentException("name is null"); } boolean result = false; Iterator<MaintenanceEntity> i = maintenanceEntities.iterator(); while (i.hasNext()) { if (i.next().name.equalsIgnoreCase(entityName)) { result = true; } } return result; } COM: <s> checks if the part has a maintenance entity of a given name </s>
funcom_train/50367720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Object item) { Messenger.debug("Adding an item to the list named \""+mListname+"\"."); if (mList == null) { mList = new Vector(DEFAULT_LIST_SIZE); } if (mList.contains(item)) { Messenger.debug("item \""+item.toString()+"\" already exists in the list "+mListname); } else { mList.addElement(item); } } COM: <s> add an item to the list </s>
funcom_train/11392360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getHadoopLocalConfDir() { String hadoopLocalConfDir = conf.get(CONF_HADOOP_LOCAL_DIR); if (hadoopLocalConfDir == null || hadoopLocalConfDir.isEmpty()) { LOG.error("No configuration " + "for the CONF_HADOOP_LOCAL_DIR passed"); throw new IllegalArgumentException( "No Configuration passed for hadoop conf local directory"); } return hadoopLocalConfDir; } COM: <s> its a local folder where the config file stores temporarily </s>
funcom_train/21335740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void emulateMessageReceived(int clientUID, Object message) { IoSession session = clientSessions.get(clientUID); if (session == null) { session = new TestIoSession(this); clientSessions.put(clientUID, session); } try { messageReceived(session, message); } catch (Exception e) { log.error(e, e); fail(e.getMessage()); } } COM: <s> emulation that this message received to server </s>
funcom_train/14615573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals( Object o ) { if( this == o ) { return true; } if( !( o instanceof StringLiteral )) { return false; } final StringLiteral stringLiteral = ( StringLiteral ) o; if( value == null ) { return stringLiteral.value == null; } else { return value.equals( stringLiteral.value ); } } COM: <s> override the code object </s>
funcom_train/24187929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void utilPropagationFinished(String variableID, GoodsTree<Val, U, L> tree, U utility, int inducedWidth) { queue.sendMessage(AgentInterface.STATS_MONITOR, new OptUtilMessage<U>(utility, variableID)); queue.sendMessage(AgentInterface.STATS_MONITOR, new StatsMessage(inducedWidth)); // start the VALUE propagation queue.sendMessageToSelf(new GoodsTreeMessage<Val, U, L>(tree, variableID)); } COM: <s> method called when util propagation phase for a certain variable has finished </s>
funcom_train/50892514
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getIntField(int index) { if(this.fields[index] instanceof IntField) { return ((IntField)this.fields[index]).getValue(); } throw new MessageException("Field [" + index + "] not an IntField type: " + this.fields[index].getClass().getName()); } COM: <s> assumes that the code ifield code entry with the given </s>
funcom_train/11010422
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addMarshaller(String contentType, PartMarshaller marshaller) { try { partMarshallers.put(new ContentType(contentType), marshaller); } catch (InvalidFormatException e) { logger.log(POILogger.WARN, "The specified content type is not valid: '" + e.getMessage() + "'. The marshaller will not be added !"); } } COM: <s> add a marshaller </s>
funcom_train/19296137
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void rollOver_ActionEvents() { boolean set = getRollOver().isSelected(); getMod1().setEnabled(set); getMod2().setEnabled(set); getMod3().setEnabled(set); getJLabel2().setEnabled(set); getInitFrac().setEnabled(set); getJLabel2().setEnabled(set); } COM: <s> enables disables fields according to selection </s>
funcom_train/10538980
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String buildDataTruncationSqlerrmc(DataTruncation dt) { return dt.getIndex() + SQLERRMC_TOKEN_DELIMITER + dt.getParameter() + SQLERRMC_TOKEN_DELIMITER + dt.getRead() + SQLERRMC_TOKEN_DELIMITER + dt.getDataSize() + SQLERRMC_TOKEN_DELIMITER + dt.getTransferSize(); } COM: <s> build the sqlerrmc for a </s>
funcom_train/50119629
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add_command(String cmd_name, String func_name, int level) { Vector v = new Vector(); v.add(cmd_name); v.add(new Integer(level)); cmds.put(cmd_name, v); super.add_command(cmd_name, func_name); } COM: <s> this method adds a new command to the module </s>
funcom_train/36459835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void teardown(String streamId) throws IOException { synchronized (streamMap) { StreamArchive archive = streamMap.get(Long.valueOf(streamId)); if (archive != null) { archive.terminate(); stoppedStreams.add(Long.valueOf(streamId)); streamMap.remove(Long.valueOf(streamId)); } } } COM: <s> stops recording of a specific stream </s>
funcom_train/38217245
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matches(Packet p) { incWorkCnt(); UDPHeader header = (UDPHeader)p.getHeader(UDPHeader.class); if (null == header) { trackNotUDP(); return false; } int srcPort = header.getSrcPort(); if (port == srcPort) return true; int destPort = header.getDestPort(); if (port == destPort) return true; trackPort(srcPort, destPort); return false; } COM: <s> scans the submitted packet </s>
funcom_train/1222835
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void boundaryOutline() { p3d.noFill(); p3d.stroke(128, 128, 255); p3d.pushMatrix(); p3d.translate((float)boundCentre.x,(float)boundCentre.y,(float)boundCentre.z); p3d.box((float)bound.x, (float)bound.y, (float)bound.z); p3d.popMatrix(); p3d.noStroke(); } COM: <s> draw the default cuboid boundary of the simulation as a wireframe outline </s>
funcom_train/27825228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Predicate getMagicPredicate(Predicate predicate,boolean[] boundVariables) { int magicPredicateArity=0; for (int i=0;i<predicate.getArity();i++) if (boundVariables[i]) magicPredicateArity++; String magicPredicateName="magic_"+getAdornedPredicateName(predicate,boundVariables); return m_predicateFactory.getPredicate(magicPredicateName,magicPredicateArity); } COM: <s> returns the magic predicate for given predicate and bindings </s>
funcom_train/51572228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FileSet auxFileSet() throws Exception { File auxBase = new File(baseFile, AUX_DIR); FileSet fSet = new LocalFileSet(auxBase); fSet.include(new FileGlob("**/*")); //NOPMD testFiles.addTestFile(new File(auxBase, AUX_FILE)); return fSet; } COM: <s> basis for test target on code aux code directory </s>
funcom_train/22718271
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private TableField findPk(Table table) { for (Iterator i = table.getFields().iterator(); i.hasNext(); ) { TableField field = (TableField)i.next(); if (field.isPrimaryKey()) return field; } System.out.println("Warning: this table contains no primary key!"); return null; } COM: <s> finds the primary key field of the given table </s>
funcom_train/22233798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getAttributeGain() { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_ATTRIBUTE_GAIN_READ)) throw new CapabilityNotSetException(J3dI18N.getString("AuralAttributes1")); return ((AuralAttributesRetained)this.retained).getAttributeGain(); } COM: <s> retrieve attribute gain amplitude </s>
funcom_train/37035248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeGroup(String groupname) { UserDatabase database = (UserDatabase) this.resource; Group group = database.findGroup(groupname); if (group == null) { return; } try { MBeanUtils.destroyMBean(group); database.removeGroup(group); } catch (Exception e) { throw new IllegalArgumentException("Exception destroying group " + group + " MBean: " + e); } } COM: <s> remove an existing group and destroy the corresponding mbean </s>
funcom_train/26289974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SymbolTable getRootSymbolTable() { SymbolTable symbols = new SymbolTable(); symbols.put("state", this); symbols.put("zones", zones); symbols.put("turn-owner", playOrder[currentPlayer]); symbols.put("phase", currentPhase); symbols.put("null", new Unit(0, "NULL")); return symbols; } COM: <s> creates a root var symbol table var that contains general information </s>
funcom_train/15530341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void init() { this.directory = new RAMDirectory(); try { this.index = new IndexModifier(directory, new SuggestionAnalyzer(), true); } catch (IOException ex) { throw new IllegalStateException("Could not create in-memory index.", ex); } this.parser = new QueryParser(field_suggest, new KeywordAnalyzer()); } COM: <s> initializes the current instance </s>
funcom_train/2939279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean areErrorsInWidgets() { if (!initialized) return false; errors = new ArrayList(); boolean result = areErrorsInFields(errors); if (errors.size() == 0) errors = null; callback.reportFieldErrors(errors); enableOrDisableWidgets(); enableOrDisableAdditionalEditorButtons(); return result; } COM: <s> checks the errors inside all code editor widget code s in the </s>
funcom_train/21845447
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean setObjectAttribute( String name, Value d) { if( this.type != Value.RECORD) return false; Value objectData = this.getElement(Value.OBJECT_DATA); if( objectData == null ) { objectData = new Value(Value.RECORD, null); this.setElement(objectData, Value.OBJECT_DATA); } objectData.setElement(d, name); return true; } COM: <s> set an object attribute </s>
funcom_train/27826092
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePropertyValue(Property property,Object value) { if (m_map!=null) { Set set=(Set)m_map.get(property); if (set!=null) { set.remove(value); if (set.isEmpty()) m_map.remove(property); } } else getBackLog().add(new PropertyValueChange(PropertyValueChange.REMOVE,property,value)); } COM: <s> removes a property value from the map </s>
funcom_train/17879994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isValidNameChar(final int code) { return isValidNameStartChar(code) || code == '-' || code == '.' || code >= '0' && code <= '9' || code == 0xB7 || code >= 0x300 && code <= 0x36F || code >= 0x203F && code <= 0x2040; } COM: <s> test if code point is valid character of name br </s>
funcom_train/13504530
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void waitWhileThreadRuns(int maxSecondsToWait) { for (int i = 0; i < maxSecondsToWait; i++) { if (getNumberOfCurrentThreads() == initialNumberOfThreads) { return; } try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } } COM: <s> wait until the journal consumer thread stops or until the time limit </s>
funcom_train/19072568
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean apply() { boolean retValue = false; Vector inputVect = getInputVector(); if ((inputVect != null) && (!inputVect.isEmpty())) { retValue = applyOnColumns() | applyOnRows(); } else { log.warn( getName()+" : Plugin has no input data to convert." ); } return retValue; } COM: <s> applies all the conversions on the patterns contained by </s>
funcom_train/19424173
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNavigation(HttpServletRequest req) { String returnValue = defaultReturnValue; try { returnValue = navigationFormatter.getFormattedNavigation(navigationFilter.getAuthorizedNavigation(systemNavigation, req), req); } catch (Throwable t) { EaasyStreet.logInfo(localStrings.getMessage(EVI0013T, new String[]{t.getMessage()}), t); } return returnValue; } COM: <s> p this method obtains the filtered and formatted set of navigation </s>
funcom_train/34340563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getBackCommand1() { if (backCommand1 == null) {//GEN-END:|28-getter|0|28-preInit // write pre-init user code here backCommand1 = new Command("Atras", Command.BACK, 0);//GEN-LINE:|28-getter|1|28-postInit // write post-init user code here }//GEN-BEGIN:|28-getter|2| return backCommand1; } COM: <s> returns an initiliazed instance of back command1 component </s>
funcom_train/1952378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addChildrenPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SmartModule_children_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SmartModule_children_feature", "_UI_SmartModule_type"), SmartPackage.Literals.SMART_MODULE__CHILDREN, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the children feature </s>
funcom_train/45867544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawString(Posn p, String s){ if (s == null) s = ""; Graphics2D g = getBufferGraphics(); Paint oldPaint = g.getPaint(); g.setPaint(new Color(0, 0, 0)); g.drawString(s, p.x, p.y); g.setPaint(oldPaint); repaint(); } COM: <s> p draws a string </s>
funcom_train/35861923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected ClientHttpRequest createRequest(URI url, HttpMethod method) throws IOException { ClientHttpRequest request = getRequestFactory().createRequest(url, method); if (logger.isDebugEnabled()) { logger.debug("Created " + method.name() + " request for \"" + url + "\""); } return request; } COM: <s> create a new </s>
funcom_train/44137339
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createSlideTitle() { m_Title = new OSMSlideTitle(this, 10, 10, 480, 50, null); m_Title.setText(""); m_Title.setFont(new Font("Arial", Font.BOLD, 36)); m_Title.setColor(Color.BLACK); this.add(m_Title); } COM: <s> to create the title component </s>
funcom_train/38177623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isCompatibleVersion(String version) { boolean result = false; if (AbstractQuantity.VERSION.equals(version)) { result = true; } else if ("QuantityVersion0.9rc1".equals(version)) { result = true; } else if ("QuantityVersion0.9rc2".equals(version)) { result = true; } else if ("QuantityVersion0.9".equals(version)) { result = true; } return result; } COM: <s> method is compatible version </s>
funcom_train/19137627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fireCalculatorStopEvent() { // If no list of listener exist, just return if (listenerList == null) return; // Loop on all listener to notify them for (int i = 0; i < listenerList.size(); i++) { listenerList.get(i).calculatorStop(); } } COM: <s> notify all the registered listener that calculator has stop </s>
funcom_train/12163049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTextRendering() { MenuItemComponentRenderer factoryRenderer = factory.createPlainTextRenderer(); assertNotNull("Should be a text renderer", factoryRenderer); if (!(factoryRenderer instanceof DefaultStyledPlainTextMenuItemRenderer)) { fail("The factory did not return the expected text renderer"); } } COM: <s> this tests create plain text renderer </s>
funcom_train/4745535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deletePrivateKey(String keypairName){ KeypairMapping mapping = user.getCloudUserRole().getPrivateKey(); //delete a key if(mapping != null && mapping.getKeypairName().equals(keypairName)) { user.getCloudUserRole().setPrivateKey(null); session.beginTransaction(); session.delete(mapping); session.update(user.getCloudUserRole()); session.getTransaction().commit(); } } COM: <s> delete a private key for a keypair </s>
funcom_train/18485689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean entityDeclared(String entityName) { if (domNode.getOwnerDocument().getDoctype() != null) { NamedNodeMap entities = domNode.getOwnerDocument().getDoctype(). getEntities(); return (entities.getNamedItem(entityName) != null); } else { return false; } } //}}} //{{{ setAttribute() COM: <s> determines if the entity was declared by the dtd </s>
funcom_train/19079882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean insert(NeuralElementDescriptor elemDescr, Point2D point) { Object neuralElement = NeuralElementController.createNeuralElementFor( elemDescr, getTheNet(), getNextIndex()); if (neuralElement!= null) { insertNode(point, neuralElement); return true; } return false; } COM: <s> inserts an element both in the neural network and in the graph view </s>
funcom_train/16526050
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String bracketBalanced(String textBoxName, String[] functionCallArgs, String textBoxValue) { String feedback = ""; int openBracketCount = getCountOfChar(textBoxValue, '['); int closeBracketCount = getCountOfChar(textBoxValue, ']'); if(openBracketCount != closeBracketCount) { feedback += functionCallArgs[0]; } return feedback; } COM: <s> compares the number of brackets </s>
funcom_train/44572354
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean verifySimpleSpecBody(JmlSpecBodyClause[] clauses) { boolean result = true; for (int i = 0; i < clauses.length; i++) if (!clauses[i].isSimpleSpecBody()) { utility.reportTrouble( new PositionedError( clauses[i].getTokenReference(), JmlMessages.BAD_SIMPLE_SPEC_BODY )); result = false; } return result; } COM: <s> returns true if all elements of the argument are simple spec body </s>
funcom_train/50464880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setGlassPane(Component gp) { if(blockWindow instanceof JFrame) { ((JFrame)blockWindow).setGlassPane(gp); } else if(blockWindow instanceof JWindow) { ((JWindow)blockWindow).setGlassPane(gp); } else if(blockWindow instanceof JDialog) { ((JDialog)blockWindow).setGlassPane(gp); } } COM: <s> set the glass pane </s>
funcom_train/9029270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rule getRule(String theName) { int colonIndex = theName.indexOf("::"); //$NON-NLS-1$ Rule localRule; if (colonIndex == -1) { localRule = rules.get(theName); if (localRule == null) { localRule = getDefaultRuleSet(); } return localRule; } return Modes.resolveDelegate(this, theName); } COM: <s> answer the named rule </s>
funcom_train/15627188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showDialog(final MapView<G, A, R> mapView) { synchronized (dialogs) { final D oldDialog = dialogs.get(mapView); if (oldDialog != null) { activate(oldDialog); return; } final D dialog = allocate(mapView); dialogs.put(mapView, dialog); } } COM: <s> show a dialog for positioning the cursor of a map </s>
funcom_train/39063454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void hookEditors(TableViewer tableViewer) { scoreEditor = new TextCellEditor(tableViewer.getTable()); messageEditor = new TextCellEditor(tableViewer.getTable()); lineModifier = new LineCellModifier(); CellEditor[] cellEditors = new CellEditor[table.getColumnCount()]; cellEditors[SCORE_COLUMN] = scoreEditor; cellEditors[MESSAGE_COLUMN] = messageEditor; tableViewer.setCellEditors(cellEditors); tableViewer.setCellModifier(lineModifier); tableViewer.setColumnProperties(columnProperties); } COM: <s> creates table editors on the table code table code that will allow </s>
funcom_train/7384106
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double placementStage(double initialX, Object parent) { mxCoordinateAssignment placementStage = new mxCoordinateAssignment( this, intraCellSpacing, interRankCellSpacing, orientation, initialX, parallelEdgeSpacing); placementStage.setFineTuning(fineTuning); placementStage.execute(parent); return placementStage.getLimitX() + interHierarchySpacing; } COM: <s> executes the placement stage using mx coordinate assignment </s>
funcom_train/8353913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void startupAcceptor() { // If the acceptor is not ready, clear the queues // TODO : they should already be clean : do we have to do that ? if (!selectable) { registerQueue.clear(); cancelQueue.clear(); } // start the acceptor if not already started synchronized (lock) { if (acceptor == null) { acceptor = new Acceptor(); executeWorker(acceptor); } } } COM: <s> this method is called by the do bind and do unbind </s>
funcom_train/1042263
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void lookAt(Vector3f direction, Vector3f up ) { tmpZaxis.set( direction ).normalizeLocal(); tmpXaxis.set( up ).crossLocal( direction ).normalizeLocal(); tmpYaxis.set( direction ).crossLocal( tmpXaxis ).normalizeLocal(); fromAxes( tmpXaxis, tmpYaxis, tmpZaxis ); } COM: <s> code look at code is a convienence method for auto setting the </s>
funcom_train/22054762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getIntFromCache() throws IOException { int iVal = getByteFromCache_as_short(); iVal = iVal * 256 + getByteFromCache_as_short(); iVal = iVal * 256 + getByteFromCache_as_short(); iVal = iVal * 256 + getByteFromCache_as_short(); return iVal - getAdditionValueForLoading(); } COM: <s> get an integer from the cache </s>
funcom_train/45935936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printDescription(ClassDoc cd) { printDTWithClass(linkToLabelHrefTargetTitle(cd.name(), hrefToDoc(cd), null, classFlavor(cd, false) + " in package " + cd.containingPackage()), visibilityModifier(cd) + classFlavor(cd, true) + deprecationTag(cd)); printDD(getCommentSummary(cd)); } COM: <s> print one line summary comment for the class </s>
funcom_train/197929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Element getXMLElementForObject(Document d) { Element e = d.createElement(getClass().getName()); e.appendChild(figure.getXMLElementForObject(d)); e.setAttribute("layer", Integer.toString(getMapLayer())); Element element = e; element.setAttribute("type", type.toString()); return element; } COM: <s> returns a w3 c dom element with the attributes of this region </s>
funcom_train/38474265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean validateBudgetItems() { BudgetItem[] monthBudgets = currentCategory.getBudget(); for (int monthNo=0; monthNo < monthBudgets.length; ++monthNo) { try { rows[monthNo].validateAllFields(); } catch (UnableToSaveException e) { return false; } } return true; } COM: <s> method validate budget items </s>
funcom_train/12176435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scheduleFlush(final CacheStore cacheStore) { Thread backGroundThread = new Thread() { public void run() { while (true) { cacheStore.removeExpiredIdentities(); synchronized(this) { try { wait(interval); } catch (InterruptedException e) { //We don't care if we got interupted } } } } }; backGroundThread.start(); } COM: <s> setup a schedule for flushes of the </s>
funcom_train/15453069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeNarrative(int fileCode) { try { IndexReader reader = initIndexReader(); reader.delete( new Term(LuceneConstraints.IDENTIFIER, fileCode + "." + LuceneConstraints.TYPE_NARRATIVE)); finalizeIndexReader(reader); } catch (IOException e) { throw new IndexingException(e); } } COM: <s> removes the narrative with the given code from the lucene index </s>
funcom_train/8639308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void readHeader() throws IOException { String id = ""; for (int i = 0; i < 6; i++) id += (char)in.read(); if (!id.startsWith("GIF8")) { throw new IOException("Gif signature nor found."); } readLSD(); if (gctFlag) { m_global_table = readColorTable(m_gbpc); } } COM: <s> reads gif file header information </s>
funcom_train/14025763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumnWidths(int[] widths) { if (widths == null) return; TableColumnModel tcm = getColumnModel(); for (int i = 0; i < Math.min(tcm.getColumnCount(), widths.length); i++) { tcm.getColumn(i).setPreferredWidth(widths[i]); } } COM: <s> convenience method for setting the tables column widths in one shot </s>
funcom_train/12652413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIsCharacteristic() { // No diagnoses testIsCharacteristic(false, false, Result.FAIL); // Left only testIsCharacteristic(true, false, Result.FAIL); // Right only testIsCharacteristic(false, true, Result.FAIL); // Left and right testIsCharacteristic(true, true, Result.PASS); } COM: <s> test is characteristic method </s>
funcom_train/7295240
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void TestRuleWhitespace() { // Rules String r = "a > \u200E b;"; Transliterator t = Transliterator.createFromRules("test", r, Transliterator.FORWARD); expect(t, "a", "b"); // UnicodeSet UnicodeSet set = new UnicodeSet("[a \u200E]"); if (set.contains(0x200E)) { errln("FAIL: U+200E not being ignored by UnicodeSet"); } } COM: <s> test handling of rule whitespace for both rbt and unicode set </s>
funcom_train/6274798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean compareToIgnoreCase(StringList tokens) { if (size() == tokens.size()) { for (int i = 0; i < size(); i++) { if (getToken(i).compareToIgnoreCase( tokens.getToken(i)) != 0) { return false; } } } else { return false; } return true; } COM: <s> compares to tokens list and ignores the case of the tokens </s>
funcom_train/27899270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void uncheckCheckbox(String checkBoxName) { HtmlCheckBoxInput cb = getCheckbox(checkBoxName); if (cb.isChecked()) { try { cb.click(); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("checkCheckbox failed", e); } } } COM: <s> deselect a specified checkbox </s>
funcom_train/44561134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFilename() { DcField field = getFileField(); String[] mappings = DcSettings.getStringArray(DcRepository.Settings.stDriveMappings); return field != null ? Utilities.getMappedFilename((String) getValue(field.getIndex()), mappings) : null; } COM: <s> retrieves the filename value </s>
funcom_train/5693670
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean welcomeClient(Socket client) throws IOException { ClientValidator cv = new ClientValidator(client, ruleFile); if(!cv.isValid()) return false; ClientQuery query = new ClientQuery(client.getInputStream()); System.out.println(query); ClientResponse response = new ClientResponse(query, mimeType); // System.out.println(response); response.respond(client.getOutputStream()); String clientName = query.getProperty("User-Agent"); if(clientName == null) clientName = "Unknown"; System.out.println(cv + " - " + clientName); return true; } COM: <s> welcomes a client by reading a query from the client </s>
funcom_train/4075286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: /* public void draw(Graphics2D g, int x, int y, int width, int height){ if (image!=null){ g.drawImage(image, x-origin.x, y-origin.y, width, height, null); } } COM: <s> draw this sprite </s>
funcom_train/49509485
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Map getEnvelopeNamespaces(org.apache.axiom.soap.SOAPEnvelope env) { Map returnMap = new HashMap(); Iterator namespaceIterator = env.getAllDeclaredNamespaces(); while (namespaceIterator.hasNext()) { org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace) namespaceIterator .next(); returnMap.put(ns.getPrefix(), ns.getNamespaceURI()); } return returnMap; } COM: <s> a utility method that copies the namepaces from the soapenvelope </s>
funcom_train/29268193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAttribute(DTDAttribute pAttribute) throws SAXException { if (attributes.put(pAttribute.getName(), pAttribute) != null) { throw new SAXParseException("Duplicate attribute " + pAttribute.getName() + " in element " + getName(), pAttribute.getLocator()); } } COM: <s> adds a new attribute to the element </s>
funcom_train/5246068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removePercept(String agName, Literal per) { if (per != null && agName != null) { Set<Predicate> agl = agPercepts.get(agName); if (agl != null) { uptodateAgs.remove(agName); for (Predicate l: agl) { if (l.equals(per)) { return agl.remove(l); } } } } notifyListeners(agName); return false; } COM: <s> removes a perception for one agent </s>
funcom_train/12562526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void waitForShutdownToComplete() { synchronized (midletProxies) { // Wait for shutdown to be called. while (!shutdownFlag) { try { midletProxies.wait(); } catch (InterruptedException ie) { return; } } // Wait for all MIDlets to be destroyed. while (midletProxies.size() > 0) { try { midletProxies.wait(); } catch (InterruptedException ie) { return; } } } } COM: <s> wait for the system to asynchronously destroy all midlets </s>
funcom_train/13874318
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addElementTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CollectionType_elementType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_CollectionType_elementType_feature", "_UI_CollectionType_type"), EssentialoclPackage.Literals.COLLECTION_TYPE__ELEMENT_TYPE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the element type feature </s>
funcom_train/460119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void push() { top++; if (top >= stack.length) { Mapping newstack[] = new Mapping[stack.length * 2]; System.arraycopy(stack, 0, newstack, 0, stack.length); stack = newstack; } if (traceEnabled) log.trace("NSPush (" + stack.length + ")"); stack[top] = null; } COM: <s> create a new frame at the top of the stack </s>
funcom_train/48196479
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void keyDownUp(int keyEventCode) { if (getCurrentInputConnection() == null) { handleClose(); return; } getCurrentInputConnection().sendKeyEvent( new KeyEvent(KeyEvent.ACTION_DOWN, keyEventCode)); getCurrentInputConnection().sendKeyEvent( new KeyEvent(KeyEvent.ACTION_UP, keyEventCode)); } COM: <s> helper to send a key down key up pair to the current editor </s>
funcom_train/44770379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { // Path is immutable, we can store the computed hash code value int h = hash; if (h == 0) { h = 17; for (int i = 0; i < elements.length; i++) { h = 37 * h + elements[i].hashCode(); } hash = h; } return h; } COM: <s> returns a hash code value for this path </s>
funcom_train/4193877
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean startsWithIgnoreCase(String s) { for (int k=0; k<s.length() && (index+k)<str.length(); k++) { if (compareIgnoreCase(s.charAt(k),str.charAt(index+k))!=0) return false; } return true; } COM: <s> whether next chars equal to a specific string i s i ignoring case </s>
funcom_train/46152488
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isAvatarExists(String avatarName) { ContentCollection userRoot = getUserRoot(); String path = "/evolver/" + avatarName; try { boolean exists = (userRoot.getChild(path) != null); return exists; } catch (ContentRepositoryException excp) { logger.log(Level.WARNING, "Error while try to find " + path + " in content repository", excp); return false; } } COM: <s> returns true if the given avatar name already exists within the users </s>
funcom_train/19054783
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getM_startPane() { if (m_startPane == null) { FlowLayout flowLayout = new FlowLayout(); flowLayout.setAlignment(FlowLayout.LEFT); m_startPane = new JPanel(); m_startPane.setLayout(flowLayout); m_startPane.setBorder(BorderFactory.createEmptyBorder(10, 20, 10, 20)); m_startPane.setBackground(Color.white); m_startPane.add(getM_btnOpenTypeface(), null); } return m_startPane; } COM: <s> this method initializes m start pane </s>
funcom_train/2286926
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateFromResource(CmsResource resource) { // first set the last modification date updateDateLastModified(resource.getDateLastModified()); // now use both release and expiration date from the resource to update the expires info updateDateExpires(resource.getDateReleased()); updateDateExpires(resource.getDateExpired()); } COM: <s> updates the last modified date for this context as well as the </s>
funcom_train/24285235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getSaveButton() { if (saveButton == null) { // Save the new parameters ActionListener saveButtonListener = new ActionListener() { public void actionPerformed(ActionEvent e) { // store configuration to RESTClient's properties // and write to disk. saveConfiguration(true); } }; saveButton = new JButton(); saveButton.setText("Save"); saveButton.addActionListener(saveButtonListener); } return saveButton; } COM: <s> this method initializes save button </s>
funcom_train/19537397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void launchMapTool() { ProcessBuilder pb = new ProcessBuilder(javaCommand, maxMemStr, minMemStr, stackSizeStr, jarCommand, mapToolJar, mtArg); try { Process p = pb.start(); } catch (IOException ex) { Logger.getLogger(MTLauncher.class.getName()).log(Level.SEVERE, null, ex); } } COM: <s> launch mt in a separate process with its own jvm </s>
funcom_train/47610984
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnSHelp() { if (btnSHelp == null) { btnSHelp = new JButton(); btnSHelp.setText("^"); btnSHelp.setPreferredSize(new Dimension(22, 22)); btnSHelp.setMargin(new Insets(0, 0, 0, 0)); btnSHelp.addActionListener(this); } return btnSHelp; } COM: <s> this method initializes btn shelp </s>
funcom_train/43695549
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initialize() { this.openingFiles = new Vector<File>(); this.setContentPane(getJFrameContentPane()); this.setJMenuBar(getIvjJMenuBar()); this.setName("JFrame1"); this.setTitle("MiniJavaPlusCompiler"); this .setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); this.setBounds(20, 30, 1000, 800); } COM: <s> initialize the class </s>
funcom_train/4135826
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEditorPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ProceedingsBibTexEntry_editor_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ProceedingsBibTexEntry_editor_feature", "_UI_ProceedingsBibTexEntry_type"), BibtexPackage.Literals.PROCEEDINGS_BIB_TEX_ENTRY__EDITOR, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the editor feature </s>
funcom_train/50135726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isAnOption(String str) { if ( str.charAt(0) != '-' && str.charAt(0) != '+' ) { return false; } else return true; // check if option is a valid option // return optSyntax.containsKey(str.substring(1)); } COM: <s> returns true if the given string b could be b an option </s>
funcom_train/36253248
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateNodes() { long now = System.currentTimeMillis(); if ( (now - this.lastNodeUpdate) > UPDATE_TIME ) { try { List<String> list = this.getScheduler().getNodes(); for (String node : list) { try { URI n = new URI(node); if (!nodes.contains(n)) { nodes.add(n); ConfigManager.addNode(n); } } catch (URISyntaxException e) { e.printStackTrace(); } } } catch (VRMMSchedulerException e) { log.debug("Cannot connect with the scheduler"); } } } COM: <s> updates the list of available nodes from the scheduler information </s>
funcom_train/16981800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCompletedFile(Station s, int f, int t) { if(this.fullyReceivedData.containsKey(s)){ HashMap h=(HashMap)this.fullyReceivedData.get(s); h.put(new Integer(f), new Integer(t)); }else{ HashMap h=new HashMap(); h.put(new Integer(f), new Integer(t)); this.fullyReceivedData.put(s, h); } } COM: <s> add a file that the station has received completely </s>
funcom_train/22233151
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setImage(int level, ImageComponent image) { if (isLiveOrCompiled()) { if(!this.getCapability(ALLOW_IMAGE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("Texture15")); } // Do illegal sharing check validateImageIllegalSharing(image); if (isLive()) ((TextureRetained)this.retained).setImage(level, image); else ((TextureRetained)this.retained).initImage(level, image); } COM: <s> sets the image for a specified mipmap level </s>
funcom_train/43098674
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeSubvertex(Object handle, Object subvertex) { if (handle instanceof MCompositeState && subvertex instanceof MStateVertex) { ((MCompositeState) handle).removeSubvertex( (MStateVertex) subvertex); return; } throw new IllegalArgumentException("handle: " + handle + " or subvertex: " + subvertex); } COM: <s> remove a given subvertex from a given composite state </s>
funcom_train/18900423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void outputLine(String line) { StringBuffer buffer = new StringBuffer(); int lineLength = line.length(); if (outPipe != null) { try { outPipe.write(line.getBytes()); outPipe.flush(); } catch (IOException e) { log.error("Error getting line", e); } } } COM: <s> print out the line to standard out </s>
funcom_train/43400191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void divide(int x) { int g = NumberTheory.gcd(x, num); num = num / g; denom = denom * x / g; if (denom == 0) { throw new ArithmeticException(); } if (denom < 0) { num = -num; denom = -denom; } } COM: <s> divides this number by the integer code n code </s>
funcom_train/13665647
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User authenticate(String loginName, String password) { UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken( loginName, password); AuthenticationManager am = (AuthenticationManager) applicationContext.getBean("authenticationManager"); try { Authentication authentication = am.authenticate(token); return (User) authentication.getPrincipal(); } catch (AuthenticationException ae) { logger.debug("acegi authentication failed: " + ae); return null; } } COM: <s> the method handles the user authentication using the login name and </s>
funcom_train/9384616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setConfiguration(FolderConfiguration config, boolean force) { mDisableUpdates = true; // we do not want to trigger onXXXChange when setting new values in the widgets. // TODO: find a device that can display this particular config or create a custom one if needed. // update the string showing the folder name String current = config.toDisplayString(); mCurrentLayoutLabel.setText(current != null ? current : "(Default)"); mDisableUpdates = false; } COM: <s> update the ui controls state with a given </s>
funcom_train/9548767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fullBuild(final IProgressMonitor monitor) { try { getProject().accept(new IResourceVisitor() { public boolean visit(IResource resource) throws CoreException { compileResource(resource); return true; } }); getProject().accept(new IResourceVisitor() { public boolean visit(IResource resource) throws CoreException { linkResource(resource); return true; } }); } catch (CoreException e) { ModulipseCorePlugin.log(e); } } COM: <s> performs a full build of the project </s>
funcom_train/17255407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLocks(int locks) { if ((lockedMode & SceneElement.LOCKED_BOUNDS) != 0) lockBounds(); if ((lockedMode & SceneElement.LOCKED_MESH_DATA) != 0) lockMeshes(); if ((lockedMode & SceneElement.LOCKED_SHADOWS) != 0) lockShadows(); if ((lockedMode & SceneElement.LOCKED_TRANSFORMS) != 0) lockTransforms(); } COM: <s> note uses the currently set renderer to generate a display list if </s>
funcom_train/50339003
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean readPaneChanges() { if (log.isDebugEnabled()) log.debug("readPane starts with " +varList.size()+" vars, " +cvList.size()+" cvs " +indexedCvList.size()+" indexed cvs" ); prepReadPane(true); return nextRead(); } COM: <s> invoked by read changes on sheet button this sets in motion a </s>
funcom_train/45649949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attemptToDeleteAll(File folder) { assert folder != null; if (folder.isDirectory()) { File[] files = folder.listFiles(); for (int i = 0; i < files.length; i += 1) { attemptToDeleteAll(files[i]); } } deleteOrWarn(folder); } COM: <s> attempt to recursively delete all files in code dir code </s>
funcom_train/21188427
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String parseUser(String userLine) { final int startOfUserName = 6; try { return userLine.substring(startOfUserName, userLine.indexOf("Date: ") - 1).trim(); } catch (StringIndexOutOfBoundsException e) { LOG.error("Unparsable string was: " + userLine); throw e; } } COM: <s> parse username from vss file history </s>
funcom_train/18671188
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Column getColumn( String columnName ) { if ( columnName != null ) { Iterator iter = columns.iterator(); while ( iter.hasNext() ) { Column col = (Column)iter.next(); if ( col.getName().equals( columnName ) ) { return col; } } } //default: return null; } COM: <s> returns the table with a name of code column name code </s>
funcom_train/51206194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeContactItemActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_removeContactItemActionPerformed {//GEN-HEADEREND:event_removeContactItemActionPerformed if(lastNode != null && lastNode.getUserObject() instanceof Contact) removeNode(lastNode); }//GEN-LAST:event_removeContactItemActionPerformed COM: <s> p called when remove contact is selected in the contact popup menu </s>