__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/1549289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(E object, int nCopies) {
modCount++;
if (nCopies > 0) {
MutableInteger mut = map.get(object);
size += nCopies;
if (mut == null) {
map.put(object, new MutableInteger(nCopies));
return true;
} else {
mut.value += nCopies;
return false;
}
} else {
return false;
}
}
COM: <s> adds a new element to the bag incrementing its count in the map </s>
|
funcom_train/50866122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newSimulation() {
if ((newSimThread == null) || !newSimThread.isAlive()) {
newSimThread = new Thread("New simulation Thread") {
@Override
public void run() {
newSimulationProcess();
}
};
newSimThread.start();
} else {
newSimThread.interrupt();
}
}
COM: <s> create a new simulation </s>
|
funcom_train/42403568 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Type getConcreteType(final String id, final String className) {
final Type type = this.getGeneratorContext().findType(className);
if (null == type) {
throwBeanTypeNotFound(id, className);
}
if (type.isInterface() || type.isAbstract() || type.isPrimitive()) {
throwBeanTypeIsNotConcrete(id, type);
}
return type;
}
COM: <s> fetches the concrete type </s>
|
funcom_train/51618075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setup_ntp(){
if_owner = new IntermediateField<NetworkTestPackage.Owner>( "getOwner", null );
{
IntermediateFieldDelegate d = (IntermediateFieldDelegate) if_owner.getBindingDelegate();
d.addBoundComponent( txt_ntpCompName );
d.addBoundComponent( txt_ntpTeamName );
}
}
COM: <s> sets up the binding for the ntp bound things team desc menu </s>
|
funcom_train/7523712 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getSmoothedAverageRetransmissionTime(Address sender) {
synchronized(smoothed_avg_xmit_times) {
Double retval=smoothed_avg_xmit_times.get(sender);
if(retval == null) {
retval=INITIAL_SMOOTHED_AVG;
smoothed_avg_xmit_times.put(sender, retval);
}
return retval;
}
}
COM: <s> returns the smoothed average retransmission time for a given sender </s>
|
funcom_train/12119447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUpTo(int bit) {
int where = subscript(bit);
/* preaddition of 1 to bit is a clever hack to avoid long arithmetic */
bits[where] |= ((1 << ((bit + 1) & MASK)) - 1);
while (where-- > 0) {
bits[where] = ~0;
}
}
COM: <s> sets all bits up to and including the given bit </s>
|
funcom_train/27823092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setCardinality(Relationship relationship,int minimumCardinality,int maximumCardinality) {
Cardinality cardinality=(Cardinality)m_cardinalities.get(relationship);
if (cardinality==null) {
cardinality=new Cardinality();
m_cardinalities.put(relationship,cardinality);
}
cardinality.m_minimumCardinality=minimumCardinality;
cardinality.m_maximumCardinality=maximumCardinality;
}
COM: <s> sets the cardinality of the relationship </s>
|
funcom_train/37422726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean modifyAND(String pStr, int pIndexOR , int pIndexAND){
boolean tRis=false;
TransExpression tExpr = new TransExpression(pStr);
if(pIndexOR < cVetOR.size()){
Vector tVetAnd = (Vector) cVetOR.get(pIndexOR);
if(pIndexAND < tVetAnd.size()){
tVetAnd.set(pIndexAND,tExpr);
tRis=true;
}
}
return tRis;
}
COM: <s> modify a and expression to the transition condition </s>
|
funcom_train/20894218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void process(String[] args) {
for (int i=0; i<args.length; i++)
if (args[i] != null && args[i].startsWith("-"))
properties.getObjectFactory().set(object, getFieldForFlag(args[i]), args[i+1]);
}
COM: <s> set the parameters </s>
|
funcom_train/31342173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSONArray getJSONArray(int index) throws JSONException {
Object object = get(index);
if (object instanceof JSONArray) {
return (JSONArray) object;
}
throw new JSONException(NLS.bind("JSONArray[{0}] is not a JSONArray.", index)); //$NON-NLS-1$
}
COM: <s> get the jsonarray associated with an index </s>
|
funcom_train/7989466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Source makeTestSource1() {
Source source =
new Source("hale-foo", makeTestUser1().toUri(server), true, false,
"21.30078,-157.819129,41", "Made up location", "Obvius-brand power meter", null, null);
source.addProperty(new Property(Source.CARBON_INTENSITY, "294"));
return source;
}
COM: <s> creates a source for use in testing 1 in a series </s>
|
funcom_train/11011214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Workbook loadWorkbook() {
File workbookFile = new File(excelFileName);
try {
FileInputStream fis = new FileInputStream(workbookFile);
workbook = WorkbookFactory.create(fis);
} catch(Exception e) {
throw new BuildException("Cannot load file " + excelFileName
+ ". Make sure the path and file permissions are correct.", e);
}
return workbook ;
}
COM: <s> loads the member variable workbook based on the file name variable </s>
|
funcom_train/24530285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createCombo() {
GridData gridData1 = new org.eclipse.swt.layout.GridData();
gridData1.grabExcessHorizontalSpace = true;
gridData1.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
gridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
list = new List(this, SWT.V_SCROLL | SWT.BORDER);
list.setLayoutData(gridData1);
listViewer = new ListViewer(list);
}
COM: <s> this method initializes combo </s>
|
funcom_train/11318138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkEntry(Entity entity) {
if (entity == null) {
throw new PresenceCachingException("Entity cannot be null");
}
if (entity.getResource() == null) {
throw new PresenceCachingException("presense stanzas are cached per resource, failure for "
+ entity.getFullQualifiedName());
}
}
COM: <s> validates basic entity data </s>
|
funcom_train/1997128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintElement(Writer aWriter, boolean breakAfter) {
if ((element != null) && (aWriter != null)) {
element.paintBeginTag(aWriter);
if (breakAfter)
Element.paintLn(aWriter);
}
paintElementBody(aWriter, breakAfter);
if (isAutoPaintEnd())
paintElementEnd(aWriter, breakAfter);
}
COM: <s> p renders the element to the supplied writer supplying a </s>
|
funcom_train/38236579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Vector getWaitingJobs() {
Vector jobVector = null;
try {
jobVector = BeanReference.getAnalysisJobDataSourceEJB().getWaitingJob(BlatTask.class.getName());
} catch (Exception e) {
cat.error("BlatTask:getWaitingJobs " + e.getMessage());
jobVector = new Vector();
}
return jobVector;
}
COM: <s> loads the request into queue </s>
|
funcom_train/18885637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteFeature(Feature f) {
mCurProject.getStack().deleteFeature(f);
// delete the model here as well?
QuickVolEvent e = new QuickVolEvent(QuickVolEvent.FEATURE_DELETED);
e.setAssociatedObject(f);
dispatchQVEvent(e);
// also delete the associated model
Model mod = mCurProject.removeModelAssociatedWithFeature(f);
QuickVolEvent e2 = new QuickVolEvent(QuickVolEvent.MODEL_DELETED);
e2.setAssociatedObject(mod);
dispatchQVEvent(e2);
}
COM: <s> deletes the feature from the current project </s>
|
funcom_train/18750604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifySetFrozen() {
// make sure the node and edge counts are locally stored
// and reset the node and edge sets, so they don't stack arbitrarily deep
if (nodeSet != null) {
getNodeCount();
}
if (edgeSet != null) {
getEdgeCount();
}
resetCache();
}
COM: <s> signals that the underlying graph has been frozen </s>
|
funcom_train/3124371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showDialogPanel(){
this.pack();
this.setLocation(
(int)((Toolkit.getDefaultToolkit().getScreenSize().width - this.getWidth()) / 2),
(int)((Toolkit.getDefaultToolkit().getScreenSize().height - this.getHeight()) / 2)
);
this.setVisible(true);
}
COM: <s> a private method to show the progress dialog immediately </s>
|
funcom_train/17206715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int maximumCollectionAttempt() {
int max = 1;
RVMThread.acctLock.lockNoHandshake();
for(int t=0; t < RVMThread.numThreads; t++) {
RVMThread thread = RVMThread.threads[t];
int current = thread.getCollectionAttempt();
if (current > max) max = current;
}
RVMThread.acctLock.unlock();
return max + CollectorThread.collectionAttemptBase;
}
COM: <s> the maximum number collection attempts across threads </s>
|
funcom_train/50862300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMaxOutputResourceRate(AmountResource resource, double rate, boolean waste) {
if (waste) {
if (!maxWasteOutputResourceRates.containsKey(resource))
maxWasteOutputResourceRates.put(resource, rate);
}
else {
if (!maxOutputResourceRates.containsKey(resource))
maxOutputResourceRates.put(resource, rate);
}
}
COM: <s> adds a maximum output resource rate if it doesnt already exist </s>
|
funcom_train/5601614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createTargetDirectory() throws IOException, DriverException {
File tmpFile = File.createTempFile(getName(), _DIR_SUFFIX, _rootDirectory);
if (FileHelper.createTempDirectory(tmpFile)) {
_targetDir = tmpFile;
} else {
throw new DriverException("unable to create temporary target directory");
}
}
COM: <s> create a target directory for a test installation </s>
|
funcom_train/2885593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NodeLink resolveNodeLink(String name) throws SmartFrogResolutionException {
NodeLink[] nodeLinks = getLinks();
for (NodeLink link:nodeLinks) {
if (name.equals(link.getName())) {
return link;
}
}
throw new SmartFrogResolutionException("Could not find \"" + name + "\" in the list of links");
}
COM: <s> resolve a specifically named node link </s>
|
funcom_train/21954043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createStaticPanel(Vector folderList) {
StringBuffer msg = new StringBuffer();
msg.append("Searching folders:\n");
for (int i = 0; i < folderList.size(); i++)
msg.append(((FolderInfo)folderList.elementAt(i)).getFolderID() + "\n");
JTextArea label = new JTextArea(msg.toString());
this.add(label);
}
COM: <s> this creates a static panel </s>
|
funcom_train/18807441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CategoryItemRenderer getRendererForDataset(CategoryDataset d) {
CategoryItemRenderer result = null;
for (int i = 0; i < this.datasets.size(); i++) {
if (this.datasets.get(i) == d) {
result = (CategoryItemRenderer) this.renderers.get(i);
break;
}
}
return result;
}
COM: <s> returns the renderer for the specified dataset </s>
|
funcom_train/44868885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private WCMExamplesBean getExamples() {
if (examples == null) {
examples = new WCMExamplesBean();
examples.setUseLoadButton(false);
examples.addTemplateElement(getFInput(), "setText",
WCMExamplesBean.STRING);
examples.addTemplateElement(getNInput(), "setText",
WCMExamplesBean.STRING);
examples.addTemplateElement(getCanvas().getCoordinateRect(),
"setLimitsAndRestoreBuffer", WCMExamplesBean.LIMITS);
}
return examples;
}
COM: <s> this method initializes examples </s>
|
funcom_train/5379880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FontRecord defaultFontRecord() {
FontRecord record = (FontRecord) stringToFontRecord
.get(JFaceResources.DEFAULT_FONT);
if (record == null) {
Font defaultFont = calculateDefaultFont();
record = createFont(JFaceResources.DEFAULT_FONT, defaultFont
.getFontData());
stringToFontRecord.put(JFaceResources.DEFAULT_FONT, record);
}
return record;
}
COM: <s> returns the default font record </s>
|
funcom_train/28914963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final private void closeAll() throws IOException {
// This method is final since version 2.2
try {
// Close the socket
if (clientSocket != null)
clientSocket.close();
// Close the output stream
if (output != null)
output.close();
// Close the input stream
if (input != null)
input.close();
} finally {
// Set the streams and the sockets to NULL no matter what
// Doing so allows, but does not require, any finalizers
// of these objects to reclaim system resources if and
// when they are garbage collected.
output = null;
input = null;
clientSocket = null;
}
}
COM: <s> closes all connection to the server </s>
|
funcom_train/9549772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean verifyHash(byte[] data, byte[] hashValue, String algorithm) throws NoSuchAlgorithmException{
byte[] hashValueComp;
MessageDigest hash = MessageDigest.getInstance(algorithm);
hash.update(data);
hashValueComp = hash.digest();
int len1,len2,i=0;
len1 = hashValue.length;
len2 = hashValueComp.length;
if(len1 == len2){
for(i=0; i<len1; i++){
if(hashValue[i] != hashValueComp[i])
break;
}
}
if(i == len1)
return true;
else
return false;
}
COM: <s> verify the hash value for the data using the given algorithm </s>
|
funcom_train/39276197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addConverter(Vector converters, LAConverter converter) {
if (converters.size() > 0) {
LAConverter previous = (LAConverter) converters.get(converters
.size() - 1);
previous.setNext(converter);
}
converters.add(converter);
if (converter instanceof NewLineConverter) {
linesToRead++;
}
}
COM: <s> constructs a converter from the converter char parsed in the pattern </s>
|
funcom_train/44657663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void broadcastLogout(Authentication authentication) {
if( logger.isDebugEnabled() )
logger.debug( "BROADCAST logout: token=" + authentication );
final Iterator iter = getBeansToUpdate( LoginAware.class ).iterator();
while( iter.hasNext() ) {
((LoginAware) iter.next()).userLogout( authentication );
}
}
COM: <s> broadcast a logout event to all the login aware beans </s>
|
funcom_train/38287976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Point calculatePageSizeDelta(Composite tile) {
Point contentSize = tile.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
Rectangle rect = pageContainerLayout.getClientArea(pageContainer);
Point containerSize = new Point(rect.width, rect.height);
return new Point(Math.max(0, contentSize.x - containerSize.x), Math
.max(0, contentSize.y - containerSize.y));
}
COM: <s> calculates the difference in size between the given page and the page </s>
|
funcom_train/25935706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URI getPropertyCamelized(String property) {
String[] names = property.split("\\W");
String camelCase = names[0];
for (int i = 1; i < names.length; i++) {
String tmp = names[i];
camelCase += tmp.replaceFirst("(.)", tmp.substring(0, 1).toUpperCase());
}
return getProperty(camelCase);
}
COM: <s> returns the property uri for the specified property string </s>
|
funcom_train/43317751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void load(IMemento memento) {
XMLMemento historyMemento = (XMLMemento) memento
.getChild(rootNodeName);
if (historyMemento == null) {
return;
}
IMemento[] mementoElements = historyMemento
.getChildren(infoNodeName);
for (int i = 0; i < mementoElements.length; ++i) {
IMemento mementoElement = mementoElements[i];
Object object = restoreItemFromMemento(mementoElement);
if (object != null) {
historyList.add(object);
}
}
}
COM: <s> load history elements from memento </s>
|
funcom_train/26395966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validate() throws CruiseControlException {
ValidationHelper.assertTrue(lwc != null,
"'localWorkingCopy' is a required "
+ "attribute on the Git task");
final File wd = new File(lwc);
ValidationHelper.assertTrue(wd.exists() && wd.isDirectory(),
"'localWorkingCopy' must be an existing "
+ "directory. Was "
+ wd.getAbsolutePath());
}
COM: <s> this method validates that the local working copy location has been </s>
|
funcom_train/23393559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addGroundedActionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ActionEnactment_groundedAction_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ActionEnactment_groundedAction_feature", "_UI_ActionEnactment_type"),
EnactmentPackage.Literals.ACTION_ENACTMENT__GROUNDED_ACTION,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the grounded action feature </s>
|
funcom_train/7507271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sendOverTransport(PastryMessage msg) {
msg.increaseHops();
PastryNode thisNode = owner.getPastryNode();
int pid = getPID(thisNode);
Transport t = getTrasportForProtocol(thisNode, pid);
t.send(msg.getSrc(), msg.getDst(), msg, pid);
}
COM: <s> useful method for gathering togheter the steps required for sending a single </s>
|
funcom_train/26467424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperty(Object bean, Object value) throws PropertyAccessException {
if (isReadOnly()) {
throw new PropertyAccessException(bean.getClass().toString() + "#" + getName() + " is read only");
}
try {
writeMethod.invoke(bean, new Object[] { value });
}
catch (Exception e) {
throw new PropertyAccessException(e);
}
}
COM: <s> set a property </s>
|
funcom_train/22362482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
String retVal = null;
if (this.tokens==null || this.tokens.size()==0){
return retVal;
}
for (Iterator iter = this.tokens.iterator();iter.hasNext();){
SpellSyntaxToken token = (SpellSyntaxToken) iter.next();
String tokenString = token.toString();
if (tokenString!=null) {
if (retVal==null){
retVal = "";
}
if (retVal.length()>0){
retVal += " ";
}
retVal = retVal + tokenString;
}
}
return retVal;
}
COM: <s> returns a string with token information or null </s>
|
funcom_train/6332139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unloadCluster(ClusterID cid, boolean deactivate) throws IOException {
if (logger.isLoggable(Level.FINE)) {
logger.fine("unloadCluster(" + cid + "," + deactivate + ").");
}
Cluster cluster = (Cluster) cachedClusters.removeForKey(cid);
if (deactivate) {
deactivateCluster(cluster);
}
}
COM: <s> remove cluster from the cluster cache </s>
|
funcom_train/9703706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNs2PkgMapping(){
String returnList="";
TableItem[] items = namespace2packageTable.getItems();
String packageValue;
for (int i=0;i<items.length;i++){
packageValue = items[i].getText(1);
if (packageValue!=null && !"".equals(packageValue)){
returnList = returnList +
("".equals(returnList)?"":",") +
items[i].getText(0)+ "=" + packageValue;
}
}
return "".equals(returnList)?null:returnList;
}
COM: <s> get the package to namespace mappings </s>
|
funcom_train/46847707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equalCommonElements(LeftDiverseIndicator other) {
if (this.commonElement == null && other.commonElement == null) return true;
if (this.commonElement == null || other.commonElement == null) return false;
if (this.isLeftDiverse() || other.isLeftDiverse()) return false;
return this.commonElement.equals(other.commonElement);
}
COM: <s> two left diverse indicators are equal if they have the same common elements </s>
|
funcom_train/31225343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void characters(char[] ch, int start, int length) {
String s = new String(ch, start, length);
if (s != null && inMessage) {
s = s.replaceAll("[\\t\\n]", " ");
s = s.replaceAll("[ ]{2,}", " ");
s = s.trim();
messageBuffer+= s;
}
}
COM: <s> used for gathering welcome message ignores all other tags </s>
|
funcom_train/32790354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IfExp createIfThenElse(OclExpression condition, OclExpression thenExp, OclExpression elseExp) throws WellFormednessException{
IfExp result = factory.createIfExp();
result.setCondition(condition);
result.setThenExpression(thenExp);
result.setElseExpression(elseExp);
typeEvl.getType(result);
return result;
}
COM: <s> creates an instance of if exp </s>
|
funcom_train/21616636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
logOut = new JButton("Log Out");
quit = new JButton("Quit");
refreshTables = new JButton("Refresh Tables");
logOut.setBounds(10, 10, 80, 30);
quit.setBounds(934, 10, 80, 30);
refreshTables.setBounds(100, 10, 200, 30);
this.setSize(1024, 50);
this.setLayout(null);
this.add(logOut);
this.add(refreshTables);
this.add(quit);
this.setBackground(Color.black);
quit.addActionListener(this);
logOut.addActionListener(this);
refreshTables.addActionListener(this);
}
COM: <s> this method initialises this </s>
|
funcom_train/43404088 | /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 instanceof Triple) {
return first.equals(((Triple<?,?,?>)obj).first) &&
second.equals(((Triple<?,?,?>)obj).second) &&
third.equals(((Triple<?,?,?>)obj).third);
}
return false;
}
COM: <s> two triples are equal if their respective components are equal </s>
|
funcom_train/41399670 | /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(new BoxLayout(jPanel, BoxLayout.X_AXIS));
jPanel.add(Box.createHorizontalGlue());
jPanel.add(getJButton(), null);
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/32815950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void rollbackBackup(ProcessContext context, String message) throws ApplicationException {
try {
context.getTaskMonitor().setCancellable(false);
HistoryHandler handler = medium.getHistoryHandler();
handler.addEntryAndFlush(new HistoryEntry(HISTO_BACKUP_CANCEL, "Backup cancellation."));
} finally {
try {
medium.rollbackBackup(context);
} finally {
context.getReport().getStatus().addItem(StatusList.KEY_BACKUP, message);
}
}
}
COM: <s> rollback the backup and release the lock on the target </s>
|
funcom_train/18288921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PreverificationErrorType getMethodSignatureError(String desc) {
Type returnType = Type.getReturnType(desc);
PreverificationErrorType errorType = validateType(returnType);
if (errorType != PreverificationErrorType.NO_ERROR) {
Type[] paramTypes = Type.getArgumentTypes(desc);
for (
int i = 0;
(i < paramTypes.length) &&
(errorType != PreverificationErrorType.NO_ERROR);
i++)
{
errorType = validateType(paramTypes[i]);
}
}
return errorType;
}
COM: <s> return a boolean indicating whether the method signature is invalid </s>
|
funcom_train/46469586 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMidiOutput(int status, int channel, int data1, int data2) {
try {
ShortMessage message = new ShortMessage ();
message.setMessage (status, channel, data1, data2);
this.midiReceiver.send (message, -1L);
} catch (InvalidMidiDataException e) {};
}
COM: <s> construct a midi message and pass to the designated midi output </s>
|
funcom_train/47833607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toStringHead(boolean withPID) {
String val = "";
for (int i = 0; i < head.size(); i++) {
Predicate pred = head.get(i);
val += pred.toString(withPID);
if (i < head.size() - 1)
val += " ^ ";
}
return val;
}
COM: <s> returns a string representation of the head of the template </s>
|
funcom_train/7625902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findIndexOfValue(String value) {
if (value != null && mEntryValues != null) {
for (int i = mEntryValues.length - 1; i >= 0; i--) {
if (mEntryValues[i].equals(value)) {
return i;
}
}
}
return -1;
}
COM: <s> returns the index of the given value in the entry values array </s>
|
funcom_train/11380699 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMinShares() {
scheds.add(new FakeSchedulable(100, 20));
scheds.add(new FakeSchedulable(10, 20));
scheds.add(new FakeSchedulable(10, 0));
scheds.add(new FakeSchedulable(3, 2));
SchedulingAlgorithms.computeFairShares(scheds, 40);
verifyShares(20, 10, 7, 3);
}
COM: <s> in this test some pools have minimum shares set </s>
|
funcom_train/18323037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDebugBlockBeginPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Statement_debugBlockBegin_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Statement_debugBlockBegin_feature", "_UI_Statement_type"),
MetalangPackage.Literals.STATEMENT__DEBUG_BLOCK_BEGIN,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the debug block begin feature </s>
|
funcom_train/11373167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int invalidateWorkForOneNode(String nodeId) {
namesystem.writeLock();
try {
// blocks should not be replicated or removed if safe mode is on
if (namesystem.isInSafeMode())
return 0;
// get blocks to invalidate for the nodeId
assert nodeId != null;
return invalidateBlocks.invalidateWork(nodeId);
} finally {
namesystem.writeUnlock();
}
}
COM: <s> get blocks to invalidate for i node id i </s>
|
funcom_train/26339738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean locationHasCase(int loc) {
for (Mounted mounted : getMisc()) {
if ((mounted.getLocation() == loc)
&& mounted.getType().hasFlag(MiscType.F_CASE)
&& !mounted.isDestroyed()) {
return true;
}
}
return false;
}
COM: <s> returns whether there is case protecting the location </s>
|
funcom_train/19143357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector createMeshNodes(){
double x_segment = length_side_x/x_partitions;
double y_segment = length_side_y/y_partitions;
for (int r=0; r<=y_partitions; r++) {
for (int c=0; c<=x_partitions; c++) {
double x = origin_point_x + c*(x_segment);
double y = origin_point_y + r*(y_segment);
double z = 0.0;
nodeVector.add(new Node(x, y, z));
}
}
return nodeVector;
}
COM: <s> code create mesh nodes code returns a mesh vector of nodes where </s>
|
funcom_train/8103276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddId() {
System.out.println("addId");
assertEquals(0, removed_articles.sizeId());
removed_articles.addId(11);
removed_articles.addId(12);
removed_articles.addId(12);
assertEquals(2, removed_articles.sizeId());
}
COM: <s> test of add id method of class wikipedia </s>
|
funcom_train/17204052 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showAnUnusualMap(int mapIndex, int bytesPerMap) {
VM.sysWrite("unusualMap with index = ", mapIndex);
VM.sysWrite(" Map bytes = ");
for (int i = 0; i < bytesPerMap; i++) {
VM.sysWrite(unusualReferenceMaps[mapIndex + i]);
VM.sysWrite(" ");
}
VM.sysWrite(" ");
}
COM: <s> show the basic information for a single unusualmap this is for testing use </s>
|
funcom_train/4755162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkNonNegative(long[] in) {
for (int i = 0; i < in.length; i++) {
if (in[i] < 0) {
throw new MathIllegalArgumentException(
LocalizedFormats.NEGATIVE_ELEMENT_AT_INDEX,
i, in[i]);
}
}
}
COM: <s> check all entries of the input array are 0 </s>
|
funcom_train/49098134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor getUpdateList(String table) {
return mDb.query("updates",
new String[]{"_id", "table_name", "target_id", "target2_id", "update_type", "update_time"},
table == null ? null : "table_name = ?", table == null ? null : new String[]{table}
, null, null, null);
}
COM: <s> get a list of updates since the last sync </s>
|
funcom_train/4375130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean domainMatch(final String host, String domain) {
if (host.equals(domain)) {
return true;
}
if (!domain.startsWith(".")) {
domain = "." + domain;
}
return host.endsWith(domain) || host.equals(domain.substring(1));
}
COM: <s> performs domain match as implemented in common browsers </s>
|
funcom_train/33895865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prepare() throws Exception {
if (StringUtil.isEmpty(getSearchName())) setSearchName("userGroup");
if(actionId == 0) {
model = new UserGroup();
} else {
model = thinkingService.getObject(UserGroup.class, new Long(actionId));
}
}
COM: <s> init set search name and initialize model object </s>
|
funcom_train/2843279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelection(Span selection) {
setSpan(selection);
fldType.setVisible(false);
fldConfidence.setVisible(false);
fldAnnotator.setVisible(false);
fldProgress.setVisible(false);
fldProgressBar.setVisible(false);
fldConfidence.setText("");
}
COM: <s> tells this status bar that the specific span is currently being selected </s>
|
funcom_train/4076068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRegistryUp() {
try {
URL url = new URL("http://" + host + "/registry/wsdl");
HttpURLConnection urlConnect = (HttpURLConnection) url.openConnection();
urlConnect.setRequestMethod("HEAD");
urlConnect.setRequestProperty("Connection", "close");
int res = urlConnect.getResponseCode();
urlConnect.disconnect();
if (res != 200)
return false;
} catch (RuntimeException e) {
e.printStackTrace();
return false;
} catch (IOException e) {
e.printStackTrace();
return false;
}
return true;
}
COM: <s> checks status of service registry </s>
|
funcom_train/18218246 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addArgumentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FilterFunction_argument_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FilterFunction_argument_feature", "_UI_FilterFunction_type"),
QualityModelPackage.Literals.FILTER_FUNCTION__ARGUMENT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the argument feature </s>
|
funcom_train/43282680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initResourceLoaders(final Configuration configuration) {
final Object location = ((ComponentDescriptor) configuration
.get_RootPart()).getLocation();
// init the class loaders
ClassAndResourceLoaders loaders = configuration.getLoaders();
try {
Iterator it = loaders.getResourceLoader().iterator();
while (it.hasNext()) {
ResourceLoader loader = (ResourceLoader) it.next();
initResourceLoader(loader, location);
}
} catch (Exception e) {
LOGGER.error(e.getLocalizedMessage(), e);
}
}
COM: <s> init the resources loaders </s>
|
funcom_train/22498217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doDeleteStyle() {
final String styleName = getSelectedStyleName();
if (styleName != null) {
if (Util.msg(JOptionPane.YES_NO_OPTION, "confirmDelete", "deleteStyleQuery", styleName, "\r\n\r\n")) {
styles.removeStyle(getContentType() + Util.CLASS_SEPARATOR + styleName);
}
}
}
COM: <s> delete the currently selected style name for the </s>
|
funcom_train/25203301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private OcpReader prepare(String prog, String in) throws IOException {
InputStream stream = new ByteArrayInputStream(prog.getBytes());
OcpProgram p = new CompilerState(stream).compile();
stream.close();
return new OcpReader(new CharArrayReader(in.toCharArray()), p);
}
COM: <s> prepare the reader by compiling a program and attaching an input stream </s>
|
funcom_train/48496149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
// clear all bins
Iterator i = bins.iterator();fireSeriesChanged();
while ( i.hasNext() ) {
( (PhetHistogramBin) i.next() ).clear();
}
rowData = ParallelDoubleArray.createEmpty(0, ParallelArray
.defaultExecutor());
// clear the series
numberOfObservations = 0;
fireSeriesChanged();
}
COM: <s> clears the series </s>
|
funcom_train/39062049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addStrategyIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(new ItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_IMarkingStrategyContainer_strategyId_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_IMarkingStrategyContainer_strategyId_feature", "_UI_IMarkingStrategyContainer_type"),
MarkingPackage.eINSTANCE.getIMarkingStrategyContainer_StrategyId(),
true,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
}
COM: <s> this adds a property descriptor for the strategy id feature </s>
|
funcom_train/28756603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOthercomments(String newVal) {
if ((newVal != null && this.othercomments != null && (newVal.compareTo(this.othercomments) == 0)) ||
(newVal == null && this.othercomments == null && othercomments_is_initialized)) {
return;
}
this.othercomments = newVal;
othercomments_is_modified = true;
othercomments_is_initialized = true;
}
COM: <s> setter method for othercomments </s>
|
funcom_train/15460527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getStateHiddenfieldName(FacesContext context, UIComponent component) {
String stateName = HIDDEN_PANEL_STATE_PREFIX;
UIPanel panel = (UIPanel) component;
if(panel.getForceId() != null && panel.getForceId().booleanValue()) {
stateName += component.getId();
} else {
stateName += component.getClientId(context);
}
return stateName;
}
COM: <s> deliver the name for the hidden field depending on the attribute force id </s>
|
funcom_train/43245398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetTmpAddrToDate() {
System.out.println("getTmpAddrToDate");
PatientDemographicsDG5Object instance = new PatientDemographicsDG5Object();
Calendar expResult = null;
Calendar result = instance.getTmpAddrToDate();
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 tmp addr to date method of class org </s>
|
funcom_train/19913099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getDirectoryRestartBox() {
if (directoryRestartBox == null) {
directoryRestartBox = new JCheckBox();
directoryRestartBox.setText(LangageManager
.getProperty("trackenum.directoryrestart"));
directoryRestartBox.setName("restartDirectoryField");
}
return directoryRestartBox;
}
COM: <s> this method initializes j check box </s>
|
funcom_train/17204542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TypeReference getInnermostElementType() {
TypeReference elem = getArrayElementType();
if (elem.isArrayType()) {
// NOTE: we must recur instead of attempting to parse
// the array descriptor for ['s so we correctly handle
// [AddressArray and similar evil VMMagic
return elem.getInnermostElementType();
} else {
return elem;
}
}
COM: <s> return the innermost element type reference for an array </s>
|
funcom_train/25826694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getNumberOfShownVars() {
shownVars = 0;
for (int i = 0; i < statsVars.size(); i++) {
if (statsVars.get(i).getStatsVarUIMap().get(StatisticVar.DISPLAYNAME) != null) {
shownVars++;
}
}
return shownVars;
}
COM: <s> usage return the number of statistic variables with a displayname </s>
|
funcom_train/46277675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCreate(String key) {
if (defaultPackage != null) {
return defaultPackage;
}
String value = (String)super.get(key);
if (value == null) {
value = normalizePackageName(
(String)Utils.makePackageName(key),
javaPkgSeparator);
put(key, value);
}
return (String) value;
} // getCreate
COM: <s> get the package name for the given namespace </s>
|
funcom_train/3378700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(String name) throws IOException {
if (name.equalsIgnoreCase(QUALIFIERS)) {
policyQualifiers = Collections.emptySet();
} else if (name.equalsIgnoreCase(ID)) {
throw new IOException("Attribute ID may not be deleted from " +
"PolicyInformation.");
} else {
//ID may not be deleted
throw new IOException("Attribute name [" + name +
"] not recognized by PolicyInformation.");
}
}
COM: <s> delete the attribute value </s>
|
funcom_train/12909229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkCombination(int mpx, int hdr){
final int noOfMPX = 3;
final int noOfHDR = 3;
final boolean[][] combinations = {
{ true, true, true },
{ false, true, true },
{ false, false, true }
};
if( mpx < noOfMPX && hdr < noOfHDR ) { // allowed MPX and HDR values?
return combinations[mpx][hdr];
}
return false;
}
COM: <s> function that checks if mpx and hdr fields are in coherence or not </s>
|
funcom_train/22770445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendQuerry(IEngineServiceAsync service) {
Logger.debug("quering : " + this.toString());
timer = new PerformanceTimer(this.toString());
PerformanceTimer sendTimer = new PerformanceTimer("XQueryPath::querry send time ");
timer.start();
sendTimer.start();
service.query(queries, this);
sendTimer.report();
}
COM: <s> sends querry to a server </s>
|
funcom_train/45623333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOutputFilesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ResolveManifestFilesType_outputFiles_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ResolveManifestFilesType_outputFiles_feature", "_UI_ResolveManifestFilesType_type"),
MSBPackage.eINSTANCE.getResolveManifestFilesType_OutputFiles(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the output files feature </s>
|
funcom_train/1540391 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataStreamEvent clone(DataStreamEvent output) {
if (output == null) {
output = new DataStreamEvent();
}
output.setData(getData());
output.setIntData(getIntData());
output.setNumSamples(getNumSamples());
output.setSource(getSource());
output.setAdditionalInfo(getAdditionalInfo());
output.setType(getType());
output.setDataDescription(getDataDescription());
return output;
}
COM: <s> copy this object into the passed in object and return it </s>
|
funcom_train/1805307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getContents(String column) {
String result = null;
if (newContents != null) {
result = newContents.getValue(column);
} else if (originalEntry != null) {
result = originalEntry.getCustomElements().getValue(column);
}
if (result == null) {
result = "";
}
return result;
}
COM: <s> gets the visible contents of a particular column </s>
|
funcom_train/27721543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void keyPressed(KeyEvent e) {
int code = e.getKeyCode();
if (code == KeyEvent.VK_ESCAPE) {
// Key pressed is the ESCAPE key. Hide this Dialog.
setVisible(false);
dispose();
}
// else if(code == KeyEvent.VK_ENTER){
// //Key pressed is the ENTER key. Redefine performEnterAction() in
// subclasses to respond to depressing the ENTER key.
// performEnterAction(e);
// }
// Insert code to process other keys here
}
COM: <s> this function is called whenever a component belonging to this dialog or </s>
|
funcom_train/49836838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMessage(Message message) {
// set the new message id
message.setId(++lastMessageId);
synchronized(messages) {
messages.addLast(message);
if(messages.size() > MAX_AVAILABLE_MESSAGES) {
messages.removeFirst();
}
}
// notify listeners...
notifyNewMessage();
}
COM: <s> add a new message to this room </s>
|
funcom_train/40910392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void implementGetterSetterInterface(Element realInterf, StringBuilder outMethods, StringBuilder outFields) {
//Get the map of getters and setters.
Map<String, ElementGenerator.FieldGetterSetter> getterSetters = buildGettersSetters(realInterf);
//Generate the getters and setters.
this.elementGenerator.generateFieldGettersSetters(getterSetters.values(), outMethods, outFields);
}
COM: <s> this is used to generate the implementation of an interface that contains </s>
|
funcom_train/800962 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unselect() {
// jcpModel.getRendererModel().setExternalSelectedPart(jcpModel.getChemModel().getBuilder().newAtomContainer());
// if (page.getAssignmentController().getSelectedSubstructure() != null) {
// page.getAssignmentController().getSelectedSubstructure().removeAllElements();
// }
}
COM: <s> deselect all selected atoms bonds </s>
|
funcom_train/20400380 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object parse(String arg) throws ParseException {
Long result = null;
try {
result = Long.decode(arg);
} catch (NumberFormatException e) {
throw (
new ParseException(
"Unable to convert '" + arg + "' to a Long.",
e));
}
return (result);
}
COM: <s> parses the specified argument into a long </s>
|
funcom_train/29804058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkTable(String tableName){
try {
Statement sqlfeed = con.createStatement();
String sqlstring = "SELECT COUNT(*) FROM " + tableName + " WHERE 1 = 2";
sqlfeed.execute(sqlstring);
return true; // if table does exist, no rows will ever be returned
} catch (SQLException e) {
return false; // if table does not exist, an exception will be thrown
}
}
COM: <s> generic check table method </s>
|
funcom_train/45715145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireQualifierChangedEvent(String name, int operation) {
if (OJ.isValidData()) {
QualifierChangedEventOJ evt = new QualifierChangedEventOJ(name, operation);
for (int i = 0; i < qualifierChangedListeners.size(); i++) {
((QualifierChangedListenerOJ) qualifierChangedListeners.get(i)).qualifierChanged(evt);
}
}
}
COM: <s> creates a new qualifier changed event oj and executes all listeners qualifier changed </s>
|
funcom_train/25099323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIsActivePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PowerSupply_isActive_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PowerSupply_isActive_feature", "_UI_PowerSupply_type"),
HardwaremodelingPackage.Literals.POWER_SUPPLY__IS_ACTIVE,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the is active feature </s>
|
funcom_train/44339131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception {
mbeanServer = server;
Hashtable properties = new Hashtable(name.getKeyPropertyList());
properties.put(AgentMBean.TYPE_KEY, "Monitor");
this.name = ObjectName.getInstance(name.getDomain(), properties);
timer = AgentMBean.getTimer(mbeanServer);
return this.name;
}
COM: <s> modifies this mbeans name with the key code type monitor code </s>
|
funcom_train/12587650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ItemLabel buildItemLabel(SlugLineType slugLine, LabelProperty labelName) {
ItemLabel itemLabel = new ItemLabel();
itemLabel.setIdentity(slugLine.getIdentity());
itemLabel.setValue(slugLine.getValue());
itemLabel.setLang(slugLine.getLang());
itemLabel.setDir(slugLine.getDir());
itemLabel.setLabelProperty(labelName);
return itemLabel;
}
COM: <s> build item label object from slug line type </s>
|
funcom_train/810665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSoftwareRefPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ProcessingMethodType_softwareRef_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ProcessingMethodType_softwareRef_feature", "_UI_ProcessingMethodType_type"),
MzmlPackage.Literals.PROCESSING_METHOD_TYPE__SOFTWARE_REF,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the software ref feature </s>
|
funcom_train/27853347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(String s) {
byte[] b = bytes;
int len = length;
if (b == null || len != s.length())
return false;
int off = offset;
for (int i = 0; i < len; i++)
if (b[off++] != s.charAt(i))
return false;
return true;
}
COM: <s> compares the message bytes to the specified string object </s>
|
funcom_train/22498852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openServer() {
//simple text entry dialog for server name/port
String index = JOptionPane.showInputDialog("Enter a server name, with optional port number (host[:portnum]).");
// cancel button used.
if (index == null) return;
indexesModel.addElement("Server: " + index);
try {
env.addServer(index);
envInit = true;
} catch (Exception e){
// remove the offending elt.
indexesModel.removeElement(indexesModel.lastElement());
error(e.toString());
}
}
COM: <s> present an input dialog to obtain a hostname and optional </s>
|
funcom_train/9216866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Explosion explode() {
Explosion explosion = super.explode(0, 0);
AbstractController ctrl = explosion.getController();
ctrl.deactivate();
// we must now change the controller
Sprite sprite = ctrl.getSprite();
explosion.setController(new VectorExplosionController(sprite.getX(),
sprite.getY(), 2, 0));
explosion.setTurnToCollectible(explosion.shouldCreateCollectible());
AbstractDenarisMap map = getParentMap();
map.removeEnemy(this);
map.addFriend(explosion);
return explosion;
}
COM: <s> this method is called when an enemy is shot </s>
|
funcom_train/28471950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /*private Keywords createKeywords(int pCount, String pPrefix, String pSuffix, Category pCategory){
Keywords keywords = new Keywords();
for (int i = 0; i < pCount; i++){
Keyword keyword = new Keyword(pPrefix + " " + (pCount+1) + " " + pSuffix,pCategory.getPrimaryKey());
keywords.add(keyword);
}
return keywords;
}*/
COM: <s> creates a collection of indexed keywords </s>
|
funcom_train/17898957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMnemonic(int index, int mnemonic) {
if (mnemonicToIndexMap == null) {
initMnemonics();
}
mnemonicInputMap.put(KeyStroke.getKeyStroke(mnemonic, Event.ALT_MASK),
"setSelectedIndex");
mnemonicToIndexMap.put(Integer.valueOf(mnemonic), Integer.valueOf(index));
}
COM: <s> adds the specified mnemonic at the specified index </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.