__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/46135016
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setEmailAddress(String emailAddress) throws UserAttributeValidationException { if (emailAddress.contains("mailinator")) { throw new UserAttributeValidationException("Tried to use a cheeky spam trap..."); } int atSymbol = emailAddress.indexOf("@"); int dotCharacter = emailAddress.lastIndexOf("."); if (atSymbol == -1 || dotCharacter == -1 || dotCharacter < atSymbol){ throw new UserAttributeValidationException("Invalid email address provided..."); } this.emailAddress = emailAddress; } COM: <s> sets the email address </s>
funcom_train/51809667
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getAllPrivilegeNames() throws BusinessException { Vector ret = new Vector(); try { PrivilegeList pList = (PrivilegeList) (new PrivilegeFactory()).getBusinessObjectList(this.getDataSource(), OPERATION_LOAD_ALL_PRIVILEGES); for (Enumeration e=pList.elements(); e.hasMoreElements();) ret.addElement(((Privilege)e.nextElement()).getName()); return ret; } catch (IntegrationException ex) { throw new BusinessException(ex); } } COM: <s> get the list of privileges of the profile </s>
funcom_train/12164451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testHostRelative() throws Exception { // Default Strings // Test Project RuntimeProject projectMock = createProject("http://www.volantis.com/webapp/"); // Test case 3 - Host Relative doRelativeOrAbsoluteTest("a/b/c.png", projectMock, "/x/y/z/", "http://www.volantis.com/webapp/x/y/z/a/b/c.png"); } COM: <s> test host relative </s>
funcom_train/39854676
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double calculateServiceTime( Request req ) { double serviceTime; // Is this node processing the request // or just passing it along // if ( req.nextNode == req.requestNode ) serviceTime = 2. + calculateTransferTime( req.numberOfResultBytes ); // else // serviceTime = calculateTransferTime( req.numberOfRequestBytes ); return serviceTime; } // end calculateServiceTime COM: <s> calculates the time to service a request on this router node </s>
funcom_train/45286501
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void printCount(String kind, int count) { if (count != 0) { String key; if (count == 1) key = "count." + kind; else key = "count." + kind + ".plural"; log.printLines(WriterKind.ERROR, key, String.valueOf(count)); log.flush(Log.WriterKind.ERROR); } } COM: <s> print numbers of errors and warnings </s>
funcom_train/51783636
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setRunTargetExpectations() { mockRelation.expects(once()).method("isNavigableToElement2") .will(returnValue(false)); mockRelation.expects(once()).method("setNavigableToElement2") .with(eq(true)); mockEditorNotification.expects(once()).method("notifyElementsMoved"); } COM: <s> sets the run expectations for the target </s>
funcom_train/22023360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public static class CastResult { public final Transform hitTransformA = new Transform(); public final Transform hitTransformB = new Transform(); public final Vector3f normal = new Vector3f(); public final Vector3f hitPoint = new Vector3f(); public float fraction = 1e30f; // input and output public float allowedPenetration = 0f; public IDebugDraw debugDrawer; public void debugDraw(float fraction) {} public void drawCoordSystem(Transform trans) {} } COM: <s> ray result stores the closest result </s>
funcom_train/26216813
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void freeSolutionNodes() { Node node = start; if( start.child!= null) { do { node = node.child; } while( node != goal ); node = null; } else { // if the start node is the solution we need to just delete the start and goal nodes start = goal = null; } } // END freeSolutionNodes COM: <s> free the solution nodes </s>
funcom_train/7506768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean lookupResource(PastryId id) { if(!isJoined()) throw new IllegalStateException("Node "+owner.getPastryId()+" is in state "+getState()+", thus cannot issue Pastry lookups"); return this.lookupResource(id, 0); } COM: <s> starts a pastry resource lookup operation </s>
funcom_train/29939634
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public IPath getFilePath() { IPath sourceFolderPath = getSourceFolderPath(); IPath packagePath = getPackagePath(); String filename = getFileName(); IPath filePathPrefix = (packagePath == null) ? sourceFolderPath : packagePath; return filePathPrefix.addTrailingSeparator().append(filename); } COM: <s> returns the file path </s>
funcom_train/41164160
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public CoEditorReviewerPairTeacher update(CoEditorReviewerPairTeacher entity) { EntityManagerHelper.log("updating CoEditorReviewerPairTeacher instance", Level.INFO, null); try { CoEditorReviewerPairTeacher 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 co editor reviewer pair teacher entity and return </s>
funcom_train/7579818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void attack(int unitIDOfAttacker, int attackThisUnitID) { System.out.println("Proxybot: ATTACK " + unitIDOfAttacker + " " + attackThisUnitID); String response = sendAndReceiveMessage("COMMAND " + unitIDOfAttacker + " 4 " + attackThisUnitID + "\n", true); System.out.println("Proxybot: response is: " + response); } COM: <s> orders unit to attack given other unit </s>
funcom_train/5341595
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void handleNoSelection() { LAUNCH_ACTION.setEnabled(false); ENQUEUE_ACTION.setEnabled(false); DELETE_ACTION.setEnabled(false); ANNOTATE_ACTION.setEnabled(false); RESUME_ACTION.setEnabled(false); RENAME_ACTION.setEnabled(false); SHARE_ACTION.setEnabled(false); UNSHARE_ACTION.setEnabled(false); SHARE_FOLDER_ACTION.setEnabled(false); UNSHARE_FOLDER_ACTION.setEnabled(false); COPY_MAGNET_TO_CLIPBOARD_ACTION.setEnabled(false); MAGNET_LOOKUP_ACTION.setEnabled(false); BITZI_LOOKUP_ACTION.setEnabled(false); LICENSE_ACTION.setEnabled(false); } COM: <s> handles the deselection of all rows in the library table </s>
funcom_train/32220419
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { Query q = hibernateSession.createQuery( "from AdlrActionObject where session_id="+ session.getId()); ScrollableResults scroll = q.scroll(); alreadyAppliedCount = 0; while (scroll.next()) { AdlrActionObject aao = (AdlrActionObject) scroll.get(0); applyAdlrAction(aao); } if (alreadyAppliedCount > 0) Log.info("Found "+alreadyAppliedCount+" duplicate apply actions"); } COM: <s> execute the apply action to update the local adl r model </s>
funcom_train/39288594
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void addRefTechnicalExceptionPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Operation_refTechnicalException_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Operation_refTechnicalException_feature", "_UI_Operation_type"), SdlPackage.eINSTANCE.getOperation_RefTechnicalException(), true, null, null, null)); } COM: <s> this adds a property descriptor for the ref technical exception feature </s>
funcom_train/16651650
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateDb() { log.debug("updateDb:#0", selectedInstitute); if (selectedInstitute.getStatusType() == StatusType.NEW) { log.debug("Adding new institute to db"); actionHelper.getEntityManager().persist(selectedInstitute); } else { log.debug("Refreshing institute in db"); } selectedInstitute.setUpdated(true); actionHelper.getEntityManager().joinTransaction(); actionHelper.getEntityManager().flush(); } COM: <s> stores the new updated institute into the database </s>
funcom_train/13558118
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testKeyStore() { try { CertificateFactory factory = CertificateFactory.getInstance("CVC"); Certificate c1 = factory.generateCertificate(readCertFile()); KeyStore ks = KeyStore.getInstance("JKS"); ks.load(null); ks.setCertificateEntry("bla", c1); Certificate c2 = ks.getCertificate("bla"); assertEquals(c1, c2); System.out.println("DEBUG: ks\n" + ks.size()); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } } COM: <s> can we store a cvcertificate in a java </s>
funcom_train/35831768
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drawPiece(int player, String pieceName, SquarePosition pos) { int tCol = pos.getColumn() - 'a'; int tRow = pos.getRow() - 1; if (pieceName.equals(Constants.NO_PIECE)) { setValueAt(pieceName, tRow, tCol); } else { setValueAt(pieceName + "-" + player, tRow, tCol); } repaint(); } COM: <s> sets the value of the table to the piece name player </s>
funcom_train/10944624
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Long getWorkingKeyIndex() { if (this.mwkIndex == null) { synchronized(this) { if (this.mwkIndex == null) { this.mwkIndex = this.getGenericValue().getLong("workingKeyIndex"); } } } if (debug) { Debug.log("Current Working Key Index : " + this.mwkIndex, module); } return this.mwkIndex; } COM: <s> returns the current working key index </s>
funcom_train/18745613
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private EdgeBundle createBundle(ShapeNode node, EdgeSignature origEs) { EdgeBundle result = this.getBundle(node, origEs); if (result == null) { result = this.createBundleWithoutStoring(node, origEs); this.addBundle(result); } return result; } COM: <s> creates a new bundle with the given node and original signature </s>
funcom_train/48740163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addServletMapping(String servletName, String urlPattern) { if (debug >= 1) log("Process servletName=" + servletName + ", urlPattern=" + urlPattern); if (servletName == null) return; if (servletName.equals(this.servletName)) this.servletMapping = urlPattern; } COM: <s> remember a servlet mapping from our web application deployment </s>
funcom_train/5379724
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void fireCancelEditor() { Object[] array = listeners.getListeners(); for (int i = 0; i < array.length; i++) { final ICellEditorListener l = (ICellEditorListener) array[i]; SafeRunnable.run(new SafeRunnable() { public void run() { l.cancelEditor(); } }); } } COM: <s> notifies all registered cell editor listeners that editing has been </s>
funcom_train/16380433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean validateTimeType_Min(int timeType, DiagnosticChain diagnostics, Map<Object, Object> context) { boolean result = timeType >= TIME_TYPE__MIN__VALUE; if (!result && diagnostics != null) reportMinViolation(CTEPackage.Literals.TIME_TYPE, new Integer(timeType), new Integer(TIME_TYPE__MIN__VALUE), true, diagnostics, context); return result; } COM: <s> validates the min constraint of em time type em </s>
funcom_train/3830239
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public GMLCoord getCoord() { Debug.debugMethodBegin( this, "getCoord" ); NodeList nl = element.getElementsByTagNameNS( CommonNamespaces.GMLNS, "coord" ); GMLCoord coord = null; if ( ( nl != null ) && ( nl.getLength() > 0 ) ) { coord = new GMLCoord_Impl( (Element)nl.item( 0 ) ); } Debug.debugMethodEnd(); return coord; } COM: <s> returns the coordinate location of the point as gmlcoord </s>
funcom_train/35185969
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void runTickThread() { Thread currentThread = Thread.currentThread(); while (!currentThread.isInterrupted()) { try { onTick(); } catch (Exception e) { System.err .println("Catched an exception in the onTick method of " + this.toString() + ": " + e); } if (!currentThread.isInterrupted()) { long tickPeriod = getTickPeriod(); if (tickPeriod > 0) { try { Thread.sleep(tickPeriod); } catch (Exception e) { return; } } } } } COM: <s> realizes the ticking thread </s>
funcom_train/45109445
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void selectInTable(ContainerOperator operator, String fieldLabel,Object value,boolean doubleClick){ JTableOperator table = new JTableOperator(operator); int column = table.findColumn(fieldLabel); int row = table.findCellRow(value.toString(), column, 0); if (doubleClick){ table.clickOnCell(row, column, 2); }else{ table.selectCell(row, column); } } COM: <s> find a table and select a cell in it </s>
funcom_train/37035069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Connection open() { try { StandardServer server = (StandardServer) ServerFactory.getServer(); Context context = server.getGlobalNamingContext(); DataSource dataSource = (DataSource)context.lookup(dataSourceName); return dataSource.getConnection(); } catch (Exception e) { // Log the problem for posterity log(sm.getString("dataSourceRealm.exception"), e); } return null; } COM: <s> open the specified database connection </s>
funcom_train/32326521
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public RPNToken remove(final String name) { if (name.length() == 0) { return null; } final String key = name.substring(0, 1); final Collection<RPNToken> c = symbols.get(key); if (c == null) { return null; } final RPNToken t = remove(c, name); if (c.isEmpty()) { symbols.remove(key); } return t; } COM: <s> removes a symbol from this scanner </s>
funcom_train/1540129
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isSquarefree(GenPolynomial<C> P) { GenPolynomial<C> S = squarefreePart(P); boolean f = P.equals(S); if (!f) { System.out.println("\nisSquarefree: " + f); System.out.println("S = " + S); System.out.println("P = " + P); } return f; } COM: <s> gen polynomial test if is squarefree </s>
funcom_train/20825371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getRowChannelWithId(final int channelId) { int row = -1; Groups groups = context.getShow().getGroups(); if (groups.isEnabled()) { int index = groups.getIndexOfChannelWithId(channelId); row = getRowChannel(index); } else { row = getRowChannel(channelId); } return row; } COM: <s> gets the row index for given channel </s>
funcom_train/8811973
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private static final class FieldWrapper { /** * The form field. */ private final Field<?> field; /** * If the field allows blank value. */ private final boolean allowBlank; public FieldWrapper(Field<?> field, boolean allowBlank) { this.field = field; this.allowBlank = allowBlank; } } COM: <s> manages a field displayed by this window </s>
funcom_train/20240194
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Command getCmdNovoUsuario() { if (cmdNovoUsuario == null) {//GEN-END:|164-getter|0|164-preInit // write pre-init user code here cmdNovoUsuario = new Command("Novo", Command.OK, 0);//GEN-LINE:|164-getter|1|164-postInit // write post-init user code here }//GEN-BEGIN:|164-getter|2| return cmdNovoUsuario; } COM: <s> returns an initiliazed instance of cmd novo usuario component </s>
funcom_train/7336563
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setVisitorId(HttpSession session) { // see if visitor was assigned a real id Integer visitorId = name2id.get(TableUsers.VISITOR_USERNAME); if (visitorId == null) { // use default visitor id session.setAttribute(Attrs.CACMS_USERID, UserId.VISITOR); } else { // use stored visitor id session.setAttribute(Attrs.CACMS_USERID, visitorId); } } COM: <s> set the visitor id in the given session </s>
funcom_train/11770652
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JPanelMonth getJPanelMonthPrev1() { if (jPanelMonthPrev1 == null) { GregorianCalendar calendar = new GregorianCalendar(getDefaultLocale()); calendar.set(Calendar.DAY_OF_MONTH, 1); calendar.add(Calendar.MONTH, -1); jPanelMonthPrev1 = new JPanelMonth(calendar, -1); } return jPanelMonthPrev1; } COM: <s> this method initializes j panel month prev1 </s>
funcom_train/44472246
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean fulfillsSizeCriteria(FLFile f, SearchSet SS) { SearchSet.SizeCriteria c = SS.size_criteria; SearchSet.SizeUnit u = SS.size_unit; long size = SS.size; if (c == SearchSet.SizeCriteria.NONE) return true; size = u == SearchSet.SizeUnit.BYTE ? size : u.getValue() * 1024 * size; if (c == SearchSet.SizeCriteria.ATLEAST) { if (f.size >= size) return true; else return false; } else { if (f.size <= size) return true; else return false; } } COM: <s> no issue of thread safety here as this is re entrant </s>
funcom_train/16786366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private ResultSet getCountResultSet(String pageGuid) throws RQLException { PreparedStatement countStmt = getCountPageStatement(); try { countStmt.setString(1, pageGuid); ResultSet countPageRs = countStmt.executeQuery(); // move to the only row countPageRs.next(); return countPageRs; } catch (SQLException ex) { throw new RQLException("Error returning the count(*) page result set from database table", ex); } } COM: <s> returns the result set with the corresponding page as current row </s>
funcom_train/29605131
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectBooleanProperty(String globalProperty, Object target, String targetProperty, String getter, String setter, boolean defaultValue) { addPropertyChangeListener(globalProperty, new BooleanPropertyConnector(globalProperty, target, targetProperty, getter, setter, defaultValue)); } COM: <s> connects global property with a java bean property on target object </s>
funcom_train/50878468
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void movePoint(int inIndex, Point inPoint) { // update the point coordinates. if (inPoint == getShape()){ myXField.setText(""+inPoint.getX()); myYField.setText(""+inPoint.getY()); fireShapeUpdated(inPoint); } } COM: <s> called to notify the editor that the moint was moved </s>
funcom_train/22066473
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: synchronized public void setGroupModeratings(List<int[]> groupModeratings) { this.groupModeratings.clear(); for ( int i = 0, n = groupModeratings.size(); i < n; i++ ) { int[] groupModerating = groupModeratings.get(i); if ( groupModerating!=null && groupModerating.length>=2 ) { this.groupModeratings.add( new int[]{groupModerating[0], groupModerating[1]}); } //end if } //end for this.cacheGroups.clear(); } //end setGroupModeratings COM: <s> sets group moderate box relations </s>
funcom_train/5713779
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testGetTrace() throws CapiException{ TestableMessage tm = new TestableMessage(new byte[]{1,2,3,4}); assertEquals("check trace-message", "<01,02,03,04>", tm.getTraceMessage()); } COM: <s> tests the functionality of get trace </s>
funcom_train/26464337
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void adjustSize() { int width = 0; for (int i = 0; i < m_listTextRows.size(); i++) { int w = getFont().getWidth((String) m_listTextRows.get(i)); if (width < w) { width = w; } } setWidth(width + 1); setHeight(getFont().getHeight() * m_listTextRows.size()); } COM: <s> adjusts the text box size to fit the font size </s>
funcom_train/44497290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public ResultSequence minus(ResultSequence arg) throws DynamicError { AnyType at = get_single_arg(arg); if( !(at instanceof XSFloat) ) DynamicError.throw_type_error(); XSFloat val = (XSFloat) at; return ResultSequenceFactory.create_new(new XSFloat(float_value() - val.float_value())); } COM: <s> mathematical subtraction operator between this xsfloat and the supplied result sequence </s>
funcom_train/6332169
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public OzoneCompatible targetClone() throws Exception { ByteArrayOutputStream bout = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream( bout ); out.writeObject( activatedObject() ); out.close(); ObjectInputStream in = new ResolvingObjectInputStream( new ByteArrayInputStream( bout.toByteArray() ) ); OzoneCompatible result = (OzoneCompatible)in.readObject(); in.close(); return result; } COM: <s> build a copy of the encap object </s>
funcom_train/25973970
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addReport(String uuid, String title, String template, String criteria){ HashMap custom = new HashMap(); custom.put("uuid", uuid); custom.put("title", title); custom.put("template", template); custom.put("criteria", criteria); String[] caption = new String[3]; caption[0] = title; caption[1] = template; caption[2] = criteria; this.reports.addItem(caption, null, custom); } COM: <s> add a report to the list </s>
funcom_train/32740935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected CRUDOperationProvider getCRUD(TransactionProvider instance) { switch (instance.getLastConnectionType()) { case makumba: return providerInstances.get(DataSourceType.makumba.toString()).getCRUDInternal(); case hibernate: return providerInstances.get(DataSourceType.hibernate.toString()).getCRUDInternal(); } return null; } COM: <s> returns the right crud provider according to the last connection </s>
funcom_train/26468726
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void ping() { long start = System.currentTimeMillis(); long end = 0; try { sendRequest(new BasicRequest(UUID, Protocol.COMMAND_PING, ((BasicProtocol)protocol).DATA_PING)); end = System.currentTimeMillis(); msgout.println("ping time:" + (end - start) + " ms"); } catch (ConnectionException ex) { errout.println("ERROR: "+ex.getMessage()); } } COM: <s> sends a ping request to the responder </s>
funcom_train/49823014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean text_term_2(Term arg0, Term arg1) { arg0 = arg0.getTerm(); arg1 = arg1.getTerm(); if (!arg0.isGround()) { return unify(arg0,new Struct(arg1.toString())); } else { try { String text = alice.util.Tools.removeApices(arg0.toString()); return unify(arg1,getEngine().toTerm(text)); } catch (Exception ex) { return false; } } } COM: <s> bidirectional text term conversion </s>
funcom_train/2292123
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getLimit(Object obj) { if (obj instanceof CmsLruCache) { return Integer.toString(((CmsLruCache)obj).getMaxCacheCosts()); } if (obj instanceof LRUMap) { return Integer.toString(((LRUMap)obj).maxSize()); } return "-"; } COM: <s> returns the max costs for all items within a monitored object </s>
funcom_train/3518713
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void printUniverse() { Set keys = universe.keySet(); for (Iterator iter = keys.iterator(); iter.hasNext();) { Coordinates element = (Coordinates) iter.next(); System.out.println(element.toString()+":"); Set i = (Set) universe.get(element); for (Iterator iterator = i.iterator(); iterator.hasNext();) { ILocatable k = (ILocatable) iterator.next(); System.out.println("\t"+k.toString()); } } } COM: <s> prints out the universe </s>
funcom_train/8760944
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void launchParser(IALSFile file) { if (file == null) return; IResource res = file.getResource(); if (res == null || !res.exists()) return; try { res.deleteMarkers(Util.ALLOYPROBLEM, false, 0); } catch (CoreException e) { e.printStackTrace(); } Reporter rep = new Reporter(res); try { AlloyLaunching.parse(file, rep); } catch (Err e) { displayErrorInProblemView(res, e); } } COM: <s> parse a als file </s>
funcom_train/44154987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Class getServiceInterfaceWithContext(Class serviceInterface) { if (m_serviceInterfaceWithContext == null) { ClassLoader cl = Thread.currentThread().getContextClassLoader(); /** * Create the service interface to be able to send context * information. */ InterfaceEnricher interfaceIndirector = new InterfaceEnricher(); EnrichmentDecorator interfaceDecorator = new ContextEnrichmentDecorator(); m_serviceInterfaceWithContext = interfaceIndirector .createShadowInterfaceAndLoadItDirectly(serviceInterface, interfaceDecorator, cl); } return m_serviceInterfaceWithContext; } COM: <s> lazily enriches the services interface adding the implicit context </s>
funcom_train/18037120
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Iterator getAttributeAxisIterator(Object contextNode) { if (debugging) { log.info("[DocumentNavigator] attribute axis"); } // if (!((StAXNode) contextNode).getXMLEvent().isStartElement()) { // return EMPTY_ITERATOR; // } return ((StAXNode) contextNode).getAttributeAxis(); } COM: <s> get an iterator over all attributes of the context node </s>
funcom_train/31503979
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void updateMenuMRU() { mMRU.removeAll(); int index = 0; Iterator iterator = documentsMRU.iterator(); while (iterator.hasNext()) { index++; Document document = (Document) iterator.next(); JMenuItem mi = new JMenuItem(new OpenDocumentAction(index, document, this)); mMRU.add(mi); } } COM: <s> updates the last open file menu items </s>
funcom_train/25084566
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public JSONObject getJSONObject(String key) throws JSONException { Object o = get(key); if (o instanceof JSONObject) { return (JSONObject)o; } throw new JSONException("JSONObject[" + quote(key) + "] "+ExceptionMessage.IS_NOT_A_JSONOBJECT.toString()); } COM: <s> get the jsonobject value associated with a key </s>
funcom_train/17714028
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initComponents() { jassJobAdsListPanel = new AdvertiserListJobAdvertisementForm("Search Job"); jassJobAdsListPanel.addSearchActionListener(new SearchActionListener()); jassJobAdsListPanel.addJobListItemListener(new SearchListItemListener()); attachComponent(jassJobAdsListPanel, 1, 1, 1, 1); } COM: <s> intialize form components </s>
funcom_train/6415034
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String toString(byte[] array) { StringBuffer sb = new StringBuffer(); for (int i=0; i< array.length; i++) { String hex = "0"+Integer.toHexString(array[i]); String end = hex.substring(hex.length()-2); sb.append(end.toUpperCase()); } return sb.toString(); } COM: <s> returns the string representation of a byte array </s>
funcom_train/25074433
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Wizard createWizard() { Wizard tmpWizard = new Wizard(MainFrame.getInstance()); tmpWizard.setTitle(LanguageResources.get("DIAGRAMWIZ_TITLE")); tmpWizard.addTask(new DiagramTask()); tmpWizard.setBackString(LanguageResources.get("DIAGRAMWIZ_BACK")); tmpWizard.setNextString(LanguageResources.get("DIAGRAMWIZ_NEXT")); tmpWizard.setFinishString(LanguageResources.get("DIAGRAMWIZ_FINISH")); tmpWizard.setCancelString(LanguageResources.get("DIAGRAMWIZ_CANCEL")); tmpWizard.setCurrentTask(DiagramTask.DIAGRAM_TASK_ID); return tmpWizard; } COM: <s> encapsules the creation of a wizard for the action listener </s>
funcom_train/47833108
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getHashValue() { String val = partner + operationName; Iterator it = parameters.values().iterator(); while (it.hasNext()) { Object obj = it.next(); if (obj instanceof Variable) val += ((Variable) obj).getHashValue(); else if (obj instanceof Function) val += ((Function) obj).getHashValue(); } return val; } COM: <s> returns a hash value of the function </s>
funcom_train/12807966
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getHeaderHeight() { float total = 0; int size = Math.min(rows.size(), headerRows); for (int k = 0; k < size; ++k) { PdfPRow row = rows.get(k); if (row != null) total += row.getMaxHeights(); } return total; } COM: <s> gets the height of the rows that constitute the header as defined by </s>
funcom_train/10514996
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void run(String classname, Vector args) throws BuildException { CommandlineJava cmdj = new CommandlineJava(); cmdj.setClassname(classname); final int size = args.size(); for (int i = 0; i < size; i++) { cmdj.createArgument().setValue((String) args.elementAt(i)); } run(cmdj); } COM: <s> executes the given classname with the given arguments as if it </s>
funcom_train/31077374
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector3f sphericalToOrthogonal(Vector3f sp, Vector3f or) { if (or == null) { or = new Vector3f(); } float r = sp.x; float p = sp.y; float t = sp.z; or.x = (float) (r * Math.sin((double)p) * Math.cos((double)t)); or.y = (float) (r * Math.sin((double)p) * Math.sin((double)t)); or.z = (float) (r * Math.cos((double)p)); return or; } COM: <s> convert the specified vector3 fd s coordinate from </s>
funcom_train/5532061
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getClassification(String pCCId) throws Exception { String sClassification = ""; Criteria crit = new Criteria(); crit = crit.add(ClassificationPeer.CLASSIFIEDOBJECT, pCCId); List lCC = ClassificationPeer.doSelect(crit); if (lCC.size() > 0) { sClassification = ((Classification) lCC.get(0)).getClassificationnode(); } return sClassification; } COM: <s> this function looks up the classification of a given cc </s>
funcom_train/39012210
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void handleMoveDownAction() { DataComponent component = (DataComponent)((IStructuredSelection)getSelection()).getFirstElement(); if(component != null && component.canMoveDown()) { component.moveDown(); refresh(component.getParent()); handleSelectionChanged(getSelection()); getDataModel().setDirty(true); } } COM: <s> move down event happened </s>
funcom_train/40944762
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void setInternalValue(Object newValue) { // Stores the old value final Object oldValue = propertyValue; // Sets the current Value super.setInternalValue(newValue); propertyValue = newValue; // Ignores form updating if data object has not changed. if (oldValue != newValue) { setFormDataSource(newValue, getVisibleItemProperties()); } } COM: <s> sets the internal value </s>
funcom_train/18655686
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Reply registerForCallback(String sessionKey, ClientInterface ci) { for (Lab lab : runningLabs) { if (lab.addClientInterface(sessionKey, ci)) return new Reply(true, "Added ClientInterface successfully"); } return new Reply(false, "Can't add ClientInterface, User not in lab"); } COM: <s> register a client for rmi callbacks with a certain lab </s>
funcom_train/36116981
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean startTimer(int delayOrIntervale, int timerMode) { if (isRunning) { return false; } this.timer = new Timer(true); this.mode = timerMode; // NOTE: once the task has been canceled, it can't be scheduled // again!! SO i have to construct a new TimerTask this.timer.scheduleAtFixedRate(new AlarmTimerTask(), delayOrIntervale, delayOrIntervale); this.isRunning = true; return true; } COM: <s> start the timer in the specific mode </s>
funcom_train/16771385
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean promptPassword(String message){ if (wsm.isSshStorePassword()) { // WARNING - unsecured procedure passwd = wsm.getSshPassword(); return true; } Object[] ob={passwordField}; int result= JOptionPane.showConfirmDialog(null, ob, message, JOptionPane.OK_CANCEL_OPTION); if(result==JOptionPane.OK_OPTION){ passwd=passwordField.getText(); return true; } else{ return false; } } COM: <s> called at password time </s>
funcom_train/26508694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addThread(IForumThread thread) throws RAPDBException { IForumThread newThread = this.dbConnection.insertThread(thread.getID(), thread.getForumID(), thread.getRootCommentID(), thread.getModValue(), thread.getBonusPoints()); if (newThread != null) return true; else return false; } COM: <s> adds a thread to this forum </s>
funcom_train/33860268
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JMenu getJMenuFile() { if (jMenuFile == null) { jMenuFile = new JMenu(); jMenuFile.setText("File"); jMenuFile.add(getJMenuItemOpen()); jMenuFile.add(getJMenuItemClearInputTextArea()); jMenuFile.add(getJMenuItemClearHistory()); jMenuFile.add(getJMenuItem1Exit()); } return jMenuFile; } COM: <s> this method initializes j menu file </s>
funcom_train/20885509
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getUseDelimiterAfterLastField() { if (this.useDelimiterAfterLastField == null) { this.useDelimiterAfterLastField = InitialConfiguration.get(USE_DELIMITER_AFTER_LAST_FIELD, DEFAULT_USE_DELIMITER_AFTER_LAST_FIELD); } return this.useDelimiterAfterLastField; } COM: <s> returns true if the last csv field should end with a delimiter </s>
funcom_train/28367627
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void parseAdaptivness(final Element inCur) { final Element d = inCur.getChild("adaptiveness"); if (d == null) { return; } final String t = parser.propertyValue(d, "value", false); if (t != null) { setMAdaptiveness(Double.parseDouble(t)); } } COM: <s> parses the priotity gain </s>
funcom_train/16651719
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void initQualitySpec() { if(publicationEntity.getQuality().getQualitySpecifications() != null && publicationEntity.getQuality().getQualitySpecifications().size() > 0){ QualitySpecification firstDataSet = publicationEntity.getQuality().getQualitySpecifications() .get(0); if (firstDataSet != null) { selectedQualitySpec = firstDataSet; } } } COM: <s> init the quality specifications for the changed publication entity </s>
funcom_train/3276033
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public char fileToChar (int i) { char c = ' '; if (i > 0 && i <= fileSet.length) c = fileSet[i-1]; else { if (Log.debug) Log.debug(DEBUG, "file out of range: <" + i + ">"); throw new ArrayIndexOutOfBoundsException ("file out of range (" + i + ")"); } return c; } COM: <s> returns the character representation of the file </s>
funcom_train/10980857
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testIndexedValue() { // Test Case for Jira Issue STR-2802 // see https://issues.apache.org/struts/browse/STR-2802 doParse("(stringArray[1] == 'one')", testBean, 1, "stringArray[1]", true); } COM: <s> test indexed property </s>
funcom_train/45504727
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void loadGraphVisResults() { sb.setStatusText( 0, "Baue Visualisierung" ); slider.setMaximum( (graphVisResult.getNeededTimeHorizon() + 1) * sliderAccuracy ); GLFlowGraphControl control = new GLFlowGraphControl( graphVisResult ); visFlow.setControl( control ); vis.update(); vis.repaint(); sb.setStatusText( 0, "Fertig. Animation startet" ); if( !vis.isAnimating() ) vis.startAnimation(); } COM: <s> loads a visualization from the data structure </s>
funcom_train/32061221
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void moveCommandIndex() { if (currentcommandindex == commands.size() - 1) { if (repetitions > 0) { repetitions--; currentcommandindex = 0; } else if (repetitions == -1) { // indefinite repetitions! currentcommandindex = 0; } else { // no repetitions left! currentcommandindex = -1; } } else { currentcommandindex++; } } COM: <s> updates the command index to the next command </s>
funcom_train/1332993
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Cursor fetch(String column) throws SQLException { Cursor mCursor = mDb.query(true, DATABASE_TABLE, new String[] {column}, null, null, null, null, null, null); if (mCursor != null) mCursor.moveToFirst(); return mCursor; } COM: <s> fetch all values in a given column from the database </s>
funcom_train/38322019
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getExistingOpenPolls(Project project) { List list = getExistingPolls(project); List open = new ArrayList(); for(int i = 0; i < list.size(); i++) { VoteData poll = (VoteData) (list.get(i)); if (poll.getStatus().booleanValue()) { open.add(poll); } } return open; } COM: <s> get only open polls where people can still vote </s>
funcom_train/36061192
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public WorkerThreadDescriptor getWorkerThread(String uniqueName){ // 0 -- Precondition check if( uniqueName == null ){ throw new IllegalArgumentException("The unique name of the thread cannot be null"); } // 1 -- Find the entry and return it synchronized(workerThreadQueue){ for(int c = 0; c < workerThreadQueue.size(); c++){ if( workerThreadQueue.get(c).hash.equalsIgnoreCase(uniqueName) ){ return workerThreadQueue.get(c); } } } return null; } COM: <s> find the worker thread whos unique name matches the one given </s>
funcom_train/12603062
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void start() throws ThinkGearSocketException { if (isConnected()) { error(log, "MultiConnectionThinkGearSocket already connected"); return; } info(log, "Starting MultiConnectionThinkGearSocket"); closeSocket(); initDisruptor(); try { createSocketConnection(); } catch (ThinkGearSocketException e) { disruptor.shutdown(); closeSocket(); throw e; } sendFormats(); startReadThread(); info(log, "MultiConnectionThinkGearSocket started"); notifyConnectionEventListeners(State.STARTED); } COM: <s> connects to the think gear socket </s>
funcom_train/51043691
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() { destroyed = true; try{ queue_mon.enter(); while( !queue.isEmpty() ) { ((RawMessage)queue.remove( 0 )).destroy(); } }finally{ queue_mon.exit(); } total_size = 0; prev_sent.clear(); listeners = new ArrayList(); urgent_message = null; } COM: <s> destroy this queue i </s>
funcom_train/36995456
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void movePenTo( int x, int y ) { if( last_x != x || last_y != y ) { StyleChangeRecord sc = getStyleChange(); sc.addFlags(StyleChangeRecord.MOVETO); sc.setDeltaX(x); sc.setDeltaY(y); last_x = x; last_y = y; } } COM: <s> moves pen to the specified position </s>
funcom_train/3372458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public float getAlignment(int axis) { switch (axis) { case View.X_AXIS: return 0; case View.Y_AXIS: if (getViewCount() == 0) { return 0; } float span = getPreferredSpan(View.Y_AXIS); View v = getView(0); float above = v.getPreferredSpan(View.Y_AXIS); float a = (((int)span) != 0) ? (above * v.getAlignment(View.Y_AXIS)) / span: 0; return a; default: throw new IllegalArgumentException("Invalid axis: " + axis); } } COM: <s> gets the alignment </s>
funcom_train/10023361
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testElementDefaultQNameValueOK01a() throws Exception { EXISchemaFactoryTestUtil.getEXISchema("/elementDefaultOK03a.xsd", getClass(), m_compilerErrorHandler); Assert.assertEquals(0, m_compilerErrorHandler.getTotalCount()); } COM: <s> element default value of type qname where the value is valid </s>
funcom_train/35672083
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected File toFile(final String content) { try { File cobolFile = File.createTempFile("test", ".cbl", COB_TEMP_DIR); cobolFile.deleteOnExit(); FileUtils.writeStringToFile(cobolFile, content); return cobolFile; } catch (IOException e) { e.printStackTrace(); fail(e.getMessage()); } return null; } COM: <s> dumps content to a temporary file </s>
funcom_train/10787957
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void rollback() { try { lock.lock(); EntityManager em = getEntityManager(); if (isManaged) { } else { em.getTransaction().rollback(); } if (scope == PersistenceContextType.TRANSACTION) { em.clear(); } } finally { lock.unlock(); } } COM: <s> rolls back a transaction on the current thread </s>
funcom_train/28312395
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private int getFirstStationID() { NonNullElements stations = new NonNullElements(KEY.STATIONS, modelRoot .getWorld(), modelRoot.getPrincipal()); if (stations.next()) { return stations.getIndex(); } throw new NoSuchElementException(); } COM: <s> since stations can be removed we should not assume that station 0 </s>
funcom_train/1174366
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public BufferedImage getImage(InputStream stream) throws IOException { Image tempImage = ImageIO.read(stream); BufferedImage image = new BufferedImage(tempImage.getWidth(null), tempImage.getHeight(null), BufferedImage.TYPE_INT_ARGB); Graphics2D g2 = image.createGraphics(); g2.drawImage(tempImage, 0, 0, null); g2.dispose(); return image; } COM: <s> p get image </s>
funcom_train/43635543
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PageXib getPageAt(int chapter, int page){ notInitialized(); Integer pos = chaptersPositions.get(chapter); if(pos == null) throw new IllegalArgumentException("This chapter number doesn't " + "exist in the core."); return chapters.get(pos).getPageAt(page); } COM: <s> obtain the page x from the chapter y </s>
funcom_train/2620784
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void defaultHandleNodeInstructions(Long nodeId, Model model) { // look for instructions to return for the given node if ( getInstructorBiz() != null && getInstructorBiz().isAvailable() ) { List<Instruction> instructions = getInstructorBiz().getService() .getActiveInstructionsForNode(nodeId); if ( instructions.size() > 0 ) { model.addAttribute(MODEL_KEY_INSTRUCTIONS, instructions); } } } COM: <s> default handling of node instructions </s>
funcom_train/36203452
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean hasErrorInSubtree(KnowWEArticle article) { Collection<KDOMError> s = KDOMReportMessage.getErrors(article, this); if (s != null && s.size() > 0) { return true; } for (Section<?> child : children) { boolean err = child.hasErrorInSubtree(article); if (err) { return true; } } return false; } COM: <s> method that looks recursively down for this section whether some errors </s>
funcom_train/16312430
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void endDocument() throws SAXException { try { translateAndFlush(); if (extWriter != null) { extWriter.close(); extWriter = null; } translateAndFlush(); currWriter().close(); } catch (TranslationException e) { throw new SAXException(e); } catch (IOException e) { throw new SAXException(e); } } COM: <s> receive notification of the end of the document </s>
funcom_train/45774067
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String accessibleToString(XAccessibleContext AC) { String result = ""; XAccessibleContext xAC = AC; if (xAC != null) { result = "Role : " + xAC.getAccessibleRole() + ", Name : " + xAC.getAccessibleName() + "(" + xAC.getAccessibleDescription() + "), Implementation name : " + getImplName(xAC); } return result; } COM: <s> returns a string object representing the specified xaccessible object </s>
funcom_train/41457177
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void add(L listener) throws TooManyListenersException { boolean res = false; for (int i = 0; i < list.length; i++) { if (list[i] != null) continue; list[i] = listener; res = true; break; } if (!res) throw new TooManyListenersException(); } COM: <s> adds listener to the collection </s>
funcom_train/44880481
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean shouldGenerate(Object metadata) { JavaClass javaClass = (JavaClass) metadata; boolean isTagClass = javaClass.isA(DocletTag.class.getName()); boolean enabled = javaClass.getTagByName("qtags.ignore") == null; return javaClass.isInterface() && isTagClass && enabled; } COM: <s> whether generation is desired for this class </s>
funcom_train/43092930
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getList() { //System.out.println(fContactList.size()+" "+((ICQContact)fContactList.elementAt(fContactList.size()-1)).getLogin()+" "+((ICQContact)fContactList.elementAt(fContactList.size()-1)).getNick()); return fContactList; } COM: <s> method get list </s>
funcom_train/10977956
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void release() { super.release(); bundle = Globals.MESSAGES_KEY; formName = null; page = 0; methodName = null; staticJavascript = "true"; dynamicJavascript = "true"; htmlComment = "true"; cdata = "true"; src = null; formClientId = null; } COM: <s> release any acquired resources </s>
funcom_train/7290350
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Instantiation findOwner(final int i) { if (!subroutine.ownsInstruction(i)) { return null; } if (!dualCitizens.get(i)) { return this; } Instantiation own = this; for (Instantiation p = previous; p != null; p = p.previous) { if (p.subroutine.ownsInstruction(i)) { own = p; } } return own; } COM: <s> returns the owner of a particular instruction relative to this </s>
funcom_train/38315494
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void updateCategory(Category category) throws PersistenceException { Session session = null; try { session = this.sessionManager.getHibernateSession(); session.update(category); } catch (HibernateException he) { log.error("HibernateException caught updating category.", he); throw new PersistenceException(he); } finally { this.sessionManager.flushCommitCloseSession(session); } } COM: <s> update a category in the database </s>
funcom_train/46740134
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setApplicationDialogRef(DisplayModel applicationDialogRef) { if (Converter.isDifferent(this.applicationDialogRef, applicationDialogRef)) { DisplayModel oldapplicationDialogRef= new DisplayModel(this); oldapplicationDialogRef.copyAllFrom(this.applicationDialogRef); this.applicationDialogRef.copyAllFrom(applicationDialogRef); setModified("applicationDialogRef"); firePropertyChange(String.valueOf(ROLES_APPLICATIONDIALOGREFID), oldapplicationDialogRef, applicationDialogRef); } } COM: <s> dialog when the user first logs in </s>