__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/48072840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate() throws ValidationException {
boolean valid = true;
for(IField field : this) {
if(field instanceof FieldGroup) {
((FieldGroup) field).validate();
}
else {
IValidator validator = field.getValidators();
if(validator != null) {
try {
validator.validate(field.getValue());
}
catch(ValidationException e) {
field.handleValidationFeedback(e);
valid = false;
}
}
}
}
if(validators != null) {
try {
validators.validate(null);
}
catch(ValidationException e) {
valid = false;
}
}
if(!valid) {
throw new ValidationException(descriptor() + " has errors.");
}
}
COM: <s> validates the current state of the field group </s>
|
funcom_train/29869873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getJSplitPane() {
if (jSplitPane == null) {
jSplitPane = new JSplitPane();
jSplitPane.setSize(new Dimension(423, 122));
jSplitPane.setTopComponent(getJSearchBasicPanel());
jSplitPane.setBottomComponent(getJSearchResultPanel());
jSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
jSplitPane.setDividerLocation(frame.getSettings().searchTabDivider);
jSplitPane.setResizeWeight(0.0);
}
return jSplitPane;
}
COM: <s> this method initializes j split pane </s>
|
funcom_train/13864737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CachedElementsList getListId(long listid) {
for (int i = 0; i< this.lists.size(); i++){
CachedElementsList temp = ((CachedElementsList) this.lists.elementAt(i));
if (temp.getListId() == listid) return temp;
}
return null;
}
COM: <s> returns the list with the given listid </s>
|
funcom_train/2958404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getPrevValue(int x) {
IStateBinaryTree.Node n = btree.prevNode(x);
if (n == null) {
return Integer.MIN_VALUE;
} else if (n.contains(x - 1)) {
return x - 1;
} else {
return n.getSup();
}
}
COM: <s> gets the previous value of x in this domain </s>
|
funcom_train/37518832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeInstructionHandles() {
// replace instruction handles by actual instructions
try {
AccessorTransformer transformer = new AccessorTransformer() {
public InstructionAccessor transform(InstructionAccessor accessor,
AccessorContainer container)
{
// the only accessors to resolve are instruction handles
return ((InstructionHandle)accessor).getInstruction();
}
};
codeInfo.transformAccessors(transformer);
} catch (BadAccessorException e) {
throw new RuntimeException(e.getMessage());
}
}
COM: <s> replaces handles by associated instructions </s>
|
funcom_train/48407265 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addElementsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MaturityElementLevel_elements_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MaturityElementLevel_elements_feature", "_UI_MaturityElementLevel_type"),
SpemxtcompletePackage.eINSTANCE.getMaturityElementLevel_Elements(),
false,
false,
false,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the elements feature </s>
|
funcom_train/48408498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOwnedMemberPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Namespace_ownedMember_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Namespace_ownedMember_feature", "_UI_Namespace_type"),
SpemxtmethodPackage.Literals.NAMESPACE__OWNED_MEMBER,
false,
false,
false,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the owned member feature </s>
|
funcom_train/38520056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MappingCondition createCondition(Element elem) {
return new MappingCondition(
elem.getAttributeNS(MappingProcessor.MAPPING_NS, MappingTags.TEMPLATE_NAME),
elem.getAttributeNS(MappingProcessor.MAPPING_NS, MappingTags.SQL_WHERE_STRING),
elem.getAttributeNS(MappingProcessor.MAPPING_NS, MappingTags.SQL_TABLE_STRING),
elem.getAttributeNS(MappingProcessor.MAPPING_NS, MappingTags.COMMENT));
}
COM: <s> creates a mapping condition object from xml element mmm class condition </s>
|
funcom_train/46742620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInitScript(String initScript) {
if (Converter.isDifferent(this.initScript, initScript)) {
String oldinitScript= null;
oldinitScript = this.initScript;
this.initScript = initScript;
setModified("initScript");
firePropertyChange(String.valueOf(APPLICATIONCONTROLLOGS_INITSCRIPT), oldinitScript, initScript);
}
}
COM: <s> javascript executed when the control is first initialized </s>
|
funcom_train/8177161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void highlight(JGraph graph, CellView cellView) {
if (cellView != null) {
highlight.setBounds(getHighlightBounds(graph, cellView));
if (highlight.getParent() == null) {
graph.add(highlight);
highlight.setVisible(true);
}
} else {
if (highlight.getParent() != null) {
highlight.setVisible(false);
highlight.getParent().remove(highlight);
}
}
}
COM: <s> highlights the given cell view or removes the highlight if no cell </s>
|
funcom_train/38725474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayMessage(String msg, boolean modal) {
//get something to paint the display message dialog
Component display = modal ? gui : new JFrame("Empty Frame for Exceptions display");
//and present it to the user
JOptionPane.showMessageDialog(
display, msg, "Just to let you know", JOptionPane.INFORMATION_MESSAGE);
}
COM: <s> displays a given message to the user </s>
|
funcom_train/37764586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
HAPartition haPartition = findHAPartition();
if (haPartition != null) {
if (log.isDebugEnabled())
log.debug("Unregistering this MBean from the HAPartition");
haPartition.unregisterRPCHandler(SERVICE_NAME, this);
}
if (log.isDebugEnabled())
log.debug("MBean stopped");
}
COM: <s> jboss invokes this method before stopping the service </s>
|
funcom_train/17387686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void userRemoved(String username, String oldFlags) {
Enumeration<UserDatabasePlugin> e = userDatabasePlugins.elements();
while (e.hasMoreElements()) {
UserDatabasePlugin plugin = (UserDatabasePlugin) e.nextElement();
((UserDatabaseCallback) plugin.getCallback()).userAdded(username,
oldFlags, plugin.getData());
}
}
COM: <s> a user who was in the database before was removed </s>
|
funcom_train/46859093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Tile nextTile() {
Tile t = null;
if (row <= totalSquareRows) {
t = tileMap[col][row];
col++; // 1 col to the right
if (col > totalSquareCols || col >= cols) { // Reached Last Column
col = startTile.getCol(); // Reset Col
row++; // Next Row
}
}
return t;
}
COM: <s> obtains the next tile </s>
|
funcom_train/42069750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initList() {
// Create the header row.
sensorListTable.setText(0, 0, "#");
sensorListTable.setText(0, 1, "SID");
sensorListTable.setText(0, 2, "Address");
sensorListTable.getRowFormatter().setStyleName(0, "sensor-List-header");
update();
}
COM: <s> initialize the flex table for the sensor list </s>
|
funcom_train/11674519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void finish() throws IOException {
if (this.pagePending) {
closePage();
}
//Finish document
gen.writeDSCComment(DSCConstants.TRAILER);
gen.writeDSCComment(DSCConstants.PAGES, new Integer(this.pagecount));
gen.writeDSCComment(DSCConstants.EOF);
gen.flush();
}
COM: <s> the rendering process has finished </s>
|
funcom_train/40675158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEntityAbsenceToCache(OnestoreEntity.Reference key) {
ByteString keyBytes = key.toByteString();
if (getCache.containsKey(keyBytes)) {
throw new IllegalStateException("shouldn't load the same entity twice within a transaction");
}
getCache.put(keyBytes, (OnestoreEntity.EntityProto) null);
}
COM: <s> caches the absence of an entity according to the datastore </s>
|
funcom_train/46470945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTexture(Texture t) {
this.tex = t;
if (this.tex instanceof Editable) {
this.props = new ColorProducer[((Editable)this.tex).getInputPropertyValues().length];
for (int i = 0; i < this.props.length; i++) {
this.props[i] = (ColorProducer)((Editable)this.tex).getInputPropertyValues()[i];
}
}
}
COM: <s> sets the texture object used by this texture shader object </s>
|
funcom_train/35861693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void stopSystem() {
try {
if( karaIMService != null )
karaIMService.stopSystem();
} catch (DeadObjectException e) {
LogFunctions.log( "KaraIm.setStatus", "Exception", e.getMessage() );
LogFunctions.log( "KaraIm.setStatus", "Exception", e.getStackTrace() );
}
}
COM: <s> stop the complete system </s>
|
funcom_train/15606115 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void disableAll() {
orf1CB.setEnabled(false);
orf2CB.setEnabled(false);
orf3CB.setEnabled(false);
orfNeg1CB.setEnabled(false);
orfNeg2CB.setEnabled(false);
orfNeg3CB.setEnabled(false);
complementCB.setEnabled(false);
oneLetterRB.setEnabled(false);
threeLetterRB.setEnabled(false);
}
COM: <s> disables all checkboxes and buttons </s>
|
funcom_train/22174985 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RenderableView getView(ExecutionContext context, Id viewId) {
/*
HibernateTemplate template = getHibernateSupport().getHibernateTemplate();
return (RenderableView) template.execute(
new HibernateCallback () {
public Object doInHibernate(Session session) throws HibernateException {
return session.createQuery("from Views where id = ?")
.setInteger(0, 1)
.uniqueResult();
}
});
*/
return new RenderableViewImpl();
}
COM: <s> given a context and a view id return the metadata defining the view </s>
|
funcom_train/13866322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeItem(MenuItem item) {
// Unselect if the item is currently selected
if (selectedItem == item) {
selectItem(null);
}
if (removeItemElement(item)) {
setItemColSpan(item, 1);
items.remove(item);
item.setParentMenu(null);
}
}
COM: <s> removes the specified menu item from the bar </s>
|
funcom_train/28347543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void findMinMax(){
if( showValue ) gd_val.findMinMax();
if( showRef ) gd_ref.findMinMax();
if( showDif ) gd_dif.findMinMax();
if( showValueChart ) gd_val_chart.findMinMax();
if( showRefChart ) gd_ref_chart.findMinMax();
if( showDifChart ) gd_dif_chart.findMinMax();
}
COM: <s> finds min and max for all graph data </s>
|
funcom_train/3890943 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /* protected void addNewComponent(DataComponent parent, DataComponent child) {
parent.addChild(child);
child.setDefaults();
getDataModel().fireDataComponentAdded(child);
getDataModel().setDirty(true);
expandToLevel(parent, 1);
}*/
COM: <s> add new child component and notify </s>
|
funcom_train/20615583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected TransactionalEditingDomain createEditingDomain() {
String editingDomainID = getEditingDomainID();
if (editingDomainID != null) {
TransactionalEditingDomain editingDomain = TransactionalEditingDomain.Registry.INSTANCE
.getEditingDomain(editingDomainID);
if (editingDomain != null) {
return editingDomain;
}
}
return DiagramEditingDomainFactory.getInstance().createEditingDomain();
}
COM: <s> gets an editing domain from the editing domain registry using the id </s>
|
funcom_train/50141449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireAuthenticationEvent(String uid, boolean loginFailed) {
Iterator iter = listeners.iterator();
while (iter.hasNext()) {
IAuthenticatorListener l = (IAuthenticatorListener) iter.next();
if (loginFailed) {
l.loginFailed(uid);
} else {
l.loginSuccess(uid);
}
}
}
COM: <s> method used to fire a authenticator manager event to all registered </s>
|
funcom_train/28750918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setControl(Long newVal) {
if ((newVal != null && this.control != null && (newVal.compareTo(this.control) == 0)) ||
(newVal == null && this.control == null && control_is_initialized)) {
return;
}
this.control = newVal;
control_is_modified = true;
control_is_initialized = true;
}
COM: <s> setter method for control </s>
|
funcom_train/4917979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIncludeDir() throws Exception {
// Obtain path to directory
final File DIR = this.findFile(this.getClass(), "DirArtifact/Test.txt")
.getParentFile();
// Obtain class path
String[] classPath = this.classPathFactory.createArtifactClassPath(DIR
.getCanonicalPath());
// Ensure directory on class path with no warnings
assertClassPath(classPath, DIR);
}
COM: <s> ensure can include a directory in class path </s>
|
funcom_train/50274573 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean confirm(String message) {
int retValue = JOptionPane.showConfirmDialog(browserFrame.getHtmlPanel(), message, "Web Page Content: JavaScript Confirm", JOptionPane.YES_NO_OPTION);
return retValue == JOptionPane.YES_OPTION;
}
COM: <s> opens a simple confirmation window </s>
|
funcom_train/15907749 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Color readNextColor() throws IOException {
int[] rgb = readNextTupel();
if (rgb == null)
return null;
if (mode == ColorMode.TRUECOLOR32BIT) {
return new Color(rgb[RED], rgb[GREEN], rgb[BLUE], rgb[ALPHA]);
}
return new Color(rgb[RED], rgb[GREEN], rgb[BLUE]);
}
COM: <s> read and interprete the next color in stream </s>
|
funcom_train/10204885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addManyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MTypedElement_many_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MTypedElement_many_feature", "_UI_MTypedElement_type"),
ClassDiagramPackage.Literals.MTYPED_ELEMENT__MANY,
false,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the many feature </s>
|
funcom_train/22578261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTab() {
try {
Map<String, Double> tagCloud = new TreeMap<String, Double>();
tagCloud.put("This string has a \t in it", 0d);
new TagCloudException(null, null, tagCloud);
fail("Should have thrown an exception by now");
} catch (IllegalArgumentException ex) {
assertTrue(true);
}
}
COM: <s> make sure tag cant contain a tab </s>
|
funcom_train/17269342 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testActivate() {
System.out.println("activate");
Editor instance = eam.getActiveEditor();
//1.test activate active editor
instance.activate();
assertTrue(instance.isEnabled());
//2.test activate inactive editor
instance.deactivate();
instance.activate();
assertTrue(instance.isEnabled());
}
COM: <s> t c ed 1 </s>
|
funcom_train/1210278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createResource() throws IOException {
final String tmpFile = dir + '/' + Utils.DATA_FOLDER + '/'
+ Utils.LANGUAGE_FILE;
printDebug("Creating resource file (translations) for EBookME: "
+ tmpFile);
FileOutputStream tmpOS = new FileOutputStream(tmpFile);
ResourceProvider.getInstance().createMEResources(tmpOS);
tmpOS.flush();
tmpOS.close();
}
COM: <s> creates resource file translations for ebook me </s>
|
funcom_train/3785441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getImageForDisplayInput()
{ /* getImageForDisplayInput */
Image img= (this.bcImg!=null)
? this.bcImg
: ((zImg!=null)
? this.zImg
: ((flk.allowXformFlag && this.oImg!=null)
? this.oImg
: this.iImg));
return(img);
} /* getImageForDisplayInput */
COM: <s> get image for display input get image for input to display painting </s>
|
funcom_train/37576942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRow(String[] r) {
String[] row = new String[r.length];
// System.arraycopy(r, 0, row, 0, r.length);
for (int i = 0; i < r.length; i++) {
row[i] = r[i];
if (row[i] == null) {
row[i] = "(null)";
}
}
rows.addElement(row);
}
COM: <s> append a tuple to the end of the table </s>
|
funcom_train/9371766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getStringInfo(String property) {
Object value = super.get(property);
if (value == null) {
return STRING_NOT_SET;
}
if (value == NULL_STRING) {
return STRING_NULL;
} else if (value instanceof String) {
return STRING_SET;
}
return STRING_TYPE_MISMATCH;
}
COM: <s> provides string type information about a property </s>
|
funcom_train/2414741 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTurnRight() throws Exception {
//cycle through all directions
Direction dir = Direction.UP;
dir = dir.turnRight();
assertEquals(Direction.RIGHT, dir);
dir = dir.turnRight();
assertEquals(Direction.DOWN, dir);
dir = dir.turnRight();
assertEquals(Direction.LEFT, dir);
dir = dir.turnRight();
assertEquals(Direction.UP, dir);
}
COM: <s> tests to ensure turn right in all directions </s>
|
funcom_train/25915401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Intent intentForPosition(int position) {
position -= getIntentStartIndex();
if (mList == null || position < 0) {
return null;
}
Intent intent = new Intent(
position >= mRealListStart ? mIntent : mOrigIntent);
ActivityInfo ai = mList.get(position).activityInfo;
intent.setComponent(new ComponentName(
ai.applicationInfo.packageName, ai.name));
return intent;
}
COM: <s> returns the intent corresponding to the given position or null </s>
|
funcom_train/20078143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void searchArtists(){
artists = null;
logger.info("Searching artists by Name");
NameValuePair[] parameters = new NameValuePair[2];
parameters[0] = new NameValuePair("name",artistToSearch);
parameters[1] = new NameValuePair("order","rating-count");
String result = executeQueryXQL("artistsQueryByName.xql",parameters);
if (result != null){
Element artistsElement = stringToXml(result);
if (artistsElement!=null){
logger.info("Artists are contained in" + artistsElement);
artists = ArtistsParser.parse(artistsElement);
return;
}
}
artists = null;
}
COM: <s> search albums by artist to search property </s>
|
funcom_train/4286511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addScaledValuePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ScaledValue_scaledValue_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ScaledValue_scaledValue_feature", "_UI_ScaledValue_type"),
OrmUsageProfilePackage.Literals.SCALED_VALUE__SCALED_VALUE,
false,
false,
false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the scaled value feature </s>
|
funcom_train/9726899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refreshTable(Map table, Map converter) {
Iterator i = table.keySet().iterator();
Object key, value, newvalue;
while (i.hasNext()) {
key = i.next();
value = table.get(key);
newvalue = converter.get(value);
if (newvalue != null)
table.put(key, newvalue);
}
}
COM: <s> change a mapping of parameter names to values to ensure that the values </s>
|
funcom_train/29517499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void incRFC(String className, String methodName, Type[] arguments) {
String argumentList = Arrays.asList(arguments).toString();
// remove [ ] chars from begin and end
String args = argumentList.substring(1, argumentList.length() - 1);
String signature = className + "." + methodName + "(" + args + ")";
responseSet.add(signature);
}
COM: <s> called when encountering a method that should be included in the </s>
|
funcom_train/51107159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPrefetch5() throws Exception {
createTestData("testPaintings");
SelectQuery q = new SelectQuery("Painting");
q.andQualifier(ExpressionFactory.matchDbExp("toArtist.ARTIST_NAME", "artist2"));
q.addPrefetch("toArtist");
List results = context.performQuery(q);
assertEquals(1, results.size());
}
COM: <s> test prefetching with queries using db path </s>
|
funcom_train/20118815 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void openTransaction() throws NewtException {
try {
openDBHandler();
getContext().setTransactionHandler(getOpenedDBHandler());
getContext().getTransactionHandler().startTransaction();
}
catch (NewtException e) {
getContext().setDebug(_saveDebug);
throw new NewtException(this, e);
}
}
COM: <s> opens transaction handler that will be used by descendant newts </s>
|
funcom_train/40334846 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getConfWavSecOrderMoment(double z) {
double secMoment;
double part1, part2;
part1 = Math.exp(4 * rho + 4 * (Math.pow(gamma, 2)));
part2 = Math.pow((alpha + 1) / (alpha + 0.5), 2);
secMoment = part1 * part2 - 2 * z;
return secMoment;
}
COM: <s> calculation of second order moments of wavelet coefficients </s>
|
funcom_train/50962812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toStringFlattened() {
Term tt = getTerm();
if (name != null) {
if (tt == this) {
return completeName.toString();
} else {
return tt.toString();
}
} else {
if (tt == this) {
return ANY + hashCode();
} else {
return tt.toString();
}
}
}
COM: <s> gets the string representation of this variable providing </s>
|
funcom_train/37451063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Collection getCollections(Object obj) {
Collection result = new ArrayList();
Field[] fields = this.getAllFields(obj);
for (int i=0; i < fields.length; i++) {
Class type = fields[i].getType();
if(Collection.class.isAssignableFrom(type)) {
result.add(fields[i]);
}
}
return result;
}
COM: <s> obtain all the collection fields of an object </s>
|
funcom_train/35660180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDeleteAuthors() throws Exception {
String key = System.currentTimeMillis() + "-animesh";
// save new author
Author animesh = createAuthor(key, "animesh@animesh.org", "India", new Date());
manager.persist(animesh);
// delete this author
manager.remove(animesh);
// check if deleted?
Author animesh_db = manager.find(Author.class, key);
assertEquals(null, animesh_db);
}
COM: <s> test delete authors </s>
|
funcom_train/31806179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void goToNext() {
try {
if (atLastDestination()) {
onTermination();
return;
}
URL address = new URL((String)hosts.elementAt(index));
aglet.dispatch(address);
} catch (ServerNotFoundException ex) {
handleTripException(ex);
tryNext();
} catch (Exception ex) {
handleTripException(ex);
// } catch (Error ex) {
// if (ex instanceof ThreadDeath == false) {
// handleTripException(ex);
// }
}
}
COM: <s> go to the next address and perform the next task </s>
|
funcom_train/43852517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte readByte() {
if(pos >= size) {
try {
pos = 0;
len += size;
size = in.read(buffer);
if(size <= 0) return 0;
} catch(final IOException ex) {
ex.printStackTrace();
}
}
return buffer[pos++];
}
COM: <s> returns the next byte </s>
|
funcom_train/20611017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Response addNode(Node n, String ns) {
/* make sure we set proper namespace for all nodes
* which must be 'jabber:client'
*/
try {
if (!((Element) n).getAttribute("xmlns").equals(ns))
((Element) n).setAttribute("xmlns",ns);
} catch (ClassCastException e) { /* ? skip! */ }
this.body.appendChild(this.doc.importNode(n,true));
return this;
}
COM: <s> adds node as child of replies body element </s>
|
funcom_train/18088186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String readResult(URLConnection conn) throws IOException {
BufferedReader rd = null;
StringBuilder sb = new StringBuilder();
try {
rd = new BufferedReader(
new InputStreamReader(conn.getInputStream()));
String line;
while ((line = rd.readLine()) != null) {
sb.append(line + '\n');
}
} finally {
if (rd != null) {
try {
rd.close();
} catch (IOException e) {
// ignore
}
}
}
return sb.toString();
}
COM: <s> read from an urlconnection the result of the http request </s>
|
funcom_train/49601737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSequence() {
// According to ITU-T X.690: if bit 6 in the first of two bytes
// is 0 then the encoding is 'primitive'.
// Note: this doesn't work here because REQ_AUTHENTICATION has a value of 0x67!
//return ((value >>> 8) & 0x20) != 0;
return isSequence;
}
COM: <s> returns flag indicating if this field is a sequence </s>
|
funcom_train/37449944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Experiment addYearAnnotation(ExperimentAutoFill expAutoFiller, Experiment experiment){
Annotation annotation;
try{
annotation = new Annotation(GeneratorHelper.getOwner(), GeneratorHelper.getPublicationYear(),Integer.toString(expAutoFiller.getYear()));
}catch (IntactException e) {
//TODO add in log "could not add"
return experiment;
}
experiment.addAnnotation(annotation);
return experiment;
}
COM: <s> create and add the publication year annotation to the experiment </s>
|
funcom_train/18586881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isJapaneseAirBaseAt(Coordinate c) {
java.util.Enumeration e = this.japaneseAirBases.keys();
while (e.hasMoreElements()) {
if (c.equals((Coordinate)e.nextElement())) {
return true;
}
}
return false;
// return japaneseAirBases.containsKey(c);
}
COM: <s> tests whether there is a japanese air base at a coordinate </s>
|
funcom_train/20893659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void splash(){
initImageAndTracker();
setSize(fImage.getWidth(null), fImage.getHeight(null));
center();
fMediaTracker.addImage(fImage, 0);
try {
fMediaTracker.waitForID(0);
}
catch(InterruptedException ie){
System.out.println(Messages.getString("SplashScreen.1")); //$NON-NLS-1$
}
new SplashWindow(this,fImage);
}
COM: <s> show the splash screen to the end user </s>
|
funcom_train/7589600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String result = "Grid\n";
for (int obj = 0; obj < objectives_; obj++){
result += "Objective " + obj + " " + lowerLimits_[obj] + " "
+ upperLimits_[obj]+"\n";
} // for
return result;
} // toString
COM: <s> retunrns a string representing the grid </s>
|
funcom_train/2615042 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void CheckInput(long elapsedTime) {
if (inputManager.enter.isPressed()) {
isRunning = false;
}
if (inputManager.moveLeft.isPressed()) {
midiPlayer.setPaused(false);
}
if (inputManager.moveRight.isPressed()) {
midiPlayer.setPaused(true);
}
}
COM: <s> checks for user inputs </s>
|
funcom_train/9203707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void renderRay(GL2 gl, Ray ray, double length) {
// get the ray attributes (world coordinates)
Vector2 s = ray.getStart();
Vector2 d = ray.getDirection();
double l = length > 0.0 ? length : 10000.0;
// draw the line from the start to the end, along d, l distance
gl.glBegin(GL.GL_LINES);
gl.glVertex2d(s.x, s.y);
gl.glVertex2d(s.x + d.x * l, s.y + d.y * l);
gl.glEnd();
}
COM: <s> renders the given ray to the given graphics object </s>
|
funcom_train/44459380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testElementFormatter() throws Exception {
String xml = "<test/>";
Element test = ElementFormatter.parse(xml);
assertEquals(0, test.getChildNodes().getLength());
String backToXML = ElementFormatter.format(test);
assertTrue(backToXML.equals("<test/>") || backToXML.equals("<test></test>"));
}
COM: <s> tests the code element formatter code class </s>
|
funcom_train/35842910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateListeners(Object oldOwner, Object newOwner) {
Set<Object[]> l = new HashSet<Object[]>();
if (newOwner != null) {
l.add(new Object[] {newOwner, "remove"});
}
updateElementListeners(l);
}
COM: <s> implementations of this method should register unregister the fig for all </s>
|
funcom_train/28755677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSynthesistypeid(Long newVal) {
if ((newVal != null && this.synthesistypeid != null && (newVal.compareTo(this.synthesistypeid) == 0)) ||
(newVal == null && this.synthesistypeid == null && synthesistypeid_is_initialized)) {
return;
}
this.synthesistypeid = newVal;
synthesistypeid_is_modified = true;
synthesistypeid_is_initialized = true;
}
COM: <s> setter method for synthesistypeid </s>
|
funcom_train/41594802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addScopePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_StrucDocTd_scope_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_StrucDocTd_scope_feature", "_UI_StrucDocTd_type"),
V3Package.eINSTANCE.getStrucDocTd_Scope(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the scope feature </s>
|
funcom_train/50116234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g) {
Dimension d = getSize();
int w = d.width - 1;
int h = d.height - 1;
int aw = h / 2;
int ah = h / 2;
if (getFillColor() != null) {
g.setColor(getFillColor());
g.drawRoundRect(0, 0, w, h, aw, ah);
}
g.setColor(getLineColor());
g.drawRoundRect(0, 0, w, h, aw, ah);
g.setColor(getForeground());
super.paint(g);
}
COM: <s> paints this component </s>
|
funcom_train/17966435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double calculateExtendedHeight(final double height) {
double result = height;
if (this.type == ABSOLUTE) {
result = result + this.top + this.bottom;
}
else if (this.type == RELATIVE) {
result = result + (this.top * height) + (this.bottom * height);
}
return result;
}
COM: <s> calculates the extended height after adding the top and bottom spacing </s>
|
funcom_train/48713367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initGameView(){
// This is used in mouse handling
displaySize.setSize(getWidth(), getHeight());
// Create off-screen buffer same size as this component
sbuff = new ScreenBuffer(this, false);
// Using the actual display size of this control update all
// the game models so that they are as big as can be viewed
GameModelManager.initGameZoomFactor(displaySize);
}
COM: <s> must not be called before this control has been initialised </s>
|
funcom_train/35846953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getThemeClassNameFromArg(String arg) {
if (arg.equalsIgnoreCase("-big")) {
return BIG_THEME.getClass().getName();
} else if (arg.equalsIgnoreCase("-huge")) {
return HUGE_THEME.getClass().getName();
}
return null;
}
COM: <s> detecting the theme from the command line </s>
|
funcom_train/25470713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel() {
if (jPanel == null) {
jPanel = new JPanel();
jPanel.setLayout(null);
jPanel.setPreferredSize(new Dimension(200, 130));
jPanel.add(getJButton(), null);
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/3284768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBanForUser (String u, boolean on) {
if (!this.isValid())
return;
String uname = u.toLowerCase();
if (on && !banList.contains (uname))
banList.addElement (uname);
else if (!on)
banList.removeElement (uname);
}
COM: <s> set the group ban state for a user </s>
|
funcom_train/38258861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DTNode getChildNodeBySym(int sym){
for(int i=0;i<childNodes.size();i++)
if (((DTNode)childNodes.get(i)).symbol==sym)
return (DTNode)this.childNodes.get(i);
return null;
}
COM: <s> return the child node with the symbol sym </s>
|
funcom_train/10587978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getHttpServletResponseStatus(AxisFault af) {
// This will raise a 401 for both "Unauthenticated" & "Unauthorized"...
return af.getFaultCode().getLocalPart().startsWith("Server.Unauth")
? HttpServletResponse.SC_UNAUTHORIZED
: HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
}
COM: <s> extract information from axis fault and map it to a http status code </s>
|
funcom_train/35301189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setClob (int parameterIndex, Clob x) throws SQLException {
checkParamIndex(parameterIndex);
if(params == null){
throw new SQLException("Set initParams() before setClob");
}
params.put(Integer.valueOf(parameterIndex - 1), new SerialClob(x));
}
COM: <s> sets the designated parameter to the given code clob code object in </s>
|
funcom_train/23834987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getClinicalhistory() {
if (PathReports_Type.featOkTst && ((PathReports_Type)jcasType).casFeat_clinicalhistory == null)
jcasType.jcas.throwFeatMissing("clinicalhistory", "org.apache.uima.PathReports");
return jcasType.ll_cas.ll_getStringValue(addr, ((PathReports_Type)jcasType).casFeatCode_clinicalhistory);}
COM: <s> getter for clinicalhistory gets </s>
|
funcom_train/41837698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasService(String serviceID) {
boolean result = false;
Iterator<Service> i = services.iterator();
while (i.hasNext()) {
Service service = i.next();
if (service.getID().trim().equals(serviceID.trim())) result = true;
}
return result;
}
COM: <s> checks if a service that has the given service id exists </s>
|
funcom_train/42739778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WeightedOntoDescription getUndisputed() {
WeightedOntoDescription result = new WeightedOntoDescription(
oliaOntology);
double maxConfidence = 0;
for (Map.Entry<String, Double> entry : this.description2confidence
.entrySet()) {
double conf = entry.getValue().doubleValue();
if (conf > maxConfidence) {
result = new WeightedOntoDescription(oliaOntology);
maxConfidence = conf;
}
if (conf == maxConfidence) {
result.addWithoutConsistencyCheck(entry.getKey(), conf);
}
}
return result;
}
COM: <s> returns all descriptions with maximal confidence those confirmed by </s>
|
funcom_train/14630201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int close(int fd) throws IOException, java.io.FileNotFoundException {
edumips64.Main.logger.debug("call to close() with fd = " + fd);
int ret = -1;
boolean in = ins.containsKey(fd);
boolean out = outs.containsKey(fd);
if(in) {
edumips64.Main.logger.debug("found open input stream");
Reader r = ins.get(fd);
r.close();
ins.remove(fd);
ret = 0;
}
if(out) {
edumips64.Main.logger.debug("found open output stream");
Writer w = outs.get(fd);
w.close();
outs.remove(fd);
ret = 0;
}
return ret;
}
COM: <s> closes the specified file descriptor </s>
|
funcom_train/45750194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUpperPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MultiplicityElement_upper_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MultiplicityElement_upper_feature", "_UI_MultiplicityElement_type"),
OntoUMLPackage.Literals.MULTIPLICITY_ELEMENT__UPPER,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the upper feature </s>
|
funcom_train/17930361 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireSelectionChanged () {
SelectionPanelEvent event = new SelectionPanelEvent(this, getFilters());
Object[] listeners = listenerList.getListenerList();
for (int i = 0; i < listeners.length; i += 2)
if (listeners[i] == SelectionPanelListener.class)
((SelectionPanelListener)listeners[i + 1]).selectionChanged(event);
}
COM: <s> called when sth was changed in filter panel </s>
|
funcom_train/20885006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLength() {
ValidatorTestUtil.check(XML, new LengthDTO("ab"), INVALID);
ValidatorTestUtil.check(XML, new LengthDTO("abcd"), INVALID);
ValidatorTestUtil.check(XML, new LengthDTO("abc"), VALID);
}
COM: <s> tests the constraint length </s>
|
funcom_train/1226186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getContainerDirectory(final String dir) {
final StringBuilder fullPath = new StringBuilder();
fullPath.append(this.containerHome);
fullPath.append(dir);
final String path = fullPath.toString();
final File directory = new File(path);
if (!directory.exists()) {
final String msg = dir + " directory does not excist! : " + path;
if (log.isErrorEnabled()) {
log.error(msg);
}
throw new ConfigurationException(msg);
}
return path;
}
COM: <s> constructs the full path to a specific directory from the configuration </s>
|
funcom_train/10798264 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isLRS(long start, long end) {
long range = end - start;
return _fc.getFetchBatchSize() >= 0
&& !(range <= _fc.getFetchBatchSize()
|| (_fc.getFetchBatchSize() == 0 && range <= 50));
}
COM: <s> return whether this should be treated as a potential large result set </s>
|
funcom_train/18876574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearElementsList(String key) throws XPathExpressionException {
NodeList nl;
XPath xpath = XPathFactory.newInstance().newXPath();
if (key!=null){
nl = (NodeList) xpath.evaluate(key, xmlDocument,
XPathConstants.NODESET);
for (int i = 0; i < nl.getLength(); i++) {
xmlDocument.removeChild(nl.item(i));
}
}
}
COM: <s> remove in the xml document a list of elements with the xpath search </s>
|
funcom_train/15452796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumberOfAnswers(){
Iterator itOptions = getOptions().iterator();
int numberOfAnswers = 0;
while (itOptions.hasNext()) {
Option option = (Option) itOptions.next();
numberOfAnswers += option.getNumberOfAnswers();
}
return numberOfAnswers;
}
COM: <s> calculates polls number of answers </s>
|
funcom_train/12079352 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void pop(char c) throws IOException {
if (this.top <= 0 || this.stack[this.top - 1] != c) {
throw new IOException("Nesting error.");
}
this.top -= 1;
this.mode = this.top == 0 ? 'd' : this.stack[this.top - 1];
}
COM: <s> pop an array or object scope </s>
|
funcom_train/2948722 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
String src = ((java.awt.Component) e.getSource()).getName();
if ("okButton".equals(src)) { //$NON-NLS-1$
if (list.getSelectedIndex() != -1) {
chosen = (DrawingTemplate) list.getSelectedValue();
}
setVisible(false);
}
else if ("cancelButton".equals(src)) { //$NON-NLS-1$
chosen = null;
setVisible(false);
}
}
COM: <s> listens for action events </s>
|
funcom_train/45541760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sessionStarted() {
List descriptors= new ArrayList(fRegistry.getProposalComputerDescriptors());
for (Iterator it= descriptors.iterator(); it.hasNext();) {
CompletionProposalComputerDescriptor desc= (CompletionProposalComputerDescriptor) it.next();
if (desc.getCategory() == this)
desc.sessionStarted();
if (fLastError == null)
fLastError= desc.getErrorMessage();
}
}
COM: <s> notifies the computers in this category of a proposal computation session start </s>
|
funcom_train/15925989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectionChanged(IAction action, ISelection selection) {
if (selection instanceof IStructuredSelection) {
IStructuredSelection ss= (IStructuredSelection) selection;
Object first= ss.getFirstElement();
if (first instanceof IProject) {
fProject= (IProject) first;
} else if (first instanceof IJavaProject) {
fProject= ((IJavaProject) first).getProject();
}
}
}
COM: <s> selection in the workbench has been changed </s>
|
funcom_train/41139465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Capabilities getCapabilities() {
Capabilities result = super.getCapabilities();
// attributes
result.enable(Capability.NOMINAL_ATTRIBUTES);
result.enable(Capability.NUMERIC_ATTRIBUTES);
result.enable(Capability.DATE_ATTRIBUTES);
result.enable(Capability.MISSING_VALUES);
// class
result.enable(Capability.NOMINAL_CLASS);
result.enable(Capability.MISSING_CLASS_VALUES);
return result;
}
COM: <s> returns the capabilities of this evaluator </s>
|
funcom_train/14616444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runTest() throws IOException {
Template cTemplate;
StringWriter cWriter = new StringWriter();
cTemplate = TemplateFactory.INSTANCE.createFromString(m_aTemplateText);
//System.out.println( cTemplate.toString() );
// Process the template.
cTemplate.process(modelRoot, cWriter);
showTestResults( m_aReferenceText, cWriter.toString() );
}
COM: <s> performs the test </s>
|
funcom_train/46463498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Complexity getAccumlatedCCNForSingleFile(File file) {
Javancss javancss = new Javancss(file.getAbsolutePath());
List methodComplexities = javancss.getMethodComplexities();
if (methodComplexities.size() <= 0)
return ZERO_COMPLEXITY;
int ccnAccumulator = 0;
Iterator iter = methodComplexities.iterator();
while (iter.hasNext())
{
ccnAccumulator += ((Integer)iter.next()).intValue();
}
return new Complexity( ccnAccumulator, methodComplexities.size());
}
COM: <s> calculates the code complexity number for single source file </s>
|
funcom_train/20874683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(String seq) {
for (int i = 0; i < iCnt.length; i++)
iCnt[i] = 0;
for (int i = 0; i < iSequence.length; i++) {
iSequence[i] = (seq.charAt(i) - 'A');
iCnt[iSequence[i]]++;
}
}
COM: <s> set the sequence from a string representation a </s>
|
funcom_train/34421129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Entity getDetachedEntity() {
ItemCollection ic = implodeEntity();
Entity localEntity = new Entity();
localEntity.setData(ic);
localEntity.setId(activeEntity.getId());
localEntity.setCreated(activeEntity.getCreated());
localEntity.setModified(activeEntity.getModified());
try {
// Add $isauthor true/false
localEntity.getData().replaceItemValue("$isauthor",
checkWriteAccess());
} catch (Exception e) {
setError_Message(e.getMessage());
e.printStackTrace();
}
return localEntity;
}
COM: <s> this method returns a detached entity from the current active entity </s>
|
funcom_train/51523513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConsequents(final int index, final Consequent newConsequents) {
Consequent oldValue = consequents.get(index);
consequents.set(index, newConsequents);
if ((oldValue != null) && !oldValue.equals(newConsequents)) {
propertyChangeSupport.firePropertyChange(CONSEQUENTS_PROPERTY,
null, consequents.toArray());
}
}
COM: <s> replaces a consequent of this rule </s>
|
funcom_train/3114070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private GraphicalObjectCollection handleDepth(int depth) {
//// 1. If depth is DEEP, then flatten the current group (ie this).
//// Otherwise, if SHALLOW, keep it as is.
GraphicalObjectCollection search;
switch (depth) {
case DEEP:
search = GraphicalObjectLib.flatten(this.gobcol);
break;
case SHALLOW:
search = this.gobcol;
break;
default:
throw new RuntimeException("Invalid depth parameter");
}
return (search);
} // of method
COM: <s> helper method to handle the depth parameter for method </s>
|
funcom_train/31296228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTestValues(Vector tvs) {
testValues = tvs;
for (int i = 0; i < tvs.size(); i++) {
Hashtable vs = (Hashtable)tvs.elementAt(i);
Double e = (Double)vs.get("Expected");
if (e == null) {
System.err.println("ERROR: hashtable missing `Expected' key.");
}
}
}
COM: <s> provide the vector of test values that fitness will be </s>
|
funcom_train/42359600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
rows.clear();
if (bean == null)
return;
Class c = bean.getClass();
Field[] publicFields = c.getFields();
for (Field f : publicFields) {
Row row = new Row();
row.setTitle(LabelFactory.getLabel(TextType.LABEL, labelBase + "." + f.getName()));
row.setAccessMethodName(f.getName());
rows.add(row);
}
}
COM: <s> uses reflection api to analyze object </s>
|
funcom_train/48151461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void update() {
super.update();
walkGraph.repaint();
getRecordTable().append(
"\t" + walkGraph.getValue(n) + "\t" + walkGraph.getMaxValue()
+ "\t" + walkGraph.getLastZero());
rvGraph.repaint();
rvTable.update();
}
COM: <s> this method updates the experiment including the random walk graph the </s>
|
funcom_train/300668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAlphaRate( float rate ) {
this.fltFadeAmt = new Float( rate ).floatValue();
if ( this.fltFadeAmt <= 0.01f ) {
this.fltFadeAmt = 0.01f;
}
else if ( this.fltFadeAmt > 1f ) {
this.fltFadeAmt = 1f;
}
}
COM: <s> set the rate at which the fade transition occurs </s>
|
funcom_train/41331798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void uninstallDefaults() {
SeaGlassContext context = getContext(splitPane, ENABLED);
style.uninstallDefaults(context);
context.dispose();
style = null;
context = getContext(splitPane, Region.SPLIT_PANE_DIVIDER, ENABLED);
dividerStyle.uninstallDefaults(context);
context.dispose();
dividerStyle = null;
super.uninstallDefaults();
}
COM: <s> uninstalls the ui defaults </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.