__key__
stringlengths
16
21
__url__
stringclasses
1 value
txt
stringlengths
183
1.2k
funcom_train/7624398
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setRequestedOrientation(int requestedOrientation) { if (mParent == null) { try { ActivityManagerNative.getDefault().setRequestedOrientation( mToken, requestedOrientation); } catch (RemoteException e) { // Empty } } else { mParent.setRequestedOrientation(requestedOrientation); } } COM: <s> change the desired orientation of this activity </s>
funcom_train/48559786
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public StringItem getStringItem7() { if (stringItem7 == null) {//GEN-END:|342-getter|0|342-preInit stringItem7 = new StringItem("\u0411\u0438\u043E\u0433\u0440\u0430\u0444\u0438\u044F", null, Item.PLAIN);//GEN-LINE:|342-getter|1|342-postInit }//GEN-BEGIN:|342-getter|2| return stringItem7; } COM: <s> returns an initiliazed instance of string item7 component </s>
funcom_train/6254069
/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 (this == o) { return true; } else if (o == null || o.getClass() != getClass()) { return false; } WeakKey weakKey = (WeakKey) o; if (weakKey.nullKey != nullKey) { return false; } else if (nullKey) { return true; } Object key = weakKey.get(); return key != null && key == get(); } COM: <s> returns true if the argument is an instance of the same concrete </s>
funcom_train/43079694
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addComponent(Component component){ //figure out if component is there Component firstComponentEncountered = findComponent(component); //if there is no component in list already //and component you want to add is found as part of a triple if(firstComponentEncountered == null && component.getTripleId() > 0) firstComponents.add(component); //then add component to set } COM: <s> add component if not already present and component is part of a triple </s>
funcom_train/22796389
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame(); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jFrame.setLocation(new Point(200, 100)); jFrame.setSize(530, 412); jFrame.setResizable(false); jFrame.setContentPane(getJContentPane()); jFrame.setTitle("Elevator-Elevator Valuable Algorithm"); } return jFrame; } COM: <s> this method initializes j frame </s>
funcom_train/28296279
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean getIsSelected() { if (_Debug) { System.out.println(" :: SeqActivity --> BEGIN - getSelected"); } if (_Debug) { System.out.println(" ::--> " + mSelected); System.out.println(" :: SeqActivity --> END - getSelected"); } return mSelected; } COM: <s> retrieves the selected state of the activity </s>
funcom_train/26266936
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void drop(final Packet p) { network.drops.getAndIncrement(); if (p == null) { FlowError.complain("Null packet reference in 'drop' method call: " + getName()); } if (this != p.owner) { FlowError.complain("Packet not owned by current component, or component has terminated"); } p.clearOwner(); } COM: <s> drop packet and clear owner reference </s>
funcom_train/27789516
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setPassword(String[] newvalues) { if (newvalues != null) { if (newvalues.length > 1) { if (newvalues[0].equals(newvalues[1])) setHashValue(getPersonMetaHash(), PASSWD_ATTR, newvalues[0]); else logError(PASSWD_ATTR, "Passwords don't match!"); } else { setPassword(newvalues[0]); } } } COM: <s> set the plaintext password only if the two field values are equivalent </s>
funcom_train/3913974
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean pattern(String restrictionValue) throws RestrictionViolationException { Pattern pattern = Pattern.compile(restrictionValue); Matcher matcher = pattern.matcher(toString()); if (matcher.matches()) { return true; } throw new RestrictionViolationException("URI \"" + toString() + "\" does not satisfy pattern \"" + restrictionValue + "\""); } COM: <s> returns true when value matches the passed pattern </s>
funcom_train/37007225
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PersonCAState getCaState() throws CAException { Date currDate = new Date(); Date expDate = entity.getCaStateExpiration(); if (expDate == null || expDate.compareTo(currDate) < 0) { return update(); } else { return entity.getCaState(); } } COM: <s> todo ma se vubec caexception hazet </s>
funcom_train/49760480
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JButton getJButtonAddBackEnd() { if (jButtonAddBackEnd == null) { jButtonAddBackEnd = new JButton(); jButtonAddBackEnd.setBounds(new Rectangle(285, 210, 76, 31)); jButtonAddBackEnd.setText("Clear"); jButtonAddBackEnd.addActionListener(this); } return jButtonAddBackEnd; } COM: <s> this method initializes j button add back end </s>
funcom_train/11301371
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test12() { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS"); long ticks = 11142L * 86400000L; String formatted = df.format(new Date(ticks)); int millisecondStart = CachedDateFormat.findMillisecondStart(ticks, formatted, df); assertEquals(20, millisecondStart); } COM: <s> check pattern location for iso8601 </s>
funcom_train/26085841
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Composite createDescriptionPanel(Composite parent) { Composite container = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.marginWidth = 0; layout.marginHeight = 0; GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true); container.setLayout(layout); container.setLayoutData(layoutData); Label introduction = new Label(container, SWT.NONE | SWT.WRAP); introduction.setText(Messages.DASHBOARD_WELCOME); introduction.setLayoutData(layoutData); return container; } COM: <s> creates the description panel for this dashboard overview </s>
funcom_train/20626241
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Vector getUsers() throws SQLException { Vector users = new Vector(); String statement = getDAO().getStatement(TABLE_KEY, "GET_USERS"); ResultSet res = keepAliveStmt.executeQuery(statement); while( res.next() ) { users.add(res.getString(1)); } return users; } COM: <s> gets a list of all names of users </s>
funcom_train/12174461
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: // private void openShardLinkSpecial(DOMOutputBuffer dom, boolean isNextLink) { // Element shardLinkFirst = dom.openElement(SHARD_LINK_ELEMENT); // ShardLinkAttributes attrs = new ShardLinkAttributes(); // if (isNextLink) { // attrs.setAction(ShardLinkAction.NEXT); // } else { // attrs.setAction(ShardLinkAction.PREVIOUS); // } // shardLinkFirst.setAnnotation(attrs); // } COM: <s> open the special shard link element </s>
funcom_train/24933770
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int compare(final Object object1, final Object object2) { final int positionOfOperation1 = ((MOperation) object1).getPositionInModel(); final int positionOfOperation2 = ((MOperation) object2).getPositionInModel(); return compareUtil.compareInt(positionOfOperation1, positionOfOperation2); } COM: <s> compares two operation by the order the use file provides </s>
funcom_train/37084593
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String insertGap (String seq, int position) { StringBuffer gapped_seq = new StringBuffer(seq.substring (0, position) + '-'); //'%'); // debug if (position < seq.length()) gapped_seq.append(seq.substring (position)); return gapped_seq.toString(); } COM: <s> inserts a at the position in seq </s>
funcom_train/24060526
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void remove ( SelfDefinedField field ) { mustBeOpen(); if ( ! ( field instanceof Utf8String ) ) // do not throw the obvious ClassCastException throw new IllegalArgumentException( "can only remove Pocket with Utf8String, not " + field.getClass() ); Utf8String identifier = (Utf8String) field; this.unencryptedPurse.removePocket( identifier ); this.isChangedAndInconsistent = true; } COM: <s> remove the given entry if it exists </s>
funcom_train/48400874
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void uniqueIDRequest() throws Exception { if (_dos == null) { throw new Exception("Sending stream invalid"); } byte[] out = new byte[2]; out[0] = MsgTypes.TYPE_CONTROL; out[1] = MsgTypes.TYPE_CONTROL_IDREQUEST; _dos.write(out); _dos.flush(); }//End of uniqueIDRequest() COM: <s> request the unique id associated with the client connection </s>
funcom_train/25968043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean storePropertiesFile(Properties pfile) { try { pfile.store(new FileOutputStream(_instance.PROPERTIES_FILE_NAME), "Andromaly properties file"); } catch (FileNotFoundException e) { System.err.println("File " + _instance.PROPERTIES_FILE_NAME + " not found."); return false; } catch (IOException e) { System.err.println("Error while writing properties file"); return false; } return true; } COM: <s> store the java </s>
funcom_train/2611098
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String toString(){ String s= "Socks5Message:"+"\n"+ "VN "+version+"\n"+ "CMD "+command+"\n"+ "ATYP "+addrType+"\n"+ "ADDR "+host+"\n"+ "PORT "+port+"\n"; return s; } COM: <s> returns string representation of the message </s>
funcom_train/33371284
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void sendDataForCircle() { Vector in = new Vector(2); // Input data within the test space double ray = rnd.nextDouble()/2; double alpha = rnd.nextDouble() * Math.PI * 2; double x = 0.5 + ray * Math.cos(alpha); double y = 0.5 + ray * Math.sin(alpha); in.set(x, 0); in.set(y, 1); som.input(in); } COM: <s> sends random data within a circle into the som </s>
funcom_train/13390079
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Advised addAdvice(ServiceItem serviceItem) { ProxyFactory factory = new ProxyFactory(serviceItem.service); Advised advised = (Advised) factory.getProxy(); advised.addAdvice(new JeriProxyInterceptor()); advised.addAdvice(new JeriProxyMethodBeforeAdvice()); advised.addAdvice(new JeriProxyAfterReturningAdvice()); advised.addAdvice(new JeriProxyThrowsAdvice()); return advised; } COM: <s> weave advice and pointcuts here for all jeri service proxy objects </s>
funcom_train/22278579
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object clone() { TextParagraphFormat cloneFormat; Object clone; try { clone = super.clone(); cloneFormat = (TextParagraphFormat)clone; if (_tabStops != null) { cloneFormat.clearAllTabPositions(); cloneFormat.setTabPositions(_tabStops); } return clone; } catch (CloneNotSupportedException e) { throw new InconsistencyException(this + ": clone() not supported :" + e); } } COM: <s> clones the text paragraph format </s>
funcom_train/9533490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void setTestDirectories() { testLoadDirectory.mkdir(); testLoadFile = new File(testLoadDirectory, "test-file-one.txt"); testPurgeFile = new File(testLoadDirectory, "test-file-two.txt"); try { testLoadFile.createNewFile(); } catch (IOException e) { e.printStackTrace(); } } COM: <s> create the test directories before the tests are run </s>
funcom_train/4713986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void generateReport(Task task, StringBuffer buf, String indent) { List<Task> children = treeViewer.getFilteredChildren(task); for(int i = 0; i < children.size(); i++) { Task child = children.get(i); buf.append(child.toString(indent)); generateReport(child, buf, indent + " "); } } COM: <s> generates a text report </s>
funcom_train/24648567
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Thing fetchThingByPredicate(Resource predicate, Class klasse) throws OperatorException { Resource resource = getResource(predicate); if (resource == null) { throw new GeneralException("Error: No value associated with the predicate \"" + predicate + "\""); } return getMyThingSession().fetchThing(resource, klasse); } COM: <s> tries to fetch a thing associated with this subject </s>
funcom_train/17774195
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void handleGameOver() { // Stop game thred thread.setPaused(true); // Reset figures if (figure != null) { figure.detach(); } figure = null; if (nextFigure != null) { nextFigure.detach(); } nextFigure = null; // Handle components board.setMessage("Game Over"); component.button.setLabel("Start"); this.notifyAll(); } COM: <s> handles a game over event </s>
funcom_train/38289136
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void groupShortInsertLists(Collection<InsertListInternal> lists) { ShortInsertlistsUnifier unifier = new ShortInsertlistsUnifier(pool); for (Iterator<InsertListInternal> i = lists.iterator(); i.hasNext();) { InsertListInternal il = i.next(); if (il.getLength() == 1) { unifier.add(il); i.remove(); } else if (il.getLength() == 0) { i.remove(); } } InsertListInternal unified=unifier.getUnifiedInt(); if(unified!=null)lists.add(unified); } COM: <s> collects all one sized insertlists and groups them into one </s>
funcom_train/48404074
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public HandlerRegistration addDragResizeMoveHandler(com.smartgwt.client.widgets.events.DragResizeMoveHandler handler) { if(getHandlerCount(com.smartgwt.client.widgets.events.DragResizeMoveEvent.getType()) == 0) setupDragResizeMoveEvent(); return doAddHandler(handler, com.smartgwt.client.widgets.events.DragResizeMoveEvent.getType()); } COM: <s> add a drag resize move handler </s>
funcom_train/3596043
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setToElement(NOMElement targ) throws NOMException { if (targ==null) return; if (corpus.isEditSafe()==false) { throw new NOMException("Corpus cannot be edited without lock when it is being shared amongst more than one NOMView"); } this.target=targ; corpus.notifyChange(new DefaultEdit(source, NOMEdit.EDIT_POINTER, (Object)target)); } COM: <s> set the element to which this pointer points </s>
funcom_train/10632714
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testConstructor_ObjectNull() { Person person = Person.getInstance(); BasicAttributes attributes = new BasicAttributes("Anyuser", person); DirStateFactory.Result result = new DirStateFactory.Result(null, attributes); assertNull(result.getObject()); assertEquals(attributes, result.getAttributes()); } COM: <s> test result object o attributes a with the first param o as null </s>
funcom_train/9916562
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getElapsedTime(Date startTime, Date endTime) { long startMS = startTime.getTime(); long endMS = endTime.getTime(); if (endMS < startMS) { System.err.println("endTime " + endMS + " < startTime " + startMS); } long elapsed = endMS - startMS; return elapsed; } COM: <s> returns the ellapsed timer </s>
funcom_train/23271262
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public double getBarBaseValue() { CategoryPlot plot = (CategoryPlot) this.chart.getPlot(); if (plot == null) { return 0.0; } BarRenderer renderer = (BarRenderer) plot.getRenderer(); if (renderer == null) { return 0.0; } return renderer.getBase(); } COM: <s> returns the base value for the bars </s>
funcom_train/12781267
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void leaveObjectRefAssignOp(CAstNode n, CAstNode v, CAstNode a, boolean pre, C c, CAstVisitor<C> visitor) { delegate.leaveObjectRefAssignOp(n, v, a, pre, c, visitor); } COM: <s> visit an object ref op assignment node after visiting the lhs </s>
funcom_train/11023818
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testRemove() { String label = null; for (int i = 0; i < nextExpressions.length; i++) { try { label = label(nextExpressions[i], i); assertEquals(label, removeProperties[i], resolver.remove(nextExpressions[i])); } catch (Throwable t) { fail(label + " threw " + t); } } } COM: <s> test remove method </s>
funcom_train/7852091
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean addAll(java.util.Collection c){ boolean setChanged = false; Iterator i = c.iterator(); while (i.hasNext()){ // we must enforce that everything in c is an LDAPAttribute // add will return true if the attribute was added if (this.add( i.next() )){ setChanged = true; } } return setChanged; } COM: <s> adds all code ldapattribute code objects in the specified collection to </s>
funcom_train/18166623
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addConnection(ConnectionInfo conPair) throws ParseException { // Find the source component ComponentInfo comp = (ComponentInfo) components.get(conPair.getSource()); // This means we're trying to connect a component that doesn't have a // COMPONENT node. if (null == comp) throw new ParseException("Unable to locate component \"" + conPair.getSource() + "\" for connection."); connections.add(conPair); } COM: <s> add connection pair to the set of known connections within </s>
funcom_train/18009753
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected Location getPixelLocation(Location location) { if (board == null) return null; int size = getWidth() < getHeight() ? getWidth() : getHeight(); double unit = size / board.getSize(); double x = unit * location.getX(); double y = unit * location.getY(); x = (getWidth() / 2) + x; y = (getHeight() / 2) - y; return new StandardLocation(x, y); } COM: <s> p converts the given location in centimeters where 0 0 is at the </s>
funcom_train/7894648
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean validateSimpleSelector(SimpleSelector selector) { // ensure the name follows the valid pattern and is not blacklisted // by the exclusion pattern. // NOTE: intentionally using non-short-circuited AND operator to // generate all relevant error messages return policy.getRegularExpression("cssElementSelector").getPattern() .matcher(selector.toString().toLowerCase()).matches() & !policy.getRegularExpression("cssElementExclusion") .getPattern() .matcher(selector.toString().toLowerCase()).matches(); } COM: <s> validates a basic selector against the policy </s>
funcom_train/44324153
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String newRandomFixedString(int length, String charBase) { int baseLen = charBase.length(); char[] buf = new char[length]; for (int i = 0; i < length;) { char ch = charBase.charAt(fRandom.nextInt(baseLen)); buf[i++] = ch; } return new String(buf); } COM: <s> returns a new string of the given length containing random characters </s>
funcom_train/7745778
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private String getNextKeyStatement() { StringBuffer stringBufferStmt = new StringBuffer(); stringBufferStmt.append("SELECT "); stringBufferStmt.append(ConfigurationRegistry.getInstance().getConfiguration().getKeyGeneratorColumnName()); stringBufferStmt.append(" FROM "); stringBufferStmt.append(ConfigurationRegistry.getInstance().getConfiguration().getKeyGeneratorTableName()); return stringBufferStmt.toString(); } COM: <s> get the statement to get the next key from the database </s>
funcom_train/35843986
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private boolean isResizable(Component comp) { if (comp == null) return false; if (comp instanceof JComboBox) return false; if (comp.getPreferredSize() == null) return false; if (comp.getMinimumSize() == null) return false; return (getMinimumHeight(comp) < getPreferredHeight(comp)); } COM: <s> a component is resizable if its minimum size is less than </s>
funcom_train/13258496
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object getClassRefStation(Object classKey) { ClassData cd = (ClassData) classDataHM.get(classKey); if (cd == null) { return null; } //if previously saved refSource has been deleted, delete it to mantain coherence if (!stationsKeyset.contains(cd.refSource)) { cd.refSource = null; } return cd.refSource; } COM: <s> returns the reference station for a given class </s>
funcom_train/9869463
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setLogin(String newVal) { if ((newVal != null && this.login != null && (newVal.compareTo(this.login) == 0)) || (newVal == null && this.login == null && login_is_initialized)) { return; } this.login = newVal; login_is_modified = true; login_is_initialized = true; } COM: <s> setter method for login </s>
funcom_train/46377795
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private CellPropertiesJFrame getCellPropertiesJFrame() { if (cellPropertiesFrameRef == null || cellPropertiesFrameRef.get() == null) { CellPropertiesJFrame cellPropertiesFrame = new CellPropertiesJFrame(); cellPropertiesFrameRef = new WeakReference(cellPropertiesFrame); return cellPropertiesFrame; } else { return cellPropertiesFrameRef.get(); } } COM: <s> returns the single cell properties jframe for the system creating it if </s>
funcom_train/10390736
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void genPreambleMethods() { // Method used to get compile time file dependencies out.printil("public java.util.List<String> getDependants() {"); out.pushIndent(); out.printil("return _jspx_dependants;"); out.popIndent(); out.printil("}"); out.println(); generateInit(); generateDestroy(); } COM: <s> declare general purpose methods shared by servlet and tag handler </s>
funcom_train/34253360
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int getPeerIndex(FmmObject bdo) { int index = -1; if ((getFmmObjectContext().hasPeers())) { List peers = getFmmObjectContext().getPeers(); index = FmmObjectSupport.findOidIndex(peers, bdo.getOid()) + 1; } return index; } COM: <s> if we have a tree view we return the position of the node </s>
funcom_train/2585404
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testOLSRegression2a() { double[][] data = createSampleData2(); double[] result = Regression.getOLSRegression(data); assertEquals(53.9729697, result[0], 0.0000001); assertEquals(-4.1823030, result[1], 0.0000001); } COM: <s> checks the results of an ols regression on sample dataset 2 </s>
funcom_train/26455014
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void itemRetrieved(Object key) { // Prevent list operations during remove while (removeInProgress) { try { Thread.sleep(5); } catch (InterruptedException ie) { } } // We need to synchronize here because AbstractConcurrentReadCache // doesn't prevent multiple threads from calling this method simultaneously. synchronized (list) { list.remove(key); list.add(key); } } COM: <s> an item was retrieved from the list </s>
funcom_train/10906520
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || !(obj instanceof PDFDestination)) { return false; } PDFDestination dest = (PDFDestination)obj; if (dest.getIDRef().equals(this.getIDRef())) { return true; } return false; } COM: <s> check if this equals another object </s>
funcom_train/16452701
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JPanel getJContentPane() { if (jContentPane == null) { GridLayout gridLayout = new GridLayout(); gridLayout.setRows(2); gridLayout.setColumns(1); jContentPane = new JPanel(); jContentPane.setLayout(gridLayout); jContentPane.add(getJScrollPane(), null); jContentPane.add(getJPanel(), null); } return jContentPane; } COM: <s> gets the j content pane </s>
funcom_train/51786451
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNext() throws DeframizerException { if ( deframizedPages == null ) throw new DeframizerException("invalid status, call start deframizing first"); for ( Iterator it = deframizedPages.keySet().iterator(); it.hasNext(); ) { String pageid = (String)it.next(); DeframizedPage page = (DeframizedPage)deframizedPages.get(pageid); if ( page.getStatus() == DeframizedPage.INITTED ) return pageid; } return null; } COM: <s> get the next new deframized page to handle by the client </s>
funcom_train/15721296
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected IJavaProject getProject(String projectName) { for (int i = 0, length = ALL_PROJECTS.length; i < length; i++) { if (ALL_PROJECTS[i].getElementName().equals(projectName)) return ALL_PROJECTS[i]; } return null; } COM: <s> returns project corresponding to given name or null if none is found </s>
funcom_train/29577163
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public List getSkillsDisplayNames(String catID) { Element e = (Element) doc.selectSingleNode("//category[@id='" + catID + "']"); List skillList = e.selectNodes("skill"); TreeSet set = new TreeSet(); for (Iterator iter = skillList.iterator(); iter.hasNext(); ) { Element a = (Element) iter.next(); set.add( a.valueOf("name") ); } return new ArrayList(set); } COM: <s> same but for skills </s>
funcom_train/12810573
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void defineTypeAndKey(byte[] b, String k) { String s = new String(b); int pos; pos = s.indexOf("cache_start="); if (pos > 0) { type = CACHE_START; key = s.substring(pos + 12, pos + 13); return; } pos = s.indexOf("cache_end="); if (pos > 0) { type = CACHE_END; key = s.substring(pos + 10, pos + 11); return; } pos = s.indexOf("replace="); if (pos > 0) { type = REPLACE; key = s.substring(pos + 8, pos + 9); return; } type = PLAIN_CONTENT; key = k; } COM: <s> partially implemented code that inspects the </s>
funcom_train/35071708
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Servicer getServicer() { Servicer servicer = getOrCreateTemp(getApp()).find(Servicer.class, getApp().getServicerId()); if (servicer == null || servicer.isPasscode(getApp().getPasscode()) == false) { throw new IllegalArgumentException("Invalid ID and/or password"); } return servicer; } COM: <s> the servicer for this installation </s>
funcom_train/18569910
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void testMatchesReturnsFalseWithNonMatchingSignatures() { RecordedCall recordedCall = new RecordedCall(signature, argValues, exception); Signature signature2 = new Signature(classType, methodName); InvokedCall invokedCall = new InvokedCall(signature2); boolean matches = recordedCall.matches(invokedCall); assertFalse(matches); } COM: <s> test that the matches method returns false with non matching signatures </s>
funcom_train/7439740
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private IndexSearcher getSearcher () { if ( this.differentIndex ) { try { getWriter().commit(); getWriter().optimize( false ); this.searcher = new IndexSearcher( getDirectory() ); this.differentIndex = false; } catch ( final CorruptIndexException exception ) { // Do nothing Logger.log( exception ); return null; } catch ( final IOException exception ) { // Do nothing Logger.log( exception ); return null; } } return this.searcher; } COM: <s> returns the searcher of the index will be created lazy </s>
funcom_train/31910843
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Rectangle2D getTransformedPrimitiveBounds(AffineTransform txf) { Rectangle2D tpBounds = getPrimitiveBounds(); if (tpBounds == null) { return null; } AffineTransform t = txf; if (transform != null) { t = new AffineTransform(txf); t.concatenate(transform); } return t.createTransformedShape(tpBounds).getBounds2D(); } COM: <s> returns the bounds of this nodes primitive paint after applying </s>
funcom_train/10800341
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void assertAutoDetachValue(int value) { if (((value & AutoDetach.DETACH_NONE) != 0) && (value != AutoDetach.DETACH_NONE)) { throw new UserException(_loc.get("detach-none-exclusive", toAutoDetachString(value))); } } COM: <s> asserts consistencey of given automatic detachment option value </s>
funcom_train/2929639
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public String getNameProperty () throws EvaluationException { try { return this.reflectProperty (this, NAME_PROPERTY).toString (); } catch (Exception e) { throw new EvaluationException (this, "No property 'Name' defined on element of type: " + this.getClass ().getName (), e); } } COM: <s> returns the value of property defining the elements name </s>
funcom_train/18836290
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private EndPoint findEndPointByRemoteDevice(RemoteDevice rdev) { for (int i = 0; i < this.endPoints.size(); i++) { EndPoint endpt = (EndPoint) this.endPoints.elementAt(i); if (endpt.getRemoteDevice().equals(rdev)) { return endpt; } } return null; } COM: <s> finds endpoint by the remote device </s>
funcom_train/47928490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAiProf3() { menuCharSelect.setAISlot3(arr1, 1); menuCharSelect.setAISlot3(arr2, 2); menuCharSelect.setAISlot3(arr3, 3); menuCharSelect.setAISlot3(arr4, 4); menuCharSelect.setAISlot3(arr5, 5); } COM: <s> set characters ai player 2 </s>
funcom_train/18397935
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void shutdown() { NavigatorManager nav = null; nav = NavigatorManager.getApplicationNavigatorManager(); if ( nav != null ) { nav.removeContextMenuListener(this); } nav = NavigatorManager.getWorkspaceNavigatorManager(); EditorManager.getEditorManager().getContextMenu().removeContextMenuListener(this); } COM: <s> called when shutting down the ide </s>
funcom_train/51813490
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected int findIndexOf(Object[] array, Object jobId) { int i = takeIndex; int k = 0; for (;;) { if (k++ >= count) return -1; if (items[i].equals( jobId ) ) { return i; } i = inc(i); } } COM: <s> find position of the object </s>
funcom_train/49627931
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private Element getSelectedTheme(final String theme, final Locale locale) { /* check groups first */ for (Object e : this.conf.getThemeGroups().getChildren("group")) { Element element = (Element) e; if (element.getAttributeValue("name").equals(theme)) { return chooseThemeFromThemeGroup(element, locale); } } /* then check single themes */ return findLocalizedThemeByName(theme, locale); } COM: <s> actually retrieves the themes xml from the config </s>
funcom_train/22368307
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void fixLyrics(ILyrics lyrics) { if (lyrics != null) { String lyricsString = lyrics.getLyrics() .replaceAll("'", "\'") .replaceAll("\n\n", "\n") // Remove duplicate \n .replaceAll("<.*>", "") // Remove HTML .trim(); lyrics.setLyrics(lyricsString); } } COM: <s> applies several common string manipulation to improve lyrics </s>
funcom_train/31240592
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void getGlyphs(Glyph[] glyph, int[] x, int[] y) { System.arraycopy(this.glyph, 0, glyph, 0, numGlyphs); System.arraycopy(this.x, 0, x, 0, numGlyphs); System.arraycopy(this.y, 0, y, 0, numGlyphs); } COM: <s> returns the glyphs and their offsets </s>
funcom_train/33231987
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void connectForSend(boolean transacted, int acknowledgMode) throws SLException { Context context = null; try { this.connect(transacted, acknowledgMode); messageProducer = session.createProducer(getDestination()); } catch (NamingException ex) { throw new SLException(ex); } catch (JMSException ex) { throw new SLException(ex); } } COM: <s> starts a connection to a queue </s>
funcom_train/22318817
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void run() { if (opt.getArgsCount() != 2 || opt.isOpt("h") || opt.isOpt("help")) printExitHelp(); String xmlFilename = opt.getArg(0); String xsltFilename = opt.getArg(1); try { TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource( xsltFilename)); transformer.transform(new StreamSource(xmlFilename), new StreamResult(System.out)); } catch (Exception e) { throw new RuntimeException(e); } } COM: <s> run the main program logic </s>
funcom_train/4145411
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private void openConnection() throws SQLException{ try { // get the initial context InitialContext ctx = new InitialContext(); // get the data source DataSource ds = (javax.sql.DataSource) ctx.lookup("jdbc/dbCoreDS"); // get the connection object connection = ds.getConnection(); } catch (Exception ex) { ex.printStackTrace(); throw new SQLException("Exception " + ex.getMessage()); } } COM: <s> creates the database connection </s>
funcom_train/11724856
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public PropertyState getPropertyState(Name propertyName) throws ItemNotFoundException, RepositoryException { PropertyEntry pe = getNodeEntry().getPropertyEntry(propertyName, true); if (pe != null) { return pe.getPropertyState(); } else { throw new ItemNotFoundException("Child Property with name " + propertyName + " does not exist."); } } COM: <s> utility method that returns the property state with the given name or </s>
funcom_train/31056380
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeComponentsFrom( Object o ) { Vector components = (Vector)objectComponents.get( o ); if( components != null ) { while( components.size() != 0 ) { Component c = (Component)components.firstElement(); // remove the component components.removeElement( c ); // remove the frame Frame f = (Frame)componentFrames.get( c ); f.setVisible( false ); f.dispose(); componentFrames.remove( c ); frameOwners.remove( f ); } } objectComponents.remove( o ); } COM: <s> remove all the components for an object </s>
funcom_train/22024172
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setAngularVel(float fx, float fy, float fz) { avel.set(fx, fy, fz); Mass m = mass.rotate(rot, Mass.pool.aquire()); amom.setZero(); m.getMomentOfInertia().mulInc(avel, amom); Mass.pool.release(m); } COM: <s> sets the angular velocity by altering the angular momentum </s>
funcom_train/20219828
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setBelow(Point top) { Point center = plate.calculateCenter(); int shiftX = top.x - center.x; int shiftY = top.y - plate.getPoints().get(2).y; // plate.relocate(0, shiftY); plate.relocate(shiftX, shiftY); top.y -= Plate.PLATE_HEIGHT; // top.x = center.x; // remove } COM: <s> relocate the plate to new coordinates in which lies above the top point </s>
funcom_train/16165535
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void scanNodeForFiles(FileNode node) { assert node != null; File f = (File) node.getUserObject(); if (this.fpl != null && !this.fpl.isDone()) { this.fpl.cancel(true); } this.fpl = new BrowserFileLoaderWorker(f.listFiles(), this.tableModel); for (PropertyChangeListener pcl : this.workerListeners) { this.fpl.addPropertyChangeListener(pcl); } this.fpl.addPropertyChangeListener(this); this.fpl.execute(); } COM: <s> scans a node for importable files </s>
funcom_train/17023125
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int readIntegerValue() throws ItchLibraryException { int nameLength = 0; for (int i = 0; i < 4; i++) { nameLength <<= 8; try { nameLength += readUnsignedByte(); } catch (IOException e) { throw new ItchLibraryException(e); } } return nameLength; } COM: <s> utility method for reading 4 bytes </s>
funcom_train/37482808
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: static public double gammln(double xx) { double x; double y, tmp, ser; double[] cof = { 76.18009172947146, -86.50532032941677, 24.01409824083091, -1.231739572450155, 0.1208650973866179e-2, -0.5395239384953e-5 }; y = x = xx; tmp = x + 5.5; tmp -= (x + 0.5) * Math.log(tmp); ser = 1.000000000190015; for (int j = 0; j <= 5; j++) ser += cof[j] / ++y; return -tmp + Math.log(2.5066282746310005 * ser / x); } COM: <s> returns incomplete gamma p a x evaluated by series </s>
funcom_train/1309315
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected void keyPressed(int keyCode) { String tt = "01234567890"; //int ch = keyCode - 48; //text.append(tt.charAt(ch)); text.append(String.valueOf((byte)keyCode)); WorkSpace.printG(text.charAt(text.length() - 1) + ""); } COM: <s> called when a key is pressed </s>
funcom_train/39879127
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public long getDateTime() { String dateTimeString = mAttributes.get(TAG_DATETIME); if (dateTimeString == null) return -1; ParsePosition pos = new ParsePosition(0); try { Date datetime = sFormatter.parse(dateTimeString, pos); if (datetime == null) return -1; return datetime.getTime(); } catch (IllegalArgumentException ex) { return -1; } } COM: <s> returns number of milliseconds since jan </s>
funcom_train/20597379
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void addSource(Scope scope, ValueSource<?> source) { ScopeImpl scopeImpl = (ScopeImpl) scope; Object conflict = source2Scope.put(source, scopeImpl); if (conflict != null) { throw new IllegalArgumentException("Already added"); //$NON-NLS-1$ } } COM: <s> registers a source within a particular scope </s>
funcom_train/37854614
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setCanceller(ISVNCanceller canceller) { myCanceller = canceller; Map pool = getPool(); for (Iterator protocols = pool.keySet().iterator(); protocols.hasNext();) { String key = (String) protocols.next(); SVNRepository repository = (SVNRepository) pool.get(key); repository.setCanceller(canceller); } } COM: <s> sets a canceller to be used in all </s>
funcom_train/10870489
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void test() { int num = atLeast(200); for (int i = 0; i < num; i++) { Automaton a = AutomatonTestUtil.randomAutomaton(random); Automaton b = a.clone(); MinimizationOperations.minimize(b); assertTrue(BasicOperations.sameLanguage(a, b)); } } COM: <s> the minimal and non minimal are compared to ensure they are the same </s>
funcom_train/4195045
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void onCallClosed(Call call, Message resp) { printLog("onCallClosed()",LogLevel.LOW); if (call!=this.call) { printLog("NOT the current call",LogLevel.LOW); return; } printLog("CLOSE/OK",LogLevel.HIGH); if (listener!=null) listener.onUaCallClosed(this); changeStatus(UA_IDLE); } COM: <s> callback function called when arriving a response after a bye request call closed </s>
funcom_train/1633373
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private JComponent createSetupPanel() { JPanel outerPanel = new JPanel(new FlowLayout()); JPanel innerPanel = new JPanel(new BorderLayout()); innerPanel.add(ComponentFactory.createButton(createSelectClsAction())); outerPanel.add(innerPanel); return outerPanel; } COM: <s> insert the methods description here </s>
funcom_train/25040193
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public int getNumberOfStepsPerSample() { if (enableIncreasingStepsPerSample) { double stepsPerSample = increaseStartStepsPerSample; stepsPerSample += (double) getNumberOfCurrentGeneration() * increaseAdditionalStepsPerSample; if (stepsPerSample > increaseMaxStepsPerSample) { stepsPerSample = increaseMaxStepsPerSample; } return (int) stepsPerSample; } else { return numberOfStepsPerSample; } } COM: <s> get the number of simulation steps per fitness sample </s>
funcom_train/29939458
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void update() { updateTimer.cancel(); updateTimer.purge(); updateTimer = new Timer(UiMessages.OUTLINE_TIMER_NAME); OutlineUpdateTask updateTask = new OutlineUpdateTask(); updateTimer.schedule(updateTask, firstUpdate ? 0 : UPDATE_DELAY); firstUpdate = false; } COM: <s> updates the outline content view </s>
funcom_train/28425619
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void destroy() { int sz = ftplets.size(); for(int i=0; i<sz; ++i) { FtpletEntry ftpletEnt = (FtpletEntry)ftplets.get(i); try { ftpletEnt.ftplet.destroy(); } catch(Exception ex) { log.error(ftpletEnt.name + " :: FtpletHandler.destroy()", ex); } } ftplets.clear(); } COM: <s> destroy all ftplets </s>
funcom_train/10171069
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeBizComponent(IFile file) { for (IFile key : bizDriverVsBizComponents.keySet()) { ArrayList<IFile> values = bizDriverVsBizComponents.get(key); boolean removed = values.remove(file); if (removed) { informReferenceModificationListeners(bizDriverVsBizComponents, key, file, true); } } } COM: <s> removes the biz component </s>
funcom_train/47022800
/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:|252-getter|0|252-preInit // write pre-init user code here font = Font.getDefaultFont();//GEN-LINE:|252-getter|1|252-postInit // write post-init user code here }//GEN-BEGIN:|252-getter|2| return font; } COM: <s> returns an initiliazed instance of font component </s>
funcom_train/44702298
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean wasAnnounced(SyndEntry entry) { Date pubDate = entry.getPublishedDate(); Date prevDate = (Date) this.announced.get(entry.getUri()); if (pubDate == null) { return prevDate != null; } else { return prevDate != null && pubDate.getTime() <= prevDate.getTime(); } } COM: <s> test if the supplied entry was already announced before and if the entry </s>
funcom_train/2893311
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isValidSitePrimary(String id) { if (siteprimarys == null) return false; int nSitePrimarys = siteprimarys.size(); SitePrimary siteprimary = null; for (int i = 0; i < nSitePrimarys; i++) { siteprimary = (SitePrimary) siteprimarys.get(i); if (siteprimary.id.getKey().equals(id)) return true; } return false; } COM: <s> check if siteprimary is in cached list </s>
funcom_train/40266896
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setQuote(ISecurity security, IQuote quote) { PricingStatus status = map.get(security); if (status == null) { status = new PricingStatus(); map.put(security, status); } Object oldValue = status.quote; if ((oldValue == null && quote != null) || (oldValue != null && !oldValue.equals(quote))) { status.quote = quote; status.deltas.add(new PricingDelta(security, oldValue, quote)); if (doNotify) notifyListeners(); } } COM: <s> sets a new quote for a security </s>
funcom_train/41344720
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public boolean isIdentity() { for (int i = 0, k = 0; i < 3; i++) { for (int j = 0; j < 3; j++, k++) { if (mValues[k] != ((i == j) ? 1 : 0)) { return false; } } } return true; } COM: <s> returns true if the matrix is identity </s>
funcom_train/48211834
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void removeTabAt(int i) { StackedTab removedTab = tabs.get(i); if (logger.isDebugEnabled()) { logger.debug("removed tab at " + i + ", removed tab " + removedTab.titleLabel, new Exception("For stack trace")); } if (removedTab != null) { remove(removedTab.tabComponent); remove(removedTab.subComponent); } tabs.remove(i); } COM: <s> removes the tab at the given index </s>
funcom_train/45192168
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public void setTitle(String title) { this.title = title; StringBuilder out = innerFrame.openScriptBuffer(); if (out != null) { out.append("wa.setWindowTitle('"); out.append(WUtil.escapeSQuote(title)); out.append("');\n"); } } COM: <s> set this windows title </s>
funcom_train/31251223
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: private MyGifImage getClockImage(int hour, int min, int sec) { MyGifImage img = new MyGifImage(CLOCK_SIZE, CLOCK_SIZE); Graphics2D g = img.getGraphics(); g.translate(CLOCK_SIZE/2, CLOCK_SIZE/2); drawBackground(g); drawBorder(g); drawTicks(g); drawHour(g, hour, min, sec); drawMinute(g, min, sec); drawSecond(g, sec); return img; } COM: <s> get the clock image </s>
funcom_train/35895122
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: protected String getAreaString(String id,int step){ if(propArea==null) initAreaInformation(); String areaStr = propArea.getProperty(id,""); if(step==100) areaStr = propArea.getProperty(enlargeId(id),""); msgLog("*******(area)id == "+id+"("+step+") , area value= "+areaStr); return areaStr; } COM: <s> get area string by action id and status </s>
funcom_train/27842635
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
TDAT: public Object findElementAt(int inIndex) { if (inIndex < 0) { return null; } STableModel tableModel = (STableModel) getModel(); try { return tableModel.getElementAt(inIndex); } catch (Exception e) { LOG.warn("Can't findElementAt: " + inIndex, e); } return null; } COM: <s> find the element in the bound list at the given index </s>