__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/48713739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void draw(Graphics2D g2, AffineTransform paf) {
// Draw the object
AffineTransform af = (AffineTransform) paf.clone();
// Apply parent rotation just once irrespective of number
// of children
af.rotate(rot * Math.PI / 180.0);
Iterator<GameArtifact> iter = children.iterator();
while(iter.hasNext()){
GameArtifact nextChild = (GameArtifact) iter.next();
nextChild.draw(g2, (AffineTransform)af.clone());
}
}
COM: <s> dummy in this class just used to enable recursion </s>
|
funcom_train/44722902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
ShopItem item;
int index, i;
// An item was selected.
// Make sure it is now the only item selected.
item = (ShopItem)e.getSource();
index = items.indexOf(item);
for (i = 0; i < items.size(); i++) {
if (i != index) {
item = (ShopItem)items.get(i);
item.setSelected(false);
}
}
repaint();
}
COM: <s> called from the awt event dispatch thread </s>
|
funcom_train/13275082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXEnd(Float xEnd) {
if (xEnd != this.xEnd) {
Float oldXEnd = this.xEnd;
this.xEnd = xEnd;
this.propertyChangeSupport.firePropertyChange(Property.X_END.name(), oldXEnd, xEnd);
updateLength();
updateDistanceToEndPoint();
}
}
COM: <s> sets the edited abscissa of the end point </s>
|
funcom_train/36182154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IGroupAdvertMgr getGroupAdvertMgr() throws GroupingException {
try {
IGroupAdvertMgr service = (IGroupAdvertMgr) gamTracker.getService();
if (null == service) {
throw new GroupingException("Error: could not get instance of IGroupAdvertMgr service");
}
return service;
} catch (Throwable t) {
throw new GroupingException("Couldn't get Group Advertisement Manager service", t);
}
}
COM: <s> gets a group advertisement manager implementation </s>
|
funcom_train/37824546 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Configuration parseConfiguration(String config) throws ConfigurationException {
StringBuffer buffer = new StringBuffer(header);
buffer.append(trim(config));
try{
if( !parseDocumentString(buffer.toString()) ){
return null;
}
}
catch(SAXException e){
System.err.println(e);
return null;
}
NodeList list = getDocument().getChildNodes();
Configuration configuration = new Configuration();
for( int nodeCounter=0; nodeCounter<list.getLength(); nodeCounter++ ){
Node node = list.item(nodeCounter);
doNode(node,configuration);
}
return configuration;
}
COM: <s> code parse configuration code is called by configuration constructor </s>
|
funcom_train/15684396 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String rebuildExpression() {
String str = getMode().toString().toLowerCase();
if (getRights() != null) {
str += RIGHTS_OPEN_CHAR;
if (isExcludeRights()) {
str += "-";
}
Iterator iter = getRights().iterator();
while (iter.hasNext()) {
String r = (String) iter.next();
str += r;
if (iter.hasNext()) {
str += ",";
}
}
str += RIGHTS_CLOSE_CHAR;
}
str += Policy.POLICY_SEPARATOR + getBehavior();
return str;
}
COM: <s> constructs the expression with the properties of some elements </s>
|
funcom_train/6267768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMAddr(String mAddr) throws ParseException {
if (mAddr == null)
throw new NullPointerException(
"JAIN-SIP Exception, "
+ "Via, setMAddr(), the mAddr parameter is null.");
Host host = new Host();
host.setAddress(mAddr);
NameValue nameValue = new NameValue(ParameterNames.MADDR, host);
setParameter(nameValue);
}
COM: <s> sets the value of the code maddr code parameter of this via header </s>
|
funcom_train/22597978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void poolSetThumb(final PhotoEdit photoEdit, final IPhoto photo) {
if (StringUtils.isNotEmpty(photoEdit.getPoolThumb())) {
log.info("photoEdit: {}, photo: {}", photoEdit, photo);
poolService.setPoolThumb(photo.getDisplayId(), photoEdit
.getPoolThumb());
}
}
COM: <s> set the pools thumbnail </s>
|
funcom_train/28742980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getNonCompletedOrderAdminObjects() throws LimsException {
Collection objects;
try {
objects = sampleSession.getNonCompletedOrderAdminObjects(serviceCode);
}
catch (Exception ex) {
LogManager.logMessage("LimsDelegate.getNonCompletedOrderAdminObjects(): ", ex);
throw new LimsException(ex.getMessage());
}
return objects;
}
COM: <s> get all non completed order admin objects </s>
|
funcom_train/29080610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void controlFocusGained(FocusEvent e) {
if (this instanceof DateControl)
maybeFireValueChangedEvent();
oldValue = getValue();
if (ClientSettings.VIEW_BACKGROUND_SEL_COLOR && isEnabled()) {
getBindingComponent().setBackground(ClientSettings.BACKGROUND_SEL_COLOR);
}
}
COM: <s> this method is called when the input control receives focus </s>
|
funcom_train/12784205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(AccessPath ap) {
assert ap != null : "AccessPathSet does not allow adding 'null' element";
if (maxSetWidth >= 0) { // there is a set-size limit
return (contents.size() < maxSetWidth ? contents.add(ap.id()) : false);
} else { // no set-size limit
return contents.add(ap.id());
}
}
COM: <s> adds a path to the access path set </s>
|
funcom_train/34810962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double highestScoringWindow (int base, int currentWindowIndex){
int num = windows.length;
double score = windows[currentWindowIndex].getScores()[scoreIndex];
for (int i=currentWindowIndex; i<num; i++){
if (baseOverlapsWindow(base,windows[i])) {
//check score
double testScore = windows[i].getScores()[scoreIndex];
if (testScore> score) score = testScore;
}
else return score;
}
return score;
}
COM: <s> looks forward at overlapping windows returns highest score for the given bp position </s>
|
funcom_train/28685009 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void suspend() {
isSuspended = true;
suspendTimers();
suspendMessages();
suspendTaskInstances();
// propagate to child tokens
if (children!=null) {
Iterator iter = children.values().iterator();
while (iter.hasNext()) {
Token child = (Token) iter.next();
child.suspend();
}
}
}
COM: <s> suspends a process execution </s>
|
funcom_train/33233846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringItem getSavingCardSI() {
if (savingCardSI == null) {//GEN-END:|111-getter|0|111-preInit
// write pre-init user code here
savingCardSI = new StringItem("Saving Cards:", null);//GEN-LINE:|111-getter|1|111-postInit
// write post-init user code here
}//GEN-BEGIN:|111-getter|2|
return savingCardSI;
}
COM: <s> returns an initiliazed instance of saving card si component </s>
|
funcom_train/51111381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean schemaExists() {
SelectQuery query = new SelectQuery(someEntity);
// as we are using random entity and don't know how much data could be there, make
// sure query does not flood us with data
query.setFetchLimit(1);
query.setFetchingDataRows(true);
try {
domain.onQuery(null, query);
return true;
}
catch (Throwable th) {
return false;
}
}
COM: <s> runs a test query to see if a schema is initialized </s>
|
funcom_train/16486118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object execute( String method, Vector parameters ) throws SSOException {
try {
Object results = client.execute( new XmlRpcRequest( method, parameters ), transport );
if( results instanceof byte[] )
return convertToObject( results );
else
return results;
} catch( XmlRpcException err ) {
throw new SSOException( err );
} catch( IOException err ) {
throw new SSOException( err );
}
}
COM: <s> executes the method </s>
|
funcom_train/17784504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Definition getSubDefinition(String name) {
Definition ret=null;
for (int i=0; ret == null &&
i < getBlock().getContents().size(); i++) {
Activity act=getBlock().getContents().get(i);
if (act instanceof Definition &&
((Definition)act).getLocatedName().getName().equals(name)) {
ret = (Definition)act;
}
}
return(ret);
}
COM: <s> this method returns the sub definition associated </s>
|
funcom_train/29699535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getJumpHeat(int movedMP) {
switch (getJumpType()) {
case JUMP_IMPROVED:
return engine.getJumpHeat(movedMP/2 + movedMP%2);
case JUMP_BOOSTER:
case JUMP_DISPOSABLE:
case JUMP_NONE:
return 0;
default:
return engine.getJumpHeat(movedMP);
}
}
COM: <s> we need to override this here because mechs generate heat when jumping </s>
|
funcom_train/41459781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Signal getSignal(EventName eventName) throws UnknownSignalException, UnknownActivityException {
//searching signal by name
for (Signal s : list) {
if (Comparator.equals(s.getName(), eventName)) {
s.trigger(eventName);
return s;
}
}
//signal nopt found
throw new UnknownSignalException(eventName.toString());
}
COM: <s> gets the signal executor for the given event name </s>
|
funcom_train/3402369 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTo(AddressingVersion av, SOAPVersion sv) {
if (to != null)
return to;
if (av == null)
throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
Header h = getFirstHeader(av.toTag, true, sv);
if (h != null) {
to = h.getStringContent();
} else {
to = av.anonymousUri;
}
return to;
}
COM: <s> returns the value of ws addressing code to code header </s>
|
funcom_train/10777036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void create() {
if (count(Library.class) > 0)
return;
EntityManager em = null;
em = emf.createEntityManager();
em.getTransaction().begin();
Library lib = new Library();
lib.setName(LIBRARY_NAME);
Book book = new Book();
book.setName(BOOK_NAME);
lib.addBook(book);
for (int i = 1; i <= NUM_PAGES; i++) {
Page page = new Page();
page.setNumber(i);
book.addPage(page);
}
em.persist(lib);
em.getTransaction().commit();
em.clear();
em.close();
}
COM: <s> create a library with a book and three pages </s>
|
funcom_train/46753793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
while (true) {
boolean anyShowing = false;
List<ISComboDocument> docs = new ArrayList<ISComboDocument>();
docs.addAll(documents.keySet());
for (ISComboDocument document : docs) {
if (document.getComboBox().isShowing()) {
anyShowing = true;
checkDocument(document);
}
}
cleanup();
if (anyShowing) {
Thread.sleep(500);
} else {
Thread.sleep(2000);
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
COM: <s> start the thread </s>
|
funcom_train/20274555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParentChild() {
test("a.length = b.length = c.length;", formatSetPropFn("length")
+ formatPropNameDecl("length")
+ "SETPROP_length(a, SETPROP_length(b, c[$$PROP_length]))");
}
COM: <s> test for modifying both parent and child as all replacements </s>
|
funcom_train/20374266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private T findService(String serviceKey) {
T service = children.get(serviceKey);
if (service == null) {
service = serviceKeyStrategy.find(children, serviceKey);
if (service == null) {
throw new RuntimeException("A service is not found: "
+ serviceClass.getName() + " : " + serviceKey);
}
}
return service;
}
COM: <s> returns the service by the key </s>
|
funcom_train/51811810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFailsWithNoJmsTemplate() {
try {
listener.setJmsTemplate(null);
introspector.addListener(producer, "TestListener", listener);
producer.fireTestListenerMessage(getName());
fail("Should have reported the illegal state of no JmsTemplate");
}
catch (IllegalStateException e) {
// expected
}
}
COM: <s> test that verifies that if no jms template is provided this is reported </s>
|
funcom_train/47308227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImageHolder(ImageHolder newImageHolder) {
// Change the image in a thread-safe manner.
if(imageHolder != null) {
synchronized(imageHolder) {
imageHolder = newImageHolder;
}
}
// Ask Swing to redraw the component that contains the image later
SwingUtilities.invokeLater(new Runnable() {
public void run() {
imagePanel.setImage(imageHolder.getImage());
}
});
}
COM: <s> set the new image holder and update image in swing </s>
|
funcom_train/27825858 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SetTracker getSubPropertiesTracker() {
if (m_subProperties==null)
m_subProperties=new SetTracker() {
protected Set loadSet() throws KAONException {
return getVirtualProperties(getProperty().getSubProperties(),true);
}
};
return m_subProperties;
}
COM: <s> returns the set tracker of direct subproperties of this property </s>
|
funcom_train/8096554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CheckKernel getTester() {
CheckKernel result;
result = new CheckKernel();
result.setSilent(true);
result.setKernel(m_Kernel);
result.setNumInstances(20);
result.setDebug(DEBUG);
result.setPostProcessor(getPostProcessor());
return result;
}
COM: <s> configures the check kernel instance used throughout the tests </s>
|
funcom_train/3746640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getChild(Object parent, int index) {
PersonTreeNode parentNode = (PersonTreeNode)parent;
if (parentNode.getPerson() != null) {
return null;
}
List allChildren = getAllChildren(parent);
if (allChildren.size() == 0) {
return null;
}
return allChildren.get(index);
}
COM: <s> p get the child of the parent group provided with the specified </s>
|
funcom_train/40843735 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onRelease(int primaryCode) {
if(DEBUG)
Log.i(TAG, "onRelease(): code = " + primaryCode);
if(hasDistinctMultitouch && primaryCode == LIMEBaseKeyboard.KEYCODE_SHIFT ){
hasShiftPress = false;
if (hasShiftCombineKeyPressed) {
hasShiftCombineKeyPressed = false;
updateShiftKeyState(getCurrentInputEditorInfo());
}
}else if(hasDistinctMultitouch && !hasShiftPress){
updateShiftKeyState(getCurrentInputEditorInfo());
}
}
COM: <s> last method to execute when key release </s>
|
funcom_train/13445564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TreePath getPathForRow(int row) {
if(row >= 0 && row < getRowCount()) {
TreePath path = getNode(row).getTreePath();
log.fine("for row="+row+" return path="+path);
return path;
}
log.fine("for row="+row+" return path=null size="+visibleNodes.size());
return null;
}
COM: <s> returns the path for code row code </s>
|
funcom_train/14074344 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void init() {
createTree(new String[] {""}); //$NON-NLS-1$
setContentProvider(new ViewContentProvider());
setLabelProvider(new ViewLabelProvider());
setSorter(new NameSorter());
setInput(invisibleRoot);
expandToLevel(invisibleRoot, 2); // expand all
makeAndAssignActions();
}
COM: <s> initializes the viewer with the extension point data </s>
|
funcom_train/43294307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List containsLoop(Map map) {
//valid
if (map == null) {
return new LinkedList(); //loop found
}
//iterator
Iterator iterator = map.keySet().iterator();
//list
List list;
List loops;
while (iterator.hasNext()) {
list = new LinkedList();
list.add((String) iterator.next());
// contains loops
loops = containsLoop(map, 0, list);
if (loops != null) {
return loops;
}
}
//no loop found
return null;
}
COM: <s> p searches for loops in the map p </s>
|
funcom_train/42464366 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initPath(String path) throws IOException {
int parsePos = 1;
int dirSeparator = path.indexOf('/', parsePos);
while (dirSeparator != -1) {
initDirectory(path.substring(0, dirSeparator + 1));
parsePos = dirSeparator + 1;
dirSeparator = path.indexOf('/', parsePos);
}
}
COM: <s> make sure all directories in path exist </s>
|
funcom_train/41593092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addQuotaPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Renter_quota_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Renter_quota_feature", "_UI_Renter_type"),
LibraryPackage.Literals.RENTER__QUOTA, true, false, false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the quota feature </s>
|
funcom_train/49958613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean endsWith(EventSequence suffix) {
if (suffix.length() > this.length()) {
return false;
}
else {
for (int i = 0; i < suffix.length(); i++) {
if (!this.tokenAt(this.length() - i - 1).equals(suffix.tokenAt(suffix.length() - i - 1))) {
return false;
}
}
return true;
}
}
COM: <s> test if the the sequence has the suffix </s>
|
funcom_train/11734979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(NodeId that) {
// This is not a 128 bit integer comparison! See also JCR-687.
if (msb < that.msb) {
return -1;
} else if (msb > that.msb) {
return 1;
} else if (lsb < that.lsb) {
return -1;
} else if (lsb > that.lsb) {
return 1;
} else {
return 0;
}
}
COM: <s> compares this identifier to the given other one </s>
|
funcom_train/3675728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void open(File configFile) throws WrongNXMLFileFormatException, NXMLParseException, IOException {
this.coreConfig = NonCachingResourceManager.loadCoreConfiguration(configFile.getAbsolutePath());
this.loadAllMaps();
this.loadAllTilesets();
this.isOpen = true;
this.notifyMyObservers();
}
COM: <s> p reads in a configuration file in nxml format </s>
|
funcom_train/14585559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeStats(PrintWriter writer) {
// the total stats
PlayerYearStat newTotStats = new PlayerYearStat();
// Writes each year's stats and adds them to the
// running total stats
for (int i = 0; i < yearStatsIdx; i++) {
writer.println(yearStats[i].getSummary(false));
mergeStats(newTotStats, yearStats[i]);
}
// Writes the total stats
writer.println(newTotStats.getSummary(true));
}
COM: <s> writes all player year stats </s>
|
funcom_train/46621480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MenuItem getSaveMenuItem() {
if (iSaveMenuItem == null) {
try {
iSaveMenuItem = new MenuItem();
iSaveMenuItem.setLabel("Save BuildInfo To Repository");
} catch (Throwable iExc) {
handleException(iExc);
}
}
return iSaveMenuItem;
}
COM: <s> return the save menu item property value </s>
|
funcom_train/33567359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkLogin(String userName,String password) {
System.out.println("Checando login "+userName);
if(LoginChecker.checkLogin(userName, password)){
System.out.println("Usuario " + userName + " autenticado.");
RootPanel.get("GeoInterest22").remove(this);
new GeoInterest(userName);
} else {
System.out.println("Usuário inválido");
setErrorText("Usuário ou senha inválidos");
}
}
COM: <s> this method is called when the button is clicked </s>
|
funcom_train/14329379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_lobBuffer() {
String fieldName = "lobBuffer";
String messageKey = Driver.LOBBUFFER;
String expectedValue = DefaultProperties.LOB_BUFFER_SIZE;
assertDefaultPropertyByServerType(URL_SQLSERVER, messageKey, fieldName, expectedValue);
if (!isOnlySqlServerTests()) {
assertDefaultPropertyByServerType(URL_SYBASE, messageKey, fieldName, expectedValue);
}
}
COM: <s> test the code lob buffer code property </s>
|
funcom_train/46378531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PresenceInfo getPresenceInfo(BigInteger sessionID) {
if (sessionID == null) {
return null;
}
synchronized (sessionIDMap) {
PresenceInfo info = sessionIDMap.get(sessionID);
if (info == null) {
logger.fine("No presence info for sessionID " + sessionID);
return null;
}
return info;
}
}
COM: <s> get presence info from a wonderland session id </s>
|
funcom_train/22284966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean handleEvent(Event evt) {
switch (evt.id) {
case Event.ACTION_EVENT: {
if (evt.target instanceof PopupMenuItemWidget) {
user.setValue(new Integer(indexOf((PopupMenuItemWidget)evt.target)));
user.action();
}
return true;
}
case Event.MOUSE_DRAG:
owner.postEvent(evt);
break;
case Event.MOUSE_UP:
// pass it on to the owner
owner.postEvent(evt);
break;
}
return super.handleEvent(evt);
}
COM: <s> handle mouse events the owner receives all mouse drag and </s>
|
funcom_train/23874853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected EObject createInitialModel() {
EClass eClass = ExtendedMetaData.INSTANCE.getDocumentRoot(metadataPackage);
EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(initialObjectCreationPage.getInitialObjectName());
EObject rootObject = metadataFactory.create(eClass);
rootObject.eSet(eStructuralFeature, EcoreUtil.create((EClass)eStructuralFeature.getEType()));
return rootObject;
}
COM: <s> create a new model </s>
|
funcom_train/32354936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(User user) {
Calendar from = Minimalist.normalize(Calendar.getInstance());
Calendar to = Minimalist.normalize(Calendar.getInstance());
Item userItem = getWSUser(user.getName(), user.getPassword(), from, to);
setPropertyValue(userItem, UserConstants.STATUS, ItemConstants.DELETED);
}
COM: <s> sets deleted status on ws </s>
|
funcom_train/7745929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doTagInherited(String uri, String localName, String qName, Attributes attributes, XMLMappingData data) {
XMLInheritedMappingData inheritedMappingData = new XMLInheritedMappingData();
inheritedMappingData.setClazz(attributes.getValue("class"));
inheritedMappingData.setTable(attributes.getValue("table"));
data.getInheritedAssociations().add(inheritedMappingData);
}
COM: <s> this method will be executed when the parser encounters the inherited tag </s>
|
funcom_train/51615411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(DataRepresentation representation, Object object) throws WriteError {
representation.setAttribute("tablename", ((TableQuery)object).getTableName());
try {
representation.setElement("database", ((TableQuery)object).getConnectionManager().getConfig());
} catch (ReadError err) {
throw new WriteError("Error copying DataRepresentation:" + err);
}
}
COM: <s> writes an array of objects to some data representation </s>
|
funcom_train/21466205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getSourceFile(Class<?> classtype) {
final String fileSeparator = System.getProperty("file.separator");
final String path = classtype.getCanonicalName().replace(".",
fileSeparator)
+ ".java";
// try on /src folder
File file = new File("src" + fileSeparator + path);
if (file.exists()) {
return file;
} else {
// try on root folder
file = new File(path);
if (file.exists()) {
return file;
}
}
// no file found
return null;
}
COM: <s> gets the source file for the given classtype sourcefiles are located on </s>
|
funcom_train/36060876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor searchAdjunct(String search) throws SQLException {
String where = createWhere(search);
Cursor mCursor = mDb.query(true, ADJUNCT_TABLE, new String[] { KEY_ID,
KEY_NAME, KEY_MANUFACTURER, KEY_DESCRIPTION, KEY_EXTRACT,
KEY_COLOR }, where, null, null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;
}
COM: <s> return a cursor for all adjuncts that match a search pattern </s>
|
funcom_train/1064026 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getFullSignature() {
String tmp = "";
Iterator parametersType = getInParameters().iterator();
while (parametersType.hasNext()) {
Parameter parameter = (Parameter) parametersType.next();
if(parameter.getType() == null) {
// undefined parameter
tmp = tmp+PARAMETER_SEPARATOR+Property.UNDEFINED_TYPE_NAME;
} else {
tmp = tmp+PARAMETER_SEPARATOR+parameter.getType().getName();
}
}
return this.getQualifiedName()+tmp;
}
COM: <s> get the full signature of the operation ie the operation name prefixed with </s>
|
funcom_train/12155926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Node searchNearestNodeByUnoptimalMethod(final double latitude, final double longitude) {
Node nearest = nodes.getFirst();
double sigma = sigma(latitude, longitude, nearest);
for (Node lltz : nodes) {
if (sigma(latitude, longitude, lltz) < sigma) {
nearest = lltz;
sigma = sigma(latitude, longitude, nearest);
}
}
return nearest;
}
COM: <s> search nearest node with defined timezone for given </s>
|
funcom_train/33398710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getLoadButton() {
if (loadButton == null) {
loadButton = new JButton();
loadButton.setToolTipText("Load selected location");
loadButton.setIcon(new ImageIcon(getClass().getResource(
"/net/sf/fmj/ui/images/import_wiz.png")));
loadButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent event) {
//onLoadButtonClick();
}
});
}
return loadButton;
}
COM: <s> this method initializes load button </s>
|
funcom_train/36930420 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readNormal() {
if (!(ttype == TT_WORD && sval.equals("normal"))) {
CCLog.error("Format Error:expecting 'normal' on line " + lineno());
return;
}
CCVector3f myNormal = new CCVector3f(getFloat(),getFloat(),getFloat());
if (DEBUG) CCLog.info("Normal:" + myNormal);
// We add that vector to the Normal's array
addNormal(myNormal);
skipToNextLine();
}
COM: <s> method that reads a normal </s>
|
funcom_train/19965718 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getSetCurrentTime() {
if (setCurrentTime == null) {//GEN-END:|111-getter|0|111-preInit
// write pre-init user code here
setCurrentTime = new Command("Now", Command.ITEM, 0);//GEN-LINE:|111-getter|1|111-postInit
// write post-init user code here
}//GEN-BEGIN:|111-getter|2|
return setCurrentTime;
}
COM: <s> returns an initiliazed instance of set current time component </s>
|
funcom_train/3342503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAlignment(int alignment) {
switch (alignment) {
case Label.LEFT:
peerComponent.setHorizontalAlignment(SwingConstants.LEFT);
break;
case Label.CENTER:
peerComponent.setHorizontalAlignment(SwingConstants.CENTER);
break;
case Label.RIGHT:
peerComponent.setHorizontalAlignment(SwingConstants.RIGHT);
break;
}
}
COM: <s> sets the text alignment </s>
|
funcom_train/46760279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public UnitConversionModel getUnitConversion(final long unitConversionId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return ReferenceData.getUnitConversion(unitConversionId, chain, call);
}}; return (UnitConversionModel) call(method, call);
}
COM: <s> same transaction return the single unit conversion model for the primary key </s>
|
funcom_train/22388147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getAllBuildSummariesForBranch(Integer branchId) {
SqlQuery allBuildsQuery = new BuildSummaryMappingQuery("SELECT ID, BRANCH_ID, VERSION_CONTROL_NO, STATUS, STARTED, FINISHED " +
" FROM BUILDS " +
" WHERE BRANCH_ID = ? ORDER BY ID DESC");
allBuildsQuery.declareParameter(new SqlParameter(Types.NUMERIC));
return allBuildsQuery.execute(branchId.intValue());
}
COM: <s> get all builds </s>
|
funcom_train/48900885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProcessorType(int processorType) {
switch (processorType) {
case ALPHA_PROCESSOR:
case ANY_PROCESSOR:
case I386_PROCESSOR:
case IA64_PROCESSOR:
case MIPS_PROCESSOR:
case PLATFORM_INDEPENDENT_PROCESSOR:
case PPC_PROCESSOR:
case SPARC_PROCESSOR:
case ULTRASPARC_PROCESSOR:
break;
default:
processorType = ANY_PROCESSOR;
}
this.processorType = processorType;
}
COM: <s> sets the type of the processor this </s>
|
funcom_train/37836326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getFormatedPrice(RPObject item) {
String price = "";
if (item.has("price")) {
int priceInt = item.getInt("price");
price = "<span style=\"color: ";
if (priceInt < 0) {
price = price + "#FFFFFF\">";
} else {
price = price + "#00FF00\">";
}
price = price + Math.abs(priceInt) + "</span>";
}
return price;
}
COM: <s> formats the price depending on its sign </s>
|
funcom_train/5346299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URN getSHA1Urn() {
if (urn == null) {
urn = extractSHA1URNFromList(getExactTopics());
if (urn == null)
urn = extractSHA1URNFromList(getXS());
if (urn == null)
urn = extractSHA1URNFromList(getAS());
if (urn == null)
urn = extractSHA1URNFromURLS(getDefaultURLs());
if (urn == null)
urn = URN.INVALID;
}
if (urn == URN.INVALID)
return null;
return urn;
}
COM: <s> returns the sha1 urn of this magnet uri if it has one </s>
|
funcom_train/44211522 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeChild(String childName, DefaultTreeModel model) {
if (children == null) return;
Iterator it = children.iterator();
while(it.hasNext()) {
AbstractNode child = (AbstractNode)it.next();
if (childName.equals(child.getUserObject().toString())) {
model.removeNodeFromParent(child);
return;
}
}
}
COM: <s> removes the first node named child name from this parent </s>
|
funcom_train/1990280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getMnemonicIndex(String name) {
int pos = name.indexOf('&');
if (pos >= 0 && pos < name.length() - 1) {
char m = name.charAt(pos + 1);
if (Character.isWhitespace(m)) {
throw new IllegalArgumentException("Mnemonic cannot be a space: " + name);
} else {
return pos;
}
}
// Not found
return -1;
}
COM: <s> returns the position of a valid amp character </s>
|
funcom_train/4123271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMaximumIconHeight() {
int height = 0;
for( int ii=0; ii < goodsIcon.length; ii++ ) {
if( goodsIcon[ii].getImage().getHeight(null) > height ) {
height = goodsIcon[ii].getImage().getHeight(null);
}
}
return height;
}
COM: <s> need to determine the tallest icon </s>
|
funcom_train/14361611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visit(TypeSpecifierCycle n, A argu) {
n.typeSpecifier.accept(this, argu);
n.nodeOptional.accept(this, argu);
n.nodeOptional1.accept(this, argu);
n.nodeOptional2.accept(this, argu);
}
COM: <s> type specifier type specifier </s>
|
funcom_train/4780710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void refreshServerAccessRules() {
final DefaultTableModel model = new NonEditableTableModel();
try {
model.setDataVector(document.getServerAccessRules(), getServerAccessRulesColumnNames());
}
catch (final AppException ae) {
displayError(ResourceUtil.getString("mainframe.error.errorloadingaccessrulesforserver"));
}
getAccessRulesPane().getAccessRulesTable().setModel(model);
AutofitTableColumns.autoResizeTable(getAccessRulesPane().getAccessRulesTable(), true);
}
COM: <s> refresh access rules table for the entire server </s>
|
funcom_train/2496943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeGroup(String id) throws DataAccessException {
try {
DAOFactory factory = (DAOFactory) DAOFactory.getFactory();
RoleDAO roleDAO = (RoleDAO) factory.getRoleDAO();
GroupEntity group = new GroupEntity();
group.setId(id);
roleDAO.removeGroup(group, entity);
}
catch(DataAccessException dae) {
FacesMessages.instance().add(dae.getMessage());
log.error(dae);
throw new LdapLookupException(dae);
}
}
COM: <s> removes the specified group from the role </s>
|
funcom_train/22959455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createAndShowCanvas() throws Exception {
classification3Dvisual = new KopsaClassification3Dvisual(this);
this.add(classification3Dvisual.getCanvas(), BorderLayout.CENTER);
this.validate();
gc.add(this, BorderLayout.CENTER);
gc.validate();
this.validate();
gc.validate();
}
COM: <s> creates an instance of classification3 dvisual including canvas3d </s>
|
funcom_train/22233706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConstantScaleEnable(boolean constantScaleEnable) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_SCALE_WRITE))
throw new CapabilityNotSetException(J3dI18N.getString("OrientedShape3D6"));
if (isLive())
((OrientedShape3DRetained)retained).
setConstantScaleEnable(constantScaleEnable);
else
((OrientedShape3DRetained)retained).
initConstantScaleEnable(constantScaleEnable);
}
COM: <s> sets the constant scale enable flag </s>
|
funcom_train/23235567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFeatureChangeListener(FeatureChangeListener listener) {
FeatureChangeListener [] newListeners;
int idx;
idx = featureListeners.length;
while(idx-- != 0) {
if(featureListeners[idx] == listener) {
newListeners =
new FeatureChangeListener[
featureListeners.length - 1];
if(idx != 0) {
System.arraycopy(
featureListeners, 0,
newListeners, 0,
idx);
}
if(++idx != featureListeners.length) {
System.arraycopy(
featureListeners, idx,
newListeners, idx - 1,
featureListeners.length - idx);
}
featureListeners = newListeners;
break;
}
}
}
COM: <s> remove a feature change listener </s>
|
funcom_train/19403001 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public void clear() {
// unlink from sources.
Iterator itr = sources.iterator();
while( itr.hasNext() ) {
Vertex src = (Vertex) itr.next();
src.removeTarget( this );
}
// unlink from targets.
itr = targets.iterator();
while( itr.hasNext() ) {
Vertex tgt = (Vertex) itr.next();
tgt.sources.remove(this);
}
}
COM: <s> break all edges entering or leaving this vertex </s>
|
funcom_train/24372338 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String toHL7format(Date date) {
String hl7DateFormat = "yyyyMMdd";
SimpleDateFormat formatter = new SimpleDateFormat(hl7DateFormat);
Calendar c = Calendar.getInstance();
c.setTime(date);
formatter.setTimeZone(TimeZone.getTimeZone("UTC"));
String hl7formattedDate = formatter.format(date);
hl7formattedDate.replaceAll("UTC", "Z");
return hl7formattedDate;
}
COM: <s> convert a java date to hl7 format </s>
|
funcom_train/40926325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getLoginKOOKButton() {
if (loginKOOKButton == null) {//GEN-END:|51-getter|0|51-preInit
// write pre-init user code here
loginKOOKButton = new Command("Ok", Command.OK, 0);//GEN-LINE:|51-getter|1|51-postInit
// write post-init user code here
}//GEN-BEGIN:|51-getter|2|
return loginKOOKButton;
}
COM: <s> returns an initiliazed instance of login kookbutton component </s>
|
funcom_train/20270916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAstDotGraph() throws IOException {
if (jsRoot != null) {
ControlFlowAnalysis cfa = new ControlFlowAnalysis(this, true, false);
cfa.process(null, jsRoot);
return DotFormatter.toDot(jsRoot, cfa.getCfg());
} else {
return "";
}
}
COM: <s> gets the dot graph of the ast generated at the end of compilation </s>
|
funcom_train/27862205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void moveCursorTo(double x, double y, int jpx, int jpy){
this.vx = x;
this.vy = y;
cursorX.moveTo(x, y);
cursorY.moveTo(x, y);
movePhantom(x,y);
picker.setVSCoordinates(x, y);
picker.setJPanelCoordinates(jpx, jpy);
Camera c = ownerSpace.getCamera(0);
double a = (c.focal+c.altitude)/c.focal;
picker2.setVSCoordinates((x-c.vx)/a, (y-c.vy)/a);
picker2.setJPanelCoordinates(jpx, jpy);
refreshPicker();
}
COM: <s> moves the cursor to the specified position </s>
|
funcom_train/44158095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWalkError() {
String[] names = {
"/one", "/one/red", "/one/red/two", "/one/three"
};
LinkedObject root = createObjects(names);
m_processor.expect(
new Notification("markRed", "LinkedObject /"),
new Notification("markRed", "LinkedObject /one"),
new Notification("visit", "LinkedObject /one/red"),
new Notification("visit", "LinkedObject /one/red/two"),
new Notification("visit", "LinkedObject /one/three")
);
m_walker.run(root);
m_processor.validateAnyOrder();
}
COM: <s> an error appears on the walk </s>
|
funcom_train/17426478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getProperty(String key) {
String value = super.getProperty(key);
if (value == null && key.length() > 0) {
value = manager.getProperty(prefix + '.' + key);
if (value == null) {
value = manager.getProperty(key);
}
}
return value;
}
COM: <s> performs the super action then searches the log manager </s>
|
funcom_train/7678247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(String timezone, long begin, long end, int startDay, int endDay) {
SQLiteDatabase db = mOpenHelper.getReadableDatabase();
db.beginTransaction();
try {
writeLocked(timezone, begin, end, startDay, endDay);
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
}
COM: <s> writes the meta data for the calendar provider </s>
|
funcom_train/2627167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test13( ) {
ComponentListType l_list = m_ripper.lOpenWindowComps;
assertSame( m_ripper.getlOpenWindowComps( ), l_list );
m_ripper.lOpenWindowComps = null;
assertEquals( m_ripper.getlOpenWindowComps( ), null );
m_ripper.lOpenWindowComps = l_list;
}
COM: <s> this function tests the ripper getl open window comps function </s>
|
funcom_train/36756423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDegreeName() {
System.out.println("getDegreeName");
Plan instance = null;
String expResult = "";
String result = instance.getDegreeName();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get degree name method of class csis543 tfinal project </s>
|
funcom_train/18213993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addComparisonDataTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RetrievalConfiguration_comparisonDataType_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RetrievalConfiguration_comparisonDataType_feature", "_UI_RetrievalConfiguration_type"),
EvaluationmodelPackage.Literals.RETRIEVAL_CONFIGURATION__COMPARISON_DATA_TYPE,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the comparison data type feature </s>
|
funcom_train/25565230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireMultiEvent(String action, SwingMultiObjectForm form, String formName){
if(AddRemoveButtonPane.ADD.equals(action)) {
form.fireMultiObjectEvent(-1, MultiObjectEvent.OBJECT_ADD);
}else if(AddRemoveButtonPane.REMOVE.equals(action)){
form.fireMultiObjectEvent(-1, MultiObjectEvent.OBJECT_REMOVE);
}else if(AddRemoveButtonPane.EDIT.equals(action)){
fireObjectEdit(form, formName);
}//other buttons can exist!
}
COM: <s> action is add remove button panes action </s>
|
funcom_train/44852753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Group getGroup(String inGroupID) throws BOMInvalidKeyException {
//create a key for the GroupID
KeyObject lKey = new KeyObjectImpl();
try {
lKey.setValue(KEY_ID, new Long(inGroupID));
return (Group)findByKey(lKey);
}
catch (VException exc) {
throw new BOMInvalidKeyException(exc.getMessage());
}
}
COM: <s> returns the discussion group identified by the specified id </s>
|
funcom_train/14516210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getTimeStampIndex(Date timestamp){
int i;
for(i=0;i< userdatas.length;i++){
if(timestamp.after(userdatas[i].getTimeModified())||
timestamp.equals(userdatas[i].getTimeModified())){
break;
}
}
return i;
}
COM: <s> returns an index to the user that related to a certain timestamp </s>
|
funcom_train/48877450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTextField() {
if (textField == null) {//GEN-END:|16-getter|0|16-preInit
// write pre-init user code here
textField = new TextField("Telefono", null, 32, TextField.NUMERIC);//GEN-LINE:|16-getter|1|16-postInit
// write post-init user code here
}//GEN-BEGIN:|16-getter|2|
return textField;
}
COM: <s> returns an initiliazed instance of text field component </s>
|
funcom_train/6203364 | /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 (obj == null)
return false;
else {
MapRule that = (MapRule) obj;
return this.getPattern().equals(that.getPattern())
&& this.getLanguage().equals(that.getLanguage())
&& this.getRules().equals(that.getRules());
}
}
COM: <s> indicates whether some other map rule is equal to this one </s>
|
funcom_train/1533179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Complex multiply(double rhs) {
if (isNaN() || Double.isNaN(rhs)) {
return NaN;
}
if (Double.isInfinite(real) || Double.isInfinite(imaginary) ||
Double.isInfinite(rhs)) {
// we don't use Complex.isInfinite() to avoid testing for NaN again
return INF;
}
return createComplex(real * rhs, imaginary * rhs);
}
COM: <s> return the product of this complex number and the given scalar number </s>
|
funcom_train/18653886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testStatefulSessionBean() throws Exception {
String someState = "some state";
// create the bean
SampleStatefulService sampleStatefulService = statefulSampleServiceHome.create( someState);
// Call the bean and make sure that it returns the same state
String returnedState = sampleStatefulService.getSampleState();
assertEquals( someState, returnedState );
// remove the bean
sampleStatefulService.remove();
}
COM: <s> simple stateful session bean test </s>
|
funcom_train/5379811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireCheckStateChanged(final CheckStateChangedEvent event) {
Object[] array = checkStateListeners.getListeners();
for (int i = 0; i < array.length; i++) {
final ICheckStateListener l = (ICheckStateListener) array[i];
SafeRunnable.run(new SafeRunnable() {
public void run() {
l.checkStateChanged(event);
}
});
}
}
COM: <s> notifies any check state listeners that a check state changed has been received </s>
|
funcom_train/46741403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTermTypeRef(DisplayModel termTypeRef) {
if (Converter.isDifferent(this.termTypeRef, termTypeRef)) {
DisplayModel oldtermTypeRef= new DisplayModel(this);
oldtermTypeRef.copyAllFrom(this.termTypeRef);
this.termTypeRef.copyAllFrom(termTypeRef);
setModified("termTypeRef");
firePropertyChange(String.valueOf(APPLICATIONCONTROLCOLUMNS_TERMTYPEREFID), oldtermTypeRef, termTypeRef);
}
}
COM: <s> term search term type </s>
|
funcom_train/18186066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDate() {
DateFormat timeFormat = DateFormat.getTimeInstance(DateFormat.SHORT,
threadLocale.getLocale());
DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT,
threadLocale.getLocale());
final Date date = getObject().getDate();
return String.format("%s %s", dateFormat.format(date), timeFormat.format(date));
}
COM: <s> returns the bookmark date as a formatted string </s>
|
funcom_train/47148973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearToolTip() {
if (getToolTipText() != null) {
setToolTipText(null);
/* According to javadoc for JComponent calling
* setToolTipText(null) should be enough to
* clear the tool tip, but at least for
* 1.4.2-b28 that is not sufficient... */
setToolTipLocation(null);
}
}
COM: <s> call this to ensure that the tool tip is no longer shown </s>
|
funcom_train/48021749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String str = null;
str = "Host : " + this.host + "\n" +
"Port : " + this.port + "\n" +
"AuthDN : " + this.authid + "\n" +
"AuthPW : " + this.authpw + "\n" +
"dn : " + this.dn;
return(str);
}
COM: <s> method that overrides the to string method of the core object class </s>
|
funcom_train/2697473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fillMenuBar(IMenuManager menuBar) {
createFileMenu(menuBar);
createEditMenu(menuBar);
/*
* This group defines an area where every extension
* may add their own top-level menus
*/
menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
createWindowMenu(menuBar);
}
COM: <s> this method fills menu bar with default top level menus and </s>
|
funcom_train/22603426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean authorize(String username, String operationName, boolean flushCache) throws AuthorizationException{
AuthorContext authorCtx = SecurityContextFactory.createAuthorContext(username, operationName);
authorize(authorCtx, flushCache);
if(AuthorResponseCode.AUTHORIZED== authorCtx.getAuthorResponse().getStatus())
return true;
else
return false;
}
COM: <s> convenient method to check authorization of username for the operation name </s>
|
funcom_train/21999657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExpressionResult getResult(Symbol symbol, TradingDateTime dateTime) {
// If we don't have that many results, just return an empty
// result. This will show up as an empty cell in the table
// and be sorted as so the result was 0.0.
ExpressionResult expressionResult = null;
if (results != null)
expressionResult = (ExpressionResult) results.get(symbol.toString()
+ dateTime.toString());
if (expressionResult == null)
expressionResult = ExpressionResult.EMPTY;
return expressionResult;
}
COM: <s> return the result of the expression for the given symbol on the given </s>
|
funcom_train/41299595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getLeftPanel() {
if (leftPanel == null) {
GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
gridBagConstraints4.fill = GridBagConstraints.BOTH;
gridBagConstraints4.weighty = 1.0;
gridBagConstraints4.weightx = 1.0;
leftPanel = new JPanel();
leftPanel.setLayout(new GridBagLayout());
leftPanel.setPreferredSize(new Dimension(180, 48));
leftPanel.add(getJTabbedPane1(), gridBagConstraints4);
}
return leftPanel;
}
COM: <s> this method initializes left panel </s>
|
funcom_train/49248816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ShortestPath getShortestPath(int nodeIndex) {
ShortestPath result = null;
int array[] = getClientListAsIntArray();
for (int i = 1; i < array.length; i++) {
ShortestPath sp = tsProblemRef.getShortestPath(array[i-1],array[i]);
if ( sp != null ) {
if ( sp.isNodeInPath(nodeIndex) ) {
result = tsProblemRef.getShortestPath(array[i-1],array[i]);
}
}
}
return result;
}
COM: <s> retrieves the shortest path that contains the node index </s>
|
funcom_train/17675436 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addInitStatics() {
StringBuffer buf = new StringBuffer();
buf.append("\tpublic static boolean initStatics(ModelMetaData jmd) {\n");
addInitStaticsBody(buf);
buf.append("\t\treturn true;\n");
buf.append("\t}");
spec.addMethod(buf.toString());
}
COM: <s> add method to fill in values of static fields from model meta data </s>
|
funcom_train/10797205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Collection<StateManagerImpl> states) {
if (_saved != null)
throw new IllegalStateException();
_saved = new HashMap<StateManagerImpl, SavepointFieldManager>((int) (states.size() * 1.33 + 1));
for (StateManagerImpl sm : states) {
_saved.put(sm, new SavepointFieldManager(sm, _copy));
}
}
COM: <s> set this savepoint saving any state for the passed in </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.