__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/19966081
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getSavePrefs() { if (savePrefs == null) {//GEN-END:|124-getter|0|124-preInit // write pre-init user code here savePrefs = new Command("Save", Command.OK, 0);//GEN-LINE:|124-getter|1|124-postInit // write post-init user code here }//GEN-BEGIN:|124-getter|2| return savePrefs; } COM: <s> returns an initiliazed instance of save prefs component </s>
funcom_train/45230022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONArray getInputArgumentsArray() { JSONArray inputArgumentsArray = null; JSONObject functionObject = getFunctionObject(); if (functionObject != null) { JSONValue inputArgumentsValue = functionObject.get("input_arguments"); if (inputArgumentsValue != null) { inputArgumentsArray = inputArgumentsArray.isArray(); } } return inputArgumentsArray; } COM: <s> gets the input arguments array attribute of the response parser object </s>
funcom_train/5064253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public URL getCodeBase() { URL u = null; File f = new File(""); String path = f.getAbsolutePath(); path = path.replace('\\', '/'); try { u = new URL("file://" + path + "/"); } catch (Exception e) { throw new RuntimeException(e); } return u; } COM: <s> returns the code base </s>
funcom_train/3336791
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getProperty( Server server, String name ) { String key = propertyName; if( name != null ) { key = name + "." + key; } String value = server.getProperty( key, defaultValue ); if( isRequired && value == null ) { throw new IllegalArgumentException( key + " is a required argument." ); } return value; } COM: <s> this is used to fetch the value of the property </s>
funcom_train/1989115
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void nextStep() { boolean ok = true; // Get the current step and validates it WizardStep current = getCurrentStep(); if (current != null) { // Validates the step ok = validate(); } // Actually goes to the next step if (ok) { WizardStep step = navigation.next(current); if (step != null) { step.setWizardView(wizardView); step.init(); step.setViewData(viewData); setCurrentStep(step); step.start(); } else { throw new IllegalStateException("No further step."); } } } COM: <s> goes to next step </s>
funcom_train/5872937
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removePlotEvent(OccurEvent oe) { if (_rmEvtList == null) _rmEvtList = new LinkedList(); _rmEvtList.add(oe); if (getAttribute(ATTR_ON_REMOVE_EVENT_RESPONSE) == null) { setAttribute(ATTR_ON_REMOVE_EVENT_RESPONSE, Boolean.TRUE); Events.postEvent(-20000, "onRemoveEventResponse", this, null); } } COM: <s> remove occur event from the plotinfo </s>
funcom_train/4210401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setAnswer(FormField field, Object value) { if (!isSubmitType()) { throw new IllegalStateException("Cannot set an answer if the form is not of type " + "\"submit\""); } field.resetValues(); field.addValue(value.toString()); } COM: <s> sets a new object value to a given forms field </s>
funcom_train/1440637
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void notestSuspendServer() throws RemoteException { System.out.println("suspendServer"); try { ServerSideFacadeImpl instance = new ServerSideFacadeImpl(config); instance.startServer(); instance.suspendServer(); assertTrue(instance.isServerSuspended()); assertFalse(instance.isServerStopped()); } catch (Exception e) { fail("Exception"); } } COM: <s> test of suspend server method of class server side facade impl </s>
funcom_train/44350606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Variable getVariable(String varName) { FunctionBlock defaultFunctionBlock = getFunctionBlock(null); if (defaultFunctionBlock == null) throw new RuntimeException("Default function block not found!"); Variable var = defaultFunctionBlock.getVariable(varName); if (var == null) throw new RuntimeException("Variable '" + varName + "' not found!"); return var; } COM: <s> get a variable from first available function block </s>
funcom_train/37035367
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeService(String name) throws Exception { // Acquire a reference to the component to be removed ObjectName oname = new ObjectName(name); String serviceName = oname.getKeyProperty("name"); Server server = ServerFactory.getServer(); Service service = server.findService(serviceName); // Remove this component from its parent component server.removeService(service); } COM: <s> remove an existing service </s>
funcom_train/24050905
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int compare(Collection<Geometry> a, Collection<Geometry> b) { Iterator<Geometry> i = a.iterator(); Iterator<Geometry> j = b.iterator(); while (i.hasNext() && j.hasNext()) { Geometry aElement = i.next(); Geometry bElement = j.next(); int comparison = aElement.compareTo(bElement); if (comparison != 0) { return comparison; } } if (i.hasNext()) { return 1; } if (j.hasNext()) { return -1; } return 0; } COM: <s> returns the first non zero result of code compare to code encountered as </s>
funcom_train/31986481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected JComboBox createFontChoice() { CommandChoice choice = new CommandChoice(); String fonts[] = Toolkit.getDefaultToolkit().getFontList(); for (int i = 0; i < fonts.length; i++) choice.addItem(new ChangeAttributeCommand(fonts[i], "FontName", fonts[i], fView)); return choice; } COM: <s> creates the font choice </s>
funcom_train/8403253
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void register(UserDTO user) throws AllCommentsException { if (this.hasUser(user)) { throw new AllCommentsException("User already exists"); } long userId = user.getUserId(); UserInfoDAO dao = new UserInfoDAOImpl(); dao.addItem(userId, user.getLoginName(), user.getPassword(), user .getEmail(), user.getNickname(), Constants.USER_ROLE_USERS); } COM: <s> write user info to table user login and user login </s>
funcom_train/13717964
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetStart() { System.out.println("testGetStart"); Assert.assertEquals(A12A12.getStart(),A12); Assert.assertEquals(A12B11.getStart(),SourceLocation.getSourceLocation("A",1,2,0,0)); Assert.assertEquals(EmptyA12.getStart(), null); } COM: <s> test of get start method of class be </s>
funcom_train/29738071
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setColumnLabel(int columnIndex, String columnLabel) { String oldColumnLabel = columns[columnIndex-1].label; columns[columnIndex-1].label = columnLabel; pcs.firePropertyChange("columnLabel"+columnIndex, oldColumnLabel, columnLabel); } COM: <s> sets the column label at the specified index </s>
funcom_train/41163397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void save(ToAssistance entity) { EntityManagerHelper.log("saving ToAssistance instance", Level.INFO, null); try { getEntityManager().persist(entity); EntityManagerHelper.log("save successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("save failed", Level.SEVERE, re); throw re; } } COM: <s> perform an initial save of a previously unsaved to assistance entity </s>
funcom_train/16482929
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Boolean searchLibrary(String slMovieName, Library library) { slMovieName = slMovieName.toUpperCase(); for (Movie movie : library.values()) { if (FileTools.makeSafeFilename(movie.getBaseName()).toUpperCase().equals(slMovieName)) { return true; } } return false; } COM: <s> search the movie library for the passed movie name </s>
funcom_train/17157521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setupContextMenu() { this.ui.locationsTableWidget .setContextMenuPolicy(ContextMenuPolicy.CustomContextMenu); contextMenu.addAction(this.ui.actionNewLocation); contextMenu.addAction(this.ui.actionEditLocation); contextMenu.addAction(this.ui.actionRemoveLocation); } COM: <s> setup a context menu for locations table widget </s>
funcom_train/18721532
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D) g; //System.out.println("paintComponent called"); if (doShow) { g2.transform(t); drawComponent(g2); if (isSelected) { drawSelected(g2); } if (doDrawEffectOnMouseOver) { drawMouseOver(g2); } } validate(); } // end method paint COM: <s> to paint use the methods draw mouse over draw selected draw component </s>
funcom_train/23279923
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public LaunchAreaOfExpertise getLaunchAreaOfExpertise(String area){ List objects = getHibernateTemplate().findByNamedQueryAndNamedParam("launchAreaOfExpertise.getByAreaOfExpertise","areaOfExpertise",area); if (objects.size()!=1) return null; return (LaunchAreaOfExpertise)objects.get(0); } COM: <s> returns the launch area of expertise with the given string </s>
funcom_train/42181584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void print() { if (!((HomePane)getView()).print()) { String message = String.format(this.resource.getString("printError"), this.home.getName()); ((HomePane)getView()).showError(message); } } COM: <s> controls the print of this home </s>
funcom_train/43246258
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testUserLogout() throws Exception { System.out.println("userLogout"); String securitytoken = getSecurityToken(); org.vistaoutreach.voe.security.ws.SecurityServicesImpl instance = new org.vistaoutreach.voe.security.ws.SecurityServicesImpl(); SecurityResponseObject result = instance.userLogout(securitytoken); assertNotNull(result); assertTrue(result.getResultCode() ==0); secToken = null; } COM: <s> test of user logout method of class org </s>
funcom_train/46456038
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setHighlighted(int start, int end, boolean highlight) { if (end >= highlighted.length) { adjustCapacity(end+1); } start = Math.max(start, 0); // can't start before 0 for (int i = start; i <= end; i++) { highlighted[i] = highlight; } } COM: <s> sets the highlighted flag for the specified point range </s>
funcom_train/44590056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IJavaElement createPackageDeclarationHandle(CompilationUnitDeclaration unit) { if (unit.isPackageInfo()) { char[] packName = CharOperation.concatWith(unit.currentPackage.getImportName(), '.'); Openable openable = this.currentPossibleMatch.openable; if (openable instanceof CompilationUnit) { return ((CompilationUnit) openable).getPackageDeclaration(new String(packName)); } } return createTypeHandle(new String(unit.getMainTypeName())); } COM: <s> creates an iimport declaration from the given import statement </s>
funcom_train/36256656
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getValuesSize(){ switch(type){ case TYPE_BYTE: return count; case TYPE_ASCII: return count; case TYPE_SHORT: return count*2; case TYPE_LONG: return count*4; case TYPE_RATIONAL: return count*8; case TYPE_SBYTE: return count; case TYPE_UNDEFINED: return count; case TYPE_SSHORT: return count*2; case TYPE_SLONG: return count*4; case TYPE_SRATIONAL: return count*8; case TYPE_FLOAT: return count*4; case TYPE_DOUBLE: return count*8; default: return count; } } COM: <s> calculates the size of the value s </s>
funcom_train/36821246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { run = true; while (run) { while (DBComm.isConnected()) { try { frame = DBComm.getVideoFrame(); if (frame != null) { pane.updateImage(frame); } } catch (Exception ex) { ex.printStackTrace(); } } try { Thread.sleep(100); } catch (InterruptedException ex) { continue; } } } COM: <s> checks to see if there is an active database connection and then </s>
funcom_train/50497660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IJavaProject getJavaProject(ILaunchConfiguration configuration) { String projectName = getStringAttribute(configuration, IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); IJavaProject javaProject = null; if ((projectName != null) && (projectName.length() > 0)) { IJavaModel javaModel = JavaCore.create(ProfilerPlugin.getWorkspace().getRoot()); javaProject = javaModel.getJavaProject(projectName); } return javaProject; } COM: <s> get the java project being referenced by the launch </s>
funcom_train/11341184
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getMessage() { StringBuffer sb = new StringBuffer(getCodeText(code)); if (uri != null) sb.append(": '").append(uri).append('\''); if (message != null) sb.append(": ").append(message); return sb.toString(); } COM: <s> get the message associated with this exception </s>
funcom_train/3581474
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean removeVertices(Collection<V> vertices) { for(Iterator<E> iterator=edges.iterator(); iterator.hasNext(); ) { Edge<V> edge = iterator.next(); for(V vertex : vertices) { if(edge.getEndpoints().contains(vertex)) { iterator.remove(); } } } return vertices.removeAll(vertices); } COM: <s> remove all vertices in the passed collection </s>
funcom_train/18843288
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("CopperCoreAdapter".equals(portName)) { setCopperCoreAdapterEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } } COM: <s> set the endpoint address for the specified port name </s>
funcom_train/7614950
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawRect(int x, int y, int width, int height) { int[] xpoints = { x, x, x + width, x + width }; int[] ypoints = { y, y + height, y + height, y }; drawPolygon(xpoints, ypoints, 4); } COM: <s> draws the rectangle with the specified width and length and top left </s>
funcom_train/37721785
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initComponents() { setLayout(new BorderLayout()); add(createToolBar(), BorderLayout.NORTH); tabbedPane = new JTabbedPane(); tabbedPane.add("SQL", createSQLView()); tabbedPane.add("Results", createResultsView()); add(tabbedPane, BorderLayout.CENTER); } COM: <s> initialize view components </s>
funcom_train/40616747
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public XAConnection getXAConnection() throws SQLException { debugCodeCall("getXAConnection"); int id = getNextId(XA_DATA_SOURCE); return new JdbcXAConnection(factory, id, getJdbcConnection(userName, StringUtils.cloneCharArray(passwordChars))); } COM: <s> open a new xa connection using the current url user name and password </s>
funcom_train/43245230
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testSetRetirementDate() { System.out.println("setRetirementDate"); Calendar retirementDate = null; EmploymentDataDG1Object instance = new EmploymentDataDG1Object(); instance.setRetirementDate(retirementDate); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } COM: <s> test of set retirement date method of class org </s>
funcom_train/46188552
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PebbleUserDetails getUser() { if (this.user == null) { SecurityRealm realm = PebbleContext.getInstance().getConfiguration().getSecurityRealm(); try { this.user = realm.getUser(getAuthor()); } catch (SecurityRealmException e) { log.error(e); } } return this.user; } COM: <s> gets full user details about the author including name email address etc </s>
funcom_train/10749063
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testActiveCount_CreateDestroySubgroup() { ThreadGroup group = new ThreadGroup("group"); ThreadGroup group1 = new ThreadGroup(group, "group1"); assertEquals(1, group.activeGroupCount()); group1.destroy(); assertEquals(0, group.activeGroupCount()); } COM: <s> active count in a thread group with an empty subgroup </s>
funcom_train/39067127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void enableShowTasksView () { //TODO show a dialog the first time this is done? //add the listener that will show Gild tasks view when there are build errors getWorkspace().addResourceChangeListener(resourceListener, IResourceChangeEvent.POST_CHANGE); IPreferenceStore workbenchPS = getWorkbench().getPreferenceStore(); // turn off show tasks preference showTasksViewEnabled = workbenchPS.getBoolean("SHOW_TASKS_ON_BUILD"); setShowTasksView(false); } COM: <s> enables show tasks view on error preference </s>
funcom_train/47741976
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJpOptions() { if (jpOptions == null) { jpOptions = new JPanel(); jpOptions.setLayout(new BorderLayout()); jpOptions.setComponentOrientation(java.awt.ComponentOrientation.UNKNOWN); jpOptions.add(getJpOptionContainer(), java.awt.BorderLayout.SOUTH); jpOptions.add(getJPanel3(), java.awt.BorderLayout.CENTER); } return jpOptions; } COM: <s> this method initializes jp options </s>
funcom_train/44162699
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void csNewTurn(Random random, ChangeSet cs) { BuildingType type = getType(); ServerPlayer owner = (ServerPlayer) getColony().getOwner(); if (canTeach()) { teach(cs, owner); } if (type.hasAbility("model.ability.repairUnits")) { repairUnits(cs); } } COM: <s> new turn for this building </s>
funcom_train/25419097
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getViewMetadataUrl() { String url = ""; Map<String, String> m = new HashMap<String, String>(); ResourceLinks rLinks = this.getResourceLinks(); if(rLinks == null) { return ""; } if(rLinks.getUrlsByTag() != null) { m = this.getResourceLinks().getUrlsByTag(); url = m.get(ResourceLink.TAG_DETAILS); } return Val.chkStr(url); } COM: <s> gets the resource links as map </s>
funcom_train/43326301
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: final public FVector makeZScores() { if (data==null) return null; float st = stdev(); float av = average(); FVector v = new FVector(data.length); if (st != 0.0F) for (int i=0; i<data.length; i++) v.data[i] = ((av - data[i]) / st); return v; } COM: <s> returns a vector containing the z scores for all </s>
funcom_train/45253481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isFastViewId(String partId) { for (int i = 0; i < fastViews.size(); i++) { IViewReference ref = (IViewReference) fastViews.get(i); String secondaryId = ref.getSecondaryId(); String refId = (secondaryId == null ? ref.getId() : ref.getId() + ":" + secondaryId); //$NON-NLS-1$ if (refId.equals(partId)) { return true; } } return false; } COM: <s> check to see if the part id represents a fast views id </s>
funcom_train/9532492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getFieldLabel(int index,String group) { if (getEnbldFieldCfg(index,group)==null) { log().info("ERROR: no field for col "+index+" group "+group); return null; // ? ex? ""? } return getEnbldFieldCfg(index,group).getLabel(); } COM: <s> gives name of field at index 0 based for table heading </s>
funcom_train/22356898
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadFileHistory() { if (history == null) { history = new Bucket<FileHistoryAction>(getMaxFileHistorySize()); } for (String file : PropertiesHelper.getList(settings, "Client.fileHistory")) { File f = new File(file); if (f.exists()) { history.add(new FileHistoryAction(this, f)); } } } COM: <s> fills the file history bucket from what is stored in the settings </s>
funcom_train/32957235
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelectedFields( List<String> selected) { if (selected==null || selected.size()==0) { for (DataField field : getFields()) { field.setEnabled(true); } } else { // Clear previous settings for (DataField field : getFields()) { field.setEnabled(false); } for (String label : selected) { DataField selectedField = findField( label ); selectedField.setEnabled(true); } } } COM: <s> set the fields to be used for the query </s>
funcom_train/25419520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String uuidsToInClause(StringSet uuids) { StringBuilder sb = new StringBuilder(); for (String sUuid: uuids) { if (sb.length() > 0) sb.append(","); sb.append("'").append(sUuid).append("'"); } return sb.toString(); } COM: <s> returns a comma delimited single quoted string of uuids </s>
funcom_train/11647565
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void bodyText(WriteContext context, String text) throws SAXException { //TODO: // FIX ME // CHECK UNICODE->CHAR CONVERSION! // THIS WILL QUITE POSSIBLY BREAK FOR NON-ROMAN char[] body = text.toCharArray(); contentHandler.characters(body, 0, body.length); } COM: <s> express body text </s>
funcom_train/21845056
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { StringBuffer msg = new StringBuffer(); msg.append("Status(" + messageCode); if( messageParameter != null ) msg.append( ", \"" + this.messageParameter + "\""); if( this.program != null ) msg.append( ", in program " + program); if( this.lineNumber > 0 ) msg.append( ", at line " + lineNumber); msg.append( ")"); return msg.toString(); } COM: <s> support function for printing status objects without control </s>
funcom_train/39173493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void cancel() { ensureEventThread(); if (null != connectionThread) { // if we are connecting - cancel connect connectionThread.interrupt(); connectionThread = null; statusMessage.setText("Connection to "+ getTitle() +" was calcelled"); MainFrame.getInstance().setTitleStatus(AnnotationDiffGUI.getConnectionStatus()); buttonConnect.setEnabled(true); } else { // if we are NOT connecting - close this dialog this.dispose(); } } COM: <s> cancels connection process or closes this dialog if no connection in </s>
funcom_train/27837918
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update(Observable notifier, Object data) { if (notifier instanceof UmlvmViewer || notifier instanceof Umlvm) { process(data); } else if (notifier instanceof UmlvmOutput) { String msg = (String) data; if (notifier == Umlvm.out) { view.appendOutputTextArea(msg); } else if (notifier == Umlvm.err) { view.appendErrorTextArea(msg); } else if (notifier == Umlvm.trace) { view.appendLogTextArea(msg); } } } COM: <s> central event handling </s>
funcom_train/50428660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getQueryNodes() { HashSet nodes = new HashSet(); for (Iterator i = getNodes().iterator(); i.hasNext(); ) { BBNNode n = (BBNNode) i.next(); if (!n.isEvidence()) nodes.add(n); } return nodes; } COM: <s> return the set of query nodes </s>
funcom_train/44323275
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addParam(String key, String value) { if (key != null) { List list = (List) fParams.get(key); if (list == null) { list = new ArrayList(); fParams.put(key, list); } list.add(value); } } COM: <s> adds new property value </s>
funcom_train/45257401
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setWorkingSet(IWorkingSet newWorkingSet) { IWorkingSet oldWorkingSet = workingSet; workingSet = newWorkingSet; // Update action clearWorkingSetAction.setEnabled(newWorkingSet != null); editWorkingSetAction.setEnabled(newWorkingSet != null && newWorkingSet.isEditable()); firePropertyChange(newWorkingSet, oldWorkingSet); } COM: <s> sets the current working set </s>
funcom_train/20949523
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void changePosition(Individual indiv, int delta) { int currentPos = autostart.indexOf(indiv); int newPos = currentPos + delta; if (currentPos != -1 && delta != 0 && newPos >= 0 && newPos < autostart.size()) { autostart.remove(indiv); autostart.add(newPos, indiv); firePropertyChange(AUTO_ORDER_CHANGED, null, null); writeAutoNumbers(); } } COM: <s> changes position of the individual to the code delta code steps </s>
funcom_train/16773061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String queryCurrentEdge() throws IOException, NotActiveException { if (!alive) throw new NotActiveException(); int currentSimStep = conn.getCurrentSimStep(); if (currentEdgeCache == null || (currentEdgeCacheTimestep < currentSimStep)) { currentEdgeCache = (new ReadVehicleVarQuery(socket, id)) .queryPositionRoadmap(); currentEdgeCacheTimestep = currentSimStep; } return currentEdgeCache.edgeID; } COM: <s> returns the road the vehicle is currently running into </s>
funcom_train/48091365
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void calculateMoves(){ possibleMoves.clear(); for (int row=0; row<GameGui.boardDim; row++) for (int col=0; col<GameGui.boardDim; col++) { if (validMoveNoFlips(row,col)) { int[] move = {row, col}; possibleMoves.add(move); } } } COM: <s> with the given player will calculate all the moves that player can </s>
funcom_train/14217423
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearPaymentMethodsById(List paymentMethodIdsToRemove) { if (UtilValidate.isEmpty(paymentMethodIdsToRemove)) return; for (Iterator iter = paymentInfo.iterator(); iter.hasNext(); ) { CartPaymentInfo info = (CartPaymentInfo) iter.next(); if (paymentMethodIdsToRemove.contains(info.paymentMethodId)) { iter.remove(); } } } COM: <s> remove all the payment methods based on the payment method ids </s>
funcom_train/9086763
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Departments update(Departments entity) { EntityManagerHelper.log("updating Departments instance", Level.INFO, null); try { Departments 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 departments entity and return it or a copy of </s>
funcom_train/36991025
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean matchAny(Object obj, ArrayList list){ Object[] objects = new Object[list.size()]; list.toArray(objects); for (int x = 0; x < objects.length; x++ ){ if ( objects[x].equals(obj)){ return true; } } return false; } COM: <s> return true if the object match one of the item in the list </s>
funcom_train/9274049
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void runOrderStatus(Object displayData, boolean byName) throws Exception { if (byName) { ops.orderStatus(display, displayData, warehouse(), rand.district(), rand.randomCLast()); } else { ops.orderStatus(display, displayData, warehouse(), rand.district(), rand.NURand1023()); } } COM: <s> run an order status transaction with random input values </s>
funcom_train/4361910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addCookie(Cookie cookie) { if (!cookiesParsed) parseCookies(); int size = 0; if (cookies != null) { size = cookies.length; } Cookie[] newCookies = new Cookie[size + 1]; for (int i = 0; i < size; i++) { newCookies[i] = cookies[i]; } newCookies[size] = cookie; cookies = newCookies; } COM: <s> add a cookie to the set of cookies associated with this request </s>
funcom_train/16498163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitle( String title) { String oldTitle = getTitle(); if (oldTitle!=null && !oldTitle.equals( title) || oldTitle==null && title!=null) { putProperty( Document.TitleProperty, title); listeners.firePropertyChange( Document.TitleProperty, oldTitle, title); } } COM: <s> sets the title of the document </s>
funcom_train/24242606
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String createRow(JSONObject row) throws DBException { boolean createRow = false; JSONObject obj = new JSONObject(); try { loadRecord(row); createRow = insert() > 0; } catch (Exception e) { logger.error(e.getMessage(),e ); throw new DBException(e); } finally { obj.put("success", createRow); } return obj.toString(); } COM: <s> this method injects http row param into java properties </s>
funcom_train/47308139
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void move() { //this.setLocation(this.x - deltax, this.y - deltay); //this.translate(-deltax, deltay); x += deltax; y += deltay; if (x < 0) { x = 640; } if (x > 640) { x = 0; } if (y < 0) { y = 480; } if (y > 480) { y = 0; } } COM: <s> makes the star travel </s>
funcom_train/26311584
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int judgePoint(Coords c) { HexLine comparor=new HexLine(c,direction); if(comparor.intercept<intercept) { return (direction<3)?-1:1; } else if(comparor.intercept>intercept) { return (direction<3)?1:-1; } return 0; } COM: <s> returns 1 if the point is to the left of the line </s>
funcom_train/10357697
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public boolean getBooleanProperty(Session session, String name, boolean defaultValue) { String result = getProperty(session, name); if (result != null) { return Boolean.valueOf(result).booleanValue(); } // return default value if it doesn't exist is isn't convertable. return defaultValue; } COM: <s> get a property associated with this mail session as a boolean value </s>
funcom_train/23410490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRealizesPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AtomicProcess_realizes_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AtomicProcess_realizes_feature", "_UI_AtomicProcess_type"), ProcessPackage.Literals.ATOMIC_PROCESS__REALIZES, true, false, true, null, null, null)); } COM: <s> this adds a property descriptor for the realizes feature </s>
funcom_train/1660219
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGenerateSSK() throws IOException, InterruptedException { final SSKKeypair[] keypair = new SSKKeypair[1]; FcpAdapter fcpAdapter = new FcpAdapter() { /** * {@inheritDoc} */ @Override public void receivedSSKKeypair(FcpConnection fcpConnection, SSKKeypair sskKeypair) { keypair[0] = sskKeypair; synchronized (this) { notify(); } } }; fcpConnection.addFcpListener(fcpAdapter); synchronized (fcpAdapter) { fcpConnection.sendMessage(new GenerateSSK()); fcpAdapter.wait(); } assertNotNull("ssk keypair", keypair[0]); } COM: <s> generates an ssk key pair </s>
funcom_train/18746822
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CtrlAut getBody(String name) { assert hasName(name) && getKind(name).hasBody() : String.format( "Unknown or inappropriate name %s", name); CtrlAut result = this.bodyMap.get(name); assert result != null : String.format("Unknown function %s", name); return result; } COM: <s> returns the automaton for a named function </s>
funcom_train/36188517
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean writeToFile(File file, String contents) { boolean retvalue = true; FileWriter out; try { out = new FileWriter(file); out.write(contents); out.close(); } catch (IOException e) { logger.debug("IO exception", e); retvalue = false; } return retvalue; } COM: <s> create a new file with contents </s>
funcom_train/8913214
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean startServer() { AmbientServer server = new AmbientServer(); // For now, we'll have the server always in verbose mode so we can // see what's happening when it starts up via UI. HackystatLogger.setLoggingLevel(server.getLogger(), "FINER"); if (server.uiStart(email, password)) { projectsTypeXML = server.getProjects(); return true; } else { return false; } } COM: <s> starts the ambient server with the email and password provided </s>
funcom_train/43451407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setUp() throws Exception { super.setUp(); bean = new DataBeanImpl(); ctx = new DataContextImpl(); DataConfig cfg = DataConfig.singleton(); ConnectionPool.setDataConfig(cfg); ConnectionPool pool = ConnectionPool.singleton(); ((DataContextImpl) ctx).setConnection(pool.getConnection()); // ((DataContextImpl) ctx).setConfig(cfg); } COM: <s> sets up the fixture for example open a network connection </s>
funcom_train/13874731
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addOnePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ResolveExp_one_feature"), getString("_UI_PropertyDescriptor_description", "_UI_ResolveExp_one_feature", "_UI_ResolveExp_type"), QvtoperationalPackage.Literals.RESOLVE_EXP__ONE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the one feature </s>
funcom_train/10908192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public BorderInfo getBorderBefore(int which) { switch (which) { case ConditionalBorder.NORMAL: return borderBefore.normal.getBorderInfo(); case ConditionalBorder.LEADING_TRAILING: return borderBefore.leadingTrailing.getBorderInfo(); case ConditionalBorder.REST: return borderBefore.rest.getBorderInfo(); default: assert false; return null; } } COM: <s> returns the resolved border before of this grid unit in the collapsing border </s>
funcom_train/45933493
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResponseObject tagKeywords(Identification id, String requestId, List<String> keywordIds) { userProfileService.addTaggedKeywords(id.getUserId(), keywordIds); //TODO: make this responseobject reflect the success or failure of the operation return new ResponseObject(requestId); } COM: <s> adds a list of keywords as tagged </s>
funcom_train/50570757
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected SessionManagerListener remove(SessionManagerListener l) { if (l == listener1) { return listener2; } if (l == listener2) { return listener1; } // Recursively seek out the target listener. SessionManagerListener l1 = remove(listener1, l); SessionManagerListener l2 = remove(listener2, l); return (l1 == listener1 && l2 == listener2) ? this : add(l1, l2); } // remove COM: <s> removes a session manager listener from this multicaster and returns </s>
funcom_train/20073660
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLetterOnField(Letter letter, int x, int y) { if(letter == null || x < 0 || y < 0 || x >= WIDTH || y >= HEIGHT) { throw new IllegalArgumentException("One argument is illegal. Values: " + letter.toString() + " " + x + " " + y); } board[x][y].setLetter(letter); } COM: <s> puts the given letter on the board </s>
funcom_train/3762492
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(Node node) { // remove node in the removed hash map // String nodeName = node.getName(); if ( m_removedNodes.containsKey(nodeName) ) { m_removedNodes.remove(nodeName); } // add node to the graph // m_filteredGraph.addNode(node); notifyObserver(); } COM: <s> adds the specified code node code to the model </s>
funcom_train/11730108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Node initVersioningException(boolean returnParent) throws RepositoryException, NotExecutableException, IOException { Node vNode = testRootNode.addNode(nodeName1, testNodeType); ensureMixinType(vNode, mixVersionable); Node vChild = vNode.addNode(nodeName2, testNodeType); session.save(); vNode.checkin(); exportRepository(SKIPBINARY, RECURSE); if (returnParent) { return vNode; } else { return vChild; } } COM: <s> creates a simple target tree consisting of a checked in node and an </s>
funcom_train/51113919
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getContentType() throws IOException { if (m_MIMEType != null) return m_MIMEType; else if (m_dataHandler != null) { readDataFromHandler(); return m_MIMEType; } else throw new IllegalStateException("This Document contains neither a DataHandler nor a byte array. It should have at least one of those things."); } COM: <s> return the mime content type of my data </s>
funcom_train/6487702
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void loadFromProperties(java.util.Properties properties) { // TODO: catch exceptions String value = properties.getProperty( "scp.keepPermissions" ); if ( value != null ) { keepPermissions = Boolean.valueOf( value ).booleanValue(); } value = properties.getProperty( "scp.recursive" ); if ( value != null ) { recursive = Boolean.valueOf( value ).booleanValue(); } } COM: <s> loads the properties from a configuration file </s>
funcom_train/43268716
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: @Test public void testReadAccessToConcepts() { try { Concept c = ConceptDAO.getInstance().findRoot(); if (c == null) { log.warn("Allthough a database error did not seem to occur, no root concept was found in the database"); } } catch (Exception e) { Assert.fail("Failed to retrive root concept. Reason: " + e.getMessage()); } } COM: <s> attempts to read the root concept </s>
funcom_train/566755
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GroupAttrReplyList read_attribute_reply(final int rid, final int tmo) throws DevFailed { final Integer rid_obj = new Integer(rid); final Boolean fwd = (Boolean) arp.get(rid_obj); if (fwd == null) { Except.throw_exception("API_BadAsynPollId", "Invalid asynch. request identifier specified", "Group.read_inout_reply"); } arp.remove(rid_obj); return read_attribute_reply_i(rid, tmo, fwd.booleanValue()); } COM: <s> read attribute reply </s>
funcom_train/34594446
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getLogConfigFilePath() { if (rtProps.getProperty("logConfig.file") == null) { rtProps.setProperty("logConfig.file", "config" + File.separator + "LogConfig.xml"); } return rtProps.getProperty("logConfig.file"); } COM: <s> returns a string representing the filepath location of the log </s>
funcom_train/18545075
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Vector filterUniqueResource(Vector list){ Vector filtered = new Vector(); Iterator i = list.iterator(); while(i.hasNext()){ ResourceTaskTO rtto = (ResourceTaskTO)i.next(); boolean found = false; String currName = rtto.getResource().getUsername(); Iterator j = filtered.iterator(); while(j.hasNext()){ String username = (String)j.next(); if (username.equals(currName)){ found = true; } } if (!found){ filtered.addElement(currName); } } return filtered; } COM: <s> return a list of resource names based on list of resource task objects </s>
funcom_train/9919030
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTexUniform(String name, GLTexture tex) { int loc = getUniformLocation(name); if (-1 < loc) { int tu = tex.getTextureUnit(); if (-1 < tu) { // If tex is already bound to a texture unit, we use // it as the value for the uniform. gl.glUniform1iARB(loc, tu); } tex.setTexUniform(loc); } } COM: <s> sets the texture uniform with the unit of tex is attached to </s>
funcom_train/45452311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setScore(Indicator indicator, int score) { if (!getProfile().getInstrument().equals(indicator.getInstrument())) { throw new IllegalArgumentException("Indicator '" + indicator.getName() + "' does not belong to this profile's instrument '" + getProfile().getInstrument().getName() + "'"); } scores.put(indicator, score); } COM: <s> specifies the score for an indicator of this evaluations instrument </s>
funcom_train/39164023
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectAnnotation(final AnnotationData aData) { Runnable action = new Runnable(){ public void run(){ List<AnnotationData> selAnns = Collections.singletonList(aData); owner.setSelectedAnnotations(selAnns); } }; pendingEvents.offer(new PerformActionEvent(action)); eventMinder.restart(); } COM: <s> queues an an action for selecting the provided annotation </s>
funcom_train/37062413
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getString( String key ) { try { return sDialogLabel.getString( key ); } catch (Exception e) { LOGGER.error( "error getting key '" + key + "' in bundle '" + BUNDLENAME + "': " + e.getMessage()); return "???"; } } COM: <s> returns the string for the given key for locale </s>
funcom_train/15627155
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void refresh() { aAddNewPickmap.setEnabled(doAddNewPickmap(false)); aOpenPickmapMap.setEnabled(doOpenPickmapMap(false)); aDeletePickmap.setEnabled(doDeletePickmap(false)); aSavePickmap.setEnabled(doSavePickmap(false)); aRevertPickmap.setEnabled(doRevertPickmap(false)); } COM: <s> update the actions states </s>
funcom_train/44719072
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void propertyChange(PropertyChangeEvent e) { Object source = e.getSource(); if (source == cwField) { int index = list.getSelectedIndex(); if (index!=-1) { saveButton.setEnabled(true); cw = ((String) cwField.getValue()); } } } COM: <s> called when a fields value property changes </s>
funcom_train/4197586
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private XmlElement toXmlDict(Map<String, Object> map) { XmlElement dict = new XmlElement("dict"); for (Map.Entry<String, Object> entry : map.entrySet()) { dict.add(new XmlElement("key", entry.getKey())); dict.add(objectToXml(entry.getValue())); } return dict; } COM: <s> convert a map to its plist representation </s>
funcom_train/45867550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void paintComponent(Graphics g) { synchronized (panel) { Insets in = getInsets(); int x = in.left; int y = in.top; g.drawImage(panel.getBuffer(), x, y, this); g.translate( x, y); //panel.paintablesequence.paint(g); g.translate(-x, -y); } } COM: <s> p paints the image buffer of the buffered panel in this panel </s>
funcom_train/15918486
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Stmt handleIf(If ifStmt, Term outerClosure, List<VarInstance<? extends VarDef>> env) { if (ifStmt.cond() instanceof Binary) return ifStmt.cond(handleBinary((Binary)ifStmt.cond(), outerClosure, env)); return ifStmt; } COM: <s> handle the case for x10 if stmt </s>
funcom_train/7720079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testPreparedStatementSetParam4() throws Exception { java.sql.PreparedStatement stmt = con.prepareStatement("INSERT INTO foo ('a', 'b') VALUES ('?', '?');"); try { stmt.setInt(0, 1234567890); } catch (SQLException e) { return; } fail(); } COM: <s> construct a statement and try to populate parameter 0 </s>
funcom_train/41174417
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean store() { try { this.settings.storeToXML(new FileOutputStream(this.file), "MangaDownloader Settings"); return true; } catch (FileNotFoundException e) { System.err.println("FileNotFoundException in saveSettings"); e.printStackTrace(); return false; } catch (IOException e) { System.err.println("IOException in saveSettings"); e.printStackTrace(); return false; } } COM: <s> only a little helper method </s>
funcom_train/15636945
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLess() { System.out.println("less"); BitString bs = BitString.createRandom(); BitString instance = bs.clone().increment(); boolean expResult = false; boolean result = instance.less(bs); assertEquals(expResult, result); } COM: <s> test of less method of class sim </s>
funcom_train/50926425
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Transform2 getTransformToRotateAndStretchBond(CMLAtom movingAtom, Real2 targetPoint) { CMLAtom pivotAtom = bond.getOtherAtom(movingAtom); Real2 pivotPoint = pivotAtom.getXY2(); Real2 movingPoint = movingAtom.getXY2(); Transform2 t = Transform2.getTransformToRotateAndStretchLine(pivotPoint, movingPoint, targetPoint); return t; } COM: <s> transform describing the rotation and stretching of a bond </s>
funcom_train/40736164
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setListName(String newVal) { if ((newVal != null && listName != null && (newVal.compareTo(listName) == 0)) || (newVal == null && listName == null && listNameIsInitialized)) { return; } listName = newVal; listNameIsModified = true; listNameIsInitialized = true; } COM: <s> setter method for list name </s>
funcom_train/38292628
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AgentController createNewAgent(String nickname, String className, Object[] args) throws StaleProxyException { if(myImpl == null || myProxy == null) { throw new StaleProxyException(); } AID agentID = new AID(nickname, AID.ISLOCALNAME); try { myProxy.createAgent(agentID, className, args); return new AgentControllerImpl(agentID, myProxy, myImpl); } catch (Throwable t) { throw new StaleProxyException(t); } } COM: <s> creates a new jade agent running within this container </s>