__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/3870
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String additionalChildren(org.w3c.dom.Node node) { if (node.getNodeName().equals("head")) { // we need to put the encoding string at the top or JavaHelp seems to ignore it. return EncodingManager.getInstance().getEncodingTag(EncodingManager.HTML) + "\n"; } return ""; } COM: <s> provides a string representation of additional children for a node </s>
funcom_train/13445563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle getBounds(TreePath path, Rectangle placeIn) { log.fine("Apath="+path+" placeIn="+placeIn+"AAAAAAAAAAAAAAA"); TreeStateNode node = getNodeForPath(path, true, false); if(node != null) { if(updateNodeSizes) updateNodeSizes(false); Rectangle r = node.getNodeBounds(placeIn); log.fine("Areturn="+r+"AAAAAAAAAAAAAAA"); return r; } log.fine("Areturn null"+"AAAAAAAAAAAAAAA"); return null; } COM: <s> returns the code rectangle code enclosing the label portion </s>
funcom_train/9086770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(RoleDetails entity) { EntityManagerHelper.log("deleting RoleDetails instance", Level.INFO, null); try { entity = getEntityManager().getReference(RoleDetails.class, entity.getId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent role details entity </s>
funcom_train/12199072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendGenericNack(int commandStatus, int sequenceNumber) { if (transmitter != null) { try { GenericNack gnack = new GenericNack(commandStatus, sequenceNumber); transmitter.send(gnack); } catch (IOException gnacke) { event.write(gnacke, "Receiver.run(): IOException sending generic_nack."); } catch (Exception gnacke) { event.write(gnacke, "Receiver.run(): an exception sending generic_nack."); stopProcessing(gnacke); } } } COM: <s> sends code generic nack code pdu via transmitter if there is one </s>
funcom_train/12335792
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void send() { String sendString = mySyncTest.getStimuliParser().getName() + ";\n"; try { myWriter.print(sendString); myWriter.flush(); //System.out.println("sent "+sendString); } catch (Exception exc) { System.err.println(exc); } } COM: <s> sends the current stimuli name </s>
funcom_train/1797257
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setGroup(String group) { // check if setting to existing value if (this.group == null ? group != null : !this.group.equals(group)) { // set to new value for customer parameter this.group = group; setStringCustomParameter("group", group); } } COM: <s> sets the group id </s>
funcom_train/38995096
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isPAdmissable(DungTheory theory){ for(Argument argument: theory){ double allProbs = 0; for(Argument attacker: theory.getAttackers(argument)){ if(this.probability(argument).doubleValue() > 1 - this.probability(attacker).doubleValue()){ System.out.println(argument + " " + attacker); return false; } allProbs += this.probability(attacker).doubleValue(); } if(this.probability(argument).doubleValue() < 1 - allProbs){ System.out.println("B"); return false; } } return true; } COM: <s> checks whether this probabilistic extension is p admissable i </s>
funcom_train/3834494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteFeature( String where, GM_Object extent ) throws SeException { Debug.debugMethodBegin(); //TODO use also spatial conditions SeDelete delete = new SeDelete( conn ); delete.fromTable( layer.getQualifiedName(), where ); delete.close(); Debug.debugMethodEnd(); } COM: <s> deletes a feature from the arc sde </s>
funcom_train/8629953
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addTemporaryResult(LocalResult result) { if (!result.needToClose()) { return; } if (temporaryResults == null) { temporaryResults = New.hashSet(); } if (temporaryResults.size() < 100) { // reference at most 100 result sets to avoid memory problems temporaryResults.add(result); } } COM: <s> remember the result set and close it as soon as the transaction is </s>
funcom_train/19089335
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getParentDepth(HTMLElements.Element[] parents) { for (int i = fElementStack.top - 1; i >= 0; i--) { Info info = fElementStack.data[i]; for (int j = 0; j < parents.length; j++) { if (info.element.code == parents[j].code) { return fElementStack.top - i; } } } return -1; } // getParentDepth(HTMLElements.Element[]):int COM: <s> returns the depth of the open tag associated with the specified </s>
funcom_train/10386918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getCurrentThreadsBusy() { if (executor!=null) { if (executor instanceof ThreadPoolExecutor) { return ((ThreadPoolExecutor)executor).getActiveCount(); } else if (executor instanceof ResizableExecutor) { return ((ResizableExecutor)executor).getActiveCount(); } else { return -1; } } else { return -2; } } COM: <s> return the amount of threads that are in use </s>
funcom_train/14177492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseDragged(MouseEvent arg0) { Point p = adjustPointToGrid(adjustPointToView(arg0.getPoint())); // if (!isCreationMode) { if(currentSelectedStation != null) { currentSelectedStation.getStation().setProperty("x", Integer.toString(p.x)); currentSelectedStation.getStation().setProperty("y", Integer.toString(p.y)); displaySurface.repaint(); return; } // } } COM: <s> mouse is moved over the display with a button pressed </s>
funcom_train/32097146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendMsg(String msg) { /* appendMsg */ if(ta!=null && msg!=null) { /* Append to the JTextArea */ ta.append(msg); String str= ta.getText(); int strLth= str.length(); ta.setCaretPosition(strLth); this.repaint(); } } /* appendMsg */ COM: <s> append msg append message to text area in gui window </s>
funcom_train/46695947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetInputType() { System.out.println("getInputType"); AggregateLinks instance = new AggregateLinks(); List<IODescriptor> expResult = null; List<IODescriptor> result = instance.getInputType(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of get input type method of class aggregate links </s>
funcom_train/13491797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Map getVariableReplacements() { if (variableReplacements==null) { variableReplacements = new Hashtable(); // protect this block against runtime exceptions try { for (int i=0;i<queryVariables.size();i++) { VariableTerm var = (VariableTerm)queryVariables.get(i); Object con = resolve(var); variableReplacements.put(var,con); } } catch (Throwable x) { LOG_IE.error("Error building variable replacement map for derivation event listener",x); } } return variableReplacements; } COM: <s> get a map containing the current query variable replacements </s>
funcom_train/19543436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getCharToolSettings(CharToolGameSettings settings) { XStream xstream = ConverterSupport.getXStream(CharToolGameSettings.GameSettingsConverter.class, PropertyDescriptor.class, RPIcon.class, PropertyDescriptorSet.class, PropertyDescriptorMap.class); xstream.alias("game-settings", CharToolGameSettings.class); readXMLObject(xstream, CHAR_TOOL_FILE, "property descriptor", settings); } COM: <s> read the character tool data from the file </s>
funcom_train/16491738
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void uninstallChooserPanel(JColorChooser enclosingChooser) { Component[] components = slidersHolder.getComponents(); for (int i=0; i < components.length; i++) { AbstractColorChooserPanel ccp = (AbstractColorChooserPanel) components[i]; ccp.uninstallChooserPanel(enclosingChooser); } super.uninstallChooserPanel(enclosingChooser); } COM: <s> invoked when the panel is removed from the chooser </s>
funcom_train/39423663
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFirstName() { if(unappliedMods.isSetName() && unappliedMods.getName().isSetFirst()){ return unappliedMods.getName().getFirst(); }else if(personElement.isSetName() && personElement.getName().isSetFirst()){ return personElement.getName().getFirst(); } return ""; } COM: <s> get the value of first name </s>
funcom_train/8466908
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Boolean getIsModelValid() { FacesContext fc = FacesContext.getCurrentInstance(); try { Integer id = Integer.parseInt((String) fc.getExternalContext(). getRequestParameterMap().get("modelID")); return initData(id); } catch (Exception e) { /* there should be no ErrorBean.printStackTrace(e); here */ return false; } } COM: <s> checkes if the model id given in param is valid </s>
funcom_train/48404426
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addDropOutHandler(com.smartgwt.client.widgets.events.DropOutHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.DropOutEvent.getType()) == 0) setupDropOutEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.DropOutEvent.getType()); } COM: <s> add a drop out handler </s>
funcom_train/33517238
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int minimumFnRemove(int[] h) { int minIndex = Integer.MAX_VALUE; double minValue = Double.MAX_VALUE; for(int i = 0; i < nbHash; i++) { double keyWeight = getWeight(keyVector[h[i]]); if(keyWeight < minValue) { minIndex = h[i]; minValue = keyWeight; } }//end for - i return minIndex; }//end minimumFnRemove() COM: <s> chooses the bit position that minimizes the number of false negative generated </s>
funcom_train/18203424
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void defineSimulationVariables( LipidiaSimulation simulation ) { GridLogic grid = simulation.getGrid(); m_simulationShellVariables.put( "charts", m_chartWrappers ); m_simulationShellVariables.put( "grid", grid ); m_simulationShellVariables.put( "simulation", simulation ); m_shell.setAll( m_simulationShellVariables ); } COM: <s> defines all the simulation dependent shell variables that will be visible </s>
funcom_train/10938995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public T remove(HttpSession session, Map<String, Object> expandContext) { AttributeAccessor<T> aa = new AttributeAccessor<T>(name, expandContext, this.attributeName, this.fma, this.needsExpand); return aa.remove(session); } COM: <s> based on name remove from http session or from list in http session </s>
funcom_train/7280589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMsgSome() throws Exception { UDPCrawlerPing msgSome = new UDPCrawlerPing(new GUID(GUID.makeGuid()), 2, 1,(byte)0); UDPCrawlerPong reply = crawlerPongFactory.createUDPCrawlerPong(msgSome); byte[] payload = reply.getPayload(); assertEquals(1,payload[1]); assertEquals(2,payload[0]); sleep(); } COM: <s> sends a message requesting 1 leafs and 2 ups </s>
funcom_train/42403042
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void implementInterfaceMethods(final Type interfacee, final NewConcreteType newType) { Checker.notNull("parameter:interface", interfacee); Checker.notNull("parameter:newType", newType); final VirtualMethodVisitor visitor = new VirtualMethodVisitor() { protected boolean visit(final Method method) { if (method.getVisibility() == Visibility.PUBLIC) { HtmlTemplateFactoryGenerator.this.implementMethod(method, newType); } return false; } protected boolean skipJavaLangObjectMethods() { return true; } }; visitor.start(interfacee); } COM: <s> finds and implements all public methods </s>
funcom_train/9162528
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findLowestOccurrence( final E obj ) { final Integer[] levelInts = levels.keySet().toArray( new Integer[levels.size()] ); int foundAt = Integer.MAX_VALUE; for( final Integer element : levelInts ) { final int levelInt = element.intValue(); if( contains( levelInt, obj ) ) { foundAt = levelInt; break; } } return foundAt; } COM: <s> returns the lowest level at which the supplied object could be found in </s>
funcom_train/181159
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateInconsistencies() { Vector errors = new Vector(); // update inconsistency-List Iterator objects = objectTests.keySet().iterator(); while (objects.hasNext()) { Object source = objects.next(); Map map = (Map)objectTests.get(source); Iterator properties = map.keySet().iterator(); while (properties.hasNext()) { String property = (String)properties.next(); TestEntry entry = (TestEntry)map.get(property); if (!entry.hasPassed()) { errors.add("<" + entry.getUiName() + "> " + entry.getInconsistencyMessage()); } } } setInconsistencies(errors); } COM: <s> force an update of inconsistencies </s>
funcom_train/27936913
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object put(Object key, Object value) { if(key == null) { key = Compatibility.NULL; } if(value == null) { value = Compatibility.NULL; } value = hashtable.put(key, value); if(value == Compatibility.NULL) { value = null; } return value; } COM: <s> associates the specified value with the specified key in this map optional operation </s>
funcom_train/21015005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showProbRounded ( ) { Font font2 = new Font( "SansSerif", Font.PLAIN, 14 ); // create font for text g2.setFont ( font2 ); g2.setPaint ( Color.black ); g2.drawString ( "Estimated Probability: " + value, x / 4, y + ( h / 2 ) ); } COM: <s> method for showing the estimated rounded probability on the </s>
funcom_train/11012531
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test27852() { HSSFWorkbook wb = openSample("27852.xls"); for(int i = 0 ; i < wb.getNumberOfNames(); i++){ HSSFName name = wb.getNameAt(i); name.getNameName(); if (name.isFunctionName()) { continue; } name.getRefersToFormula(); } } COM: <s> names and macros </s>
funcom_train/20301937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Word createWord(Synset synset, int index, String lemma) { Word word; if (synset.getPOS().equals(POS.VERB)) { word = new MutableVerb(synset, index, lemma); } else { word = new Word(synset, index, lemma); } return word; } COM: <s> creates a word also access the sense </s>
funcom_train/25245558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readConfig() { try { this.properties = new Properties(); URL url = ResourceLoader.getResource(dataPath+file); properties.load(url.openStream()); } catch (Exception ex) { //Logger.getLogger(Config.class.getName()).log(Level.SEVERE, null, ex); throw new RuntimeException("Can't load file"); } } COM: <s> read the config file </s>
funcom_train/40926769
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getDesconectarOKCommand() { if (desconectarOKCommand == null) {//GEN-END:|111-getter|0|111-preInit // write pre-init user code here desconectarOKCommand = new Command("Confirmar", Command.OK, 0);//GEN-LINE:|111-getter|1|111-postInit // write post-init user code here }//GEN-BEGIN:|111-getter|2| return desconectarOKCommand; } COM: <s> returns an initiliazed instance of desconectar okcommand component </s>
funcom_train/12186375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void generateStartDocument() throws SAXException { if (!generatedStartDocumentEvent) { XMLProcess consumer = getConsumerProcess(); if (consumer != null) { ContextWrapperLocator locator = new ContextWrapperLocator(getPipelineContext()); consumer.setDocumentLocator(locator); consumer.startDocument(); generatedStartDocumentEvent = true; } } } COM: <s> we must generate a start document event before any other event is seen </s>
funcom_train/19295099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void oKButton_ActionEvents() { // No checks for S2S first stage estimator. if (getCheckBoxS2S().isSelected()) { setVisible(false); return; } // Check whether first stage coint relation is properly specified. String error = checkBetaRes(); if (error != null) { StdMessages.errorInput(error); return; } setVisible(false); } COM: <s> confirm settings check if external specified relations have at least 2 </s>
funcom_train/13410461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearBuffers() { // make sure no funny business is going on in the z before clearing. if (Renderer.defaultStateList[RenderState.RS_ZBUFFER] != null) Renderer.defaultStateList[RenderState.RS_ZBUFFER].apply(); GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); } COM: <s> code clear buffers code clears both the color and the depth buffer </s>
funcom_train/41457231
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean compareChars(byte[] chars, int pos) { for (int i = 0; i < len; i++) { if (differentChars((char) this.chars[i + this.pos], (char) chars[i + pos])) return false; } return true; } COM: <s> compares specified character string with current string </s>
funcom_train/32867609
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void record(String actionCommand) { if( actionCommand.equals(" Record ") ) { mbRecord = true; btnRecord.setLabel("Stop Rec"); updateCount(nMsgCount); } else if( actionCommand.equals("Stop Rec") ) { btnRecord.setLabel(" Record "); mbRecord = false; updateCount(nMsgCount); displayChatHistory(); } } COM: <s> record stop button pressed </s>
funcom_train/3652348
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComponent createCPEditorTab() { JListChooser listChooser = new JListChooser(); listChooser.setChooserActionListener(createCPEntryActionListener()); listChooser.setModel(model.getClassPathView()); listChooser.setEditable(false); listChooser.setOrderable(true); return listChooser; } COM: <s> creates the tab that lets us edit the class path referenced </s>
funcom_train/6329014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean containsKey(Object key) { Iterator entries = ((OzoneSet) entrySet())._org_ozoneDB_internalIterator(); int pos = size(); while (--pos >= 0) if (equals(key, ((Map.Entry) entries.next()).getKey())) return true; return false; } COM: <s> returns true if this contains a mapping for the given key </s>
funcom_train/47109394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SystemUser querySystemUser(EntityManager manager, String personalNumber) { // direct cache hit? if (systemUserCache.containsKey(personalNumber)) { return systemUserCache.get(personalNumber); } // query entry in the database SystemUser systemUser = SystemUserHelper.getByPersonalNumber(manager, personalNumber); systemUserCache.put(personalNumber, systemUser); return systemUser; } COM: <s> returns the system user for the given personal number </s>
funcom_train/9206139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroySubcontext(Context ctx, Name name) throws NamingException, RemoteException { if(!bindings.containsKey(name.toString())){ throw new NameNotFoundException("name: " + name.toString()); } isContext(name); List list = this.list(ctx,name); if(list.isEmpty()){ // context is empty removeBinding(name); } else{ // context not empty throw new ContextNotEmptyException("name: " + name.toString()); } } COM: <s> destory a empty sub context </s>
funcom_train/10628831
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetScaleLess() { String a = "2.345726458768760000E+10"; int newScale = 5; BigDecimal aNumber = new BigDecimal(a); BigDecimal bNumber = aNumber.setScale(newScale); assertTrue("incorrect scale", bNumber.scale() == newScale); assertEquals("incorrect value", 0, bNumber.compareTo(aNumber)); } COM: <s> set a less new scale this </s>
funcom_train/21608756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ApplicationAdminPermission setCurrentApplicationId(String applicationId) { ApplicationAdminPermission newPerm = null; if( this.applicationDescriptor == null ) { try { newPerm = new ApplicationAdminPermission( this.filter, this.actions ); }catch( InvalidSyntaxException e ) { throw new RuntimeException( "Internal error" ); /* this can never happen */ } } else newPerm = new ApplicationAdminPermission( this.applicationDescriptor, this.actions ); newPerm.applicationID = applicationId; return newPerm; } COM: <s> this method can be used in the </s>
funcom_train/22032396
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isThisType(byte[] block) { if (block == null) return false; if (block.length != GATAN_MAGIC_BLOCK_1.length) return false; for (int i=0; i<block.length; i++) { if (block[i] != GATAN_MAGIC_BLOCK_1[i]) return false; } return true; } COM: <s> checks if the given block is a valid header for a gatan file </s>
funcom_train/38589869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initMinMaxSize() { Dimension min = new Dimension(WIDTH_MINIMUM, HEIGTH_MINIMUM); Dimension max = new Dimension(WIDTH_MAXIMUM, HEIGTH_MAXIMUM); setMinimumSize(min); setMaximumSize(max); setPreferredSize(DimensionCalculator.middle(min, max)); setCaretPosition(0); setHorizontalAlignment(JTextField.LEFT); // 27.05.2011 -dst- don't use this. // HOME Key sets Cursor to the right. END to the left. // The view text ends with the character / // Override the view model. //setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); } COM: <s> set minimum maximum and preferred size of control </s>
funcom_train/16513380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void moveUp() { int oldIndex = getCommandContainer().getCommands().indexOf(this); getCommandContainer().getCommands().remove(oldIndex); getCommandContainer().getCommands().add(oldIndex - 1, this); registerMoved(UndoOperationValues.wasMovedUp); } COM: <s> moves this command up in the command container that </s>
funcom_train/26630704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Widget addChild(Widget widget) { if (children == null) { children = new Widget[4]; } else if (childCount == children.length) { Widget[] old = children; children = new Widget[children.length + 4]; System.arraycopy(old, 0, children, 0, childCount); } children[childCount++] = widget; return widget; } COM: <s> adds a widget to the widget list </s>
funcom_train/555266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void pushOpenedContexts() { Hashtable<String, Context> openedContexts = Context.getOpenedContexts(); if (openedContexts != null) { Iterator<Context> it = openedContexts.values().iterator(); int size = openedContexts.values().size(); ContextData[] rows = new ContextData[size]; int i = 0; while (it.hasNext()) { Context nextContext = it.next(); rows[i] = nextContext.getContextData(); i++; } ContextListTableModel model = ContextListTableModel.getInstance(); model.setRows(rows); } } COM: <s> displays onscreen the opened state of contexts contained in this history </s>
funcom_train/47989690
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void validateAspect(File xsdSchema) throws Exception { SchemaFactory factory; factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); Schema schema = factory.newSchema(xsdSchema); Validator validator = schema.newValidator(); Source source = new StreamSource(claxAspect); validator.validate(source); } COM: <s> performs validation of the target clax file against xsd schema </s>
funcom_train/35845270
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setPropertyInternal(String newValue) { // TODO: This is updating model on a per character basis as // well as unregistering/reregistering event listeners every // character - very wasteful - tfm if (isFiring() && !newValue.equals(getProperty())) { setFiring(false); setProperty(newValue); Model.getPump().flushModelEvents(); setFiring(true); } } COM: <s> wrapped version of set property which attempts to keep us from hearing </s>
funcom_train/18455846
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JFileChooser getFileChooser() throws IOException { String file; file = Utils.getUserPrefs().getProperty( AppConstants.LAST_FILE_CHOSEN_PROP); if (StringUtils.isBlank(file)) { file = "/"; } FILE_CHOOSER.setCurrentDirectory(new File(file)); return FILE_CHOOSER; } COM: <s> builds and returns a jfile chooser the current directory of the </s>
funcom_train/33851328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PatternElementMatch getLastLabeledMatch(String label) { PatternElementMatch cur = this; while (cur != null) { String elementLabel = cur.patternElement.getLabel(); if (elementLabel != null && elementLabel.equals(label)) return cur; cur = cur.prev; } return null; } COM: <s> get em last em match element with given label if any </s>
funcom_train/41474350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Result compare(Node oldNode, Node newNode) { Result result = new Result(); result.oldNode = oldNode; result.newNode = newNode; if (oldNode == null) { if (newNode != null) { result.created = true; result.different = true; } } else { if (newNode == null) { result.removed = true; result.different = true; } else { result.different = !oldNode.isEqualNode(newNode); } } return result; } COM: <s> performs full node comparison attributes children and node type </s>
funcom_train/49199867
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addAlienSequencePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AlienSlideLink_AlienSequence_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AlienSlideLink_AlienSequence_feature", "_UI_AlienSlideLink_type"), ExhibitionPackage.Literals.ALIEN_SLIDE_LINK__ALIEN_SEQUENCE, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the alien sequence feature </s>
funcom_train/39567539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateRoutingEntry(SPT_LogicalAddress dId, SPT_LogicalAddress nId) { //update or add a routing entry SPT_RoutingEntry entry=new SPT_RoutingEntry(dId, nId, routeEntryTimeout, adapter); if(isValid(entry)) routing_table.put(dId, entry); } COM: <s> update an routing entry </s>
funcom_train/16380252
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTitlePropertyDescriptor(Object object) { itemPropertyDescriptors.add (new UnsettablePropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ComplexTaskDefType_title_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ComplexTaskDefType_title_feature", "_UI_ComplexTaskDefType_type"), CTEPackage.Literals.COMPLEX_TASK_DEF_TYPE__TITLE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the title feature </s>
funcom_train/24121874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LoggerTreeTableNode getChild(final String name) { final int count = getChildCount(); for (int i = 0; i < count; i++) { final LoggerTreeTableNode child = (LoggerTreeTableNode) getChildAt(i); if (child.getUserObject().getName().equals(name)) { return child; } } return null; } COM: <s> returns the child with the specified name </s>
funcom_train/41621936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validateAnimation(JointAnimation animation) { if(this.joints.length != animation.getJointIDs().length) return false; else { boolean result = true; for(int i = 0; i < this.joints.length && result; i++) { result = this.joints[i].getName().equals(animation.getJointIDs()[i]); } return result; } } COM: <s> validate the given code joint animation code with controlled skeleton </s>
funcom_train/46459010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPlayerVisible(final boolean visible) { if (visible == playerVisible) return; Runnable setPlayerVis = new Runnable() { public void run() { playerVisible = visible; if (playerVisible) add(player, BorderLayout.SOUTH); else remove(player); repaint(); } }; SwingUtilities.invokeLater(setPlayerVis); } COM: <s> shows or hides the video player </s>
funcom_train/50242431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getDateFormatSpec() { if ( this.dateFormatSpec== null || this.dateFormatSpec.trim().length() == 0) { String msg = "invalid spec == '" + this.dateFormatSpec + "'"; throw new IllegalStateException( msg ); } return this.dateFormatSpec; } COM: <s> returns the specification for the rowing date is formatted as a string </s>
funcom_train/10871229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testNFA() throws IOException { // accept this or three, the union is an NFA (two transitions for 't' from // initial state) Automaton nfa = BasicOperations.union(BasicAutomata.makeString("this"), BasicAutomata.makeString("three")); assertAutomatonHits(2, nfa); } COM: <s> test that a nondeterministic automaton works correctly </s>
funcom_train/20553128
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJPanel1() { if (jPanel1 == null) { jLabel = new JLabel(); jLabel.setText(" "); FlowLayout flowLayout = new FlowLayout(); flowLayout.setAlignment(FlowLayout.RIGHT); jPanel1 = new JPanel(); jPanel1.setLayout(flowLayout); jPanel1.add(getBackButton(), null); jPanel1.add(getNextButton(), null); jPanel1.add(jLabel, null); jPanel1.add(getCancelButton(), null); } return jPanel1; } COM: <s> this method initializes j panel1 </s>
funcom_train/4970328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void saveValues(TransformerHandler handler) throws SAXException { Attributes2Impl atts = new Attributes2Impl(); handler.startElement("", "", name, atts); for (Parameter parameter : parameters) { parameter.saveValueToXML(handler); } // subsections for (ParameterSection subSection : subSections) { subSection.saveValues(handler); } handler.endElement("", "", name); } COM: <s> saves all parameter values in this section to given xml handler </s>
funcom_train/25706384
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getCancelButton() { if( cancelButton == null ) { cancelButton = new JButton(); cancelButton.setText(language.getString("Common.cancel")); cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(final java.awt.event.ActionEvent e) { cancelButtonPressed(); } }); } return cancelButton; } COM: <s> this method initializes cancel button </s>
funcom_train/31545297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getCallerName(final String pCIDNumber) { LOG.debug("Looking up callerID"); if (pCIDNumber == null) { return null; } String name = callerNames.getProperty(pCIDNumber); // null is return if entry not found if ((name != null) && (name.trim().length() < 1)) { name = null; } return name; } COM: <s> retrieves the callers name </s>
funcom_train/10595616
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Map getSessionContexts(HttpSession session) { Map contexts; contexts = (Map)session.getAttribute(SessionContext.class.getName()); if (contexts == null) { contexts = new HashMap(5, 3); session.setAttribute(SessionContext.class.getName(), contexts); } return contexts; } COM: <s> get the list of contexts </s>
funcom_train/37074736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private FeatureProperty makeDefaultFeatureProperty() { if (defaultFeatureProperty == null) return new FeatureProperty(); // cloning can be dangerous if the cloning doesnt go deep enough // then parts of the clone will be present in other clones return defaultFeatureProperty.cloneFeatureProperty(); //return new FeatureProperty(); } COM: <s> just clones default feature property hafta clone dont wanna reuse same ref </s>
funcom_train/4025732
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File validSource(String pathToSource) { if(pathToSource.indexOf(RESOURCE_SOURCE_PREFIX) != 0) { return null; } File sourceDir = toAbsolutePath(pathToSource.substring(RESOURCE_SOURCE_PREFIX.length())); return sourceDir.exists() && sourceDir.isDirectory() ? sourceDir : null; } COM: <s> validates a source dir path </s>
funcom_train/46293410
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RecordData getRecordData() throws IOException { if (hasDocuments() && !hasDocData()) { createDocData(); } if (hasDeletes() && !hasOtherData()) { createDeleteData(); } return new RecordData(docType, docBytes, otherType, otherBytes); } COM: <s> get the record data </s>
funcom_train/2903068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeGUI(Integer id){ Object set = null; synchronized(moduleTable){ set = moduleTable.remove(id); } if(set instanceof Vector){ Vector v = (Vector)set; Object[] gui = v.toArray(); FileData data = null; for(int i=0; i<gui.length; i++){ if(gui[i] instanceof Subcomponent){ Subcomponent sub = (Subcomponent)gui[i]; String pid = sub.getParentOwner(); synchronized(idTable){ data = (FileData)idTable.get(pid); } if(gui[i] instanceof Component){ if(data != null){ data.taskbar.removeTaskbarComponent((Component)gui[i]); } } } } v.clear(); } } COM: <s> remove a modules gui from the interested listener </s>
funcom_train/27808945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean accept( File f ) { if ( f.isDirectory() ) return true; String fname = f.getName(); fname.toLowerCase(); if ( fname.endsWith( ".tgz" ) && !fname.equals( ".tgz" ) ) return true; if ( fname.endsWith( ".tar.gz" ) && !fname.equals( ".tar.gz" ) ) return true; return false; } COM: <s> returns true if the file is a tar gzip file </s>
funcom_train/20659523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPopupMenu getJpmPatches() { if (jpmPatches == null) { try { jpmPatches = new JPopupMenu(); jpmPatches.setLabel("- Modify Patches -"); jpmPatches.addSeparator(); jpmPatches.add(getJmiPatchesAdd()); jpmPatches.add(getJmiPatchesEdit()); jpmPatches.add(getJmiPatchesRemove()); } catch (java.lang.Throwable e) { l.severe("Unexpected error occured. Something wrong with PatchesPopupMenu..."); e.printStackTrace(); } } return jpmPatches; } COM: <s> this method initializes j popup menu </s>
funcom_train/19158448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRightClickView(Component component) { rightClickView = component; if (!(rightClickView instanceof JPopupMenu)) return; MouseAdapter listener = new MouseAdapter() { public void mouseEntered(MouseEvent e) { mouseOnPopup = true; } public void mouseExited(MouseEvent e) { mouseOnPopup = false; } }; addListenersToAllSubcomps(rightClickView, listener); } COM: <s> set the component to be prompted when mouse right click </s>
funcom_train/29803021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void unsetMainUser(int uid){ try{ Statement deletebid = con.createStatement(); deletebid.executeUpdate("UPDATE user SET mainuser = NULL WHERE uid = '" + uid +"'"); }catch(Exception e){ System.out.println(e); e.printStackTrace(); } } COM: <s> unsets the main user of the program </s>
funcom_train/25946837
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { int val = gauge.getValue(); try { while(progressRunning){ Thread.sleep(SLEEP_INTERVAL); gauge.setValue(val++); if(val >= gauge.getMaxValue()){ gauge.setValue(gauge.getMaxValue()); Thread.sleep(SLEEP_INTERVAL*2); val = 0; } } } catch( InterruptedException e ){ e.printStackTrace(); } } COM: <s> run method of the thread which increments the progressbar </s>
funcom_train/33635523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.add(getSettingPanel(), null); jContentPane.add(getSyncPanel(), null); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/26202090
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printIndexRow(PackageDoc packagedoc) { trBgcolorStyle("white", "TableRowColor"); summaryRow(20); bold(); printPackageLink(packagedoc); boldEnd(); summaryRowEnd(); summaryRow(0); printSummaryComment(packagedoc); summaryRowEnd(); trEnd(); } COM: <s> print each package in separate rows in the index table </s>
funcom_train/5853797
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void displayEvent(Event e) { Point p = new Point(0, 0); if (e.display_info != null) p = e.getLocation(); if (p == null) p = new Point(0, 0); if (icon != null) icon.setLocation((int)p.getX(), (int)p.getY()); } COM: <s> displays a text message from an event on the tpanel </s>
funcom_train/2580123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInsets(RectangleInsets insets, boolean notify) { if (insets == null) { throw new IllegalArgumentException("Null 'insets' argument."); } if (!this.insets.equals(insets)) { this.insets = insets; if (notify) { fireChangeEvent(); } } } COM: <s> sets the insets for the plot and if requested and sends a </s>
funcom_train/9364546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean onKeyDown(int keyCode, KeyEvent event) { if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) { if (handleBack(false)) { event.startTracking(); return true; } return false; } return doMovementKey(keyCode, event, MOVEMENT_DOWN); } COM: <s> override this to intercept key down events before they are processed by the </s>
funcom_train/50158944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getKeywords() { List nodes = xmlDoc.selectNodes("//*[local-name()='general']/*[local-name()='keywords']/*[local-name()='keyword']"); String tmp = ""; if(nodes.size() > 1) tmp = ((Element)nodes.get(0)).getText(); for(int i = 1; i < nodes.size(); i++) tmp += "+" + ((Element)nodes.get(i)).getText(); return tmp.trim(); } COM: <s> gets the keywords associated with this collection </s>
funcom_train/15452033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public User getUser() { User user = null; if (this.getReferedObject() instanceof Narrative) { user = ((Narrative) this.getReferedObject()).getUser(); } else if (this.getReferedObject() instanceof UploadedFile) { user = ((UploadedFile) this.getReferedObject()).getOwner(); } return user; } COM: <s> gets the user from the refered object </s>
funcom_train/6268393
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String encode() { if (this.isEmpty()) return ""; StringBuffer encoding = new StringBuffer(); ListIterator iterator = this.listIterator(); if (iterator.hasNext()) { while (true) { Object obj = iterator.next(); if (obj instanceof GenericObject) { GenericObject gobj = (GenericObject) obj; encoding.append(gobj.encode()); } else { encoding.append(obj.toString()); } if (iterator.hasNext()) encoding.append(separator); else break; } } return encoding.toString(); } COM: <s> encode the list in semicolon separated form </s>
funcom_train/34289394
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSubject(String subject) { boolean flag = false; int i = 0; LangText lt = new LangText(subject); if (!getSubjects().contains(lt)) { List<LangText> subjectList = getSubjects(); while (i < subjectList.size() || !flag) { LangText sub = subjectList.get(i); if (sub.getLang().equals(LangText.LANG_DEFAULT)) { getSubjects().set(i, lt); flag = true; } i++; } if (!flag) { this.addSubject(lt); } } } COM: <s> set the default subject </s>
funcom_train/10563386
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMultiYardIndexLayout(Boolean multiYardIndexLayoutState) { if (multiYardIndexLayoutState != null) { config.put(SolrYard.MULTI_YARD_INDEX_LAYOUT, multiYardIndexLayoutState); } else { config.remove(SolrYard.MULTI_YARD_INDEX_LAYOUT); } } COM: <s> setter for the multi yard index layout state </s>
funcom_train/885987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isRootFragment(Fragment frag) { boolean isRoot = false; if((frag != null) && (controller.getCurrentObjectModel() != null)) { Document currentDoc = ControllerManagerImpl.getXMLFileIOManager() .getDocument(controller.getCurrentObjectModel()); isRoot = frag.equals(currentDoc.getRootFragment()); } return isRoot; } COM: <s> is the passed fragment the root fragment of the objectmodel </s>
funcom_train/44850454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Override public void flush() throws IOException { synchronized (CircularByteBuffer.this){ if (outputStreamClosed) throw new IOException("OutputStream has been closed; cannot flush a closed OutputStream."); //$NON-NLS-1$ if (inputStreamClosed) throw new IOException("Buffer closed by inputStream; cannot flush."); //$NON-NLS-1$ } // this method needs to do nothing } COM: <s> flush the stream </s>
funcom_train/46765034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getGroupchatMenuItem() { if (groupchatMenuItem == null) { groupchatMenuItem = new JMenuItem(); groupchatMenuItem.setText(Resources.getString("menu_joinroom")); groupchatMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { readChatRoomDataFromDialog(Resources.getString("msg_joinroom")); } }); } return groupchatMenuItem; } COM: <s> this method initializes groupchat menu item </s>
funcom_train/46739988
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumnName(String columnName) { if (Converter.isDifferent(this.columnName, columnName)) { String oldcolumnName= null; oldcolumnName = this.columnName; this.columnName = columnName; setModified("columnName"); firePropertyChange(String.valueOf(APPLICATIONCONTROLCOLUMNS_COLUMNNAME), oldcolumnName, columnName); } } COM: <s> unique name identifying this column </s>
funcom_train/37790388
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { Permission perm = action.getAbout(Session.getSession().getSecurityContext(), nakedObject).canUse(); if (perm.isAllowed()) { returnValue = action.execute(nakedObject); if (returnValue != null) { fireNakedActionPerformedEvent(); } } else { fireNakedActionVetoed(perm); } } COM: <s> invoked when an action occurs </s>
funcom_train/44799737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getFieldsByRefKey(final String refkey) { if (refkey != null) return (Vector) fieldsByRefKeyTable.get(refkey); // null key, construct vector of all known fields Vector v = new Vector(); for (Enumeration en = fieldsByRefKeyTable.elements(); en .hasMoreElements();) { Vector vt = (Vector) en.nextElement(); for (int i = 0; i < vt.size(); i++) { v.addElement(vt.elementAt(i)); } } return v; } COM: <s> return vector of field objects with given refkey </s>
funcom_train/2579904
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRange(Range range) { if (range == null) { throw new IllegalArgumentException("Null 'range' argument."); } if (!(range.getLength() > 0.0)) { throw new IllegalArgumentException( "Range length must be positive."); } this.range = range; fireChangeEvent(); } COM: <s> sets the range for the dial and sends a </s>
funcom_train/32612154
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Value rd(String query, String name) throws TSAPIException { // Read the name of the space which shall be tested. Set<Statement> st = null; try { st = this.tsclient.rd( new Template(String.format(query, name, name)), new SpaceURI(this.configurationSpace), Constants.TIMEOUT); } catch (NullPointerException e) { st = null; } if (st != null && st.size() == 1) { return st.iterator().next().getObject(); } else { return null; } } COM: <s> read a triple form the configuration space </s>
funcom_train/10655961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAddAttributeSimilar() { AttributeSet as1 = sc.addAttribute(sc.getEmptySet(), StyleConstants.FontSize, new Integer(10)); AttributeSet as2 = sc.addAttribute(sc.getEmptySet(), StyleConstants.FontSize, new Integer(10)); assertSame(as1, as2); } COM: <s> add the same attribute value but with different objects </s>
funcom_train/7647107
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void checkPackageAccess(String packageName) { if (packageName == null) { throw new NullPointerException(); } if (checkPackageProperty(PKG_ACC_KEY, packageName)) { checkPermission(new RuntimePermission("accessClassInPackage." //$NON-NLS-1$ + packageName)); } } COM: <s> checks whether the calling thread is allowed to access the specified </s>
funcom_train/41165116
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(CoWritingPhase entity) { EntityManagerHelper.log("saving CoWritingPhase instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved co writing phase entity </s>
funcom_train/2878745
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void readSFAttributes() throws SmartFrogException, RemoteException { // // Optional attributes. // hosts = ListUtils.resolveStringList(this,new Reference(HOSTS), false); port = sfResolve(PORT, port, false); hostsPort = sfResolve(HOSTSPORT, hostsPort, false); if (sfLog().isInfoEnabled()) sfLog().info(this.toString()); } COM: <s> reads sf description </s>
funcom_train/1694981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testObjectSuperclassOfInterface() throws NoSuchMethodException { assertEquals(Object.class, GenericTypeReflector.getExactSuperType(ArrayList.class, Object.class)); assertEquals(Object.class, GenericTypeReflector.getExactSuperType(List.class, Object.class)); assertEquals(Object.class, GenericTypeReflector.getExactSuperType(String[].class, Object.class)); } COM: <s> test that object is seen as superclass of any class interface and array </s>
funcom_train/15718328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColor(Color color) { if (color != null) { mRedSl.setValue(color.getRed()); mGreenSl.setValue(color.getGreen()); mBlueSl.setValue(color.getBlue()); mAlphaSl.setValue(color.getAlpha()); } } COM: <s> sets the color in this dialog </s>