__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/13570317
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public V get(final Class<? extends K> key) { V value = this.mainMap.get(key); if (value == null) { Class<?> newKey = this.cacheReduction.get(key); if (newKey == null) { for (Class<?> klass : ClassUtils.getAllTypes(key)) { value = this.mainMap.get(klass); if (value != null) { this.cacheReduction.put(key, klass); break; } } } else { value = this.mainMap.get(newKey); } } return value; } COM: <s> returns the associated mapped value for the given key </s>
funcom_train/45253243
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Object getPartId(IWorkbenchPart part) { String id = part.getSite().getId(); if (part instanceof IViewPart) { String secondaryId = ((IViewPart) part).getViewSite() .getSecondaryId(); if (secondaryId != null) { id = id + ':' + secondaryId; } } return id; } COM: <s> returns the id for the given part taking into account </s>
funcom_train/13190989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IType getType() { String projectName = textProjectName.getText(); IJavaProject javaProject = TypeSelectionHelper .getJavaProject(projectName); if (javaProject != null) { try { IType type = javaProject.findType(textClassName.getText()); if (type != null && type.exists()) { return type; } } catch (JavaModelException e) { // ignore } } return null; } COM: <s> returns the selected type </s>
funcom_train/38975486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int CallOrigination(int LineNum) { int i=LineNum; LineScanner[i].setStatus(3); TSS.controller.setPhoneState(i, TSSPhoneState.BUSY);//give status to GUI TSS.controller.setPhoneTone(i, "DialTone");//set tone to DialTone for line i; CallRecord[i].setTimer(10); CallRecord[i].setCallStatus(true); return 2; } COM: <s> call process 1 </s>
funcom_train/3982755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onModuleLoad() { // EspaceEtudiant ep = EspaceEtudiant.getInstance(); // ep.createEspace(2); // RootPanel.get().add(ep.getViewport()); //lancement de la vitrine Vitrine lVitrine = new Vitrine(); RootPanel.get().add(lVitrine.getPanel()); lVitrine.loadVitrine(); // EspaceAdministration lAdministration = EspaceAdministration.getInstance(); // lAdministration.createEspace(0); // RootPanel.get().add(lAdministration.getViewport()); } COM: <s> this is the entry point method </s>
funcom_train/8076292
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void nodeId(String s,int t) { nextToken("error occurred in node_id"); if (m_st.ttype == '}') { //creates a node if t is zero if (t == 0) { m_nodes.addElement(new InfoObject(s)); } m_st.pushBack(); } COM: <s> generates a new info object with the specified name and either does </s>
funcom_train/3702351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void parseTupleLogEntryValue(String strVal) { StringTokenizer strtok = new StringTokenizer(strVal, TUPLE_LOG_ENTRY_SEPARATOR); String strEntry; TupleLogEntry entry; listTupleLogEntries.clear(); while (strtok.hasMoreTokens()) { strEntry = strtok.nextToken(); entry = new TupleLogEntry(strEntry); listTupleLogEntries.add(entry); } } // of method COM: <s> parse a new tuple log entry value </s>
funcom_train/9100961
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addResults(ArrayList batch, String source, int theoreticalAvailableResults, Map facetQueryCounts) { if (null != batch && batch.size() > 0) { theoreticalResultsAvailable.put(source, new Integer(theoreticalAvailableResults)); sourceFacets.put(source, facetQueryCounts); this.totalTheoreticalResultsAvailable = theoreticalAvailableResults; ((ArrayList) results.get(source)).addAll(batch); rawResultCount += batch.size(); } } COM: <s> add the results to the results table by source and update the theoretical </s>
funcom_train/42717644
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void increment() { if (progressBar.getValue() + stepSize > progressBar.getMaximum()) progressBar.setValue(progressBar.getMaximum()); else if (progressBar.getValue() + stepSize < progressBar.getMinimum()) progressBar.setValue(progressBar.getMinimum()); else progressBar.setValue(progressBar.getValue() + stepSize); } COM: <s> increment progress bar by adding registered step size to current value </s>
funcom_train/1463547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { try { if (isTerminated.compareAndSet(false, true)) { listenerExecutor.shutdown(); while (listenerExecutor.awaitTermination(10, TimeUnit.SECONDS) == false) { // wait 10 secs and check if all tasks have been completed. } } else { logger.debug("BookmarkManager is already shutdowned."); } } catch (InterruptedException e) { logger.debug(e); } } COM: <s> terminates threads that have been created for notifying bookmark change event listeners </s>
funcom_train/19911498
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove(int position) { if (position < 0 || position >= COUNT) { Logger.out("ERROR POSITION OUT OF BOUNDS: " + position); return; } for (int i = position; i < COUNT - 1; i++) { songs[i] = songs[i + 1]; } songs[COUNT - 1] = getSong(); adapter.notifyDataSetChanged(); if (position == 0) { } } COM: <s> removes an item from the list </s>
funcom_train/31322524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processOkEvent(IPCRequest request) { OkEvent event = (OkEvent) request.getGameEvent(); IWizard wiz = theGame.getWizard(request.getId()); if (wiz.isActive()) { wiz.setLeftHandGesture(event.getLeftHandGesture()); wiz.setRightHandGesture(event.getRightHandGesture()); } } COM: <s> process ok event </s>
funcom_train/17850695
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ProgramReceiveTargetSelectionPanel getPassOnComponent() { if (passOnComponent == null) { passOnComponent = new ProgramReceiveTargetSelectionPanel(UiUtilities.getLastModalChildOf(CapturePlugin .getInstance().getSuperFrame()), configuration.getReceiveTargets(), null, CapturePlugin.getInstance(), false, null); } return passOnComponent; } COM: <s> this method initializes pass on component </s>
funcom_train/15400693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateComment(Document d) { try { _wr.setComment(d.getText(0, d.getLength())); getRootPane().putClientProperty("windowModified", Boolean.TRUE); } catch(BadLocationException blexc) { // This shouldn't happen; we're sure to use a valid range. } } COM: <s> relays the comment in the given document to the current dto </s>
funcom_train/795368
/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(new BorderLayout()); jContentPane.add(getJPanelAllColors(), BorderLayout.CENTER ); jContentPane.add(getJPanelButtons(), BorderLayout.SOUTH); } return jContentPane; } COM: <s> this method initializes j content pane </s>
funcom_train/44166798
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasMaximumProduction() { if (maximumProduction.isEmpty()) { return true; } for (int index = 0; index < production.size(); index++) { if (maximumProduction.size() < index) { return true; } else if (maximumProduction.get(index).getAmount() > production.get(index).getAmount()) { return false; } } return true; } COM: <s> returns true if production equals maximum production </s>
funcom_train/27710589
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void callTextDecl(int version, int encoding) throws Exception { // create text decl Element textDecl = fGrammarDocument.createElement("textDecl"); textDecl.setAttribute("version", fStringPool.toString(version)); textDecl.setAttribute("encoding", fStringPool.toString(encoding)); fCurrentElement.appendChild(textDecl); } // callTextDecl(int,int) COM: <s> signal the text declaration of an external entity </s>
funcom_train/34563817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void refresh() { int c = 0; for(int i = 0; i < MENUBAR.length; i++) { for(int j = 0; j < MENUITEMS[i].length; j++) { final Object item = MENUITEMS[i][j]; if(!(item instanceof GUICommand)) continue; ((GUICommand) item).refresh(gui, items[c++]); } } } COM: <s> refreshes the menu items </s>
funcom_train/4894
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float pairwiseDistance(SensoryItem f){ //check the validity of parameters if(f == null){ throw new IllegalArgumentException("A null feature was given."); } //make sure we have a distance calculation algorithm set if(SensoryItem.m_distanceCalculation == null){ throw new IllegalStateException("The distance calculation algorithm has not yet been set."); } //if everything is fine, return the pairwise distance return SensoryItem.m_distanceCalculation.pairwiseDistance(this, f); } COM: <s> calculates the distance between two features </s>
funcom_train/13849640
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() { if (operationsLogger.isLoggable(Level.FINER)) { operationsLogger.entering( TxnManagerImpl.class.getName(), "destroy"); } readyState.check(); (new DestroyThread()).start(); if (operationsLogger.isLoggable(Level.FINER)) { operationsLogger.exiting( TxnManagerImpl.class.getName(), "destroy"); } } COM: <s> cleans up and exits the transaction manager </s>
funcom_train/31995550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void packet0x70() { try { byte type = readByte(); int charSerial = readInt(); int targetSerial = readInt(); short objectID = readShort(); short srcX = readShort(); short srcY = readShort(); byte srcZ = readByte(); short targX = readShort(); short targY = readShort(); byte targZ = readByte(); short speed = readShort(); short unknown = readShort(); short explode = readShort(); } catch(IOException e) { } } COM: <s> effect play a special effect </s>
funcom_train/34247211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getWorkPackageChildrenCount() { if (this.isWorkPackageInstance()) { return 1; } int count = 0; for (int i = 0; i < getChildCount(); ++i) { FmmTreeNode node = (FmmTreeNode) getChildAt(i); count += node.getWorkPackageChildrenCount(); } return count; } COM: <s> recursive method for finding the number of work package work package children </s>
funcom_train/19231368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createMap(String inputFile,String outputFile,int layoutId) throws Exception { String className = LAYOUT_PACKAGE+LAYOUT_CLASS_NAME[layoutId]+LAYOUT_EXTENSION; ClassLoader classLoader = ClassLoader.getSystemClassLoader(); Class layoutClass = classLoader.loadClass(className); Layout layout = (Layout) layoutClass.newInstance(); createMap(inputFile,outputFile,layout); } COM: <s> create a map of specified layout with specific layout id </s>
funcom_train/33519294
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isTheSameLeague(League other) { if (this == other) { return true; } if (other == null) { return false; } if (getClass() != other.getClass()) { return false; } if (name == null) { if (other.name != null) { return false; } } else if (!name.equals(other.name)) { return false; } return true; } COM: <s> this method verifies if two leagues are equals in the meaning </s>
funcom_train/43388028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean generateClass(String appletName, File dir, String[] jars) { String fileName = generateJavaFile(appletName, dir); // create the desired classpath StringBuffer classpath = new StringBuffer(dir.getPath()); for (int i=0; i<jars.length; i++) { classpath.append(File.pathSeparator); classpath.append(jars[i]); } classpath.append(File.pathSeparator); classpath.append(System.getProperty("java.class.path")); return ClassCompiler.compile(fileName, classpath.toString()); } COM: <s> generate a applet class for the given bean box </s>
funcom_train/37241518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Score compose() { Phrase phrase = new Phrase(); Score s = new Score(new Part(phrase)); //for(int i = 0; i < 8; i++) { Note n = new Note ((int)(Math.random() * 36 + 48), 0.5); phrase.addNote(n); //} //Instrument[] tempInsts = {new SineInst(22000)}; //insts = tempInsts; return s; } COM: <s> the compose method should be overridden by classes that extend this class </s>
funcom_train/51714923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setinfos(int portidx, String protolabel, String entrylabel, Object value) { int column = portidx + 1; com.mgib.modifiers.I_stack_elt target = model.findtargetmodule(column, protolabel); if (target == null) { TDeb.wri("setinfo for target : " + protolabel + "notfound port : " + portidx); } target.getoptions().setOption(entrylabel, value); } COM: <s> set value of option entry on a target protocol on a port </s>
funcom_train/21611011
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testXMLParsing() throws ParserException { tpcs = new TestParserContextStack(ALL_XML_ATTRS); TestWordReader wordReader = new TestWordReader(); Parser parser = new Parser(tpcs); parser.addWordReader( wordReader ); parser.parse( XML_STREAM ); wordReader.checkResult( XML_STREAM ); } COM: <s> tests the xml parsing </s>
funcom_train/21407636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void saveParameters(Persistent dataInParams, Persistent dataIn, Persistent dataOutParams, Persistent dataOut,TransportLayerListener eventListener, boolean isDownload, String userName, String password){ this.dataInParams = dataInParams; this.dataIn = dataIn; this.dataOutParams = dataOutParams; this.dataOut = dataOut; this.eventListener = eventListener; this.isDownload = isDownload; this.userName = userName; this.password = password; } COM: <s> saves parameters to class level variables </s>
funcom_train/1241021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int hashCode() { int hash = 0; if (null != name) { hash += name.hashCode(); } if (null != publicURI) { hash += publicURI.hashCode(); } if (null != systemURI) { hash += systemURI.hashCode(); } return hash; } COM: <s> returns the sum of the hashcodes of name public uri system uri </s>
funcom_train/16908752
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeCompressedFrame(ImageProcessor ip) throws IOException { BufferedImage bufferedImage = ip.getBufferedImage(); //IJ.log("BufferdImage Type="+bufferedImage.getType()); // 1=RGB, 13=indexed if (biCompression == JPEG_COMPRESSION) ImageIO.write(bufferedImage, "jpeg", raOutputStream); else //if (biCompression == PNG_COMPRESSION) ImageIO.write(bufferedImage, "png", raOutputStream); } COM: <s> write a frame as jpeg or png compressed image </s>
funcom_train/34570308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuilder sb = new StringBuilder("[PDPStatus: OFFSET=0x"); sb.append(Long.toHexString(offset)); sb.append(", SIZE=0x"); sb.append(Long.toHexString(size)); sb.append(", lastReading="); sb.append(lastReading); sb.append(", unknownSeconds="); sb.append(unknownSeconds); sb.append(", value="); sb.append(value); sb.append("]"); return sb.toString(); } COM: <s> returns a summary the contents of this pdp status block </s>
funcom_train/12151493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Form getOptionsForm() { if (optionsForm == null) { optionsForm = new Form("Options", new Item[]{getChoicePortrait(), getChoicePriority(), getChoiceAdvanced()}); optionsForm.addCommand(getOkCommand()); optionsForm.addCommand(getCancelCommand()); optionsForm.setCommandListener(this); } return optionsForm; } COM: <s> returns an initiliazed instance of options form component </s>
funcom_train/5261276
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onError(AppEvent<?> ae) { if (ae.data instanceof AppError){ AppError error = (AppError)ae.data; MessageBox.alert(error.get_title(),error.get_msg(), null); } else MessageBox.alert((String)ae.getData("title"),(String)ae.getData("msg"), null); } COM: <s> shows a alert windows called for all app errors br </s>
funcom_train/7426869
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void repaintFrom(final PBounds localBounds, final PNode childOrThis) { if (childOrThis != this) { Rectangle2D.intersect(getBoundsReference(), localBounds, localBounds); super.repaintFrom(localBounds, childOrThis); } else { super.repaintFrom(localBounds, childOrThis); } } COM: <s> callback that receives notification of repaint requests from nodes in </s>
funcom_train/4676060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equalsIgnoreCase(String s) { final int len = length; if (len != s.length()) { return false; } char[] val = value; for (int i = 0; i < len; i++) { final char c = s.charAt(i); if (val[i] != c && val[i] != (c + 32) && val[i] != (c - 32)) { return false; } } return true; } COM: <s> compares ignoring case the messenger value with the given string </s>
funcom_train/15636886
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void onEveryCycle(long id, ControlInterface ci) { for (Query q : ci.getAnswerData()) { Vector<Query> vq = hm.get(q.getID()); if (vq == null) { vq = new Vector<Query>(); } vq.add(q); hm.put(q.getID(), vq); } } COM: <s> fetch all queries from each node and store them in the hash map </s>
funcom_train/16079970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSyncStatus(Object o,syncstatus s){ /*if (o==this) { l.error("Don't set syncstatus for object itself, only for properties"); } else {*/ syncstatus before=status.put(o,s); l.trace("Status of "+reference.getClass().getSimpleName()+"."+o.getClass().getSimpleName() +" changed from "+before+" to "+s); //} } COM: <s> set syncstatus for a member </s>
funcom_train/42399068
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testAsyncMethodDoesntReturnVoid() { try { final Object service = GWT.create(AsyncInterfaceDoesntReturnVoid.class); fail("A \"" + EXCEPTION + "\" should have been thrown because the async is not compatible with the service interface."); } catch (final Exception expected) { final String causeType = expected.getCause().getClass().getName(); assertTrue(causeType, causeType.equals(EXCEPTION)); } } COM: <s> this test tests that the generator complains that the async interface is </s>
funcom_train/9110456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteNotification(NotificationLogic nl) { UserUtil.reattach(this.bean); // Delete references boolean b1 = this.bean.getNotification().remove(nl.getBean()); boolean b2 = nl.getBean().getSentTo().remove(this.bean); if (b1 && b2) { if (nl.getBean().getSentTo().isEmpty()) { // No more users - we can delete nl.deleteNotification(); } else { // There are still users - we save nl.save(); } } } COM: <s> deletes a special notification of this user </s>
funcom_train/45130054
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLogConfig() { String logConfig = getServletContext().getInitParameter("logConfig"); if (logConfig == null) throw new WebException("Please specify the path for a Log4j configuration file using the web.xml property 'logConfig'"); return getRelativePath(logConfig); } COM: <s> returns the log4j configuration file </s>
funcom_train/5079868
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void layout() { if (getSourceAnchor() != null && getTargetAnchor() != null) connectionRouter.route(this); RectD2D oldBounds = bounds; super.layout(); bounds = null; if (!getBounds().contains(oldBounds)) { getParent().translateToParent(oldBounds); getUpdateManager().addDirtyRegion(getParent(), oldBounds); } repaint(); fireFigureMoved(); } COM: <s> layouts this polyline </s>
funcom_train/10791845
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void guessJDBCVersion(Connection conn) { if (_driverBehavior != BEHAVE_ORACLE) { return; } isJDBC4 = true; try { conn.getClientInfo(); // Try to call a JDBC 4 method. } catch (SQLException e) { // OK, we are on JDBC 4. } catch (Throwable t) { // Most likely an AbstractMethodError from JDBC 3 driver. isJDBC4 = false; } } COM: <s> oracle drivers at least in versions 10 </s>
funcom_train/10255660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean restoreBackupIncremental() { try { if (fa.isStreamElement(backupFileName)) { RAShadowFile.restoreFile(database, backupFileName, dataFileName); deleteBackup(); return true; } return false; } catch (IOException e) { throw Error.error(ErrorCode.FILE_IO_ERROR, e); } } COM: <s> restores in from an incremental backup </s>
funcom_train/1383079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private PlanningMese getDicembre() { if (dicembre == null) { try { dicembre = new PlanningMese(PlanningMese.DICEMBRE, dbm, listener, padre); dicembre.setPreferredSize(new Dimension(600, 300)); // Generated dbm.addDBStateChange(dicembre); } catch (java.lang.Throwable e) { // TODO: Something } } return dicembre; } COM: <s> this method initializes dicembre </s>
funcom_train/15741246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cacheSarosSupport(final JID buddy) { try { isSupportedNonBlock(buddy, Saros.NAMESPACE); } catch (CacheMissException e) { supportExecutor.execute(new Runnable() { public void run() { Utils.runSafeAsync(log, new Runnable() { public void run() { isSarosSupported(buddy); } }); } }); } } COM: <s> begin a thread that populates saros support information for all people in </s>
funcom_train/14137784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getValue(){ long retValue = Math.abs(value); //Adjust the return value for the number of decimal places. // We want to return a long, expressed in the lowest // unit of the decimal palces. To do this, we pad // with zeros for each unused decimal place, using the formula // retValue *- 10 ** (maxDecimalPlaces - decimalPlaces). retValue *= Math.pow(10, (maxDecimalPlaces - decimalPlaces)); if (negative) retValue *= -1; return retValue; } COM: <s> returns the value of the given text </s>
funcom_train/2362214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Reader loadReport(int turn) throws Exception { // send request to server Document doc = loadReportSendRequest(turn); // parse answer from server NodeList list = doc.getElementsByTagName("file"); if (list.getLength() == 0) return new StringReader(""); Element file = (Element) list.item(0); file.getAttribute("encoding"); String encoding = file.getAttribute("encoding"); if (!"text".equals(encoding)) throw new Exception("Unsupported encoding: " + encoding); return new StringReader(file.getTextContent()); } COM: <s> load report from server by selected turn </s>
funcom_train/26573087
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void undoNormalMove (Move move){ int startCol = move.getStartCol(); int startRow = move.getStartRow(); // 3. Swap back swapPieces (startCol, startRow); // 2. restore piece info move.restorePieceInfo (this, 0); // 1. restore last piece info move.restoreLastPieces (this.getBoard()); } COM: <s> undos a normal move </s>
funcom_train/25492097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void drawImage(Graphics2D g2d, Image gumpImage) { int x = (getWidth() / 2) - (gumpImage.getWidth(null) / 2); int y = (getHeight() / 2) - (gumpImage.getHeight(null) / 2); g2d.drawImage(gumpImage, x, y, null); } COM: <s> draws the given image to the canvas </s>
funcom_train/9021060
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Regex getRegexAt(int i) { if(i >= tp.ra_len) throw new ArrayIndexOutOfBoundsException("i="+i+">="+patterns()); if(i < 0) throw new ArrayIndexOutOfBoundsException("i="+i+"< 0"); return tp.ra[i]; } COM: <s> get the regex at position i in this transformer </s>
funcom_train/21727841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent e) { if (e.getSource() == soundButton) { model.toggleSound(); if (soundButton.getText().equals("Sound Off")) { soundButton.setText("Sound On"); } else { soundButton.setText("Sound Off"); } } if (e.getSource() == logoutButton) { window.newLoginScreen(); } } COM: <s> method that checks for performed actions and responds to them </s>
funcom_train/35212224
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readByte() { int ret = 0; try { ret = this.bytein.read(); } catch (IOException e) { throw new IllegalStateException("could not read the next byte", e); } if (-1 == ret) { throw new IllegalStateException("end of the byte array reached"); } return ret; } COM: <s> read one byte of the data input </s>
funcom_train/23661502
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dragSetData(DragSourceEvent event) { if (query != null) { event.data = new BookmarkTransferObject("" + operations, query); } else if (folder != null) { event.data = new BookmarkTransferObject(folder.getName(), folder); } else { event.data = null; event.doit = false; } } COM: <s> is called when the code cube query code is being dragged </s>
funcom_train/13260202
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(int pos, double newD) { if (pos >= size) { throw new IndexOutOfBoundsException("pos >= size"); } if (start < end) { data[pos + start] = newD; } else { int direct = data.length - start; if (pos < direct) { data[pos + start] = newD; } else { data[pos - direct] = newD; } } } COM: <s> sets the element in position pos </s>
funcom_train/51786015
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getBestResults() { List results=new Vector(); int bestCount=0; Iterator i=kCount.keySet().iterator(); while(i.hasNext()) { Object key=i.next(); Integer count=(Integer)kCount.get(key); if(count.intValue()>bestCount) { bestCount=count.intValue(); results=new Vector(); results.add(key); } else if(count.intValue()==bestCount) { results.add(key); } } return results; } COM: <s> get the list of keys scoring the best </s>
funcom_train/33418748
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected char readChar() throws IOException { if (this.charReadTooMuch != '\0') { final char ch = this.charReadTooMuch; this.charReadTooMuch = '\0'; return ch; } else { final int i = this.reader.read(); if (i < 0) { throw this.unexpectedEndOfData(); } else if (i == 10) { this.parserLineNr += 1; return '\n'; } else { return (char) i; } } } COM: <s> reads a character from a reader </s>
funcom_train/20516160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void proxyGetAndLocalPut(ByteArray key) throws VoldemortException { List<Versioned<byte[]>> proxyValues = proxyGet(key); for(Versioned<byte[]> proxyValue: proxyValues) { try { getInnerStore().put(key, proxyValue); } catch(ObsoleteVersionException e) { // ignore these } } } COM: <s> in rebalancing stealer state put should be commited on stealer node </s>
funcom_train/29059789
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initializeValues() { // Set checkboxes from stored data final EventList<AbstractMetric<?, ?>> metrics = MetricManager.getInstance().getMetrics(); metrics.getReadWriteLock().readLock().lock(); try { for (final AbstractMetric<?, ?> metric : metrics) { tableViewer.setChecked(metric, metric.isActivated()); } tableViewer.refresh(true); } finally { metrics.getReadWriteLock().readLock().unlock(); } } COM: <s> initialize views from stored preferences </s>
funcom_train/46761134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File getLocalFile(final long fileId, final ServiceCall call) throws Exception { IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception { FileModel fileModel = getFile(fileId, call); String filename = fileModel.getFilePath(); return new File(filename); }}; return (File) call(method, call); } COM: <s> get the file handle </s>
funcom_train/48361547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetCustomer() throws DAOException { //DataAccessDAOImpl x = new DataAccessDAOImpl(); DataAccessDAO dao =(DataAccessDAO)getApplicationContext().getBean("dataAccessDAO"); int value =103; System.out.println(" Customer number is "+value); Customers cust = dao.getCustomer(value); System.out.println("Name= "+ cust.getCity()); //fail("Not yet implemented"); // TODO } COM: <s> test method for </s>
funcom_train/17296659
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void traceLink(Graphics2D g2) { int direction; if (child.getAbsolutePosition().x < parent.getAbsolutePosition().x) { // Left link direction = LEFT; } else { // Right link direction = RIGHT; } switch (shape) { case TRIANGULAR: traceTriangularLink(g2, direction); break; case TRAPEZOIDAL: traceTrapezoidalLink(g2, direction); break; default: traceTriangularLink(g2, direction); } } COM: <s> traces the link </s>
funcom_train/35717286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int insertPerson() { final Address a1 = new Address("A Rd.", "", "Dallas", "TX", "75001"); final Person p1 = new Person("Brett", 'L', "Schuchert", a1); if (!em.getTransaction().isActive()) { em.getTransaction().begin(); } em.persist(p1); return p1.getId(); } COM: <s> even though we begin a transaction we never commit it </s>
funcom_train/20498344
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void registerHandler(ServiceHandler handler, SelectableChannel channel, int ops) { mChangeRequests.add(new ChangeRequest(channel, handler, ChangeRequest.REGISTER, 0)); mChangeRequests.add(new ChangeRequest(channel, null, ChangeRequest.CHANGEOPS, ops)); mSelector.wakeup(); } COM: <s> registers code channel code with this so that the selector can select </s>
funcom_train/24933800
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(final Object object1, final Object object2) { final int firstPosition = ((MPrePostCondition)object1).getPositionInModel(); final int secondPosition = ((MPrePostCondition)object2).getPositionInModel(); return compareUtil.compareInt(firstPosition, secondPosition); } COM: <s> compares two pre postconditions by the order the use file provides </s>
funcom_train/43268994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object object) throws ClassCastException { if (!(object instanceof Media)) { throw new ClassCastException("Media.compareTo"); } int c = 0; if (this != object) { Media that = (Media) object; String thatString = that.keyRepresentation(); String thisString = this.keyRepresentation(); c = thisString.compareTo(thatString); } return c; } COM: <s> compares two code media code s for state dependent equality </s>
funcom_train/19912712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JCheckBox getExtendTrackNumbers() { if (this.extendTrackNumbers == null) { this.extendTrackNumbers = new JCheckBox(LangageManager .getProperty("tagrename.extendtracks")); this.extendTrackNumbers.setSelected(PreferencesManager .getBoolean("renamepanel.extendtracks")); this.extendTrackNumbers.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { PreferencesManager.putBoolean("renamepanel.extendtracks", getExtendTrackNumbers().isSelected()); } }); } return this.extendTrackNumbers; } COM: <s> this method will return a proper configured </s>
funcom_train/24237147
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasAttribute(String caption, String value) { Iterator i = entries.iterator(); while (i.hasNext()){ VocabularyEntry vocEntr = (VocabularyEntry)i.next(); Collection atts = vocEntr.getAttributes(); if(atts != null) { Iterator j = atts.iterator(); while (j.hasNext()){ VocabularyAttribute att = (VocabularyAttribute) j.next(); if(att.getCaption().equalsIgnoreCase(caption) && att.getValue().equals(value)) { return true; } } } } return false; } COM: <s> checks if vocabulary has entry with given attribute </s>
funcom_train/46790291
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getKids() { if (cachedKids == null) { cachedKids = new ArrayList(); COSArray cosKids = cosGetField(DK_Kids).asArray(); if (cosKids != null) { for (Iterator i = cosKids.iterator(); i.hasNext();) { COSBasedObject page = PDPageNode.META .createFromCos((COSObject) i.next()); if (page != null) { cachedKids.add(page); } } cosKids.addObjectListener(this); } } return cachedKids; } COM: <s> get the list of all page nodes that are children of the receiver </s>
funcom_train/20926882
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JSplitPane getJSplitPane4() { if (jSplitPane4 == null) { jSplitPane4 = new JSplitPane(); jSplitPane4.setResizeWeight(0.5D); jSplitPane4.setComponentOrientation(java.awt.ComponentOrientation.LEFT_TO_RIGHT); jSplitPane4.setDividerSize(5); jSplitPane4.setLeftComponent(getJPanel1()); jSplitPane4.setRightComponent(getJPanel7()); } return jSplitPane4; } COM: <s> this method initializes j split pane4 </s>
funcom_train/38388332
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void bestrow(PyObject qualifier, PyObject owner, PyObject table) { clear(); String c = getMetaDataName(qualifier); String s = getMetaDataName(owner); String t = getMetaDataName(table); int p = DatabaseMetaData.bestRowUnknown; // scope boolean n = true; // nullable try { this.fetch.add(getMetaData().getBestRowIdentifier(c, s, t, p, n)); } catch (SQLException e) { throw zxJDBC.newError(e); } } COM: <s> gets a description of a tables optimal set of columns that uniquely </s>
funcom_train/18660863
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumberOfNodes() { try { return allPictures.size(); } catch ( NullPointerException ex ) { LOGGER.severe( String.format( "Why did we get a NullPointerExecption for the ArrayListNavigator %s?", getTitle() ) ); Thread.dumpStack(); return 0; } } COM: <s> returns the number of pictures in this group </s>
funcom_train/49675720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSessionAltered( boolean sessionAltered ) { try { readLock.lock(); synchronized( this ) { this.sessionAltered = sessionAltered; if( this.status == Status.IDLE ) { this.lastAction = System.currentTimeMillis(); } else { this.lastAction = -1; } } } finally { readLock.unlock(); } } COM: <s> this can set the boolean specifiying whether the session has been altered </s>
funcom_train/31545284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void uncaughtException(final Throwable e) { LOG.debug("uncaughtException", e); ExceptionListener listener = null; for (int i = 0; i < listeners.size(); i++) { listener = (ExceptionListener) listeners.get(i); listener.uncaughtException(e); } } COM: <s> indicates an uncaught exception in a job </s>
funcom_train/48121563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateDisplay() { mDateDisplay.setText( new StringBuilder() // Month is 0 based so add 1 .append(mMonth + 1).append("-") .append(mDay).append("-") .append(mYear).append(" ") .append(pad(mHour)).append(":") .append(pad(mMinute))); } COM: <s> updates the date in the text view </s>
funcom_train/35772126
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void computeSolution() throws LayoutBuildException, FlowImpossibleException { //31990 | 41005 System.out.println("TEST METODY computeSolution\n"); AnnealingOptimizationMonitor monitor = new AnnealingOptimizationMonitor(); AnnealingSolver solver = new AnnealingSolver(problem1, settings, monitor); Layout wynik=solver.computeSolution(); assertTrue(wynik.checkCorrectness()); System.out.println(wynik); } COM: <s> test of compute solution method of class annealing solver </s>
funcom_train/20308599
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void serialiseDocument( Document doc, Writer out ) { try { // write the given document to the string buffer XMLSerializer serializer = new XMLSerializer ( out, createXMLFormatter( doc ) ); serializer.asDOMSerializer(); serializer.serialize( doc ); } catch (IOException e) { throw new DIGWrappedException( e ); } } COM: <s> p serialise the given document to the given output writer </s>
funcom_train/12077546
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) { getGraphics().drawRoundRect(x + this.translateX, y + this.translateY, width + 1, height + 1, arcWidth, arcHeight); } COM: <s> draws the outline of the specified rounded corner rectangle </s>
funcom_train/18029762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addOptionalSwitchArgument(String name, String abbrev, String key, String defaultValue, String description) { addSwitchArgument( name, abbrev, key, description ); if ( key==null ) throw new IllegalArgumentException("null key"); values.put( key, defaultValue ); if ( defaultValue==null ) { if ( false ) System.err.println("breakpoint"); } } COM: <s> specify a named switch argument that may be specified by the user </s>
funcom_train/2304221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean useStandard(Node node, String attributeName) { NamedNodeMap map = node.getAttributes(); if (map == null) return true; Node attrNode = map.getNamedItem(attributeName); if (attrNode == null) return true; return attrNode.getNodeValue().equals("true"); } COM: <s> private helper used by the three factory routines to see if the </s>
funcom_train/24523666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean intersects(int tileX, int tileY) { //Before we check collision we need to know if the given line isn't empty. for(int point = 1; point < points; point++) { if(tileX == xPoints.get(point) && tileY == yPoints.get(point)) { return true; } } return false; } COM: <s> checks intersectsion with the a given tile </s>
funcom_train/9235056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLineToAll(final String messageType, final Object... args) { for (Channel channel : channels.values()) { channel.getFrame().addLine(messageType, args); } for (Query query : queries) { query.getFrame().addLine(messageType, args); } addLine(messageType, args); } COM: <s> passes the arguments to all frames for this server </s>
funcom_train/31800375
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean saveTheme(String userId, String theme) { boolean retVal; retVal = true; logger.info("UserProfile EJB activated (saveTheme). Processing demand."); try { UserProfileTO upTO = new UserProfileTO(); upTO.setTheme(theme); upTO.setUserProfile_id(userId); upDAO.update(upTO); } catch (DAOException e) { retVal = false; logger.info(e.getMessage()); } logger.info("CalendarAccessRights EJB (saveTheme) finished."); return retVal; } COM: <s> this method saves users theme </s>
funcom_train/35975636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setNewProperty(String property) { StringTokenizer st = new StringTokenizer(property, propertyDelimiter); String tok1 = new String(); String tok2 = new String(); if (st.hasMoreTokens()) { tok1 = st.nextToken(); Property prop = new Property(); prop.setName(tok1); if (st.hasMoreTokens()) { tok2 = st.nextToken(); prop.setValue(tok2); } else { prop.setValue(tok1); } params.addElement(prop); } } COM: <s> add new property for selection </s>
funcom_train/3526819
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getVersionName() { UriHandler hpathHandler = HistoryPathHandler.getHistoryPathHandler(); String[] hpathTokens = hpathHandler.getUriTokens(); if( !isVersionUri() ) throw new IllegalStateException( "URI "+uri+" is not a version URI" ); return uriTokens[hpathTokens.length + 1]; } COM: <s> returns the version name from the uri </s>
funcom_train/15737734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testImmediateImportBracket() throws IOException { CharArrayReader reader = new CharArrayReader( "#import <foo.h> nowhatever ".toCharArray()); CParser parser = new CParser(); parser.parse(reader); List<String> includes = parser.getIncludes(); assertEquals(includes.size(), 1); assertEquals("foo.h", includes.get(0)); } COM: <s> checks parsing of include foo </s>
funcom_train/19309102
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void writeDescendantFonts(final StringBuilder buffer) { final PDFCIDFont descendantFonts = getDescendantFonts(); if (descendantFonts == null) { return; } buffer.append("/DescendantFonts [ "); buffer.append(descendantFonts.pdfReference()); buffer.append(" ] "); buffer.append(EOL); } COM: <s> write the descendant fonts component of the font entry </s>
funcom_train/8436947
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testJoinWith() { System.out.println("joinWith"); MatchPair mp2 = new MatchPair("abc","cde"); MatchPair instance = new MatchPair("cba","edc"); Collection<List<MatchPair>> expResult = null; Collection<List<MatchPair>> result = instance.joinWith(mp2); assertEquals(expResult, result); } COM: <s> test of join with method of class nii </s>
funcom_train/4753713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addPattern(IPatternObject pattern) { if (pattern.getSymbol() != null && fPatternIndexMap.get(pattern) != null) { // for "named" patterns (i.e. "x_" or "x_IntegerQ") return; } fPatternIndexMap.put(pattern, Integer.valueOf(fPatternCounter++)); } COM: <s> set the index of code f pattern symbols array code where the </s>
funcom_train/39566069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCallback(I_AdapterCallback cb) { if (state != STOPPED) throw new IllegalStateException("Tried to change callback while TCP_UDP_Adapter was running!"); callback = cb; if (multicast_adapter != null) multicast_adapter.setCallback(cb); if (tcp_adapter != null) tcp_adapter.setCallback(cb); } COM: <s> set code i adapter callback code object </s>
funcom_train/10348579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JTextArea getMessageValue() { if (messageValue == null) { messageValue = new JTextArea(); messageValue.setEditable(false); messageValue.setFont(new Font("Default", Font.PLAIN, 14)); messageValue.addKeyListener(this); } return messageValue; } COM: <s> this method initializes message value </s>
funcom_train/37091313
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save() { try { initWriter(); } catch (IOException ex) { ErrorUtil.exception(this, ex, "Can not access file " + file); return; } GraphEltSet filtGraph = GraphEltSet.getCurrentGraph().getFilteredGraph(); for (NBEdge e : filtGraph.getAllEdges()) writeEdge(e); writer.flush(); writer.close(); } COM: <s> saves what is currently is displayed doesnt save filtered out </s>
funcom_train/9887148
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFeaturesList(ArrayList list) { this.featuresList = list; for(int i=0; i<featuresList.size(); i++){ indicesList.add(createIndices((ISlideData)featuresList.get(i))); } updateSpotColors(); updateExperimentColors(); this.experiment = this.createExperiment(); } COM: <s> sets the data objects feature list </s>
funcom_train/15557228
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void load() { try { ObjectInputStream in = new ObjectInputStream(new FileInputStream("repository")); Object o = null; try { while((o = in.readObject()) != null) { guidelines.add((GuidelineMetadata) o); } } catch(EOFException e) { // ignore; that's no problem... } } catch(FileNotFoundException e) { // ignore and load nothing } catch(Exception e) { e.printStackTrace(); } } COM: <s> loads the persisted state </s>
funcom_train/22076927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deleteAttr(String currentAttrId, Resource currentResource) { Collection tempAttributes = new TreeSet(new AttributeNameComparator()); for(Iterator attributes=currentResource.getAttributes().iterator(); attributes.hasNext();){ Attribute attr =(Attribute)attributes.next(); if(!attr.getId().equals(currentAttrId)){ tempAttributes.add(attr); } } currentResource.setAttributes(tempAttributes); } COM: <s> action to delete an attribute from the attributes list of the resource </s>
funcom_train/22210125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Dimension getMaximumSize() { if (maxSize == null) { maxSize = new Dimension(32768, 0); } Dimension pref = getPreferredSize(); if (pref != null) { maxSize.setSize(32768.0, pref.getHeight()); } else { maxSize.setSize(32768, 32768); } return maxSize; } COM: <s> overrides the super implementation in order to </s>
funcom_train/9061959
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValueAt(Object node, int column) { TreeTableNode fn = (TreeTableNode)node; if (node != null) { switch(column) { case 0: return fn.getId(); case 1: return fn.getProgress(); case 2: return fn.isActive() ; case 3: return fn.startTime(); case 4: return fn.endTime(); case 5: return fn.getDuration(); case 6: return fn.getResult(); } } return null; } COM: <s> returns the value of the particular column </s>
funcom_train/37833781
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void step_3() { final SpeakerNPC npc = npcs.get(REWARD_NPC_NAME); npc.add(ConversationStates.ATTENDING, "reward", new QuestInStateCondition(QUEST_SLOT, "reward"), ConversationStates.ATTENDING, null, new ChatAction() { public void fire(final Player player, final Sentence sentence, final EventRaiser entity) { entity.say("Oh yes, " + NPC_NAME + " told me to reward you well! I hope you enjoy your increased combat abilities!"); rewardPlayer(player); player.setQuest(QUEST_SLOT, "done"); } }); } COM: <s> initialize the rewarding npc </s>
funcom_train/33970584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFullScreen(DisplayMode displayMode) { frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setUndecorated(true); // frame.setIgnoreRepaint(true); frame.setResizable(false); device.setFullScreenWindow(frame); if (displayMode != null && device.isDisplayChangeSupported()) { try { device.setDisplayMode(displayMode); } catch (IllegalArgumentException ex) { } // fix for mac os x frame.setSize(displayMode.getWidth(), displayMode.getHeight()); } frame.createBufferStrategy(2); } COM: <s> enters full screen mode and changes the display mode </s>
funcom_train/12735133
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendOnActivateEvent() { HashMap eventParameters = new HashMap(); eventParameters.put(TYPE, new Integer(COMPONENT_EVENT)); eventParameters.put(ACTION, new Integer(ACTIVATE)); this.sendEvent(eventParameters); invokeActionHandler(getOnActivate(), eventParameters); } COM: <s> send an activate event </s>