__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/10655577
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetMinimumSpan02() { view = new ResizableView(line); assertEquals(0.0f, view.getMinimumSpan(View.X_AXIS), 0.000001f); assertEquals(0.0f, view.getMinimumSpan(View.Y_AXIS), 0.000001f); } COM: <s> tests code get minimum span code with resizable view </s>
funcom_train/19761892
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testServiceEnums() throws Exception { _logger.info("----------------------------------------------------------------------------"); _logger.info("Testing com.netstoke.core.commerce.service package."); Class[] classes = new Class[]{ServiceCategory.class}; testEnumValues(classes); Long id = null; try { ServiceCategory.valueOf(id);fail(); } catch (NullPointerException e) {} try { id = 9000L;ServiceCategory.valueOf(id);fail(); } catch (IllegalArgumentException e) {} } COM: <s> tests service package enum values </s>
funcom_train/4359378
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void send(ClusterManager manager, CatalinaCluster cluster, String sessionId) { ClusterMessage msg = manager.requestCompleted(sessionId); if (msg != null) { if(manager.doDomainReplication()) { cluster.sendClusterDomain(msg); } else { cluster.send(msg); } if(doStatistics()) nrOfSendRequests++; } } COM: <s> send manager request completed message to cluster </s>
funcom_train/51572320
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public File createDir(String dir) throws IllegalArgumentException { if (dir.startsWith(File.separator)) { throw new IllegalArgumentException(dir + " is absolute"); } File toCreate = new File(baseFile, dir); boolean success = toCreate.mkdirs(); if (!success) { toCreate = null; } return toCreate; } COM: <s> create the specified directory relative to the base file </s>
funcom_train/24570021
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addLayoutComponent(Component comp, Object constraints) { checkNotNull(constraints, "The constraints must not be null."); if (constraints instanceof String) { setConstraints(comp, new CellConstraints((String) constraints)); } else if (constraints instanceof CellConstraints) { setConstraints(comp, (CellConstraints) constraints); } else { throw new IllegalArgumentException("Illegal constraint type " + constraints.getClass()); } } COM: <s> adds the specified component to the layout using the specified </s>
funcom_train/37445704
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void deleteExperiment(String shortlabel) throws IntactException { Collection experiments = helper.search(Experiment.class.getName(), "shortlabel", shortlabel); for (Iterator iterator = experiments.iterator(); iterator.hasNext();) { Experiment exp = (Experiment) iterator.next(); helper.delete(exp); } } COM: <s> deletes an experiment specified by the shortlabel </s>
funcom_train/39176756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void valueChanged(ListSelectionEvent e) { int selectedRow = form.gasParametersTable.getSelectedRow(); if(selectedRow == -1) { setGasParamName(null); } else { setGasParamName((String)form.gasParametersTable .getValueAt(selectedRow, 1)); } } COM: <s> called when the selection changes in the ga s parameters table </s>
funcom_train/15464355
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isAnySettingWindowOpen(){ if(frameChatSett != null) if(frameChatSett.isVisible()) return true; if(frameVoicSett != null) if(frameVoicSett.isVisible()) return true; if(frameConnSett != null) if(frameConnSett.isVisible()) return true; return false; } COM: <s> returns true if any settings window is open </s>
funcom_train/41665548
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValidateType() { boolean result = false; if (validateType != null) { if (validateType.trim().equalsIgnoreCase("true")) { if (getPropertyClass().equals(PropertyClass.getString())) { result = true; } else { String message = getCode() + " property class must be " + PropertyClass.getString() + " to be type validated."; throw new ConfigRuntimeException(message); } } } return result; } COM: <s> checks if to validate the property validation type </s>
funcom_train/45623470
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addTargetPathPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_AspNetCompilerType_targetPath_feature"), getString("_UI_PropertyDescriptor_description", "_UI_AspNetCompilerType_targetPath_feature", "_UI_AspNetCompilerType_type"), MSBPackage.eINSTANCE.getAspNetCompilerType_TargetPath(), true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the target path feature </s>
funcom_train/9644890
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isConnectedTo(SGNode toNode) { for (Iterator iter = getFromEdges().iterator(); iter.hasNext();) { SGEdge edge = (SGEdge) iter.next(); assert (edge.getFromNode() == this); if (edge.getToNode() == toNode) { return true; } } return false; } COM: <s> checks if is connected to </s>
funcom_train/1590979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getMaximumTextLength(Locale locale) { int max = getMaximumValue(); if (max >= 0) { if (max < 10) { return 1; } else if (max < 100) { return 2; } else if (max < 1000) { return 3; } } return Integer.toString(max).length(); } COM: <s> get the maximum text value for this field </s>
funcom_train/37864595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setSelfIsContext() { useSelfAsContext = true; if (realSet != null && realSetIsComplete) { for (Iterator<NodeProxy> i = realSet.iterator(); i.hasNext();) { NodeProxy p = i.next(); p.addContextNode(contextId, p); } } } COM: <s> the method code set self is context code </s>
funcom_train/32040630
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addMinPersonsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StaffType_minPersons_feature"), getString("_UI_PropertyDescriptor_description", "_UI_StaffType_minPersons_feature", "_UI_StaffType_type"), ImsldPackage.eINSTANCE.getStaffType_MinPersons(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the min persons feature </s>
funcom_train/12145397
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setUsers(String theUsers) { System.out.println("USers: " + theUsers); StringTokenizer stok = new StringTokenizer(theUsers, ","); mUsers = new ArrayList(); while (stok.hasMoreTokens()) { mUsers.add(stok.nextElement()); } } COM: <s> sets the users attribute of the notebook descriptor object </s>
funcom_train/3926018
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public boolean valid( int tokenOffset, TokenEnumerator v ) { if ( !validColor( tokenOffset, v )) { return( false ); } int state = v.getState(); tokenOffset = v.getNextToken(); if ( !validColor( tokenOffset, v )) { v.setState( state ); return( false ); } tokenOffset = v.getNextToken(); if ( !validColor( tokenOffset, v )) { v.setState( state ); return( false ); } return( true ); } COM: <s> check if a sfcolor value is valid </s>
funcom_train/46360120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long addClientToChatNotification(Long room_id){ try { IConnection current = Red5.getConnectionLocal(); RoomClient currentClient = this.clientListManager.getClientByStreamId(current.getClient().getId()); String streamid = currentClient.getStreamid(); currentClient.setIsChatNotification(true); currentClient.setChatUserRoomId(room_id); this.clientListManager.updateClientByStreamId(streamid, currentClient); } catch (Exception err) { log.error("[addClientToCahtNotification]",err); } return new Long(-1); } COM: <s> adds a client to the additional list of users to chat </s>
funcom_train/13259580
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void centerWindow() { Toolkit tk = Toolkit.getDefaultToolkit(); //gets dimensions of the screen to center window. int xOffset = ((int) tk.getScreenSize().getWidth() - getWidth()) / 2, yOffset = ((int) tk.getScreenSize().getHeight() - getHeight()) / 2; setBounds(xOffset, yOffset, this.getWidth(), this.getHeight()); } COM: <s> centers this window on the screen </s>
funcom_train/3617305
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Key findKey(IDatatype datao) { if( !keys.containsValue(datao) ) throw new NoSuchElementException("No key found for object."); Key key = null; for(Iterator i=keys.entrySet().iterator(); i.hasNext() && key==null; ) { Map.Entry e = (Map.Entry)i.next(); if( e.getValue()==datao ) key=(Key)e.getKey(); } return key; } COM: <s> finds the wrapped key associated with an object </s>
funcom_train/13899864
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testReadGroupAddress() { System.out.println("readGroupAddress"); Object _groupAddress = 123; String expResult = "0/0/123"; String result = KNXToolkit.readGroupAddress(_groupAddress); System.out.println("expected:" + expResult.toString() + " got: " + result.toString() ); assertEquals(expResult, result); } COM: <s> test of read group address method of class knxadmin </s>
funcom_train/15622891
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Collection getStepsWhereThisIsInputConcept() throws M4Exception { Collection params = this.getParameterReferences(); Vector steps = new Vector(); if (params != null) { Iterator it = params.iterator(); while (it.hasNext()) { Parameter p = (Parameter) it.next(); if (p != null && p.getParameterType().equals(Parameter.TYPE_INPUT)) { steps.add(p.getTheStep()); } } } return steps; } COM: <s> returns all steps in the case that use this concept as </s>
funcom_train/44715229
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Collection getInternalAssignedGroups() { if (m_assignedGroups == null) { m_assignedGroups = new HashSet(); GroupCollection gc = new GroupCollection (getAssignedGroupAssociation().cursor()) {}; while (gc.next()) { m_assignedGroups.add(gc.getDomainObject()); } } return m_assignedGroups; } COM: <s> return the internal collection of groups </s>
funcom_train/9713932
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AxisService getServiceForActivation(String serviceName) { AxisService axisService = null; axisService = (AxisService) allServices.get(serviceName); if (axisService != null) { return axisService; } else { axisService = (AxisService) allEndpoints.get(serviceName); return axisService; } } COM: <s> service can start and stop once stopped it cannot be accessed so we </s>
funcom_train/41726657
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMaxCount(final int count) { if ((count < 1) || (count < mMinCount)) { throw new IllegalArgumentException("MaxCount (" + count + ") must not be 0 or less than MinCount (" + mMinCount + ")"); } mMaxCount = count; } COM: <s> sets the maximum number of times the flag can be specified </s>
funcom_train/3394043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void appendFloat(float x) { ByteArrayOutputStream buffer = new ByteArrayOutputStream(4); DataOutputStream bufout = new DataOutputStream(buffer); try { bufout.writeFloat(x); appendBytes(buffer.toByteArray(), 0, 4); } catch (IOException e) { throw new AssertionError("write"); } } COM: <s> append a float as a four byte number </s>
funcom_train/38315994
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public AdditionalHardware updateAdditionalHardware(AdditionalHardware additionalHardware) { try { additionalHardware.setModificationDate(new Date()); filesDAO.updateAdditionalHardware(additionalHardware); } catch (PersistenceException jlcppe) { log.debug("PersistenceException updating file additional hardware.", jlcppe); return null; } return additionalHardware; } COM: <s> update a additional hardware from a form on the frontend </s>
funcom_train/8352501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void notifyLogin(final FtpIoSession session) { StatisticsObserver observer = this.observer; if (observer != null) { // is anonymous login User user = session.getUser(); boolean anonymous = false; if (user != null) { String login = user.getName(); anonymous = (login != null) && login.equals("anonymous"); } observer.notifyLogin(anonymous); } } COM: <s> observer login notification </s>
funcom_train/10628796
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testLongValueNegative1() { byte aBytes[] = {12, -1, 100, -2, -76, -128, 45, 91, 3}; long result = -43630045168837885L; long aNumber = new BigInteger(aBytes).longValue(); assertTrue(aNumber == result); } COM: <s> convert a number to a negative long value </s>
funcom_train/26475767
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doFormat(Object object, Writer writer, CharConverter conv) throws Exception { SimpleDate date = (SimpleDate) object; int day = date.getDay(); if (day < 10) writer.write('0'); Utils.print(day, writer); writer.write('.'); int month = date.getMonth()+1; if (month < 10) writer.write('0'); Utils.print(month, writer); writer.write('.'); Utils.print(date.getYear(), writer); } COM: <s> formats an object to produce an output on the given code writer code </s>
funcom_train/50314101
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void pack () { checkWidget (); if (parent.itemsCount == 0) return; TableItem[] items = parent.items; int index = getIndex (); int newWidth = getPreferredWidth (); for (int i = 0; i < parent.itemsCount; i++) { newWidth = Math.max (newWidth, items [i].getPreferredWidth (index)); } if (newWidth != width) parent.updateColumnWidth (this, newWidth); } COM: <s> causes the receiver to be resized to its preferred size </s>
funcom_train/20671772
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void prepareProcesses() throws Exception { for(int i=0; i<_processes.size(); i++){ try{ _processes.get(i).prepare(); } catch(RuntimeException re){ throw new Exception("Unabel to prepare process ["+_processes.get(i).getUniqueName()+"]", re); } } } COM: <s> invoke prepare method for each process </s>
funcom_train/44164801
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void reset() { removeAll(); buildGameMenu(); buildViewMenu(); buildOrdersMenu(); buildReportMenu(); buildColopediaMenu(); // --> Debug if (FreeColDebugger.isInDebugMode()) { add(new DebugMenu(freeColClient, gui)); } update(); } COM: <s> resets this menu bar </s>
funcom_train/13874572
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addIsOrderedPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_MultiplicityElement_isOrdered_feature"), getString("_UI_PropertyDescriptor_description", "_UI_MultiplicityElement_isOrdered_feature", "_UI_MultiplicityElement_type"), EmofPackage.Literals.MULTIPLICITY_ELEMENT__IS_ORDERED, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } COM: <s> this adds a property descriptor for the is ordered feature </s>
funcom_train/41302766
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean intersects(double x, double y, double w, double h) { double mx = getX(); double my = getY(); double mw = getWidth(); double mh = getHeight(); return w > 0 && h > 0 && mw > 0 && mh > 0 && x < mx + mw && x + w > mx && y < my + mh && y + h > my; } COM: <s> tests if the given rectangle intersects this one </s>
funcom_train/49462192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void sanitizeCorp(List<String> ve) { for (int i=0; i<inc_parts.length; ++i) for (int j=ve.size()-1; j>0; --j) if (inc_parts[i].equalsIgnoreCase(ve.get(j))) { _logger.debug(ve.get(j)+" removed in vendor name"); ve.remove(j); return; // once near the end ... } } COM: <s> removes all company kind from the vendor name </s>
funcom_train/48358297
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void copyMiscFiles() throws IOException, URISyntaxException, UtilsException { if (!tossimFlag && !combinedImage) { generateIndividualMiscFiles(); } else if (combinedImage && !tossimFlag) { generateCombinedMiscFiles(); } else if (tossimFlag) { generateTossimMiscFiles(); } if (this.target == CodeGenTarget.AVRORA_MICA2_T2 || this.target == CodeGenTarget.AVRORA_MICAZ_T2){ copyBlinkFiles(); } } COM: <s> generates miscellaneous files make files and other supporting files </s>
funcom_train/25217876
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printBindings(PrintStream stream) { for (LSymbol k : bindings.keySet()) { stream.print("(setq "); stream.print(k.getValue()); stream.print(" "); bindings.get(k).print(stream); stream.println(")"); } } COM: <s> print all bindings to a stream </s>
funcom_train/39289009
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void performDirectEdit(){ try { if ( listener.getSource().equals(BasicModelElement.TYPE) ) { if ( manager == null ) { manager = new ComboBoxDirectEditManager( this, ComboBoxCellEditor.class, new ComboBoxCellEditorLocator( (Label)getFigure() .getChildren() .get(1) ) ); } manager.show(); } } catch (Exception e) { e.printStackTrace(); } } COM: <s> helper function that is used by the above and the following </s>
funcom_train/38551432
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object other) { if (!(other instanceof Test<classname>)) { return false; } Test<classname> otherTest<classname> = (Test<classname>) other; if (this.toString().equals(otherTest<classname>.toString())) { return true; } return false; } COM: <s> indicates whether the passed object is equal to this one </s>
funcom_train/35975949
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleForEach(String name, AttributeList attrs) throws SAXParseException { (new TaskHandler(helperImpl, this, null, null, null)).init(name, attrs); // new ForEachHandler(helperImpl, this).init(tag, attrs); } COM: <s> handles a for each defintion element by creating a for each handler </s>
funcom_train/22769569
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PathNode copyDimensionSubTree() { PathNode result= copyNode(); int size = getChildCount(); XDimension dimension = getDimension(); for(int i =0; i< size; i++) { PathNode child = getPathNode(i); if(child.getDimension() == dimension) { PathNode childCopy = child.copyDimensionSubTree(); result.addChild(childCopy); } } return result; } COM: <s> copies the subtree that describes the dimension </s>
funcom_train/51514005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long checkIn(String localPath, AlmayerObject almayerObject) throws Exception { String[] paths = resourceManager.makePhotoThumbs(localPath); ++photoCounter; for(int index = 0; index < 4; index++) { fileSystemManager.checkIn(paths[index], almayerObject.getId(), index); FileUtil.delete(paths[index]); } return almayerObject.getId(); } COM: <s> insert the specified file into the repository and gets the </s>
funcom_train/12242928
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setFinalized() { this.finalized = true; // Initialized map for lookup and insert names into map. this.nameToIndexMap = new Hashtable<String, Integer>(2 * this.size()); for(int i = 0; i < this.size(); i++) { this.nameToIndexMap.put(this.get(i).name, new Integer(i)); } } COM: <s> set the columns definition to be finalized and prevent further </s>
funcom_train/33808522
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void positionAround(TableController tableController, TableControllerSet tableControllerSet) { Coordinate coord = tableMatrix.getCoordinate(tableController); int placementY = coord.y; int placementX = coord.x; int distance = distanceMatrix[placementY][placementX]; PlaceNeighbor pn = new PlaceNeighbor(tableControllerSet); tableMatrix.operateSquare(pn, placementX, placementY, distance); } COM: <s> position the tables on the table controller set around the specified table controller </s>
funcom_train/25290022
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setInfluencingBoundingLeaf(BoundingLeaf region) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_INFLUENCING_BOUNDS_WRITE)) throw new CapabilityNotSetException(Ding3dI18N.getString("ModelClip13")); if (isLive()) ((ModelClipRetained)this.retained).setInfluencingBoundingLeaf(region); else ((ModelClipRetained)this.retained).initInfluencingBoundingLeaf(region); } COM: <s> set the model clip nodes influencing region to the specified </s>
funcom_train/35672012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getVersion() throws IOException { InputStream stream = null; try { Properties version = new Properties(); stream = Cob2TransGeneratorMain.class.getResourceAsStream( VERSION_FILE_NAME); version.load(stream); return version.getProperty("version"); } finally { if (stream != null) { stream.close(); } } } COM: <s> pick up the version from the properties file </s>
funcom_train/1547719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int findMaxY(WeightedObservedPoint[] points) { int maxYIdx = 0; for (int i = 1; i < points.length; i++) { if (points[i].getY() > points[maxYIdx].getY()) { maxYIdx = i; } } return maxYIdx; } COM: <s> finds index of point in specified points with the largest y </s>
funcom_train/31890266
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void processSelectedContactResponse(Element root) { String rq = root.elementText("requestid"); AddressAcceptor aa = (AddressAcceptor) (addressAcceptors.get(rq)); if (aa == null) { log.warning("Unexpected contact arrived, request ID: " + rq); return; } addressAcceptors.remove(rq); aa.addressArrived(root.element("contact")); } COM: <s> processes response from the address book </s>
funcom_train/51102648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void rollbackChanges() { if (objectStore.hasChanges()) { GraphDiff diff = getObjectStore().getChanges(); getObjectStore().objectsRolledBack(); if (channel != null) { channel.onSync(this, null, DataChannel.ROLLBACK_CASCADE_SYNC); } fireDataChannelRolledback(this, diff); } } COM: <s> reverts any changes that have occurred to objects registered with data context also </s>
funcom_train/14233455
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int findSlotByIPAndPort(String IP, int port) { for (int i = 0; i < slots.length; i++) { if (slots[i].getIP().equals(IP) && (slots[i].getPort() == port) && (port != 0)) { return i; } } return -1; } COM: <s> finds a slot whose player has the specified ip and port </s>
funcom_train/22397347
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ImapMessageToken messageExpunged(int index, Vector updatedTokens) { ImapMessageToken result; synchronized(lock) { result = (ImapMessageToken)indexToTokenMap.remove(index); if(result != null) { removeIndexFromVector(index, updatedTokens); } else { shiftVectorAroundRemovedIndex(index, updatedTokens); } } return result; } COM: <s> expunge a message by index from the mailbox </s>
funcom_train/15679756
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void dispose() { Iterator it = imageCache.values().iterator(); while( it.hasNext() ) { Image image = ( Image )it.next(); image.dispose(); } heightImage.dispose(); widthImage.dispose(); spacingImage.dispose(); marginImage.dispose(); paddingImage.dispose(); } COM: <s> disposes all cached images </s>
funcom_train/43185944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Format intersects(Format format) { Format fmt; if ((fmt = super.intersects(format)) == null) return null; if (!(format instanceof JPEGFormat)) return fmt; JPEGFormat other = (JPEGFormat)format; JPEGFormat res = (JPEGFormat)fmt; res.qFactor = (qFactor != NOT_SPECIFIED ? qFactor : other.qFactor); res.decimation = (decimation != NOT_SPECIFIED ? decimation : other.decimation); return res; } COM: <s> finds the attributes shared by two matching code format code objects </s>
funcom_train/10945012
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GenericValue getItemTypeGenericValue() { try { return this.getDelegator().findByPrimaryKeyCache("OrderItemType", UtilMisc.toMap("orderItemTypeId", this.itemType)); } catch (GenericEntityException e) { Debug.logError(e, "Error getting ShippingCartItem's OrderItemType", module); return null; } } COM: <s> returns the item type </s>
funcom_train/124749
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void syncWithScrollPane(JScrollPane sp) { super.syncWithScrollPane(sp); getVerticalScrollBar().firePropertyChange( "JScrollBar.isFreeStanding", false, true); getHorizontalScrollBar().firePropertyChange( "JScrollBar.isFreeStanding", false, true); } COM: <s> overloads supermethod and provides additional notification to horizontal </s>
funcom_train/34580158
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Font getFont() { if (font == null) {//GEN-END:|225-getter|0|225-preInit // write pre-init user code here font = Font.getDefaultFont();//GEN-LINE:|225-getter|1|225-postInit // write post-init user code here }//GEN-BEGIN:|225-getter|2| return font; } COM: <s> returns an initiliazed instance of font component </s>
funcom_train/31679438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void parse(InputStream in, String encoding) throws IOException, SAXException { try { _xmlReader.setInput(in, encoding); parseAll(); } catch (XMLStreamException e) { if (e.getNestedException() instanceof IOException) throw (IOException)e.getNestedException(); throw new SAXException(e); } finally { _xmlReader.reset(); } } COM: <s> parses an xml document from the specified input stream and encoding </s>
funcom_train/18007550
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getPageRotation(int index) { PdfDictionary page = pages[index - 1]; PdfNumber rotate = (PdfNumber)getPdfObject(page.get(PdfName.ROTATE)); if (rotate == null) return 0; else { int n = rotate.intValue(); n %= 360; return n < 0 ? n + 360 : n; } } COM: <s> gets the page rotation </s>
funcom_train/18748709
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected boolean isEdgeMode(MouseEvent evt) { /* added by Carel*/ if (getEditor()==null){ return false; } /*end */ if (! getEditor().isEdgeMode()) { return false; } Object cell = getFirstCellForLocation(evt.getX(), evt.getY()); return isVertex(cell); } COM: <s> callback method to determine whether an event concerns edge creation </s>
funcom_train/47674359
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSubComponent(BeanWrapperElement p_element) { return (p_element == propertyTransformer || p_element == passThroughRouter || p_element == internalEndpoint || p_element == component || p_element == internalEndpoint || (internalEndpoint != null && p_element != null && internalEndpoint.contentEquals(p_element.getContent()))); } COM: <s> check whether the given element is a subcomponent of this </s>
funcom_train/28208963
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void clearResults() { synchronized (this) { if (tabFolder != null) { CTabItem[] tabItems = tabFolder.getItems(); for (int i = 0; i < tabItems.length; i++) { if (tabItems[i] != messagesTab) { closeTab(tabItems[i]); } } } if (messagesTable != null) { messagesTable.removeAll(); } } } COM: <s> closes all result tabs and signals all associated </s>
funcom_train/15453880
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Set getInstantMessengers() { Set instantMessengers = new LinkedHashSet(); String queryString = "select instanteMessenger from instanteMessenger " + "in class org.cesar.resc.accessControl.api.InstantMessenger order by" + " instanteMessenger.description asc"; Query query = session.createQuery(queryString); List list = query.list(); instantMessengers.addAll(list); return instantMessengers; } COM: <s> returns all instant messengers stored in database </s>
funcom_train/1990066
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void doubleClick(MouseEvent e) { int x = e.getX(); int y = e.getY(); int row = tree.getRowForLocation(x, y); if (row >= 0) { TreePath treePath = tree.getPathForRow(row); tree.setSelectionPath(treePath); GUITreeNode treeNode = (GUITreeNode) treePath.getLastPathComponent(); // Get the default action treeNode.runDefaultAction(this, getField().getForm().getView()); } } COM: <s> executes the default action on 2 click </s>
funcom_train/5028352
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setMondayValue(int minutes) { IElementWrapper iew = this.getParentWrapper(); if (iew instanceof PersonWrapper) { PersonWrapper personWrapper = (PersonWrapper) iew; getAvailabilityRecord().setMondayValue(minutes); persisting(personWrapper); } if (iew instanceof OrganizationWrapper) { OrganizationWrapper organizationWrapper = (OrganizationWrapper) iew; getAvailabilityRecord().setMondayValue(minutes); persisting(organizationWrapper); } } COM: <s> set the availability in minutes on monday </s>
funcom_train/27661524
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void creatXml(String aeTitle, String hostName, String port, String wadoPort, String dcmProtocol){ createAndParseXML(); ServerConfiguration s=new ServerConfiguration(); s.setAeTitle(aeTitle); s.setHostName(hostName); s.setPort(port); s.setWadoPort(wadoPort); s.setDcmProtocol(dcmProtocol); createRootElement(s); printToFile(); } COM: <s> creates the new xml document with the given element values </s>
funcom_train/47819132
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connect(String username, MessageReceiver receiver, ServerInfo info) throws IOException { connect(new Socket(info.getServerIPAddress(), info.getServerPort()),receiver); sendMessage(new Message(Message.CONNECT_TO_SERVER, new Object[]{username})); } COM: <s> connects to a server at the specified ip address and port number and </s>
funcom_train/3026211
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isJavadocRequired(SimpleNode node, PrintData printData) { if (printData.isNestedClassDocumented()) { return node.isRequired() && !isInAnonymousClass(node); } else { return node.isRequired() && !isInAnonymousClass(node) && !isInInnerClass(node) && !isInnerClass(node); } } COM: <s> gets the javadoc required attribute of the pretty print visitor object </s>
funcom_train/33622113
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getMenuPanel() { if (menu == null) { menu = new JPanel(); menu.setLayout(null); menu.setBounds(new Rectangle(509, 0, 240, 500)); menu.add(getBtnTriangle(), null); menu.add(getBtnRectangle(), null); menu.add(getBtnText(), null); menu.add(getBtnChangeColor(), null); menu.add(getTxtInputText(), null); } return menu; } COM: <s> this method initializes j panel1 </s>
funcom_train/16465272
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void mouseReleased(MouseEvent e) { if (e.getButton() == MouseEvent.BUTTON1) { if (e.getClickCount() == 1) { map.setSelectionByTileCoordinate(PreviewMap.MAX_ZOOM, iStartSelectionPoint, convertToAbsolutePoint(e.getPoint()), true); } } map.grabFocus(); } COM: <s> when dragging the map change the cursor back to its pre move cursor </s>
funcom_train/49755311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isStartable(Invoker invoker) { // startable if there is at least one fully observable // alternation set in the list of conditions boolean fullSet = true; for (int i = 0; i < conditions.size(); i++) { Condition cond = conditions.get(i); if (! cond.isObservable(invoker)) { fullSet = false; } if (i > 0 && cond.isAlternate()) { // new alternation set if (fullSet) { return true; } } } return fullSet; } COM: <s> is the situation startable a situation is startable if it has </s>
funcom_train/44851910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getValue(String inName) throws VInvalidNameException { // Pre: inName not null if (VSys.assertNotNull(this, "getValue", inName) == Assert.FAILURE) return null; // Pre: list must contain the element if (!nameValues().containsKey(inName)) { throw new VInvalidNameException(inName); } // Post: return value return nameValues().get(inName).getValue(); } COM: <s> returns the value for the given in name </s>
funcom_train/3379217
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Extension get(String alias) { X509AttributeName attr = new X509AttributeName(alias); String name; String id = attr.getPrefix(); if (id.equalsIgnoreCase(X509CertImpl.NAME)) { // fully qualified int index = alias.lastIndexOf("."); name = alias.substring(index + 1); } else name = alias; return map.get(name); } COM: <s> get the extension with this alias </s>
funcom_train/45246368
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JNumberFloatField getJNumberFloatFieldGamaTN93() { if (jNumberFloatFieldGamaTN93 == null) { jNumberFloatFieldGamaTN93 = new JNumberFloatField(); jNumberFloatFieldGamaTN93.setLocation(new Point(345, 279)); jNumberFloatFieldGamaTN93.setSize(new Dimension(65, 20)); } return jNumberFloatFieldGamaTN93; } COM: <s> this method initializes j number float field gama tn93 </s>
funcom_train/32790931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void insertQueryMethods() { MappedClass mc; Set<String> operations; for (String classifier : classifiersToMappedClasses.keySet()) { mc = classifiersToMappedClasses.get(classifier); operations = theORM.getOperations(classifier); for (String op : operations) { mc.addQuery(op); } } } COM: <s> inserts information about query methods contained by the classes in </s>
funcom_train/13814445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testfailedCreation() { String fname = "test1.jpg"; File f = new File( nonExistingDir, fname ); PhotoInfo photo = null; try { photo = PhotoInfo.addToDB( f ); // Execution should never proceed this far since addToDB // should produce exception fail( "Image file should have been nonexistent" ); } catch ( PhotoNotFoundException e ) { // This is what we except } } COM: <s> test that an exception is generated when trying to add </s>
funcom_train/10016436
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getSystemDisplayName(FileObject f) { String name = null; if (f != null) { name = f.getName().getBaseName(); if (!name.trim().equals("")) { name = VFSUtils.getFriendlyName(f.getName() + ""); } } return name; } COM: <s> name of a file directory or folder as it would be displayed in </s>
funcom_train/28199558
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String displayName() { try { return Introspector.getBeanInfo(getClass()).getBeanDescriptor().getDisplayName(); } catch (Exception e) { // Catching IntrospectionException, but also maybe NullPointerException...? Logger.getLogger(ServiceType.class.getName()).log(Level.WARNING, null, e); return getClass().getName(); } } COM: <s> default human presentable name of the service type </s>
funcom_train/28116460
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testInvalidObject() throws Exception { TestContext context = getContext(); MapMessage message = (MapMessage) context.getMessage(); try { message.setObject("testInvalidObject", new java.math.BigDecimal(0.0)); fail("MapMessage.setObject() should only support " + "objectified primitives"); } catch (MessageFormatException expected) { // the expected behaviour } } COM: <s> verifies that attempting to set an invalid object using the set object </s>
funcom_train/49959016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onWindowClosed() { RPCServiceFactory.getInstance().getService().endSession(Cookies.getCookie("user"), Cookies.getCookie("password"), new AsyncCallback() { public void onSuccess(Object result) { // widget closed now, nothing to do } public void onFailure(Throwable caught) { // widget closed now, nothing to do } }); } COM: <s> respond to a window close event by logging out of twitter </s>
funcom_train/5525431
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void makeimage () { Dimension D=getSize(); if (I==null || D.width!=W || D.height!=H) { I=null; W=D.width; H=D.height; if (TI!=null) I=TI.getImage(W,H,this); if (I==null) I=createImage(W,H); IG=I.getGraphics(); if (Background==null) Background=getBackground(); IG.setColor(Background); IG.fillRect(0,0,W,H); init(Global.FixedFont); initBold(Global.BoldFont); IG.setFont(F); paintlines(); } } COM: <s> make offscreen image </s>
funcom_train/42082419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String dump() { final DecimalFormat df = new DecimalFormat("#0.00"); final String x = df.format(getX()).replace(",", "."); final String y = df.format(getY()).replace(",", "."); return "(" + x + " , " + y + ")"; } COM: <s> dump the content of the point as string representation </s>
funcom_train/10800299
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Compatibility getCompatibilityInstance() { if (compatibilityPlugin.get() == null) { Specification spec = getSpecificationInstance(); Compatibility comp = spec != null ? spec.getCompatibility() : null; if (comp == null) compatibilityPlugin.instantiate(Compatibility.class, this); else compatibilityPlugin.configure(comp, this); } return (Compatibility) compatibilityPlugin.get(); } COM: <s> if a compatibility instance is associated with the specification </s>
funcom_train/925547
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString() { String name; // determine attribute name AttributeType at = getAttributeTypeObject(); if (at != null) name = at.getName(); else if (getVendorId() != -1) name = "Unknown-Sub-Attribute-" + getAttributeType(); else name = "Unknown-Attribute-" + getAttributeType(); // indent sub attributes if (getVendorId() != -1) name = " " + name; return name + ": " + getAttributeValue(); } COM: <s> string representation for debugging purposes </s>
funcom_train/41725790
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void insertMenuItemAt(int index, MenuItem item) { item.setItemSize(getWidth(), getHeight() / displayedItems); composite.getLayoutManager().insertCellAt(index, item, Drawable.X_ALIGN_CENTER, Drawable.Y_ALIGN_CENTER, BoxLayout.CELL_SIZE_FIXED); composite.getLayoutManager().setCellFixedSize(index, getHeight() / displayedItems); itemCount++; if (getSelectedItemIndex() >= index) { selectedItemIndex++; } setNeedLayout(); } COM: <s> insert an item into menu with specified index </s>
funcom_train/36074737
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void clearDeltas(TakagiSugenoFIS fis) { int i; DifferentiableMembershipFunction auxMF; int mfParameterNumber; Iterator<MembershipFunction> mfs = fis.getFuzzySet(); while (mfs.hasNext()){ auxMF = (DifferentiableMembershipFunction)mfs.next(); mfParameterNumber = auxMF.parameterNumber; auxMF.localGradient = 0; for (i = 0; i < mfParameterNumber; i++) { auxMF.delta[i] = 0; auxMF.derivative[i] = 0; } } } COM: <s> clear all membership function deltas and local gradient </s>
funcom_train/19062518
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String createTooltipText(IMailboxInfo info) { StringBuffer buf = new StringBuffer(); buf.append("<html><body>&nbsp;Total: " + info.getExists()); buf.append("<br>&nbsp;Unseen: " + info.getUnseen()); buf.append("<br>&nbsp;Recent: " + info.getRecent()); buf.append("</body></html>"); return buf.toString(); } COM: <s> create html tooltip text </s>
funcom_train/41165691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void delete(CoParagraphType entity) { EntityManagerHelper.log("deleting CoParagraphType instance", Level.INFO, null); try { entity = getEntityManager().getReference(CoParagraphType.class, entity.getParagraphTypeId()); getEntityManager().remove(entity); EntityManagerHelper.log("delete successful", Level.INFO, null); } catch (RuntimeException re) { EntityManagerHelper.log("delete failed", Level.SEVERE, re); throw re; } } COM: <s> delete a persistent co paragraph type entity </s>
funcom_train/28874758
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void forceCompile() { setYellow(); packer.generate(Packer.TYPE_SID, instrSong, ""+(instrument+1)+".s", option.getTmpPath(), ""+(instrument+1), option.getTmpPath(), 0x0801, false, option.getA4Freq()); setGreen(); isCompiled[instrument]=true; } COM: <s> force a compilation of tune </s>
funcom_train/6227165
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object o) { if(o == this) return true; if(o == null || !(o instanceof ThemeDescription)) return false; ThemeDescription other = (ThemeDescription)o; if(isValid() != other.isValid()) return false; if(isValid()) return uri.equals(other.uri); // both are invalid -> null equals null return true; } COM: <s> two code theme description code objects are equal if </s>
funcom_train/27752689
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawString(Graphics g, String s, int x, int y) { MetricsImage mi = stringImageMI(s); int xpos = (mi.metrics.leftSideBearing<0 ? -mi.metrics.leftSideBearing : 0); g.drawImage(mi.image, x-xpos, y-mi.metrics.ascent, null); } COM: <s> draw a string on the screen </s>
funcom_train/36534356
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int addVehicleWithPermit(String registration, String type, String mapName) { boolean success = this.addVehicle(registration, type); if (success) { int mapID = mdb.getMapID(mapName); int permitID = this.addPermit(registration, type, mapID); return permitID; } else { return 0; } } COM: <s> adds a vehicle to the database and automatically assigns it a permit for </s>
funcom_train/51765714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Component getTableCellRendererComponent(JTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column) { setBackground(defaultcolor); return super.getTableCellRendererComponent(table,value,isSelected, hasFocus,row,column); } COM: <s> override this method from the parent class </s>
funcom_train/25075277
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addSourceLabelExpressionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_RichReferenceFigure_sourceLabelExpression_feature"), getString("_UI_RichReferenceFigure_sourceLabelExpression_description"), GraphdescPackage.Literals.RICH_REFERENCE_FIGURE__SOURCE_LABEL_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, getString("_UI_AppearancePropertyCategory"), null)); } COM: <s> this adds a property descriptor for the source label expression feature </s>
funcom_train/1036265
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean add(BaseSharedFormulaRecord fr) { boolean added = false; int r = fr.getRow(); if (r >= firstRow && r <= lastRow) { int c = fr.getColumn(); if (c >= firstCol && c <= lastCol) { formulas.add(fr); added = true; } } return added; } COM: <s> adds this formula to the list of formulas if it falls within </s>
funcom_train/51301730
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getVariableName(int variableId) { String variableName = (String) variables.elementAt(variableId); int colonIndex = variableName.indexOf(':'); if (colonIndex > 0) { variableName = variableName.substring(0,colonIndex); } return variableName; } COM: <s> returns the variable name corresponding to a variable id </s>
funcom_train/46578936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean contains(ItemSelector selector, boolean recurse) { for (Item child : getChildren()) { if (selector.isSelected(child)) { return true; } if (recurse && child instanceof ItemList) { if (((ItemList) child).contains(selector, true)) { return true; } } } return false; } COM: <s> determines whether this list contains an item defined by the given item </s>
funcom_train/17892407
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addButtons() { addButton(manager.getAction(ActionConstants.CMD_NAME_NEW)); addButton(manager.getAction(ActionConstants.CMD_NAME_OPEN)); addButton(manager.getAction(ActionConstants.CMD_NAME_SAVE)); addButton(manager.getAction(ActionConstants.CMD_NAME_HELP)); } COM: <s> configures the toolbar </s>
funcom_train/10626714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test_getResourceAsStreamLlava_lang_StringLjava_beans_beancontext_BeanContextChild() { BeanContextSupport obj = new BeanContextSupport(); try { obj.getResourceAsStream(new String(), null); fail("NullPointerException expected"); } catch (NullPointerException t) { } } COM: <s> test method get resource as stream with string bean context child null </s>
funcom_train/288005
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void applyConvertedValidatedValuesToModel(FacesContext facesContext) { String viewId = getViewId(facesContext); for (Page page : getPageStack(viewId)) { for (Param pageParameter : page.getParameters()) { ValueExpression valueExpression = pageParameter .getValueExpression(); if (valueExpression != null) { Object object = Contexts.getEventContext().get( pageParameter.getName()); if (object != null) { valueExpression.setValue(object); } } } } } COM: <s> apply page parameters passed as view root attributes or request </s>
funcom_train/33927438
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void doFilter(ServletRequest request, ServletResponse response) { Assert.notNull(request, "Request must not be null"); Assert.notNull(response, "Response must not be null"); if (this.request != null) { throw new IllegalStateException("This FilterChain has already been called!"); } this.request = request; this.response = response; } COM: <s> records the request and response </s>