__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/35184911
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeGUI() { setTitle("Execute " + method.getName()); getContentPane().setLayout(new BorderLayout()); // information about the method constructInfoPart(); // if there are parameters, create a table for editing values of the // parameters if (method.getParameterTypes().length > 0) constructParametersPart(); // add the GUI components for starting execution and displaying the // result constructExecuteAndResultPart(); // enable/disable execute button checkValidityOfParameters(); } COM: <s> initializes the gui </s>
funcom_train/37036268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addApplicationListener(String listener) { synchronized (applicationListeners) { String results[] =new String[applicationListeners.length + 1]; for (int i = 0; i < applicationListeners.length; i++) results[i] = applicationListeners[i]; results[applicationListeners.length] = listener; applicationListeners = results; } } COM: <s> add a new listener class name to the set of listeners </s>
funcom_train/45252519
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { removeFromActionList(this); if (retargetAction != null) { window.getPartService().removePartListener(retargetAction); retargetAction.dispose(); retargetAction = null; } window.getSelectionService().removeSelectionListener(this); super.dispose(); } COM: <s> disposes of the action and any resources held </s>
funcom_train/32823557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOperationTypePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_SemiConnectedNode_operationType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_SemiConnectedNode_operationType_feature", "_UI_SemiConnectedNode_type"), ModelPackage.eINSTANCE.getSemiConnectedNode_OperationType(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the operation type feature </s>
funcom_train/46056813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isToolEnabled(String enabledTool) { // clusterNOK: cacheToolStates: omit, since is it not clustersafe. if (!cacheToolStates.contains(enabledTool)) { // not in cache yet, read property first (see getPropertyOf(..)) getPropertyOf(enabledTool); } // POSTCONDITION: cacheToolStates.get(enabledTool) != null Boolean cachedValue = (Boolean) cacheToolStates.get(enabledTool); return cachedValue.booleanValue(); } COM: <s> reads from the internal cache </s>
funcom_train/20985988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void save(char ch) { if (_savedLen >= _saved.length) { char newSaved[] = new char[_saved.length + 512]; System.arraycopy(_saved, 0, newSaved, 0, _saved.length); _saved = newSaved; } _saved[_savedLen++] = ch; } COM: <s> saves specified character to the temporary buffer </s>
funcom_train/32213283
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void doOutOfBandCommands(String line, Client src) { if(!line.startsWith(outOfBandToken)) return; MessageData msg = new MessageData(line, src); String cmd = msg.getMessage(); LocalSystem.out.println("Got out of band message: " + cmd); fireOOBListeners(cmd, src); } COM: <s> check for the presence of out of band command if not just return </s>
funcom_train/7745897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doTagProperty(String uri, String localName, String qName, Attributes attributes, XMLMappingData data) { XMLPropertyMappingData propertyMappingData = new XMLPropertyMappingData(); propertyMappingData.setName(attributes.getValue("name")); propertyMappingData.setColumn(attributes.getValue("column")); propertyMappingData.setType(attributes.getValue("type")); data.getProperties().add(propertyMappingData); data.getColumnNames().add(attributes.getValue("column")); } COM: <s> this method will be executed when the parser encounters the property tag </s>
funcom_train/26492827
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String SearchAttributValue(Node node,String NodeName,String Attribut){ String AttributValue=""; if(node.getNodeName().equals(NodeName)){ AttributValue = SearchAttributValue(node,Attribut); } else{ NodeList listChild = node.getChildNodes(); for(int i=0;i<listChild.getLength();i++){ if(!AttributValue.equals("")) break; AttributValue = SearchAttributValue(listChild.item(i),NodeName,Attribut); } } return AttributValue; } COM: <s> return the value of the attribut attribut </s>
funcom_train/1542013
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeEnd() { bytePos = writeInt4(0, bytePos); bytePos = writeString("IEND", bytePos); crc.reset(); crc.update("IEND".getBytes()); crcValue = crc.getValue(); bytePos = writeInt4((int) crcValue, bytePos); } COM: <s> write a png iend chunk into the png bytes array </s>
funcom_train/25779069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addCoverageModelPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Test_CoverageModel_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Test_CoverageModel_feature", "_UI_Test_type"), TestpackagePackage.Literals.TEST__COVERAGE_MODEL, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the coverage model feature </s>
funcom_train/7891979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean matches(String resource, String token, String etag) { log.debug("matches: Trying to match token=" + token + ", etag=" + etag); for (int i = 0; i < size(); i++) { IfList il = (IfList) get(i); if (il.match(token, etag)) { log.debug("matches: Found match with " + il); return true; } } // invariant: no match found return false; } COM: <s> matches a list of </s>
funcom_train/39220543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertState(VideoState aVideoState) { // Add state to new position int newIndex = 0; if (videoStates.contains(selected)) { newIndex = videoStates.indexOf(selected) + 1; } videoStates.add(newIndex, aVideoState); setSelected(aVideoState); } COM: <s> insert a new state </s>
funcom_train/5272649
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("MailArchiva".equals(portName)) { setMailArchivaEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/6266975
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void stop() { // Put an empty event in the queue and post ourselves a message. if (sipStack.isLoggingEnabled()) sipStack.getLogWriter().logDebug("Exiting provider"); for (Iterator it = listeningPoints.values().iterator(); it.hasNext();) { ListeningPointImpl listeningPoint = (ListeningPointImpl) it.next(); listeningPoint.removeSipProvider(); } this.eventScanner.stop(); } COM: <s> stop processing messages for this provider </s>
funcom_train/36614915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isLegalWord(String word) { int i = 0; for (; i < word.length(); ++i) { if (word.charAt(i) < 96 || word.charAt(i) > 123) { break; } } return (i == (word.length())); } COM: <s> checks if a word is a valid word or not </s>
funcom_train/22020913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLine(String text, int static_, int visibility) { Label l = new Label(); fillLine(l, text, visibility); if (static_ == Constants.staticCst) { l.setBorder(new UnderlineBorder(l)); } textToLabel.put(text, l); textToVisibility.put(text, visibility); textToStatic.put(text, static_); add(l); } COM: <s> add a new line with the given text and visibility </s>
funcom_train/5362466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(KeyObject key) { if (key instanceof FloatKey) { float comp = m_key - ((FloatKey) key).m_key; if (comp == 0) { return KEY_EQUAL; } else if (comp < 0) { return KEY_LESS; } else { return KEY_MORE; } } else { return KEY_ERROR; } } COM: <s> compares the invoking code float key code to code key code returning </s>
funcom_train/7652973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int countLines(Process process) throws IOException { logErrors(process); InputStream in = process.getInputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(in)); int count = 0; while (reader.readLine() != null) { count++; } return count; } COM: <s> counts lines of input from the given process </s>
funcom_train/3395231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void patchTargets(JCTree body, final JCTree src, final JCTree dest) { class Patcher extends TreeScanner { public void visitBreak(JCBreak tree) { if (tree.target == src) tree.target = dest; } public void visitContinue(JCContinue tree) { if (tree.target == src) tree.target = dest; } public void visitClassDef(JCClassDecl tree) {} } new Patcher().scan(body); } COM: <s> patch up break and continue targets </s>
funcom_train/46458333
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getKeywords() { if(!keywords.equals("")) { //$NON-NLS-1$ return keywords; } else if(isRoot()) { return ""; //$NON-NLS-1$ } LaunchNode parent = (LaunchNode) getParent(); return parent.getKeywords(); } COM: <s> gets the keywords of this node or ancestor </s>
funcom_train/10260129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitle(String title) { if((description == null || "".equals(description.trim())) && (title == null || "".equals(title.trim()))) throw new InvalidRequiredParamException("title or description required: "+title+" "+description); this.title = title; } COM: <s> sets the title of the item </s>
funcom_train/44452140
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isOnlyCallWithParameter(Call call, String paramName) { for (Call c : references) { if (!c.equals(call)) { for (Parameter p : c.getParams()) { if (p.getName().equals(paramName)) { return false; } } } } return true; } COM: <s> checks whether provided call is the only one referencing this rule that </s>
funcom_train/21953372
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getAllFolders() { Vector returnValue = new Vector(); Vector subFolders = getChildren(); for (int i = 0; i < subFolders.size(); i++) { returnValue.addAll(((FolderInfo) subFolders.elementAt(i)).getAllFolders()); } return returnValue; } COM: <s> gets all of the children folders of this store info which are both </s>
funcom_train/14227601
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectionAlerting(final CallId id, final String address, final int cause) { // define action block EventHandler eh = new EventHandler() { public void process(Object o) { // Fetch or create the connection and move it to alerting ((GenericProvider)o).getCallMgr().getLazyConnection(id, address).toAlerting(cause); } }; // dispatch for processing this.getEventPool().put(eh); } COM: <s> receive and queue up a connection alerting notification event </s>
funcom_train/48105646
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUseRAM(boolean value) throws IOException, CorpusConcurrencyException { if(indexSearcher == null) closeIndex(0); if (value && !(dir instanceof RAMDirectory)) { dir = new RAMDirectory(dir); } else { dir = FSDirectory.getDirectory(indexFile); } } COM: <s> expert switch corpus to ram </s>
funcom_train/15677407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double localPosition(double t) { int i = this.curveIndex(t); T curve = curves.get(i); double t0 = curve.getT0(); double t1 = curve.getT1(); return Curves2D.fromUnitSegment(t-2*i, t0, t1); } COM: <s> converts the position on the curve set which is comprised between 0 and </s>
funcom_train/14519079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getAllCAIds(){ Collection caids = (Collection) data.get(CAID); ArrayList retval = new ArrayList(); Iterator iter = caids.iterator(); while(iter.hasNext()){ Integer value = (Integer) iter.next(); if(value.intValue() > CAInfo.SPECIALCAIDBORDER || value.intValue() < 0){ retval.add(value); } } return retval; } COM: <s> returns all valid caids if a certusage have caid useuserdefined defined then </s>
funcom_train/40873692
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveToDisk(Document document, String filePath) { // Create the output file and save the xml schema try { XMLOutputter fmt = new XMLOutputter(Format.getPrettyFormat()); fmt.getFormat().setEncoding("utf-8"); File outputFile = new File(filePath); FileOutputStream out = new FileOutputStream(outputFile); fmt.output(document, out); out.flush(); out.close(); } catch (Exception e) { System.err.println(e); } } COM: <s> save the given document in the given path </s>
funcom_train/2928171
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFilterConcreteType () { TypeFilter filter = new TypeFilter (MockElement.class); assertEquals("Concrete type is expected to be accepted", true, filter.filter(elem)); assertEquals("Supertype is expected to be rejected", false, filter.filter(untypedElement)); assertEquals("Custom type is expected to be rejected", false, filter.filter(untypedElement)); } COM: <s> this tests initializes the filter with type mock element </s>
funcom_train/26369848
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNamedCreate(){ Artist a = new Artist( 1, "Jimmy" ); assertTrue( a.getId() == 1 ); assertTrue( a.getName().equals("Jimmy") ); assertTrue( a.getType() == MP3Config.ARTIST_TYPE ); } COM: <s> tests the creation of an aritst </s>
funcom_train/1282676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRelativeMouseMode(boolean _mode) { if (_mode == this.isRelativeMouseMode()) { return; } if (_mode) { try { this.robot = new Robot(); this.recenterMouse(); } catch (AWTException e) { this.robot = null; } } else { this.robot = null; } } COM: <s> set mousemovement to be relative </s>
funcom_train/1728241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(RepositoryFacade runtime, Serializable... idFields) { if(idFields == null) throw new IllegalArgumentException("Identity cannot be null."); Serializable identity = PersistencyAttributes.getId(idFields); try { readLock(); return this.objectWarehouse.contains(identity, runtime.getTransaction()); } finally { readUnlock(); } } COM: <s> checks if the repository contains the object with the given identity </s>
funcom_train/9558521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Message sendMessage(String recipient, String text) throws TwitterException { if (text.length() > 140) throw new IllegalArgumentException("Message is too long."); Map vars = asMap(new Object[] {USER, recipient, TEXT, text}); String result = post("http://twitter.com/direct_messages/new.json", true, vars); //$NON-NLS-1$ try { return new Message(new JSONObject(result)); } catch (JSONException e) { throw new TwitterException(e); } } COM: <s> sends a new direct message to the specified user from the </s>
funcom_train/42709651
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getTerminarCommand() { if (terminarCommand == null) {//GEN-END:|61-getter|0|61-preInit // write pre-init user code here terminarCommand = new Command("Terminar", Command.EXIT, 0);//GEN-LINE:|61-getter|1|61-postInit // write post-init user code here }//GEN-BEGIN:|61-getter|2| return terminarCommand; } COM: <s> returns an initiliazed instance of terminar command component </s>
funcom_train/3073778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void loadSupportedToolsList() { this.nbToolsSupported = getDefaultIntValue("Statics.tools.nbTools"); this.supportedTools = new ArrayList<String>(this.nbToolsSupported); for ( int toolId = 1; toolId <= this.nbToolsSupported ; toolId++ ) this.supportedTools.add(getDefault("Statics.tools." + toolId)); } COM: <s> p load from properties file the metadata on each tools xradar can agregate </s>
funcom_train/15931355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { ConcurrentSkipListMap<K,V> clone = null; try { clone = (ConcurrentSkipListMap<K,V>) super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError(); } clone.initialize(); clone.buildFromSorted(this); return clone; } COM: <s> returns a shallow copy of this tt map tt instance </s>
funcom_train/23044612
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTimeoutPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AsyncActivity_timeout_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AsyncActivity_timeout_feature", "_UI_AsyncActivity_type"), ConceptPackage.Literals.ASYNC_ACTIVITY__TIMEOUT, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the timeout feature </s>
funcom_train/7880915
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void lnw(String bin) { // get operands indexed = true; int r1 = Integer.parseInt(bin.substring(8, 11), 2); int addr = effAdr(bin); // store to memory location if (addr >= 0 && addr <= 65536) { setReg(r1, -(Integer.parseInt(getMem(addr), 16))); } else { // report invalid memory location error } indexed = false; } COM: <s> description load negated word br </s>
funcom_train/19311474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void ne() throws PsOperatorException { final PsObject object1 = popOperand(PsOperator.NE); final PsObject object2 = popOperand(PsOperator.NE); if (! object1.isComparable(object2)) { pushTrue(); return; } if (object1.equals(object2)) { pushFalse(); return; } pushTrue(); } COM: <s> executes the ne operator </s>
funcom_train/18878435
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void copyFrom(Vessel vessel) { mmsi = vessel.mmsi; status = vessel.status; callSign = vessel.callSign; name = vessel.name; destination = vessel.destination; position.set(vessel.position.toString()); speedOverGround = vessel.speedOverGround.clone(); trackOverGround = vessel.trackOverGround.clone(); heading = vessel.heading.clone(); width = vessel.width; length = vessel.length; type = vessel.type; typeOfStation = vessel.typeOfStation; active = vessel.active; time = vessel.time; positionsCache.clear(); positionsCache.addAll(vessel.positionsCache); } COM: <s> copy the data from another vessel </s>
funcom_train/46866981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if (o == null) return false; if (!(o instanceof CommunityMember)) return false; CommunityMember other = (CommunityMember) o; return (this.getCommunity().getCommunityId() == other.getCommunity() .getCommunityId() && this.getMember().getUserId() == other .getMember().getUserId()); } COM: <s> returns code true code if o is object of </s>
funcom_train/31406459
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUpdateParameters(PreparedStatement stmt) throws SQLException { setInt(stmt, 1, _row); setInt(stmt, 2, _column); stmt.setString(3, _name); stmt.setString(4, _abbreviation); stmt.setString(5, _type); stmt.setLong(6, getID()); } COM: <s> set parameters on the update statement </s>
funcom_train/2714958
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateCachedMetrics() { Font textFont = text.getFont(); FontMetrics fm = getFontMetrics(textFont); this.textFontHeight = fm.getHeight(); this.textFontAscent = fm.getAscent(); this.textTopInset = text.getInsets().top; } COM: <s> cache some values that are used a lot in painting or size </s>
funcom_train/2808894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getEventType(String uriStr) { Map uri = getRequestMapMap(uriStr); if (uri != null) return (String) uri.get(ConfigXMLReader.EVENT_TYPE); else { Debug.logWarning("[RequestManager.getEventType] Type of event for request \"" + uriStr + "\" not found", module); return null; } } COM: <s> gets the event type from the request map </s>
funcom_train/2538786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3D crossLocal(Vector3D v) { float crossX = y * v.getZ() - v.getY() * z; float crossY = z * v.getX() - v.getZ() * x; float crossZ = x * v.getY() - v.getX() * y; this.setXYZ(crossX, crossY, crossZ); return this; } COM: <s> calcs the cross and sets the new values to this vector </s>
funcom_train/50365096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getLeafCount() { int count = 0; MibNode node; Enumeration enum = breadthFirstEnumeration(); while (enum.hasMoreElements()) { node = (MibNode) enum.nextElement(); if (node.isLeaf()) { count++; } } if (count < 1) { throw new Error("tree has zero leaves"); } return count; } COM: <s> returns the total number of leaves that are descendants of this node </s>
funcom_train/37831494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean shouldReward(Player player) { String cid = getPlayerCID(player); // Do not reward if either the buyer or the offerer // does not have a proper CID for some reason if (cid.equals("") || "".equals(get(OFFERER_CID_ATTRIBUTE)) || cid.equals(get(OFFERER_CID_ATTRIBUTE))) { return false; } // Finally check if it's the same player from another computer return !player.getName().equals(getOfferer()); } COM: <s> check whether accepting this offer should be rewarder in trade score </s>
funcom_train/11728198
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetStatement() throws RepositoryException { String statement = "/" + jcrRoot + "/foo"; Query q = session.getWorkspace().getQueryManager().createQuery(statement, Query.XPATH); assertEquals("Statement returned by Query.getStatement() is not equal to the initial statement.", statement, q.getStatement()); } COM: <s> tests it the statement returned by </s>
funcom_train/25880196
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Method getMethodFromCommand() { Class<?> testClass = getClassFromCommand(); if (parameters.length < 2) { throw new TesterException("The method parameter is empty."); } try { return testClass.getMethod(this.parameters[METHOD_INDEX]); } catch (Exception e) { throw new TesterException(String.format("Method '%s' cannot be found in the class '%s'",this.parameters[METHOD_INDEX],this.parameters[CLASS_INDEX])); } } COM: <s> return a specific method of a class informed as parameter </s>
funcom_train/43580261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getGloomySeaButton() { if (gloomySeaButton == null) { gloomySeaButton = new JButton(); gloomySeaButton.setText("Apply"); gloomySeaButton.setSize(new Dimension(80, 20)); gloomySeaButton.setLocation(new Point(356, 258)); gloomySeaButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { setskin(3); SkinContainer.setLookAndFeel(getskin()); f.repaint(); } }); } return gloomySeaButton; } COM: <s> this method initializes gloomy sea button </s>
funcom_train/12325863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGenerateLargeNumberOfRandomMRN() { Set<Integer> previouslyGenerated = new HashSet<Integer>(); for (int i=0; i<LARGE_NUMBER; i++) { int mrn = CherelMedicalRecordNumbers.generateRandomMRN(); assertTrue(mrn >= 0); boolean isNew = previouslyGenerated.add(mrn); if (!isNew) { fail("Unexpectedly generated '" + mrn + "' more than once"); } } } COM: <s> this test should succeed most of the time the chance of failure </s>
funcom_train/50464350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireManagedObjectRemoved(Object pObject) { Iterator _listeners = listeners.iterator(); while(_listeners.hasNext()) { ((BLXCollectionListener)_listeners.next()).managedObjectRemoved( new BLXCollectionEvent(this, BLXCollectionEvent.COMPONENT_REMOVED, pObject, null, -1)); } } COM: <s> fire object removed event </s>
funcom_train/3472390
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setChildren(StructureElement[] children) { if (children != null) { this.children = new Vector<StructureElement>(Arrays.asList(children)); for (int i = 0; i < children.length; i++) { children[i].setParent(this); } } else { this.children = new Vector<StructureElement>(5, 5); } } COM: <s> sets the children </s>
funcom_train/7679539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void initPluginsPath() { BrowserSettings s = BrowserSettings.getInstance(); pluginsPath = s.getPluginsPath(); if (pluginsPath == null) { s.loadFromDb(mContext); pluginsPath = s.getPluginsPath(); } if (Config.LOGV) { Log.v(TAG, "Plugin path: " + pluginsPath); } } COM: <s> utility method to initialize the user data plugins path </s>
funcom_train/46015300
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Item getItemById(long itemid) { Iterator it = sellItems.iterator(); Item item = null; //Look through the whole database if the requested id is there while (it.hasNext()) { item = (Item) it.next(); if (item.getId() == itemid) { break; } else { item = null; } } return item; } COM: <s> return specific item for given id </s>
funcom_train/8381361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getCurrentUser() { SecurityContext context = SecurityContextHolder.getContext(); if (context != null && context.getAuthentication() != null) { Authentication auth = context.getAuthentication(); if (auth instanceof AnonymousAuthenticationToken) { return null; } return auth.getPrincipal(); } return null; } COM: <s> fetches the user object from the acegi security contexts authentication object </s>
funcom_train/34840434
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean userExists(String username) { try { JPAUtil.getEntityManager() .createQuery("select ad from Admin ad where ad.username =:aUserName") .setParameter("aUserName", username.toLowerCase()) .setHint(QueryHints.READ_ONLY, HintValues.TRUE) .getSingleResult(); return true; } catch (NoResultException ne) { return false; } } COM: <s> tells whether or not an administrative user with the given username exists </s>
funcom_train/21940328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Field72 getField72() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("72"); if (t == null) { log.fine("field 72 not found"); return null; } else { return new Field72(t.getValue()); } } } COM: <s> iterates through block4 fields and return the first one whose name matches 72 </s>
funcom_train/3833920
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setModules( Module[] modules ) { this.modules.clear(); this.list.clear(); if ( modules != null ) { for ( int i = 0; i < modules.length; i++ ) { this.modules.put( modules[i].getName(), modules[i] ); list.add( modules[i] ); } } } COM: <s> sets the modules of a guiarea </s>
funcom_train/24081721
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createUtilities(Properties t){ for(int i=0; i < n_utilities; i++){ int j = Integer.parseInt(t.getProperty("index"+i)); String s = t.getProperty("title"+i); int c = Integer.parseInt(t.getProperty("price"+i)); squares.remove(j); if(j==5 || j==15 || j==25 || j==35){ squares.add(j, new ShipSquare(s, c, c, null)); } else { squares.add(j, new BrewerySquare(s, c, c, null)); } } } COM: <s> creates ship and brewery squares </s>
funcom_train/46144304
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCentralTidbokIDfromLocation(State state, String locationId) { try { int tidboksId = Integer.parseInt(locationId, 10); state.setCentralTidbokID(tidboksId); } catch (NumberFormatException e) { // Don't do anything if we can't get an int. We probably have a Sectra call, // and then it won't be needed anyway. } } COM: <s> used in the update flow </s>
funcom_train/14001191
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Particle (float x, float y, float z, int frame_num, String[] params) { this.x = x; this.original_x = x; this.y = y; this.original_y = y; this.z = z; this.original_z = z; this.all_params = params; this.special = true; this.frame = frame_num; this.next = new int[getLinkrange()]; this.score = 0.0F; this.m0 = 0.0F; this.m1 = 0.0F; this.m2 = 0.0F; this.m3 = 0.0F; this.m4 = 0.0F; } COM: <s> constructor for particles created from text files </s>
funcom_train/25507270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAlertThreshold (Account account, AlertThreshold threshold) { AlertThreshold old = account.getAlertThreshold(); if (!old.equals(threshold)) { account.setAlertThreshold(threshold); this.fireEvent(new AccountPropertyChangedEvent(this, AccountPropertyChangedEvent.ALERT_THRESHOLD, account, old, threshold)); this.setChanged(); } } COM: <s> changes the alert threshold for this account </s>
funcom_train/10799520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Instruction throwException(Code code, Class type) { Instruction ins = code.anew().setType(type); code.dup(); code.invokespecial().setMethod(type, "<init>", void.class, null); code.athrow(); return ins; } COM: <s> throw an exception of the given type </s>
funcom_train/29922380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateList(Long minPeriod) { Enumeration e = this.propertyNames(); while (e.hasMoreElements()) { String address = (String)e.nextElement(); String entryTime = this.getProperty(address); if (hasExpired(entryTime,minPeriod)) { this.remove(address); } } } COM: <s> updates the address list by removing </s>
funcom_train/27784162
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Integer getIntegerFromRequest(HttpServletRequest request, String key) { Integer returnInt = null; String stringInt = request.getParameter(key); if(stringInt != null && stringInt.length() > 0) { try { returnInt = new Integer(stringInt); } catch (NumberFormatException ignore) {/* oh well... */} } return returnInt; } COM: <s> a convenience method for getting integers from the request </s>
funcom_train/4233180
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handlePropertiesUpdate(Component source) { if (source == null) return; if (source.equals(sampleRateTextField)) { handleSampleRateUpdate(); } else if (source.equals(numberOfSamplesTextField)) { handleNumberOfSamplesUpdate(); } else if (source.equals(windowFunctionComboBox)) { handleWindowFunctionUpdate(); } else if (source.equals(segmentSizeTextField)) { handleSegmentSizeUpdate(); } else if (source.equals(overlapTextField)) { handleOverlapUpdate(); } } COM: <s> handle events from the properties panel </s>
funcom_train/19695923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void put(String key, String tokensStr) { List<String> tokens = new ArrayList<String>(); for (String token : tokensStr.split("[ ,]+")) { token = StringUtils.trimToNull(token); if (token != null) { tokens.add(token); } } put(key, tokens); } COM: <s> generate pattern using tokens from given string </s>
funcom_train/51655584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isBackEnabled() { checkWidget(); int ptr = OS.malloc(4); int[] args = new int[] {OS.Pt_ARG_WEB_NAVIGATE_PAGE, ptr, 0}; OS.PtGetResources(webHandle, args.length / 3, args); int[] result = new int[1]; OS.memmove(result, ptr, 4); OS.memmove(result, result[0], 4); OS.free(ptr); return (result[0] & (1 << OS.Pt_WEB_DIRECTION_BACK)) != 0; } COM: <s> returns code true code if the receiver can navigate to the </s>
funcom_train/8085384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void copyMatrix(int from[][], int to[][]) { for(int i=0; i<from.length; i++) for(int j=0; j<from[i].length; j++) to[i][j]=from[i][j]; } COM: <s> copies one matrix of type int to another </s>
funcom_train/12901344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { if (getAnnotationLinkagePolicy() != null) { getAnnotationLinkagePolicy().dispose(); linkageHelper = null; } if (genericData != null) { disposeCollection(genericData.values()); } if (viewerData != null) { Iterator itr = viewerData.values().iterator(); while (itr.hasNext()) { disposeCollection(((HashMap) itr.next()).values()); } } if(imageCache != null){ Iterator images = imageCache.values().iterator(); while(images.hasNext()){ ((Image)images.next()).dispose(); } } } COM: <s> call when it is time to go away </s>
funcom_train/26221500
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() throws IOException { if (null == fileName) { throw new IOException("No file name specified!"); } final DataOutputStream dataOut = new DataOutputStream(new FileOutputStream(getFullFileAccessName())); dataOut.write(this.fileBytes); dataOut.flush(); dataOut.close(); } COM: <s> saves the file content </s>
funcom_train/8690828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Reader chain(final Reader rdr) { ConcatFilter newFilter = new ConcatFilter(rdr); newFilter.setPrepend(getPrepend()); newFilter.setAppend(getAppend()); // Usually the initialized is set to true. But here it must not. // Because the prepend and append readers have to be instantiated // on runtime //newFilter.setInitialized(true); return newFilter; } COM: <s> creates a new concat reader using the passed in </s>
funcom_train/50983297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInsert_NoLimits() throws Exception { final NumberDocument document = new NumberDocument(); document.localize(ENGLISH_CONTROLLER); doTest( document, 0, "123.456", "123.456" ); doTest( document, document.getLength(), ".7", "123.4567" ); doTest( document, document.getLength(), "a8", "123.45678" ); } COM: <s> test insert with a default document </s>
funcom_train/32304289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assignP(final Temp def, Collection c, boolean multAssignAllowed) { if (!multAssignAllowed) { // getting around multiple-assignment checker... for (Object rO : c) { Temp r = (Temp) rO; Temp t = regfile.getTemp(r); if (regfile.hasAssignment(t)) regfile.remove(t); } } // don't need Instr source info here, so can use null regfile.assign(def, new ArrayList(c), null); } COM: <s> assigns def to c </s>
funcom_train/43467178
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testTestClass() { assertEquals("ToStringTest.TestClass [names=" + "String[] [{\"Heinz\",\"Joern\",\"Pieter\",\"Herman\"" + ",\"John\"}], totalIQ=900]", ToStringFacade .toString(new TestClass())); } COM: <s> tests support for classes </s>
funcom_train/49791119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void logStatus(IStatus status) { if (status.isOK()) return; if (status.getSeverity() >= IStatus.ERROR) { getDefaultPlugin().logError( status.getMessage(), status.getException()); } else { getDefaultPlugin().logError( "[warning] " + status.getMessage(), status.getException()); } } COM: <s> log the given status to the plugin </s>
funcom_train/13849115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void removeClientLeases(Iterator deadLeases) { while(deadLeases.hasNext()) { ClientLeaseWrapper clw = (ClientLeaseWrapper) deadLeases.next(); // Remove from lrm try { lrm.remove(clw); } catch (UnknownLeaseException e) { // This can happen if there was some problem renewing // the lease, or its LRM expiration just ran out. // Since we are remove the lease any way ignore. } } } COM: <s> method used to remove membership expired leases from the server </s>
funcom_train/5510872
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public InstanceList getInstanceList() { Object refObj = m_instanceListRef.getReferencedObject( getProject() ); if ( InstanceList.class.isAssignableFrom(refObj.getClass()) == false ) { String msg = m_instanceListRef.getRefId() + " doesn\'t denote a instancelist"; throw new BuildException(msg, getLocation() ); } return (InstanceList) refObj; } COM: <s> get the instance list to be converted </s>
funcom_train/28116728
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onMessage(Message message) { try { _sender.send(message, _count); if (_commit) { if (_session != null && !(_session instanceof javax.jms.XASession) && _session.getTransacted()) { _session.commit(); } } } catch (Exception exception) { log.error(exception, exception); } } COM: <s> invoked when the consumer asynchronously receives a message </s>
funcom_train/31801554
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetOperator() { HanselValue se1 = new HanselValue("arg1", false, 1); HanselValue se2 = new HanselValue("arg2", false, 1); BinaryOperatorEntry boe = new BinaryOperatorEntry("+", 3, se1, se2); assertSame(se1, boe.getOperator1()); assertSame(se2, boe.getOperator2()); } COM: <s> test the get operator methods </s>
funcom_train/18827356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void decode(DataInputStream in) throws IOException { int len = in.readInt(); MeteredInputStream min = new MeteredInputStream(in, len); DataInputStream in2 = new DataInputStream(min); while (!min.limitReached()) { String name = in2.readUTF(); String value = in2.readUTF(); put(name, value); } } COM: <s> decodes a set of properties from the given input stream </s>
funcom_train/7410687
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addFile(File file) throws IOException { /* instrument class */ ClassFile cf = new ClassFile(); FileInputStream fis = new FileInputStream(file); cf.read(new DataInputStream(fis)); instrument.instrument(cf); fis.close(); log.info("[Instrument] Instrumenting file " + file.getPath()); } COM: <s> add the content of file this instrumented set </s>
funcom_train/2966861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cleanUp(double xmlVersion) { // Remove the action listeners if set. This MUST be done // othewise even after removing these components they will // keep on getting these events and it would be a whole // mess. if (m_comboBox != null) m_comboBox.removeActionListener(this); if (m_plusButton != null) m_plusButton.removeActionListener(this); if (m_minusButton != null) m_minusButton.removeActionListener(this); removeAll(); setVisible(false); } COM: <s> this method cleans up the text menu objetc </s>
funcom_train/20891768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String calculateSimulationTime(String simulationTime, String base, String stepsPerSecond) { long time = Long.parseLong(simulationTime); int sps = Integer.parseInt(stepsPerSecond); if (base.equals("seconds")) { time = time / sps; } else if (base.equals("minutes")) { time = time / (sps * 60); } else if (base.equals("hours")) { time = time / (1L * sps * 3600); } return Long.toString(time); } COM: <s> calculates the time value that should be written to the file </s>
funcom_train/20433635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean moveManFromLeft(char player, int row) { int j; for (j = 0; j < boardSize; j++) { if (board[row][j] != EMPTY) break; } if (j == boardSize || j == 0) return false; board[row][j - 1] = player; lastMove[getMovesIndex(player)].x = row; lastMove[getMovesIndex(player)].y = j - 1; numberMoves[getMovesIndex(player)]++; movesCounter++; return true; } COM: <s> moves man from left of the board </s>
funcom_train/37650616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumberOfMethods(AbstractPMDRecord element) { int numberOfMethods = 0; if (element instanceof MarkerRecord && getShowType() == SHOW_MARKERS_FILES) { numberOfMethods = element.getParent().getParent().getNumberOfMethods(); } else { numberOfMethods = element.getNumberOfMethods(); } return numberOfMethods; } COM: <s> gets the correct number of methods depending on the presentation type </s>
funcom_train/23779342
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void append(char argChar) { _isHashCached = false; if (_length == _content.length) { char[] old = _content; _content = new char[old.length << 1]; System.arraycopy(old, 0, _content, 0, old.length); } _content[_length++] = argChar; } COM: <s> appends the given character to the buffer </s>
funcom_train/3400487
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeAttribute(int i, String value) throws XMLStreamException { String nsUri = in.getAttributeNamespace(i); if(nsUri!=null) out.writeAttribute( in.getAttributePrefix(i), nsUri, in.getAttributeLocalName(i), value ); else out.writeAttribute( in.getAttributeLocalName(i), value ); } COM: <s> writes out an </s>
funcom_train/2962112
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void storeClauses(final ComponentConstraint clause) { if (clausesStore == null) { clausesStore = new ComponentConstraintWithSubConstraints(ConstraintType.CLAUSES, clause.getVariables(), null, clause); clausesStore.addOptions(clause.getOptions()); clausesStore.findManager(properties); constraints.add(clausesStore); } else { clausesStore.addElements(clause.getVariables(), clause); } } COM: <s> data structure to deal with clauses </s>
funcom_train/69515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLayoutComponent(Component comp, Object constraints) { if (constraints instanceof SpazPosition) { SpazPosition cons = (SpazPosition)constraints; setConstraints(comp, cons); } else if (constraints != null) { throw new IllegalArgumentException( "cannot add to layout: constraint must be a SpazPostion"); } } COM: <s> adds the specified component to the layout using the specified </s>
funcom_train/29723492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getJTextArea() { if (jTextArea == null) { jTextArea = new JTextArea(); jTextArea.setEditable(false); jTextArea.setBackground(new Color(243, 243, 243)); jTextArea.setBorder(BorderFactory.createLineBorder(Color.gray, 5)); } return jTextArea; } COM: <s> this method initializes j text area </s>
funcom_train/42897346
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePermission(String topicArn, String label) throws SNSException { Map<String, String> params = new HashMap<String, String>(); params.put("TopicArn", topicArn); params.put("Label", label); HttpGet method = new HttpGet(); makeRequestInt(method, "RemovePermission", params, RemovePermissionResponse.class); } COM: <s> removes permissions from a topic </s>
funcom_train/8008821
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addRegularExpressionRule( String column,String regExp, String errorMessage, HtmlFormComponent focusComp) { FourObjectContainer f = new FourObjectContainer(TYPE_REGEXP, new TwoObjectContainer(column,new RegularExpressionMatcher(regExp)), errorMessage, focusComp); _rules.addElement(f); } COM: <s> adds a regular expression rule to the datastore </s>
funcom_train/13479385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPlanetoid(Planetoid planetoid, int position) { controller.checkStatus(Controller.STATUS_INIT); if (planets == null) planets = new Planetoid[MAX_PLANETS]; if (planets[position] != null) { if (planets[position].equals(planetoid)) return; // FIXME[todo]: check whether there existed another // Planetoid at that position before, and if so, delete it ... planets[position]._destroy(); } planets[position] = planetoid; } COM: <s> set planetoid sets the parameters of the index th planetoid within the </s>
funcom_train/11096972
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doFail() { LOGGER.debug("ServiceMixGBean doFail"); try { if (container != null) { try { container.shutDown(); } catch (JBIException e) { LOGGER.info("Caught while closing due to failure: {}", e.getMessage(), e); } } } finally { container = null; } } COM: <s> fails the gbean </s>
funcom_train/10153959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void createDialog() { XADialog dialog = new XADialog(shell, this, composite, "Installation Verification", true, false, new Point(400, 230)) { /** * (non-Javadoc) * * @see org.eclipse.jface.dialogs.Dialog#close() */ @Override public boolean close() { executePhoneHome(); return super.close(); } }; dialog.open(); } COM: <s> creates and opens installation verification dialog </s>
funcom_train/38938839
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void switchLanguage(ActionEvent event) { String current = (String)event.getComponent().getId(); setSelectedLanguage(current); ConfigurationBackingBean configurationBean = (ConfigurationBackingBean)super.getBackingBean("configurationBackingBean", ConfigurationBackingBean.class); configurationBean.establishLanguageAccordionView(current); this.currentLocale = (Locale)localesApplication.get(current); getViewRoot().setLocale((Locale)localesApplication.get(current)); } COM: <s> performs the change of language dynamically </s>
funcom_train/7526061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOverriddenForTYPES() throws Throwable { MethodCall methodCall = new MethodCall("overriddenMethod", new Object[] { "abc" }, new Class[] { String.class }); TargetSubclass target = new TargetSubclass(); Object result = methodCall.invoke(target); assertEquals("TargetSubclassABC", result); } COM: <s> this tests whether overriden methods are correctly identified and invoked </s>