__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/14430992
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String fullClasspath() { return System.getProperty("java.class.path") + File.pathSeparator + SuiteDef.class.getProtectionDomain().getCodeSource().getLocation().getFile() + File.pathSeparator + BeanUnitTestCase.class.getProtectionDomain().getCodeSource().getLocation().getFile(); } COM: <s> build the classpath using the system classpath the classpath </s>
funcom_train/3742955
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void afterPhase(PhaseEvent event) { if ((event.getPhaseId() == PhaseId.APPLY_REQUEST_VALUES) || (event.getPhaseId() == PhaseId.PROCESS_VALIDATIONS) || (event.getPhaseId() == PhaseId.INVOKE_APPLICATION)) { FacesContext facesContext = event.getFacesContext(); saveMessages(facesContext); } } COM: <s> handle a notification that the processing for a particular phase has just </s>
funcom_train/3723830
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object invoke(Object proxy, Method m, Object[] args) throws Throwable { try { if (m.equals(GET_ROLE)) return getRole(); if (m.equals(GET_ELEMENT)) return getElement(); return m.invoke(delegate, args); } catch (InvocationTargetException e) { throw e.getTargetException(); } catch (Exception e) { throw e; } } COM: <s> dynamic proxy implementation </s>
funcom_train/37807954
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void process(String input, IChatClient client) { String[] args = decompose(input); if (args.length == 0) { return; } ICommandProcessorLocal processor = (ICommandProcessorLocal)_processors.get(args[0]); if (processor == null) { client.generalMessage(input); } else { processor.process(client, args); } } COM: <s> process a message that came over the socket </s>
funcom_train/17201914
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void printFinalMaps(IR ir) { System.out.println("\n =-=-=-=-=- Final IR-based GC Maps for " + ir.method.getDeclaringClass() + "." + ir.method.getName()); map.dump(); System.out.println(" =-=-=-=-=- End Final IR-based GC Maps\n"); } COM: <s> prints the final maps </s>
funcom_train/10666454
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void stopTimer() { try { server.invoke(timerTest, "removeAllNotifications", new Object[0], new String[0]); server.invoke(timerTest, "stop", new Object[0], new String[0]); server.unregisterMBean(timerTest); MBeanServerFactory.releaseMBeanServer(server); } catch (Exception ignored) { } } COM: <s> stop of the timer service </s>
funcom_train/49993034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public DownloadInfo checkDatafileDownloadAccess(String sessionId, Collection<Long> datafileIds) throws SessionException, NoSuchObjectFoundException, InsufficientPrivilegesException { //for user bean get userId String userId = user.getUserIdFromSessionId(sessionId); DownloadInfo downloadInfo = DownloadManager.checkDatafileDownloadAccess(userId, datafileIds, manager); //if here, user has access, return downloadInfo return downloadInfo; } COM: <s> checks if user has access to download the files </s>
funcom_train/46570971
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ITextEditor getEditor(final IWorkbenchPart part) { if (part instanceof ITextEditor) { ITextEditor editor = (ITextEditor) part; String extension = EXBreakpointAdapterFactory.getExtension(editor); if (extension != null && (extension.equals("as") || extension.equals("mxml"))) { return editor; } } return null; } COM: <s> returns the editor being used to edit a pda file associated with the </s>
funcom_train/39363537
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testFindRowById() { rowControl.expectAndReturn(rowMock.getId(), "1"); row2Control.expectAndReturn(row2Mock.getId(), "2"); MockUtils.replay(this); tested.addRow(rowMock); assertSame(rowMock, tested.findRowById("1")); tested.addRow(row2Mock); assertSame(rowMock, tested.findRowById("1")); assertSame(row2Mock, tested.findRowById("2")); MockUtils.verify(this); } COM: <s> test both add and find by id </s>
funcom_train/35715673
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setExitPosition(Position position) throws BadLocationException { if (fMarkExitTarget && getPosition(fExitAnnotation) != position) { removeAnnotation(fExitAnnotation, false); if (position != null) { fExitAnnotation= new Annotation(EXIT_ANNOTATION_TYPE, false, ""); //$NON-NLS-1$ addAnnotation(fExitAnnotation, position, false); } else fExitAnnotation= null; } } COM: <s> sets the position that should be highlighted as the exit position i </s>
funcom_train/33233860
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getNotLearnedMainSI() { if (notLearnedMainSI == null) {//GEN-END:|115-getter|0|115-preInit // write pre-init user code here notLearnedMainSI = new StringItem("Not Learned Cards:", null);//GEN-LINE:|115-getter|1|115-postInit // write post-init user code here }//GEN-BEGIN:|115-getter|2| return notLearnedMainSI; } COM: <s> returns an initiliazed instance of not learned main si component </s>
funcom_train/17690020
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getFilePath(String path){ if (path == null || path.trim() == ""){ path = SCORE_DATA_PATH; } ClassLoader loader = Thread.currentThread().getContextClassLoader(); URL url = loader.getResource(path); return url.getPath(); } COM: <s> get files path </s>
funcom_train/15770351
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection initPersons( Collection persons ){ ArrayList list = new ArrayList(); try{ Iterator i = persons.iterator(); while( i.hasNext() ){ PersonView personView = initPerson( (PersonVO)i.next() ); list.add( personView ); } } catch(Exception e){ e.printStackTrace(); } return list; } COM: <s> creates the collection of person view by given persons </s>
funcom_train/4404768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Polynomial mod( Polynomial that ) { BigInteger da = this.degree(); BigInteger db = that.degree(); Polynomial register = new Polynomial( this.degrees ); for ( BigInteger i = da.subtract( db ); i.compareTo( BigInteger.ZERO ) >= 0; i = i.subtract( BigInteger.ONE ) ) { if ( register.hasDegree( i.add( db ) ) ) { Polynomial shifted = that.shiftLeft( i ); register = register.xor( shifted ); } } return register; } COM: <s> computes this mod that in gf 2 k using synthetic division </s>
funcom_train/15866119
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addAll( Collection c ) throws CloneNotSupportedException{ Iterator i = c.iterator(); while( i.hasNext() ){ Object o = i.next(); if( Poolable.class.isInstance( o ) ){ this.add( (Poolable)o ); }else{ throw new CloneNotSupportedException("Please add only objects from type jet.utils.Poolable interface!"); } } } COM: <s> this method adds all objects from the colletion </s>
funcom_train/24650466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void checkStorage(File directory) { if (!directory.exists()) { directory.mkdirs(); } else { if (!directory.isDirectory()) { throw new GeneralException("Error: The given directory \"" + directory.getAbsolutePath() + "\" is not a directory"); } } } COM: <s> make sure everything exists like its supposed to </s>
funcom_train/46375406
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void syncSlavePixels(BigInteger slaveID) { byte[] tmpPixelBytes = new byte[getWidth() * getHeight() * 4]; // Get pixels in a byte array getPixelBytes(tmpPixelBytes, 0, 0, getWidth(), getHeight()); ClientXrw client = ((AppXrw) app).getClient(); ((ClientXrwMaster) client).writeSyncSlavePixels(slaveID, tmpPixelBytes); } COM: <s> used only by app base master during a new slave connection </s>
funcom_train/3291861
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNumberFromName(String name) { String number = null; Enumeration e=search("name=='"+name+"'"); if (e.hasMoreElements()) { MMObjectNode node=(MMObjectNode)e.nextElement(); number=""+node.getNumber(); } return number; } COM: <s> returns the number of the node with the specified name </s>
funcom_train/3518850
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compareTo(Object o) { Resources r = (Resources) o; if (equals(o)) { return 0; } else if ( getColonist() >= r.getColonist() && getBoranium() >= r.getBoranium() && getGermanium() >= r.getGermanium() && getIronium() >= r.getIronium() && getConstruction() >= r.getConstruction()) { return 1; } else { return -1; } } COM: <s> implements comparables compare to but there are differences </s>
funcom_train/50120608
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object patch(String f_name, Object[] params) { Method m = get_method(f_name); if(m == null) return null; Object ret = null; try { ret = m.invoke(this, params); } catch (Exception e) { return e; } return ret; } COM: <s> executes a method in the object and returns the result </s>
funcom_train/45771076
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void applyTextPosition(StyleWithProperties style, boolean bInherit, BeforeAfter ba) { if (style==null) { return; } if (bIgnoreAll) { return; } String s = textPosition(style.getProperty(XMLString.STYLE_TEXT_POSITION, bInherit)); if (s!=null) { ba.add(s+"{","}"); } } COM: <s> p apply text position </s>
funcom_train/18582539
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void writeUsersIDMap(Hashtable hash, DLPUserInfo user) throws FileNotFoundException, IOException { FileOutputStream fos = new FileOutputStream(getUserFileName(user)); ObjectOutputStream oos = new ObjectOutputStream(fos); oos.writeObject(hash); oos.close(); fos.close(); } // end-method COM: <s> serializes the users id map to disk for later retrieval </s>
funcom_train/41163286
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AgStatusSequence update(AgStatusSequence entity) { EntityManagerHelper.log("updating AgStatusSequence instance", Level.INFO, null); try { AgStatusSequence result = getEntityManager().merge(entity); EntityManagerHelper.log("update successful", Level.INFO, null); return result; } catch (RuntimeException re) { EntityManagerHelper.log("update failed", Level.SEVERE, re); throw re; } } COM: <s> persist a previously saved ag status sequence entity and return it or a </s>
funcom_train/28723146
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean open(IDDElement locationNode, int x, int y) { this.locationNode = locationNode; // Create the dialog window Shell shell = new Shell(getParent(), getStyle()); shell.setText(getText()); createContents(shell); shell.pack(); shell.open(); if (x >=0 && y >= 0) { shell.setLocation(x, y); } Display display = getParent().getDisplay(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } return result; } COM: <s> opens the dialog and positions it at the given location </s>
funcom_train/3360645
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void checkCipherState() { if (!(this instanceof NullCipher)) { if (!initialized) { throw new IllegalStateException("Cipher not initialized"); } if ((opmode != Cipher.ENCRYPT_MODE) && (opmode != Cipher.DECRYPT_MODE)) { throw new IllegalStateException("Cipher not initialized " + "for encryption/decryption"); } } } COM: <s> ensures that cipher is in a valid state for update and do final </s>
funcom_train/8022254
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void cancel() { if (!timers.isEmpty()) { System.out.println("Cancelling timers for: " + name); for (Timer timer : timers) { timer.cancel(); } } if (!schedulers.isEmpty()) { System.out.println("Cancelling schedulers for: " + name); for (Scheduler scheduler : schedulers) { scheduler.stop(); } } } COM: <s> terminates any threads initiated by this updater </s>
funcom_train/24084506
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void processLeafContextMenuAddProperty(ActionEvent event){ UITreeNode srcNode = (event.getComponent().getParent().getParent()instanceof UITreeNode) ? (UITreeNode) event.getComponent().getParent().getParent() : null; processAddNodeActionEvent(srcNode); } COM: <s> todo theres a bug in </s>
funcom_train/3795035
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void disableCmdStatable(String cmd_name) { Collection<ICmdStatable> col = _cmdNameToStatable.get(cmd_name); if (col != null) for (ICmdStatable icm : col) { icm.cmdDisable(cmd_name); } else { __log.debug("cmdDisable failed because no collection for " + cmd_name); debugStatable(); } } COM: <s> there are two strategies to disable a cmd </s>
funcom_train/51572691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printToTestFiles(Pattern namePat) throws IOException { for (File file : files) { Matcher matcher = namePat.matcher(file.getName()); if (matcher.matches()) { PrintWriter writer = new PrintWriter(new FileWriter(file, true)); writer.println(file.getAbsolutePath()); writer.close(); } } } COM: <s> print some text into test files whose name not path matches a regular </s>
funcom_train/49052622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setIntendedEndUserRoles (String[] values) { // First delete the existing learning resource types. JAXBPath.deleteJaxbObject ("/Educational/Intendedenduserrole[]", getLom()); // Now add the learning resource types from the array. for (int i=0; i < values.length; i++) { addIntendedEndUserRole (values[i], false); } } COM: <s> replace the existing list of intended end user roles with the values </s>
funcom_train/17052702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateNetworkSize() { radioModelNeighbors.setTotalOfNodes(SimulationController.getInstance().getSimulation().getSimulator().getNodes().size()); routingModelNeighbors.setTotalOfNodes(SimulationController.getInstance().getSimulation().getSimulator().getNodes().size()); } COM: <s> controls the state of the controller </s>
funcom_train/4506759
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void agentJoined(AgentSession agentSession) { // Since the session has received the queues status details we need to update the status // in the manager so that the thread that is polling for changes in the status does not // send the queues status details again to this session WorkgroupManager.getInstance().updateWorkgroupStatus(this); // Trigger the event that an agent has joined the workgroup WorkgroupEventDispatcher.agentJoined(this, agentSession); } COM: <s> notification message that a new agent session has been started </s>
funcom_train/646261
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runEventLoop(Shell loopShell) { //Use the display provided by the shell if possible Display display; if (getShell() == null) { display = Display.getCurrent(); } else { display = loopShell.getDisplay(); } while (loopShell != null && !loopShell.isDisposed()) { try { if (!display.readAndDispatch()) { display.sleep(); } } catch (Exception e) { SQLExplorerPlugin.error(e); } } display.update(); } COM: <s> runs the event loop for the given shell </s>
funcom_train/22226047
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected double calcDistance(double _min, double _max) { if (_min == 0) return _max / 2; else if (_max == 0) return _min / 2; else if (Math.abs(_min) >= Math.abs(_max)) return (_min - _max) / 2; else return (-_min + _max) / 2; } COM: <s> calculate distance between min and max value </s>
funcom_train/22958534
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getOutput(double [] input_vector) { TrainingPattern pattern = new TrainingPattern(input_vector, new double[1]); double [] outputs = new double [1]; try{ outputs = this.network.extractOutput(pattern); return outputs[0]; } catch (Exception ex){ ex.printStackTrace(); } return outputs[0]; } COM: <s> linear transfer function should be overided </s>
funcom_train/140052
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void set(SymWithProps mark_sym) { List<String> queries = new ArrayList<String>(); List<String> servers = new ArrayList<String>(); for(SymBookmark bookmark : this.syms){ if(!bookmark.isGraph()){ servers.add(bookmark.getServer()); queries.add(bookmark.getPath()); } } mark_sym.setProperty(Bookmark.QUERY_URL, queries.toArray(new String[queries.size()])); mark_sym.setProperty(Bookmark.SERVER_URL, servers.toArray(new String[servers.size()])); } COM: <s> sets the das2 and quickload properties of the bookmark and deletes source url </s>
funcom_train/15684070
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ValidationResult validate() throws MonoiException { ValidationResult result = super.validate(); for ( MonoiComponent c : getComponents() ) { if ( c instanceof MonoiDataComponent && c.isValidable()) { ValidationResult r = ((MonoiDataComponent)c).validate(); result.merge(r); } } return result; } COM: <s> performs validation on components added to this container </s>
funcom_train/22865290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public boolean openArrayBuffer(int arrayBufferIndex,int size) { boolean returnValue = false; if ((arrayBufferIndex > 0) && (size > 0)) { if (bindArrayBuffer(arrayBufferIndex) == true) { currentGL.glBufferData(GL.GL_ARRAY_BUFFER,size,null,GL.GL_STATIC_DRAW); arrayBuffer = currentGL.glMapBuffer(GL.GL_ARRAY_BUFFER,GL.GL_WRITE_ONLY); openedArrayBufferIndex = arrayBufferIndex; freeArrayBufferCapacityRestBytes = size; returnValue = true; } } return returnValue; } COM: <s> open an array buffer for writing </s>
funcom_train/3393229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setDefined(Bits newDefined) { if (alive && newDefined != state.defined) { Bits diff = state.defined.dup().xorSet(newDefined); for (int adr = diff.nextBit(0); adr >= 0; adr = diff.nextBit(adr+1)) { if (adr >= nextreg) state.defined.excl(adr); else if (state.defined.isMember(adr)) setUndefined(adr); else setDefined(adr); } } } COM: <s> set the current variable defined state </s>
funcom_train/18808311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(final Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj instanceof MatrixSeriesCollection) { final MatrixSeriesCollection c = (MatrixSeriesCollection) obj; return ObjectUtils.equal(this.seriesList, c.seriesList); } return false; } COM: <s> tests this collection for equality with an arbitrary object </s>
funcom_train/10532495
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isReconcilePhase() { String phaseValue = null; String[] phase = getOption("-Aphase"); if (phase == null || phase.length == 0) { phase = getOption("phase"); if (phase != null && phase.length > 0) { phaseValue = phase[0]; } } else { phaseValue = phase[0]; } return "RECONCILE".equals(phaseValue); } COM: <s> utility method to get the value of the phase option from the annotation </s>
funcom_train/26618267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void translate(Graphics2D graphics2D, IContext context, double x, double y) { graphics2D.translate( (context.getWidth() * x) - context.getWidth() / 2, (context.getHeight() * y) - context.getHeight() / 2); } COM: <s> do the actual translation </s>
funcom_train/44870420
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void componentResized(ComponentEvent e) { if (!this.getBounds().equals(gfData.getBounds())) { // not supported on MacOS, since a resize fires too many events if (!MAC_OS_X) { if (undoable) { undo.addEdit(new GraphUndoableEdit(GraphFrame.this, gfData .getBounds(), this.getBounds(), GraphDataType.RESIZE)); } } gfData.setBounds(this.getBounds()); } } COM: <s> part of the component listener interface </s>
funcom_train/25875985
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updatePasswordCategory(long Id, long newCategoryId) { if (Id<0 || newCategoryId<0) { //make sure values appear valid return; } ContentValues args = new ContentValues(); args.put("category", newCategoryId); try { db.update(TABLE_PASSWORDS, args, "id=" + Id, null); } catch (SQLException e) { Log.d(TAG,"SQLite exception: " + e.getLocalizedMessage()); } } COM: <s> only update the category field of the password entry </s>
funcom_train/19411787
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setStatus(final String status,final int level) { EventQueue.invokeLater(new Runnable() { public void run() { try { statusLabels[level].setText(status); } catch (ArrayIndexOutOfBoundsException ax) { //Not critical so don't care } } }); } COM: <s> sets the status message of the specified level </s>
funcom_train/19408666
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void cmdInfoModel() throws NoSystemException { MSystem system = system(); MMVisitor v = new MMPrintVisitor(new PrintWriter(System.out, true)); system.model().processWithVisitor(v); int numObjects = system.state().allObjects().size(); System.out.println(numObjects + " object" + ((numObjects == 1) ? "" : "s") + " total in current state."); } COM: <s> prints information about the model </s>
funcom_train/24112364
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String nextNonDelimiterToken(final StringTokenizer toki, final String delimiter) { final String text = toki.nextToken(); if (delimiter.equals(text)) { return ""; //$NON-NLS-1$ } if (toki.hasMoreTokens()) { toki.nextToken(); } return text; } COM: <s> returns the next non delimiter token from the given string tokenizer </s>
funcom_train/22204310
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void addVariants(Collection variants, org.tm4j.topicmap.Variant var) { org.tmapi.core.Variant wrapped = Wrapper.wrap(var, var.getVariantName(), m_tm); variants.add(wrapped); for (Iterator iter = var.getVariants().iterator(); iter.hasNext();) { addVariants(variants, (org.tm4j.topicmap.Variant) iter.next()); } } COM: <s> used to collect the variants of the underlying native base name </s>
funcom_train/47576361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addObjectPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DataActivity_object_feature"), getString("_UI_PropertyDescriptor_description", "_UI_DataActivity_object_feature", "_UI_DataActivity_type"), DfmPackage.Literals.DATA_ACTIVITY__OBJECT, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the object feature </s>
funcom_train/2440995
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showTestResult(TestResult result) { BreakLocation location = result.getCurrentLocation(); String targetNodePath = location.getTargetNodePath(); Node node = m_targetTreeComponent.findNode_expandTreeIfNotExist(targetNodePath); if (node != null) { showFormulaBuilder(node, result); } } COM: <s> displays the given code test result code from a debugging session </s>
funcom_train/14329622
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPreparedStatementParsing2() throws Exception { PreparedStatement pstmt = con.prepareStatement(" SELECT ?"); pstmt.setString(1, "TEST"); ResultSet rs = pstmt.executeQuery(); assertTrue(rs.next()); assertEquals("TEST", rs.getString(1)); assertFalse(rs.next()); pstmt.close(); rs.close(); } COM: <s> test for bug 1008882 some queries with parameters cannot be executed with 0 </s>
funcom_train/33381855
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void changeLanguage() { //save new language String strLanguage = ConfigurationEditor.getCurrentTemplate().getLanguages().get(comboLanguage.getSelectionIndex()); ConfigSpider configSpider = ConfigurationEditor.getConfigSpider().clone(); configSpider.setLanguage(strLanguage); ConfigurationEditor.saveConfigSpider(configSpider, true); EditorUtil.reOpenEditor(ConfigurationEditor.fileConfigSpider); } COM: <s> save and change language re open editor </s>
funcom_train/3598115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testDominanceDistance() { try { List results = engine.search(nom, "($w word)($s s):$s^3$w"); results.remove(0); // remove list of vars Collections.sort(results, new SearchResultIDComparator()); assertTrue(results.size()==3); NOMElement r1 = (NOMElement)((List)results.get(0)).get(0); NOMElement r2 = (NOMElement)((List)results.get(0)).get(1); assertTrue(r1.getID().equals("w_4")); assertTrue(r2.getID().equals("s_1")); } catch (Throwable ex) { ex.printStackTrace(); fail("Dominance through specified distance failed!"); } } COM: <s> check dominance through a specified number of layers works </s>
funcom_train/27825217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set purge() { Set removedPredicates=new HashSet(); Iterator iterator=m_predicateInfosByPredicate.values().iterator(); while (iterator.hasNext()) { PredicateInfo predicateInfo=(PredicateInfo)iterator.next(); if (predicateInfo.m_predicateSupport.isEmpty()) { predicateInfo.dumpModifiedPredicates(removedPredicates); iterator.remove(); } } return removedPredicates; } COM: <s> removes auxiliary predicates which arent mentioned in any of the rules </s>
funcom_train/50394499
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createMetadata(String resourceName, Map<String, String> metadata, String contents) throws IOException { Document document = createMetadataDocument(metadata, resourceName, contents); indexWriter.deleteDocuments(new Term(Metadata.RESOURCE_NAME_KEY, resourceName)); indexWriter.addDocument(document); } COM: <s> adds resource with metadata and contents to the index </s>
funcom_train/1385989
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getBtnBackup() { if (btnBackup == null) { try { btnBackup = new JButton(); btnBackup.setText("Crea Backup"); // Generated btnBackup.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { creaBakup(); } }); } catch (java.lang.Throwable e) { // TODO: Something } } return btnBackup; } COM: <s> this method initializes btn backup </s>
funcom_train/31171541
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void post(int index){ // use the post method to load a url WmlTask t = deck.getTask(index); if(t != null){ WmlDeckBuilder df = new WmlDeckBuilder(deck, t); if(imgconverter != null){ df.imgconverter=imgconverter; } if(gateway != null){ df.gateway=gateway; } card = startparse(df); if(card != null){ cards.push(card); } } } COM: <s> retrieves a wml deck using an http post </s>
funcom_train/47750927
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int nbServerFromInformationsTable(String mac) { String query1 = "SELECT COUNT(*) As rowcount FROM INFORMATIONS WHERE MACADDRESS='" + Activator.toMacTableForm(mac) + "'"; try { ResultSet rs1 = dataBaseManager.JDBCexecuteQuerySelect(query1); rs1.next(); return rs1.getInt("rowcount"); } catch (Exception e) { System.err .println("Error when count nb server in informations table"); System.err.println(e); e.printStackTrace(); return -1; } } COM: <s> return the number of servers with the given mac address inside the </s>
funcom_train/44136732
/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("DELETE".equals(e.getActionCommand())) { if(m_NotesSoundPanel.getFilename() != null) { if(isDeleteConfirmed()) { stop(); setFileName(null); m_NotesSoundPanel.deleteFilename(); } } } else super.actionPerformed(e); } COM: <s> call when there is an event to do the specified action </s>
funcom_train/3168095
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IntegerValue maximum(IntegerValue another) { //TODO rename to max for Java compatability? //TODO efficiency improvement by returning maximum rather than re-creating return new IntegerValue(value.max(another.value)); /* udanax-top.st:35052:PrimIntValue methodsFor: 'operations'! {IntegerVar CLIENT login} maximum: another {PrimIntValue} "Return the largest of the two numbers." ^myValue max: another asIntegerVar! */ } COM: <s> return the largest of the two numbers </s>
funcom_train/31141483
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public byte decodeBuffer(String inputString)[] throws IOException { byte inputBuffer[] = inputString.getBytes(); ByteArrayInputStream inStream; ByteArrayOutputStream outStream; inStream = new ByteArrayInputStream(inputBuffer); outStream = new ByteArrayOutputStream(); decodeBuffer(inStream, outStream); return (outStream.toByteArray()); } COM: <s> alternate decode interface that takes a string containing the encoded </s>
funcom_train/29806357
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void createNewFile() throws SmbException { if( getUncPath0().length() == 1 ) { throw new SmbException( "Invalid operation for workgroups, servers, or shares" ); } close( open0( O_RDWR | O_CREAT | O_EXCL, ATTR_NORMAL, 0 ), 0L ); } COM: <s> create a new file but fail if it already exists </s>
funcom_train/4149097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isMapped(String expression) { if (expression == null || expression.length() == 0) { return false; } for (int i = 0; i < expression.length(); i++) { char c = expression.charAt(i); if (c == NESTED || c == INDEXED_START) { return false; } else if (c == MAPPED_START) { return true; } } return false; } COM: <s> indicate whether the expression is for a mapped property or not </s>
funcom_train/16101901
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void maybeShowPopup(MouseEvent e) { if (e.isPopupTrigger()) { if(e.getSource().equals(list)){ listPop.show(list, e.getX(), e.getY()); } //background color chooser for showTxt if(e.getSource().equals(showTxt)){ txtPop.show(list, e.getX(), e.getY()); } } } COM: <s> show the popup if the mouse event was a popup trigger </s>
funcom_train/21105600
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenuItem getMiLendersBorrowers() { if (miLendersBorrowers == null) { miLendersBorrowers = new JMenuItem("Lenders/Borrowers"); miLendersBorrowers.addActionListener(new DicEditListener()); miLendersBorrowers.setMnemonic('L'); } return miLendersBorrowers; } COM: <s> this method initializes mi lenders borrowers </s>
funcom_train/19080493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JPanel setSizes(JLabel label) { JPanel res = new JPanel(); res.setLayout(new BoxLayout(res, BoxLayout.X_AXIS)); res .setMaximumSize(new Dimension(UNBOUNDED_TXT_SIZE, MAXIMAL_TXT_SIZE + 10)); label.setPreferredSize(new Dimension(MARGIN_SIZE, MAXIMAL_TXT_SIZE)); label.setMinimumSize(label.getPreferredSize()); label.setMaximumSize(label.getPreferredSize()); label.setHorizontalAlignment(SwingConstants.RIGHT); res.add(label); return res; } COM: <s> initialize the preferred size of given label in order to obtain an right </s>
funcom_train/5806515
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void expandParms(Autoaction[] autoactions, Event event) { boolean expanded = false; for (Autoaction action : autoactions) { String strRet = EventUtil.expandParms(action.getContent(), event); if (strRet != null) { action.setContent(strRet); expanded = true; } } if (expanded) { event.setAutoaction(autoactions); } } COM: <s> expand parms in the event autoaction s </s>
funcom_train/22799215
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ActionMessages deleteUser(AccessUser user) throws DatabaseException { QueryHelper queryHelper = new QueryHelper(AdminQueries.deleteUserQuery()); queryHelper.addInputInt(ObjectTypes.USER); queryHelper.addInputInt(user.getId()); queryHelper.addInputInt(user.getModifierId()); return executeProcedure(queryHelper); } COM: <s> deletes a user </s>
funcom_train/6508350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void showWinnerState (String[] gameState) { int i=0; while (i<gameState.length&&!gameState[i].equals("null")) { d("getting ranking of "+gameState[i]+" zu holen"); ((RobotStatus) robotStatus.get(gameState[i])).setWinnerNumber((i+1)); i++; } } COM: <s> shows the winner state of the game in the mids of the game </s>
funcom_train/4557916
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPaymentSettingInputInvalidSecurityCode() { repEng.newStep("337", "Payment Setting-Input invalid Security Code for credit card"); //1. Goto User Settings:Payment Settings page //2. Select one credit card and input valid Card Number //3. Input invalid Security Code // Security Code should be marked as red border } COM: <s> 337 payment setting input invalid security code for credit card </s>
funcom_train/47161121
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setVersion(Version version) { if ( version == null ) throw new IllegalArgumentException("version must be non null"); if ( version != this.getVersion() ) { Version oldVersion = this.getVersion(); this.version = version; this.firePropertyChange(PROPERTY_VERSION, oldVersion, this.getVersion()); } } COM: <s> initialize the version of the software </s>
funcom_train/33839311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetBaseArray() { int[][][] test = new int[2][3][4]; byte b = 0; ArrayFuncs.testPattern(test, b); assertEquals(ArrayFuncs.getBaseArray(test), test[0][0]); } COM: <s> test of get base array method of class nom </s>
funcom_train/8492328
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void deatach() { float sx, sy, sz; Vector3f v; Mesh mesh; sx = (v = (mesh = getMesh(0)).getCenter()).x; sy = v.y; sz = v.z; // put the object in the "center". mesh.detach(true, 0, 0, 0); mesh.rebuild(); for (int i = 1; i < objects.size(); i++) { // put the object in the relative coordinages. (mesh = getMesh(i)).detach(false, sx, sy, sz); mesh.rebuild(); } } COM: <s> sets the x y z of all meshes of the object </s>
funcom_train/3652545
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void write(byte[] ba, int offset, int len) throws IOException { try { doc_.insertString(doc_.getLength(), new String(ba, offset, len), null); } catch (BadLocationException e) { // should never happen e.printStackTrace(); } } COM: <s> adds the given bytes as a string to the document </s>
funcom_train/4125924
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void embark(Unit unit) { if (unit == null) { throw new IllegalArgumentException("Target of embarkation must not be 'null'."); } else if (getMoveType(unit.getTile()) != MoveType.EMBARK) { throw new IllegalStateException("Illegal disembark requested!"); } else { setLocation(unit); setMovesLeft(getMovesLeft() - 3); } } COM: <s> embarks this unit onto the specified unit </s>
funcom_train/2450345
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void enableOperator(OperatorNode op) { if (operations == null) { throw new IllegalStateException("OperandOperations must be set before adding an operator."); //$NON-NLS-1$ } opTokenToOp.put(op.toString(), op); operatorStrings.add(op.toString()); } COM: <s> enable a certain operator e </s>
funcom_train/45317562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sendUnauthorized(String text) { Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).info("Unauthorized " + text); AACCNormalResponse response = new AACCNormalResponse(); response.setCode(AACCNormalResponse.MSG_UNAUTHORIZED); response.setMessage(text); sendMessage(response); } COM: <s> sends text to the client with response code 401 </s>
funcom_train/30237430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addToPropMap(ClassNameSpec cns){ if(propMap.get(cns.classDirectory) == null){ propMap.put(cns.classDirectory, new Properties()); } String origClass = cns.klass.getCanonicalName(); String newClass = cns.canonicalClassName; propMap.get(cns.classDirectory).put(origClass,newClass); } COM: <s> add an entry to the class map for the package directory for the </s>
funcom_train/29038389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Image getHelpIcon() { Image helpIcon = null; try { final ImageDescriptor descriptor = ImageDescriptor.createFromURL(FileLocator .toFileURL(Platform.getBundle(EMFCompareUIPlugin.PLUGIN_ID).getEntry( EMFCompareConstants.ICONS_PREFERENCES_HELP))); helpIcon = descriptor.createImage(); } catch (IOException e) { // this try/catch block only keeps the compiler happy, we should never be here assert false; } return helpIcon; } COM: <s> creates and return the help icon to show in our label </s>
funcom_train/5255048
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addEditablePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_EditableObject_Editable_feature"), getString("_UI_PropertyDescriptor_description", "_UI_EditableObject_Editable_feature", "_UI_EditableObject_type"), CompanytracPackage.eINSTANCE.getEditableObject_Editable(), true, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the editable feature </s>
funcom_train/2876734
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public SmartFrogLifecycleException convert(Throwable thrown) { String message = thrown.toString(); SmartFrogException sfe = extractNestedSFE(thrown); if (sfe != null) { return (SmartFrogLifecycleException) SmartFrogLifecycleException.forward(message, sfe, owner); } else { return (SmartFrogLifecycleException) SmartFrogLifecycleException.forward(message, thrown, owner); } } COM: <s> convert a caught exception into a smartforg exception </s>
funcom_train/3714099
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void saveAsFITS() { String filename = getSaveFileName(".fits", ".fit", null, JMenuItem71); PlottableSpectrum ps = ((PlottableSpectrum) (main_widget.getPlottedObject())); SimpleFITSWriter writer = new SimpleFITSWriter(ps); try { writer.write(filename); } catch (Exception e) { handleException(e); } } COM: <s> saves the main display area to a fits table </s>
funcom_train/25761753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JToolBar getJJToolBarBar() { if (jJToolBarBar == null) { jJToolBarBar = new JToolBar(); status = new JLabel(language.getProperty("edit.dialog.loaded")); jJToolBarBar.setFloatable(false); jJToolBarBar.add(status); } return jJToolBarBar; } COM: <s> this method initializes j jtool bar bar </s>
funcom_train/14077897
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void actionPerformed(ActionEvent arg0) { String text = citation.getTranslation() + " " + ReferenceGeneratorCollection.getDefaultGenerator().getCopiableReference(citation); Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); clipboard.setContents(new StringSelection(text), this); } COM: <s> perform the clipboard copy </s>
funcom_train/14170619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getAbsolutePath(char separatorChar) { StringBuilder bld = new StringBuilder(); Stack<DirectoryEntry> parents = new Stack<DirectoryEntry>(); DirectoryEntry parent = getParent(); while (parent != null) { parents.push(parent); parent = parent.getParent(); } while (!parents.isEmpty()) { bld.append(separatorChar); bld.append(parents.pop().getName()); } bld.append(separatorChar); bld.append(getName()); return bld.toString(); } COM: <s> this method generates the absolute path of the file entry with specified </s>
funcom_train/29292308
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean showError(L2PcInstance player, Throwable t) { _log.log(Level.WARNING, this.getScriptFile().getAbsolutePath(), t); if (player.getAccessLevel() > 0) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); t.printStackTrace(pw); pw.close(); String res = "<html><body><title>Script error</title>"+sw.toString()+"</body></html>"; return showResult(player, res); } return false; } COM: <s> show message error to player who has an access level greater than 0 </s>
funcom_train/5260712
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addResponsibilityOfPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_BusinessProcess_responsibilityOf_feature"), getString("_UI_PropertyDescriptor_description", "_UI_BusinessProcess_responsibilityOf_feature", "_UI_BusinessProcess_type"), BmmPackage.Literals.BUSINESS_PROCESS__RESPONSIBILITY_OF, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the responsibility of feature </s>
funcom_train/19770289
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Entry dereferenceEntry(Map.Entry<Object, Object> entry) { K key = dereferenceKey(entry.getKey()); V value = dereferenceValue(entry.getValue()); return (key == null || value == null) ? null : new Entry(key, value); } COM: <s> dereferences an entry </s>
funcom_train/11005693
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void supplyTextProps(TextPropCollection pStyle, TextPropCollection cStyle, boolean pShared, boolean cShared) { if(paragraphStyle != null || characterStyle != null) { throw new IllegalStateException("Can't call supplyTextProps if run already has some"); } paragraphStyle = pStyle; characterStyle = cStyle; sharingParagraphStyle = pShared; sharingCharacterStyle = cShared; } COM: <s> supply normally default textprops and if theyre shared </s>
funcom_train/1564466
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void write(BufferedImage image) throws IOException { if (image == null) { return; } byte[] bytes = outputter.toBytes(image); if (minLength > bytes.length) { minBytes = bytes; minLength = minBytes.length; reductionPct = ((originalResponse.getContentLength() - minLength) * 100) / originalResponse.getContentLength(); } } COM: <s> write the image using a specified write param </s>
funcom_train/19378114
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AssociationEndFacade getOneToOneChildParent(ClassifierFacade type) { AssociationEndFacade parent = null; Collection associationEnds = type.getAssociationEnds(); if (associationEnds != null && !associationEnds.isEmpty()) { Iterator associationEndIt = associationEnds.iterator(); while (associationEndIt.hasNext()) { AssociationEndFacade end = (AssociationEndFacade) associationEndIt.next(); if (this.isOneToOneChild(end.getType())) { parent = end.getConnectingEnd(); break; } } } return parent; } COM: <s> if this type is a one to one child then the parent of </s>
funcom_train/20169010
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addEvent(String action) { try { p = new PrintStream( new FileOutputStream(file ,true)); if(lastDate!=null && Calendar.getInstance().getTime().getMinutes() > (lastDate.getMinutes()+5)) p.println(); p.println(Calendar.getInstance().getTime() + "\t" + action); lastDate = Calendar.getInstance().getTime(); p.close(); } catch(Exception e){ e.printStackTrace(); } } COM: <s> type of actions delimited by tabs </s>
funcom_train/18748822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isLayoutCompatible(GraphJEdge jEdge, Edge edge) { JCellLayout edgeLayout = layoutMap.getEdge(edge); JCellLayout jEdgeLayout = layoutMap.getEdge(jEdge.getEdge()); if (edgeLayout == null) { return jEdgeLayout == null; } else { return jEdgeLayout != null && edgeLayout.equals(jEdgeLayout); } } COM: <s> tests if a given edge may be added to an existing jedge </s>
funcom_train/32830448
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void dropTestTables() { executeUpdateQuietly("drop table TEST"); executeUpdateQuietly("drop table SCHEMA_A.TEST"); executeUpdateQuietly("drop schema SCHEMA_A"); executeUpdateQuietly("drop table SCHEMA_B.TEST"); executeUpdateQuietly("drop schema SCHEMA_B"); } COM: <s> removes the test database tables </s>
funcom_train/3802862
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void remove() { if (cpNext != null) { // if next cp exists cpNext.setPrev(cpPrev); // point next cp's prev to prev cp (might be null) if (cp.getLoop()) { cpNext.setLoop(true); } } if (cpPrev != null) { // if prev cp exitsis cpPrev.setNext(cpNext); // point prev cp's next to next cp (might be null) } } COM: <s> this method removes the control point from the curve </s>
funcom_train/5341557
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doRefresh() { boolean inactivePresent = ((Boolean)DATA_MODEL.refresh()).booleanValue(); setButtonEnabled(UploadButtons.CLEAR_BUTTON, inactivePresent); MAIN_PANEL.setTitle(UPLOAD_TITLE + " (" + RouterService.getUploadManager().uploadsInProgress() + " " + ACTIVE + ", " + RouterService.getUploadManager().getNumQueuedUploads() + " " + QUEUED + ")"); } COM: <s> override the default refresh so we can set the clear button </s>
funcom_train/29025619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean matchesVal(String test, String val) { if (test.charAt(0) == '\\') { test = test.substring(1); if (test.charAt(0) != '\\') { test = test.replaceAll("\\\\.", "[a-z\\*]"); // System.out.println(test + " --- " + val + " --- " + // Pattern.matches(test,val)); return Pattern.matches(test, val); // interprets test as a regex } } return test.equals(val); } COM: <s> if test begins with it is interpretted as a regular expression </s>
funcom_train/36612788
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void waitForResponse(long timeout) throws XBeeTimeoutException, XBeeException { try { synchronized (this.getNewPacketNotification()) { long now = System.currentTimeMillis(); // wait for packets this.getNewPacketNotification().wait(timeout); if (timeout > 0 && (System.currentTimeMillis() - now >= timeout)) { throw new XBeeTimeoutException(); } } } catch (Exception e) { ExceptionHandler.handleAndThrow(e); } } COM: <s> updated to throw xbee timeout exception </s>
funcom_train/40681544
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setContent(Widget w) { //for(Iterator it = this.styleNames.iterator(); it.hasNext(); ){ // w.addStyleName( (String) it.next() ); //} this.content = w; //GWT.log("Setting Content: " + w.toString(), null); this.grid.setWidget(0, 0, this.content); } COM: <s> sets the internals of the button to the specified widget </s>
funcom_train/5461960
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void crawlDtStampProperty(Property property, Resource parentNode, RDFContainer rdfContainer) { Node propertyValue = getRdfPropertyValue(rdfContainer, property, IcalDataType.DATE_TIME); addStatement(rdfContainer, parentNode, NCAL.dtstamp, propertyValue); } COM: <s> crawls the dtstamp property </s>