__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/3341646
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void set(int index, int value) {
if (index >= size) {
if (next != null) {
next.set(index - size, value);
} else {
throw new IndexOutOfBoundsException("at index " + index);
}
} else {
data[start + index] = (byte) value;
}
}
COM: <s> sets a byte in the buffer </s>
|
funcom_train/251838
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testRead() throws TaskQueueException, InterruptedException {
File readFile = new File(xmlDir, "io.xml");
assertTrue(readFile.exists());
ReadFileTask readTask = new ReadFileTask(readFile, null, "test");
io.getTaskQueue().enqueue(readTask);
ReadFileEvent event = (ReadFileEvent) testChannel.take();
byte[] data = event.getData();
assertEquals(222, data.length);
}
COM: <s> check that reading a file that exists properly pulls in the write </s>
|
funcom_train/29896263
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int faceCount() {
int cnt = 0;
for (int i=1; i<size()-1; i++) {
int c_i = ((MeshSection)elementAt(i)).size();
int c_i1 = ((MeshSection)elementAt(i+1)).size();
if (c_i != c_i1) {
cnt += Math.max(c_i,c_i1);
} else if (c_i > 1) {
cnt += 2 * c_i;
}
}
return cnt;
}
COM: <s> returns the number of faces that have to be created povray wants </s>
|
funcom_train/2805020
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void repaintTo(int x, int y) {
canvas.repaint(Math.min(x,getXCenterline()),
Math.min(y,getYCenterline()),
Math.abs(1 + getXCenterline() - x),
Math.abs(1 + getYCenterline() - y));
}
COM: <s> mark a region from the the objects current point as needing repainting </s>
|
funcom_train/32092390
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void respondErrorResourceNotFound() {
String strAnswer = "<html><body><h1>404 Resource not found</h1></html>";
m_print.println("HTTP/1.0 404 Resource not found");
m_print.println("Content-Type: text/html");
m_print.println("Server: " + SERVER_NAME);
m_print.println("Connection: close");
m_print.println("Content-Length: " + strAnswer.length());
m_print.println("");
m_print.print(strAnswer);
m_print.println("");
}
COM: <s> responds to the client with an error indicating that the resource </s>
|
funcom_train/29562733
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void writeLabels(WritableSheet ws) {
try {
CellView cv = new CellView();
WritableCellFormat headerFormat = getHeaderFormat();
cv.setFormat(headerFormat);
for (int i = 0; i < headers.length; i++) {
Label l = new Label(i, 0, headers[i]);
l.setCellFormat(headerFormat);
ws.addCell(l);
}
} catch (WriteException e) {
throw new IllegalArgumentException(e);
}
}
COM: <s> write out loads of labels in order to test the shared string table </s>
|
funcom_train/19063780
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testSetGetResultStream() throws Exception {
GPGResultSet res = new GPGResultSet();
res.setResultStream(new ByteArrayInputStream("testmessage".getBytes()));
assertEquals(true, (res.getResultStream() != null));
assertEquals("testmessage", StreamUtils.readInString(
res.getResultStream()).toString());
}
COM: <s> tests if the get result stream works as expected </s>
|
funcom_train/18023882
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setHasBorder(boolean b) {
if (hasBorder != b) {
hasBorder = b;
if (hasBorder) {
EtchedBorder etchedBorder = new EtchedBorder();
TitledBorder titledBorder = new TitledBorder(etchedBorder, borderTitle, TitledBorder.LEFT, TitledBorder.TOP);
setBorder(titledBorder);
}
else {
setBorder(new NoBorder());
}
}
}
COM: <s> if the given boolean is code true code then the panel will be </s>
|
funcom_train/1834450
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void waitToComplete(ExecutorService threadPool) {
LOG.info("All compression tasks have been initiated. Waiting for tasks to complete.");
threadPool.shutdown();
try {
threadPool.awaitTermination(120 * 60, TimeUnit.SECONDS);
LOG.info("All compression tasks have been completed.");
} catch (InterruptedException e) {
LOG.error("Compressor was interrupted!", e);
}
}
COM: <s> waits until all tasks have been executed </s>
|
funcom_train/13274684
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setName(String name) {
if (name != this.name
|| (name != null && !name.equals(this.name))) {
String oldName = this.name;
this.name = name;
if (this.propertyChangeSupport != null) {
this.propertyChangeSupport.firePropertyChange(Property.NAME.name(), oldName, name);
}
}
}
COM: <s> sets the name of the imported texture </s>
|
funcom_train/28151270
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ExprVar get(int i) {
if (i<0) throw new NoSuchElementException();
for(Decl d: decls) {
if (i < d.names.size()) return (ExprVar) (d.names.get(i));
i = i - d.names.size();
}
throw new NoSuchElementException();
}
COM: <s> return the i th variable </s>
|
funcom_train/18808858
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setValue(final Number value, final Comparable chipx, final Comparable chipy) {
this.data.setValue(value, chipx, chipy);
if (isMaxValue(value)) {
this.maxValue = (Double) value;
}
if (isMinValue(value)) {
this.minValue = (Double) value;
}
}
COM: <s> sets a value in the dataset and updates min and max value entries </s>
|
funcom_train/7518303
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Embarcacao update(Embarcacao entity) {
EntityManagerHelper.log("updating Embarcacao instance", Level.INFO,
null);
try {
Embarcacao result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved embarcacao entity and return it or a copy of </s>
|
funcom_train/8064478
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String getAppletInfo() {
return "GEF (the Graph Editing Framework) example editor applet. \n" +
"EquipmentApplet a very simple demonstration of how GEF can \n" +
"be used. " + "\n\n" +
"Author: Jason Robbins\n" +
"Copyright (c) 1996-1998 Regents of the University of California.\n"+
"All rights reserved.\n\n";
}
COM: <s> reply a breif string that describes this applet in the about </s>
|
funcom_train/40675899
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: @Override public boolean equals(Object o) {
if (o == null || !(o instanceof ClientCookie)) {
return false;
} else {
ClientCookie cookie = (ClientCookie)o;
return cookie.name_.equals(name_) &&
cookie.effectiveDomain_.equals(effectiveDomain_) &&
cookie.effectivePath_.equals(effectivePath_);
}
}
COM: <s> compare two cookies </s>
|
funcom_train/44185113
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public enum State {
RUN, // juggle/prioritize/emit; usual state
EMPTY, // running/ready but no URIs queued/scheduled
HOLD, // NOT YET USED enter a consistent, stable, checkpointable state ASAP
PAUSE, // enter a stable state where no URIs are in-progress; unlike
// HOLD requires all in-process URIs to complete
FINISH // end and cleanup; may not return to any other state after
// this state is requested/reached
}
COM: <s> enumeration of possible target states </s>
|
funcom_train/33797954
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Inode readInode(int ino, OSEvent ev) {
Inode inode = null;
MemPage theinode = getBufferCache().read(getSuperBlock().calcBlockNum(ino), ev);
if(theinode != null)
inode = new Inode(getSuperBlock(), theinode.get_bytes(), ino);
return inode;
}
COM: <s> read inode from buffer cache </s>
|
funcom_train/49147335
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void setErr(String msg) {
if(msg != null) {
if(!bErr) {
bErr = true;
add(errComp, BorderLayout.SOUTH);
revalidate();
repaint();
}
errComp.setText(msg);
} else {
if(bErr) {
remove(errComp);
revalidate();
repaint();
bErr = false;
}
}
}
COM: <s> set an error string on the component </s>
|
funcom_train/5724806
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean equals(Object object) {
if (this == object) {
return true;
}
if (!(object instanceof MyUniInstituteInfo)) {
return false;
}
final MyUniInstituteInfo that = (MyUniInstituteInfo) object;
if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) {
return false;
}
return true;
}
COM: <s> returns code true code if the argument is an my uni institute info </s>
|
funcom_train/18851782
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Dimension getPreferredSize() {
FontMetrics fm = getFontMetrics(getFont());
int w = fm.stringWidth(label);
if (file != null) {
if (file.isDirectory()) ICON_WIDTH = 15;
}
return new Dimension(w+(PADDING*2)+SIZE+ICON_WIDTH,SIZE+(PADDING*2));
}
COM: <s> the preferred size of the button </s>
|
funcom_train/3290034
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void closeAllChannels(MMObjectNode community) {
if (channelBuilder == null) {
log.error("No channel builder");
return;
}
Enumeration relatedChannels = mmb.getInsRel().getRelated(community.getNumber(), channelBuilder.oType);
while (relatedChannels.hasMoreElements()) {
channelBuilder.close((MMObjectNode)relatedChannels.nextElement());
}
}
COM: <s> closes all the channels of the community </s>
|
funcom_train/22433090
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected DocumentBuilder getDocumentBuilder() throws ServletException {
DocumentBuilder documentBuilder = null;
DocumentBuilderFactory documentBuilderFactory = null;
try {
documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
documentBuilder = documentBuilderFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
throw new ServletException("jaxp failed");
}
return documentBuilder;
}
COM: <s> return jaxp document builder instance </s>
|
funcom_train/32944089
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Mailable convertTaskToMail(Task task, String emailAddress) {
Mailable email = new Mailable();
email.setMessage(task.getMessage());
email.setRecipients(emailAddress);
email.setSender(task.getSender());
email.setSubject(task.getSubject());
return email;
}
COM: <s> converts a task object into something that is mailable </s>
|
funcom_train/3907375
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int getRowCount() {
if(_elementBinding != null) {
// We have a Schema Element
if(_elementBinding.getSchemaElement() != null) {
SchemaAttribute[] atts = _elementBinding.getSchemaElement().getSchemaAttributes();
return atts.length;
}
// We don't have a Schema Element
else if(_elementBinding.getElement() != null) {
java.util.List list = _elementBinding.getElement().getAttributes();
return list.size();
}
}
return 0;
}
COM: <s> return the amount of rows needed to display the number of attributes </s>
|
funcom_train/48877747
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Category create() throws DataException {
String id = null;
try {
id = GUID.generate();
} catch(GUIDException guide) {
throw new DataException("Could not generate a GUID", guide);
}
Category category = new Category();
category.setID(id);
Cache cache = Cache.getInstance();
cache.put(id, category);
return category;
} //create
COM: <s> creates a new category business object </s>
|
funcom_train/31342257
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void shutdown(boolean emergency) {
fShuttingDown = true;
/* Shutdown Connection Manager (safely) */
if (!emergency && fConnectionService != null) {
try {
fConnectionService.shutdown();
} catch (Exception e) {
Activator.safeLogError(e.getMessage(), e);
}
}
/* Shutdown Persistence Service */
if (fPersistenceService != null)
fPersistenceService.shutdown(emergency);
fStartLevel = StartLevel.NOT_STARTED;
}
COM: <s> shutdown the services managed by this facade </s>
|
funcom_train/44585653
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected JavaElementDelta find(IJavaElement e) {
if (this.equalsAndSameParent(this.changedElement, e)) { // handle case of two jars that can be equals but not in the same project
return this;
} else {
for (int i = 0; i < this.affectedChildren.length; i++) {
JavaElementDelta delta = ((JavaElementDelta)this.affectedChildren[i]).find(e);
if (delta != null) {
return delta;
}
}
}
return null;
}
COM: <s> returns the code java element delta code for the given element </s>
|
funcom_train/22901794
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testCommitWrite() throws Exception {
TransactionManager transactionManager = new MockTransactionManager();
Transaction transactionA = TransactionFactory.create(transactionManager, TEN_MINUTES).transaction;
javaSpace.write(new TestEntry(), transactionA, TEN_MINUTES);
transactionA.commit();
assertNotNull("Written to space", javaSpace.readIfExists(new TestEntry(), null, JavaSpace.NO_WAIT));
}
COM: <s> tests writing an entry under a transaction then committing </s>
|
funcom_train/1952379
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addParentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SmartModule_parent_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SmartModule_parent_feature", "_UI_SmartModule_type"),
SmartPackage.Literals.SMART_MODULE__PARENT,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the parent feature </s>
|
funcom_train/43267094
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void addConceptNames(Collection storage, IConcept concept) {
Collection conceptNames = concept.getConceptNameColl();
for (Iterator i = conceptNames.iterator(); i.hasNext(); ) {
IConceptName conceptName = (IConceptName) i.next();
storage.add(conceptName.getName());
}
}
COM: <s> convience method to load all concept names from a concept into a collection </s>
|
funcom_train/7310206
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void copy(final File root, final File dir, final FileFilter filter) {
final File[] files = root.listFiles(filter);
for (int i = 0; i < files.length; i++) {
final File f = files[i];
if (f.isDirectory())
copy(f, new File(dir, f.getName()), filter);
else
copy(f, dir);
}
}
COM: <s> recursively copies all files in root to dir that match filter </s>
|
funcom_train/25966967
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private UnicodeSet getSimilarDecimals(char decimal, boolean strictParse) {
if (dotEquivalents.contains(decimal)) {
return strictParse ? strictDotEquivalents : dotEquivalents;
}
if (commaEquivalents.contains(decimal)) {
return strictParse ? strictCommaEquivalents : commaEquivalents;
}
// if there is no match, return the character itself
return new UnicodeSet().add(decimal);
}
COM: <s> return characters that are used where this decimal is used </s>
|
funcom_train/3990234
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addCzynnosc_sercaPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BadanieOkresowe_czynnosc_serca_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_czynnosc_serca_feature", "_UI_BadanieOkresowe_type"),
PrzychodniaPackage.Literals.BADANIE_OKRESOWE__CZYNNOSC_SERCA,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the czynnosc serca feature </s>
|
funcom_train/27843491
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void setupWindow(JRootPane rootPane, View view, SwingViewOptions viewOptions) {
// Keep track of the new RootPane
_rootpanes.add(rootPane);
// Put the View in the content pane
Container contentPane = rootPane.getContentPane();
contentPane.setLayout(new BorderLayout());
contentPane.add(BorderLayout.CENTER, (Component) view);
}
COM: <s> setup the window insert the view in the window </s>
|
funcom_train/21374765
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean validate(File file) {
if (file == null) {
throw new NullPointerException("file");
}
if (file.lastModified() != this.lastModified) {
return false;
}
if (file.length() != this.length) {
return false;
}
hit++;
return true;
}
COM: <s> checks the passed file attributes against those cached ones </s>
|
funcom_train/45623002
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void addConsoleXslPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CodeAnalysisType_consoleXsl_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CodeAnalysisType_consoleXsl_feature", "_UI_CodeAnalysisType_type"),
MSBPackage.eINSTANCE.getCodeAnalysisType_ConsoleXsl(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the console xsl feature </s>
|
funcom_train/48402362
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public HandlerRegistration addTitleHoverHandler(com.smartgwt.client.widgets.form.fields.events.TitleHoverHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.form.fields.events.TitleHoverEvent.getType()) == 0) setupTitleHoverEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.form.fields.events.TitleHoverEvent.getType());
}
COM: <s> add a title hover handler </s>
|
funcom_train/51246009
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Dimension getPreferredSize() {
int width = super.getPreferredSize().width;
int height = 25;
int parentWidth = getParent().getWidth();
if (getParent() != null) {
if (width >= parentWidth) {
height = 55;
}
}
return new Dimension(parentWidth, height);
}
COM: <s> gets the preferred size of this row </s>
|
funcom_train/28686727
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected String generateLsString(TagVo tagVo) {
return this.getDataFormatDecorator().getFormattedString_LastSeen(tagVo);
//return getIpicoUtil().generateIpxString(tagVo.getUid(), tagVo.getI_sum(), tagVo.getQ_sum(), tagVo.getLastTime());
}
COM: <s> generate the last seen string to be send to all next nodes </s>
|
funcom_train/30075623
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected ModelAndView onSubmit(Object command) throws ServletException {
Downtime downtime = (Downtime) command;
// delegate the insert to the Business layer
getGpir().storeDowntime(downtime);
return new ModelAndView(getSuccessView(), "resourceId", Integer.toString(downtime.getResource().getId()));
}
COM: <s> method inserts a new code downtime code </s>
|
funcom_train/1502127
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: @Override public boolean add(final BrailleSequence item) {
if (!isEmpty() && getLast().needsGuideDot(item)) {
final BrailleSequence dot = new GuideDot();
dot.setParent(this);
if (!super.add(dot)) return false;
}
item.setParent(this);
return super.add(item);
}
COM: <s> append a sign </s>
|
funcom_train/13257321
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setData(ClassDefinition cd, StationDefinition sd, BlockingRegionDefinition brd, Object key) {
this.cd = cd;
this.sd = sd;
this.bd = brd;
this.regionKey = key;
comboFactory.setData(sd);
blockingPanel.setData(cd, brd, key);
stationPanel.setBorder(BorderFactory.createTitledBorder(new EtchedBorder(), "Stations in " + bd.getRegionName(regionKey)));
}
COM: <s> sets data for this panel </s>
|
funcom_train/12152259
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void show() {
System.out.println(databaseID() + " " + name() + " {");
System.out.println(" url= " + _url);
for ( TableMap tmap : _tablesByID.values() ) {
System.out.println(" " + tmap.tableID() + " " + tmap.name());
}
System.out.println("}");
}
COM: <s> output a description of this database on stdout </s>
|
funcom_train/46014519
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void initProbe(String filename){
if (filename == null || filename.length() == 0){
return;
}
Object[] retVal = ModelUtils.loadEffectProbeData(filename);
trainingUserIDs = (int[])retVal[0];
trainingMoviesIDs = (short[])retVal[1];
trainingRatings = (byte[]) retVal[2];
trainingPredictions = (double[])retVal[3];
residuals = (double[]) retVal[4];
}
COM: <s> initialize the probe data </s>
|
funcom_train/25647188
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private Long getElapsedTime(int row) {
Date startTime = getStartTime(row);
Date endTime = getEndTime(row);
Long elapsetTime = null;
if (startTime != null && endTime != null) {
long startTimeInMillis = startTime.getTime();
long endTimeInMillis = endTime.getTime();
elapsetTime = endTimeInMillis - startTimeInMillis;
}
return elapsetTime;
}
COM: <s> time taken by a test case </s>
|
funcom_train/13525876
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public double getStretchY() {
if (stretchY < 0.0) {
Iterator iter = cells.iterator();
Cell cell;
stretchY = getIntrinsicStretchY();
while (iter.hasNext()) {
cell = (Cell) iter.next();
if (cell.isMultiRowCell())
stretchY = Math.max(stretchY, cell.getStretchYPerRow());
}
}
return stretchY;
}
COM: <s> gets the vertical stretch value of this row </s>
|
funcom_train/8064779
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setPoints(int i, int x, int y) {
if (i == 0) {
_x1 = x;
_y1 = y;
} else if (i == 1) {
_x2 = x;
_y2 = y;
} else
throw new IndexOutOfBoundsException("FigLine has exactly 2 points");
calcBounds();
firePropChange("bounds", null, null);
}
COM: <s> move point i to location x y </s>
|
funcom_train/9760730
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void selectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection= (IStructuredSelection) event.getSelection();
Object selectedElement= selection.getFirstElement();
if (selectedElement == null) {
currentTreeSelection= null;
listViewer.setInput(currentTreeSelection);
return;
}
// i.e.- if not an item deselection
if (selectedElement != currentTreeSelection)
populateListViewer(selectedElement);
currentTreeSelection= selectedElement;
}
COM: <s> handle the selection of an item in the tree viewer </s>
|
funcom_train/8283967
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Object set(int index,Object obj) {
SyndCategoryImpl sCat = (SyndCategoryImpl) obj;
DCSubject subject = (sCat!=null) ? sCat.getSubject() : null;
subject = (DCSubject) _subjects.set(index,subject);
return (subject!=null) ? new SyndCategoryImpl(subject) : null;
}
COM: <s> sets a category in an existing position in the list </s>
|
funcom_train/4205280
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void fireSelectionChanged(final SelectionChangedEvent event) {
final Object[] listeners = selectionChangedListeners.getListeners();
for (int i = 0; i < listeners.length; ++i) {
final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
SafeRunnable.run(new SafeRunnable() {
public void run() {
l.selectionChanged(event);
}
});
}
}
COM: <s> notifies any selection changed listeners that the viewers selection has changed </s>
|
funcom_train/36554058
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void refreshLocation() {
Point location = SwingUtilities.convertPoint(attachedComponent, getLocation(), this);
try {
positioner.determineAndSetLocation(new Rectangle(location.x, location.y, attachedComponent.getWidth(), attachedComponent.getHeight()));
} catch (NullPointerException exc) {}
}
COM: <s> redetermines and sets the balloon tips location </s>
|
funcom_train/20904485
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected JButton getBnREmove() {
if (bnREmove == null) {
bnREmove = new JButton();
bnREmove.setText("Remove");
bnREmove.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
int r = getTableHeaders().getSelectedRow();
if (r != -1)
getColumnHeadersTableModel().removeItem(r);
}
});
}
return bnREmove;
}
COM: <s> this method initializes bn remove </s>
|
funcom_train/43449103
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Dimension getMinimumSize() {
if (this.image != null) {
int width = this.image.getWidth(this);
if (width == 0) {
width = 20;
System.err.println(
"Detected size 0 for image width! Maybe there is an error!");
}
int height = this.image.getHeight(this);
if (height == 0) {
height = 20;
System.err.println(
"Detected size 0 for image height! Maybe there is an error!");
}
return new Dimension(width + 4, height + 4);
} else {
return new Dimension(20, 20);
}
}
COM: <s> p returns minimum size for this shadow object </s>
|
funcom_train/4962173
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public LocatorIterator locators() {
PositionIterator pi = new InOrderIterator(tree_);
Locator[] locarray = new Locator[size()];
int i = 0;
while (pi.hasNext()){
pi.nextPosition();
if (pi.element() instanceof Locator){
locarray[i++] = (Locator)(pi.element());
}
}
ArrayLocatorIterator akbi = new ArrayLocatorIterator(locarray,i);
return akbi;
}
COM: <s> takes o n time from the need to iterate through the tree during </s>
|
funcom_train/10808750
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testMalformedDocument() {
OMDocument document = getSampleOMDocument("<Root><Child attr='a' attr='a'/></Root>");
try {
document.serialize(new ByteArrayOutputStream());
fail("Expected exception");
} catch (Exception ex) {
// We expect an exception here
}
document.close(false);
}
COM: <s> test that a document that is not well formed triggers an appropriate error </s>
|
funcom_train/48705024
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void execute(BstEntry context) {
if (stack.size() < 1) {
throw new VMException("Not enough operands on stack for operation chr.to.int$");
}
Object o1 = stack.pop();
if (!(o1 instanceof String && ((String) o1).length() == 1)) {
throw new VMException("Can only perform chr.to.int$ on string with length 1");
}
String s = (String) o1;
stack.push(new Integer(s.charAt(0)));
}
COM: <s> pops the top string literal makes sure its a single </s>
|
funcom_train/22551481
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addEndpoint(TorrentLocation to) {
if (_peers.contains(to) || linkManager.isConnectedTo(to))
return;
if (!RouterService.getIpFilter().allow(to.getAddress()))
return;
if (NetworkUtils.isMe(to.getAddress(), to.getPort()))
return;
if (_peers.add(to)) {
synchronized(state.getLock()) {
if (state.get() == TorrentState.SCRAPING)
state.set(TorrentState.CONNECTING);
}
_connectionFetcher.fetch();
}
}
COM: <s> adds location to try </s>
|
funcom_train/42646527
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void disposeFontResources() {
Enumeration<Reference> test = refs.keys();
Reference ref;
Object tmp;
while (test.hasMoreElements()) {
ref = test.nextElement();
tmp = refs.get(ref);
if (tmp instanceof Font ||
tmp instanceof FontDescriptor) {
refs.remove(ref);
}
}
}
COM: <s> utility demo functionality to clear all font and font descriptor </s>
|
funcom_train/9878299
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected boolean areProbesColored() {
int [] indices = this.getCluster();
for(int i = 0; i < indices.length; i++){
if( this.data.getProbeColor(this.getMultipleArrayDataRow(i)) != null){
return true;
}
}
return false;
}
COM: <s> returns true if a probe in the current viewer has color </s>
|
funcom_train/50869702
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: static public void saveConfiguration() {
try {
FileOutputStream out = new FileOutputStream("Crepe.prop");
properties.store(out, "--- Crepe settings ---");
out.close();
} catch (Exception e) {
// nothing useful we can do here, just print the stack trace
e.printStackTrace();
}
}
COM: <s> saves the current configuration </s>
|
funcom_train/18738425
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testOutjarInInjars () {
String[] args = new String[] {"-aspectpath", aspectjarName, "-injars", injarName, "-outjar", injarName};
Message error = new Message(WeaverMessages.format(WeaverMessages.OUTJAR_IN_INPUT_PATH));
Message fail = new Message("Usage:");
MessageSpec spec = new MessageSpec(null,null,newMessageList(error),newMessageList(fail),null);
CompilationResult result = ajc(baseDir,args);
// System.out.println(result);
assertMessages(result,spec);
}
COM: <s> aim check that outjar does not coincide with a member of injars </s>
|
funcom_train/11671463
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void deliverEvent(EventObject evt) {
if (evt instanceof TextEvent) {
TextEvent event = (TextEvent)evt;
Vector l;
synchronized (textListeners) { l = (Vector)textListeners.clone(); }
int size = l.size();
for (int i = 0; i < size; i++)
((TextListener)l.elementAt(i)).textValueChanged(event);
}
}
COM: <s> this function delivers text listener events when the ok </s>
|
funcom_train/32778678
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void internalUpdate(double value) {
if (this.getObservations() == 1) { // First entry
_mean = value;
_sumOfSquaredDevsFromMean = 0.0;
} else { // Further entries
double _m_old = _mean;
_mean += (value - _mean)/this.getObservations();
_sumOfSquaredDevsFromMean += (value - _m_old)*(value - _mean);
}
}
COM: <s> internal method to update the mean and sum of the squares of the </s>
|
funcom_train/12561818
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public ImageData createResourceImageData(String name) throws IOException {
ImageData data = new ImageData();
/*
* Load native image data from cache and create
* image, if available. If image is not cached,
* proceed to load and create image normally.
*/
if (!loadCachedImage(data, name)) {
createImageFromStream(data,
MIDPConfig.getResourceAsStream(name));
}
data.createGCISurfaces();
return data;
}
COM: <s> creates an immutable code image data code </s>
|
funcom_train/18739010
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public HostNode createNode(int nr, TypeLabel type) {
assert type.isNodeType();
TypeNode typeNode = this.typeFactory.getNode(type);
assert typeNode != null;
setLastNodeType(typeNode);
HostNode result = super.createNode(nr);
resetLastNodeType();
assert result.getType() == typeNode;
return result;
}
COM: <s> creates and returns a node with a given number and node type label </s>
|
funcom_train/38316417
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int doEndTag() throws JspTagException {
JspWriter out = pageContext.getOut();
try {
out.write(String.valueOf(SessionCounter.getActiveUserCount()));
} catch (IOException e) {
throw new JspTagException("Error writing to page");
}
return EVAL_PAGE;
}
COM: <s> print the active user count </s>
|
funcom_train/15616493
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void addParam(WikiMessageParam wikiMessageParam) {
WikiMessageParam[] newParams = new WikiMessageParam[this.getParamsLength() + 1];
int i = 0;
if (this.params != null) {
for (WikiMessageParam param : this.params) {
newParams[i++] = param;
}
}
newParams[i] = wikiMessageParam;
this.params = newParams;
}
COM: <s> update the list of params for this wiki message adding the new </s>
|
funcom_train/18094583
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void sendKey(String keyCode) {
if(this.isBTReady){
//Bluetooth IS ready
this.setKSState(""+1);
byte [] data = new byte[50];
data = keyCode.getBytes();
//Trying to send
this.setKSState(""+2);
try {
this.connection.send(data);
//Sent data
this.setKSState(""+4);
}
catch (Exception e) {
//Can't send data
this.setKSState(""+5);
}
}
else
//Bluetooth is NOT ready
this.setKSState(""+6);
}
COM: <s> sends a key to the connected remote device </s>
|
funcom_train/3704251
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean getPrivacyTagSecondUseNotify() {
Tuple tSecondUse = getOrCreatePrivacyTag(TUPLE_PRIVACYTAG_SECOND_USE);
String strVal = tSecondUse.getAttribute(ATTR_NOTIFY_ON_SECOND_USE);
if (strVal == null) {
return (true);
}
else {
return ("true".equalsIgnoreCase(strVal));
}
} // of method
COM: <s> get the notify value </s>
|
funcom_train/25679576
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void insertBlock(Block b) {
lastId++;
b.setId(lastId);
int zeros = b.getZeros();
idMapping.put(b.getId(), b);
getCacheItem(zeros, b.getSum()).add(b);
}
COM: <s> insert block into database </s>
|
funcom_train/24671740
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void updateDateFromDisplay() {
// Month is 0 based so add 1
StringBuilder sb1 = new StringBuilder()
.append(dateDayFrom).append(".").append(dateMonthFrom + 1).append(".").append(dateYearFrom).append(" ");
buttonPickDateFrom.setText(sb1.toString());
}
COM: <s> updates the text on the minimum date picker button </s>
|
funcom_train/50363943
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void remove(TableModelEvent e) {
TableRow row = (TableRow) e.getSource();
OID oids[] = getColumns();
for (int i = 0; i < oids.length; i++) {
oids[i].append(row.getKey());
removeOID(oids[i]);
}
map.remove(row.getKey());
}
COM: <s> remove provided row from this conceptual table </s>
|
funcom_train/16580191
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private JPanel getJPanel10() {
if (jPanel10 == null) {
jPanel10 = new JPanel();
jPanel10.setLayout(new BorderLayout());
jPanel10.add(getCheckLegend(), java.awt.BorderLayout.WEST);
// commented out: currently is not possible to customize legend size in maps
//jPanel10.add(getCmbLegend(), java.awt.BorderLayout.EAST);
jPanel10.add(new JPanel(), java.awt.BorderLayout.EAST);
}
return jPanel10;
}
COM: <s> this method initializes j panel10 </s>
|
funcom_train/25827546
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void computeAbstractSimState() {
AbstractSimState abstractSimState = new AbstractSimState();
abstractSimState.setSimStep(currentSimulationStep);
abstractSimState.setAgentsCount(this.aorObjectsByType.get(AOR_AGENT)
.size());
abstractSimState.setObjectsCount(this.aorObjectsByType.get(AOR_OBJECT)
.size()
- this.aorObjectsByType.get(AOR_AGENT).size());
abstractSimState.setEventsCount(this.currentEvents.size());
dataBus.notifySimulationInfo(new SimulationEvent(this,
DataBus.LoggerEvent.EVENT_INFOS, abstractSimState));
} // computeAbstractSimState
COM: <s> compute the abstract sim state </s>
|
funcom_train/7931221
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public List getSorted() {
// make sure sorting is done only once
if (sorted == null) {
sorted = new ArrayList(ngrams.values());
Collections.sort(sorted);
// trim at NGRAM_LENGTH entries
if (sorted.size() > MAX_SIZE) {
sorted = sorted.subList(0, MAX_SIZE);
}
}
return sorted;
}
COM: <s> return a sorted list of ngrams sort done by 1 </s>
|
funcom_train/48477098
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public HandlerRegistration addRowHoverHandler(com.smartgwt.client.widgets.grid.events.RowHoverHandler handler) {
if(getHandlerCount(com.smartgwt.client.widgets.grid.events.RowHoverEvent.getType()) == 0) setupRowHoverEvent();
return doAddHandler(handler, com.smartgwt.client.widgets.grid.events.RowHoverEvent.getType());
}
COM: <s> add a row hover handler </s>
|
funcom_train/50388449
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public Calendar makeCalendar(Object initialTT){
if(initialTT==null)return null;
Calendar c=null;
try{
XmlDateTime d=XmlDateTime.Factory.newValue(initialTT);
c=d.getCalendarValue();
return c;
}
catch(Exception e){}
try{
XmlDuration d=XmlDuration.Factory.newValue(initialTT);
GDuration duration=d.getGDurationValue();
GDateBuilder b=new GDateBuilder();
b.addGDuration(duration);
c=Calendar.getInstance();
c.setTime(b.getDate());
return c;
}catch(Exception e){}
return null;
}
COM: <s> make a calendar instance from the initial tt as supplied to add br </s>
|
funcom_train/27843411
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void unhookMenuItemImpl(String inControlID, SwingView inView) {
SMenuItem item = findMenuItem(inView, inControlID);
if (item == null) {
LOG.error("Can't find menuitem for: " + inControlID, new Throwable());
return;
}
item.unsetOwner(inView);
}
COM: <s> unhook a menu item from a view </s>
|
funcom_train/2325018
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public float normInfinity(FloatMatrix2D A) {
FloatProperty.DEFAULT.checkSparse(A);
float norm;
if (A instanceof SparseRCFloatMatrix2D) {
norm = normInfinityRC((SparseRCFloatMatrix2D) A);
} else {
norm = normInfinityRC(((SparseCCFloatMatrix2D) A).getRowCompressed());
}
return norm;
}
COM: <s> returns the infinity norm of matrix tt a tt which is the maximum </s>
|
funcom_train/7647266
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public int lastIndexOf(int c) {
// BEGIN android-changed
int _count = count;
int _offset = offset;
char[] _value = value;
for (int i = _offset + _count - 1; i >= _offset; --i) {
if (_value[i] == c) {
return i - _offset;
}
}
return -1;
// END android-changed
}
COM: <s> searches in this string for the last index of the specified character </s>
|
funcom_train/5232286
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setData(PdfSelectionTableItem[] inputData){
data.clear();
for(int i=0; (i<inputData.length && data.size()<getMaxRowsNumber()); i++){
data.add(inputData[i]);
}
this.fireTableDataChanged();
}
COM: <s> set data source for the model </s>
|
funcom_train/25967026
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public UnicodeSet applyIntPropertyValue(int prop, int value) {
checkFrozen();
if (prop == UProperty.GENERAL_CATEGORY_MASK) {
applyFilter(new GeneralCategoryMaskFilter(value), UCharacterProperty.SRC_CHAR);
} else {
applyFilter(new IntPropertyFilter(prop, value), UCharacterProperty.getInstance().getSource(prop));
}
return this;
}
COM: <s> modifies this set to contain those code points which have the </s>
|
funcom_train/26574461
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: private void returnToField(java.awt.Component field) {
final java.awt.Component help = field;
javax.swing.SwingUtilities.invokeLater(
new Runnable() {
/**
* Main processing method for the ActivityCustomizer object
*/
public void run() {
help.setForeground(Color.red);
help.requestFocus();
}
});
}
COM: <s> this method is used if a field has an invalid entry </s>
|
funcom_train/42710632
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void modifySS4NewPt( PumsHouseholdRealization newPoint, int mapNumber) {
assert mapNumber == 0;
PumsHousehold house = newPoint.getParentHousehold();
int reg = regionMap.getCellValue( newPoint.getEasting(), newPoint.getNorthing());
modifySS4NewPt(house, reg, mapNumber);
}
COM: <s> a point has been added to the map update statistics accordingly </s>
|
funcom_train/37772020
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public GridModel getRelatedFormUsageWM() {
GridModel rows = (GridModel) getWidgetCache().getModel("relatedFormUsage");
if (rows == null) {
rows = new GridModel();
populateRelatedFormUsage(rows);
getWidgetCache().addModel("relatedFormUsage", rows);
}
return rows;
}
COM: <s> getter for property related form usage </s>
|
funcom_train/49318117
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected JMenuItem createFileNewWindowMenuItem() {
JMenuItem menuItem = new JMenuItem(_I18N.getString("newWindow"));
menuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
_imageDisplay.newWindow();
}
});
return menuItem;
}
COM: <s> create the file new window menu item </s>
|
funcom_train/8221923
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void addUrlActions(Action[] actions) {
if (actions == null)
return;
for (int i = 0; i < actions.length; i++) {
_urlActions.add(actions[i]);
}
for (int i = 0; i < actions.length; i++) {
urlPopupMenu.add(new JMenuItem(actions[i]));
}
}
COM: <s> adds the url actions </s>
|
funcom_train/11371975
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: protected void checkDiskError(Exception e ) throws IOException {
LOG.warn("checkDiskError: exception: ", e);
if (e.getMessage() != null &&
e.getMessage().startsWith("No space left on device")) {
throw new DiskOutOfSpaceException("No space left on device");
} else {
checkDiskError();
}
}
COM: <s> check if there is no space in disk </s>
|
funcom_train/48849566
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public boolean hasTag() {
// simplified by [email protected] 030103 begin
// if (header != null)
// {
// return false;
// }
// else
// {
// return true;
// }
return ((header != null) ? false : true);
// simplified by [email protected] 030103 end
}
COM: <s> test if file already has an id3v2 tag </s>
|
funcom_train/47896892
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void print(Status sys) {
sys.printlnOut("Results: (Rank,Candidate)");
for(int i=0; i<numCand; i++) {
if(candList[i] != -1)
sys.printlnOut(Util.toStringIntPadded(i+1,5) + " " + candStrings[i]);
}
}
COM: <s> print prints results to the screen </s>
|
funcom_train/38551658
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void updateDataCodes(DataPointCodeCollection dataPointCodeCollection) {
this.dataCodeModel.removeAllElements();
for(int i = 0; i < dataPointCodeCollection.size(); i++) {
this.dataCodeModel.addElement(
dataPointCodeCollection.getDataPointCodeAt(i));
}
}
COM: <s> updates the data codes that available for the user to query from </s>
|
funcom_train/12273607
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public String toString() {
StringBuffer str = new StringBuffer();
str.append("[");
if ( hasOwner()) {
str.append("Owner:");
str.append(getOwner().toString());
str.append(",");
}
if ( hasGroup()) {
str.append("Group:");
str.append(getGroup().toString());
str.append(",");
}
if ( hasDACL()) {
str.append("DACL:");
str.append(getDACL().toString());
str.append(",");
}
if ( hasSACL()) {
str.append("SACL:");
str.append(getSACL().toString());
}
str.append("]");
return str.toString();
}
COM: <s> return the security descriptor as a string </s>
|
funcom_train/12179533
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void testTextPrefixURL() throws Exception {
RuntimeProject project = createNewProject(baseURLString, false);
MarinerURL url = project.getPrefixURL(VariantType.TEXT);
assertNotNull("URL should exist", url);
assertEquals("Project and test URLs should match",
url, new MarinerURL(textPrefixString));
}
COM: <s> test that the text prefix url is set correctly </s>
|
funcom_train/47139591
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setCurrentSubBasket(String sName) {
synchronized (getChildrenLock()) {
if (!m_mpsdbChildren.containsKey (sName)) {
SubDataBasket sdb = new SubDataBasket (this);
m_mpsdbChildren.put (sName, sdb);
}
synchronized (getCurrentLock()) {
m_sdbCurrent = (SubDataBasket) m_mpsdbChildren.get (sName);
}
}
}
COM: <s> set the current subbasket </s>
|
funcom_train/42667313
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public JMenuItem getJMenuConvComp() {
if (jMenuConvComp == null) {
jMenuConvComp = new JMenuItem();
jMenuConvComp.setText("Convert and Compare");
jMenuConvComp.setMnemonic(KeyEvent.VK_T);
jMenuConvComp.setName("menuConv");
jMenuConvComp.setToolTipText("Convert the image and compare outputs");
jMenuConvComp.setAction(new Actioneer(this, jMenuConvComp));
}
return jMenuConvComp;
}
COM: <s> this method initializes j menu conv comp </s>
|
funcom_train/1848901
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void updateAuthenticator(String domain, AuthenticatorFactory factory) {
final Authenticator authenticator;
try {
authenticator = factory.newInstance(api);
} catch (Throwable e) { //Throwable due to OSGi
GoGoEgo.debug("error").println("Could not load {0} due to error: {1}", domain, e);
return;
}
GoGoEgo.debug("config").println("Adding authenticator {0} to {1}", domain, getRealm());
addAuthenticator(domain, authenticator);
}
COM: <s> used to reload authenticators following a drop in or initialization </s>
|
funcom_train/43876105
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void setKey( final String key ) {
final WebElement list = openList();
final List<WebElement> items = list.findElements( By.tagName( "a" ) );
for ( WebElement element : items ) {
if ( element.getText().equalsIgnoreCase( key ) ) {
element.click();
return;
}
}
}
COM: <s> set filter key after this filter is not called </s>
|
funcom_train/32140241
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public void dispose() {
if(null != txtDisplay)
txtDisplay.dispose();
if(null != txtCategory)
txtCategory.dispose();
if(null != txtDescription)
txtDescription.dispose();
if(null != treeGraphs)
treeGraphs.dispose();
if(null != btnAdd)
btnAdd.dispose();
if(null != btnRemove)
btnRemove.dispose();
if(null != btnAddFilter)
btnAddFilter.dispose();
if(null != selectedTreeItem)
selectedTreeItem.dispose();
txtDisplay = null;
txtCategory = null;
txtDescription = null;
treeGraphs = null;
btnAdd = null;
btnRemove = null;
btnAddFilter = null;
selectedTreeItem = null;
data = null;
}
COM: <s> this cleans up all internal references to objects </s>
|
funcom_train/50066693
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public SourceRange cspCases(List trees) {
if ((trees == null) || !(trees.nonEmpty()))
return null;
SourceRange list_sr = new SourceRange();
for (List l = trees; l.nonEmpty(); l = l.tail) {
list_sr.mergeWith(csp((Tree) l.head));
}
positions.put(trees, list_sr);
return list_sr;
}
COM: <s> visitor method compute source positions for a list of case blocks of </s>
|
funcom_train/8581269
|
/tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716
|
TDAT: public DomainRestoreInfo reduceDomains(Variable var, Object value, CSP csp) {
DomainRestoreInfo result = new DomainRestoreInfo();
Domain domain = csp.getDomain(var);
if (domain.contains(value)) {
if (domain.size() > 1) {
FIFOQueue<Variable> queue = new FIFOQueue<Variable>();
queue.add(var);
result.storeDomainFor(var, domain);
csp.setDomain(var, new Domain(new Object[] { value }));
reduceDomains(queue, csp, result);
}
} else {
result.setEmptyDomainFound(true);
}
return result.compactify();
}
COM: <s> reduces the domain of the specified variable to the specified value and </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.