__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/8492326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector3f max() {
float maxX, maxY, maxZ;
Vector3f v;
maxX = (v = getMesh(0).max()).x;
maxY = v.y;
maxZ = v.z;
for (int i = 1; i < objects.size(); i++) {
if (maxX > (v = getMesh(i).max()).x)
maxX = v.x;
if (maxY > v.y)
maxY = v.y;
if (maxZ > v.z)
maxZ = v.z;
}
return new Vector3f(maxX, maxY, maxZ);
}
COM: <s> returns the max x y z </s>
|
funcom_train/45643386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void defaultAction(String name) {
if (MessageDialog.openQuestion(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Default Alphabet", "Are you sure you want to make the '" + name + "' alphabet the new default?")) {
AbstractAlphabet a = getDefaultAlphabet();
if (a != null) {
a.setDefaultAlphabet(false);
}
AbstractAlphabet b = getAlphabet(name);
b.setDefaultAlphabet(true);
fillTable();
}
}
COM: <s> will be performed after the set default button has been clicked </s>
|
funcom_train/20775729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUseVelocity (boolean useVelocity){
if ( useVelocity ){
setPathsEnabled(true);
}
getSupport().firePropertyChange("useVelocity",this.useVelocity,useVelocity);
this.useVelocity = useVelocity;
getPrefs().putBoolean("BluringFilter2DTracker.useVelocity",useVelocity);
}
COM: <s> use cluster velocity ppt to estimate the location of cluster </s>
|
funcom_train/26481543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void executeOn(Object prevalentSystem, Date executionTime) {
LedgerSystem system = (LedgerSystem) prevalentSystem;
BookTable table = system.getBookTable();
PostedHeldTransaction tran = table.getHeld(requestid);
if (tran != null && tran.getReceiptId() == null)
tran.setReceiptId(receiptid);
}
COM: <s> this method is called by prevayler </s>
|
funcom_train/19155325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFormNameXML(XMLElement xml) {
Vector c = xml.getChildren();
for (int i=0;i<c.size();i++) {
XMLElement x=(XMLElement)c.get(i);
if (x.getName().equals("text")) {
formname=x.getContent();
}
}
}
COM: <s> set the formname from an </s>
|
funcom_train/39293965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIncludeOptionalPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SectionType_includeOptional_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SectionType_includeOptional_feature", "_UI_SectionType_type"),
CntPackage.Literals.SECTION_TYPE__INCLUDE_OPTIONAL,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the include optional feature </s>
|
funcom_train/35443498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int write(byte[] b, int off, int len) {
int writeCount = 0;
while(writeCount < len)
{
// Write as much as possible
writeCount += writeLenOrAvailable(b,off+writeCount,len-writeCount);
// If we couldn't write it all, then block until more is available
if(writeCount<len)
block();
}
return len;
}
COM: <s> write data of provided bytearray </s>
|
funcom_train/31684237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static protected ColumnRef getCachedColumnRef(String sColumn) throws DataStoreException {
String sKey = Session.class.getName() + sColumn;
ColumnRefCache cache = ColumnRefCache.getInstance();
ColumnRef colref = (ColumnRef) cache.getObject(sKey);
if(colref == null) {
colref = getColumnRef(sColumn);
cache.putObject(sKey,colref);
}
return colref;
}
COM: <s> returns a code column ref code corresponding to the column given </s>
|
funcom_train/40768960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getAccessSecret() {
// TODO - is this the length i want?
int nounceLength = 15;
String chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
String s = "";
for (int i = 0; i < nounceLength; i++) {
int rnum = (int) Math.floor(Math.random() * chars.length());
s += chars.substring(rnum, rnum + 1);
}
return s;
}
COM: <s> get accesstoken secret creates a unique secret for teh session </s>
|
funcom_train/10515356 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
LocalProperties.get(getProject()).copy();
thread = Thread.currentThread();
task.perform();
} catch (Throwable t) {
exception = t;
if (failOnAny) {
stillRunning = false;
}
} finally {
synchronized (semaphore) {
finished = true;
semaphore.notifyAll();
}
}
}
COM: <s> executes the task within a thread and takes care about </s>
|
funcom_train/28224847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void putInCache(final String key, final Object value) {
int repeated = recent.indexOf(key);
if (repeated != -1) { // It's already there
recent.remove(repeated);
} else {
cache.put(key, value);
}
recent.add(key); // Refresh recent list
if (cache.size() > cacheSize) { // Remove old element
cache.remove(recent.remove(0));
// System.out.println("Dropped element form cache");
}
}
COM: <s> put an element in the cache that is read it from the persisted </s>
|
funcom_train/32961949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updatePlanEndTime( ) throws ParseException {
IVLTS ivltsAct = getEffectiveTimeIVLTS( getAct() );
IVLTS ivltsPlan = getEffectiveTimeIVLTS( planAct );
if (ivltsAct!=null) {
TSEx tsEnd = (TSEx) ivltsAct.getHigh().getTS();
ivltsPlan.getHigh().setTS(toTS( tsEnd.getDate() ));
}
}
COM: <s> use our end time to update the end time of the plan </s>
|
funcom_train/19960686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException{
cal.setTime(new java.util.Date(x.getTime()));
saveObject(parameterIndex,cal);
ps.setTimestamp(parameterIndex, x, cal);
}
COM: <s> this implementation assumes that the timestamp has the date time and </s>
|
funcom_train/24152923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSelectedMonth() {
System.out.println("selectedMonth");
DefaultCalendarModel model = new DefaultCalendarModel();
model.setSelectedMonth(Calendar.JANUARY);
assertEquals(
"Wrong selectMonth:",
Calendar.JANUARY,
model.getSelectedMonth());
// test if month is wrong
try {
model.setSelectedMonth(345);
fail("IllegalArgumentException is expected.");
} catch (IllegalArgumentException e) {
// ok
}
}
COM: <s> test of property selected month of class com </s>
|
funcom_train/32905419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setDefaultCredential( SecurePeerCredential newDefault ) {
Credential oldDefault = defaultCredential;
synchronized( this ) {
defaultCredential = newDefault;
}
if (LOG.isEnabledFor(Level.INFO)) {
LOG.info( "New Default credential : " + newDefault );
}
support.firePropertyChange( "defaultCredential", oldDefault, newDefault );
}
COM: <s> sets the default credential </s>
|
funcom_train/51167776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printStackTrace(PrintWriter w) {
super.printStackTrace(w);
int i = 0;
for (Iterator iterator = list.iterator(); iterator.hasNext(); i++) {
Throwable throwable = (Throwable) iterator.next();
w.println("Detail [" + i + "] :");
throwable.printStackTrace(w);
}
}
COM: <s> prints this throwable and its backtrace to the specified print writer </s>
|
funcom_train/26626445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected GDNInf bindToObject(String name) throws GlobeException {
try {
// bind to object and get interface
SOI soi = globe.bindTo(name);
GDNInf gdn = new GDNInf(name, soi);
return gdn;
} catch (ObjectNotFoundException e) {
throw new GlobeException(e);
} catch (BindingException e) {
throw new GlobeException(e);
}
}
COM: <s> bind to the named gdn package object </s>
|
funcom_train/25187299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToArray_0args() {
System.out.println("toArray");
System.out.println(" NOTE: NonResizableListForArray does not support toArray() method and return null.");
for (Object o : getTestArrays()) {
NonResizableListForArray instance = new NonResizableListForArray(o);
Object[] objs = instance.toArray();
assertNull(objs);
}
}
COM: <s> test of to array method of class non resizable list for array </s>
|
funcom_train/13758888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getARGBHex() {
StringBuffer sb = new StringBuffer();
byte[] rgb = getRgb();
if(rgb == null) {
return null;
}
for(byte c : rgb) {
int i = (int)c;
if(i < 0) {
i += 256;
}
String cs = Integer.toHexString(i);
if(cs.length() == 1) {
sb.append('0');
}
sb.append(cs);
}
return sb.toString().toUpperCase();
}
COM: <s> return the argb value in hex format eg ff00 ff00 </s>
|
funcom_train/4017806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException {
int formID = ExtUtil.readInt(in);
instance = getTemplateInstance(formID).clone();
instance.setID(ExtUtil.readInt(in));
instance.setDateSaved((Date)ExtUtil.read(in, new ExtWrapNullable(Date.class)));
//formID, name, schema, versions, and namespaces are all invariants of the template instance
TreeElement root = instance.getRoot();
readTreeElement(root, in, pf);
}
COM: <s> deserialize a compact instance </s>
|
funcom_train/9277252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCastWithUnaryMinusAndPlus()throws SQLException{
PreparedStatement ps = prepareStatement("select cast(-? as smallint), cast(+? as int) from t1");
ps.setInt(1,2);
ps.setInt(2,2);
int[] expectedTypes= new int[]{Types.SMALLINT,Types.INTEGER};
JDBC.assertParameterTypes(ps,expectedTypes);
String [][] expectedRows = new String[][]{{"-2","2"},{"-2","2"}};
JDBC.assertFullResultSet(ps.executeQuery(), expectedRows, true);
ps.close();
}
COM: <s> tests casting with unary plus and unary minus </s>
|
funcom_train/38513405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireTreeStructureChanged(Feature pFeature) {
if (treeListeners == null) return;
TreeItem[] path = pFeature.getPath();
for(Iterator it = treeListeners.iterator(); it.hasNext();) {
TreeModelListener element = (TreeModelListener)it.next();
element.treeStructureChanged(new TreeModelEvent(this, new TreePath(path)));
}
}
COM: <s> notifies all listeners </s>
|
funcom_train/32961131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeUserPassword(char[] oldPassword, char[] newPassword) {
String principal = null;
try {
principal = (String)TolvenSessionWrapperFactory.getInstance().getPrincipal();
this.ldapBean.changeUserPassword(principal, oldPassword, newPassword);
} catch (Exception e) {
throw new RuntimeException("Error changing password for " + principal, e );
}
}
COM: <s> remote friendly method to change the users password </s>
|
funcom_train/2621083 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setupTestPriceLocation(Long id, String name, Long sourceId) {
simpleJdbcTemplate.update(
"insert into solarnet.sn_price_loc (id,loc_name,source_id,currency,unit,time_zone) values (?,?,?,?,?,?)",
id, name, sourceId, "NZD", "kWh", "Pacific/Auckland");
}
COM: <s> insert a test price location into the solarnet </s>
|
funcom_train/2368830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean addIfUnderCorePoolSize(Runnable firstTask) {
Thread t = null;
final ReentrantLock mainLock = this.mainLock;
mainLock.lock();
try {
if (poolSize < corePoolSize && runState == RUNNING)
t = addThread(firstTask);
} finally {
mainLock.unlock();
}
if (t == null)
return false;
t.start();
return true;
}
COM: <s> creates and starts a new thread running first task as its first </s>
|
funcom_train/45256274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IWorkingSetElementAdapter createWorkingSetElementAdapter() {
if (!WorkbenchPlugin.hasExecutableExtension(configElement, ATT_ELEMENT_ADAPTER_CLASS))
return null;
IWorkingSetElementAdapter result = null;
try {
result = (IWorkingSetElementAdapter) WorkbenchPlugin
.createExtension(configElement, ATT_ELEMENT_ADAPTER_CLASS);
} catch (CoreException exception) {
WorkbenchPlugin.log("Unable to create working set element adapter: " + //$NON-NLS-1$
result, exception.getStatus());
}
return result;
}
COM: <s> creates a working set element adapter </s>
|
funcom_train/11307789 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
try {
if (pipe != null) {
if (pipe.sink().isOpen())
pipe.sink().close();
if (pipe.source().isOpen())
pipe.source().close();
}
pipe = Pipe.open();
flipped = false;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
COM: <s> reset the pipe </s>
|
funcom_train/4516245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void insertAutopadding(boolean insert) {
horizontalGroup.insertAutopadding(HORIZONTAL, new ArrayList<Spring>(1),
new ArrayList<Spring>(1), new ArrayList<Spring>(1),
new ArrayList<Spring>(1), insert);
verticalGroup.insertAutopadding(VERTICAL, new ArrayList<Spring>(1),
new ArrayList<Spring>(1), new ArrayList<Spring>(1),
new ArrayList<Spring>(1), insert);
}
COM: <s> adjusts the autopadding springs for the horizontal and vertical groups </s>
|
funcom_train/1458702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void throwUnsupportedOperationExceptionIfRest(String changingField, int value) throws UnsupportedOperationException {
if (this.isRest() && value != 0) { // each of the fields can be zero...
throw new UnsupportedOperationException(String.format("The Note is a rest. The %s field cannot be changed on a rest.", changingField));
}
}
COM: <s> throws an exception if the changing field is not being changed to zero </s>
|
funcom_train/33789914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getIncludePanel() {
if (includePanel == null) {
includePanel = new JPanel();
includePanel.setBorder(BorderFactory.createTitledBorder("Inclusione"));
includePanel.setLayout(null);
includePanel.setBounds(new Rectangle(555, 30, 100, 70));
includePanel.add(getIncludeRadioButton(), null);
includePanel.add(getExcludeRadioButton(), null);
}
return includePanel;
}
COM: <s> this method initializes include panel </s>
|
funcom_train/47545177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getChecked () {
checkWidget();
if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED);
if ((parent.style & SWT.CHECK) == 0) return false;
int /*long*/ [] ptr = new int /*long*/ [1];
OS.gtk_tree_model_get (parent.modelHandle, handle, Tree.CHECKED_COLUMN, ptr, -1);
return ptr [0] != 0;
}
COM: <s> returns code true code if the receiver is checked </s>
|
funcom_train/17689622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isTraversable(JType aRawType, Set<JType> aTraversalTypes) {
if (aTraversalTypes.contains(aRawType))
return true;
if (aRawType.isPrimitive())
return false;
JClass clazz = (JClass) aRawType;
for(JClass arg : clazz.getTypeParameters()) {
if (aTraversalTypes.contains(arg))
return true;
}
return false;
}
COM: <s> returns true if the type is something that we should traverse </s>
|
funcom_train/17789031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintComponent( Graphics g ) {
super.paintComponent( g );
try {
img = ImageIO.read( DrawMainPanel.class.getResource( "/images/backgroundMainPanel.png") );
} catch (IOException ex) {
ex.printStackTrace();
}
g.drawImage( img, 0, 0, this);
// g.drawLine( 10, 10, 100, 50);
}
COM: <s> draws the main panel </s>
|
funcom_train/19325666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String traitCaseName(final FObj fobj, final FoContext context) {
final AbstractName property = (AbstractName) getProperty(
FoProperty.CASE_NAME);
if (property != null) {
return property.getValue(context, fobj);
}
return AbstractName.getValueNoInstance();
}
COM: <s> returns the case name property </s>
|
funcom_train/4787223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setImage(Image image) {
checkWidget();
GridData ld = (GridData) button.getLayoutData();
if ( WIN32 ) {
ImageData id = image.getImageData();
ld.widthHint = id.width + 4;
ld.heightHint = id.height + 4;
}
ld.grabExcessVerticalSpace = true;
button.setImage(image);
}
COM: <s> sets a new image to display on the button replacing the default one </s>
|
funcom_train/17938670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAxis(int num){
Axis newAxes[] = new Axis[axes.length-1];
int i=0,j=0;
for (;i<newAxes.length;i++){
if (j == num){
j++;
}
newAxes[i] = axes[j];
j++;
}
axes = newAxes;
setupPopup();
deepRepaint = true;
repaint();
}
COM: <s> removes an axis from the display </s>
|
funcom_train/32965617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long countDocuments(long accountId) {
Query query = em.createQuery("SELECT COUNT(d) FROM DocBase d where account.id=:account");
query.setParameter("account", accountId);
Long rslt = (Long) query.getSingleResult();
return rslt.longValue();
}
COM: <s> count of all documents owned by this account </s>
|
funcom_train/24592797 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tryUnlockNewTowns(World theWorld) {
// unlock new towns
int townUnlocked = theWorld.getTownsUnlocked();
// Is the prosperity high enough to advance?
while(townUnlocked == 0){
// unlock next town
theWorld.unlockTown();
++townUnlocked;
}
// update prosperity needed for next town
theWorld.setNextTownProsperity(prosperityToProceed(theWorld,
townUnlocked));
}
COM: <s> unlock new town s if total prosperity is high enough </s>
|
funcom_train/2639921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void reenableAutoCompaction( boolean check_for_compaction ) {
_autoCompactTemporaryDisable = false;
if ( check_for_compaction && _autoCompactRemovesRemaining <= 0 &&
_autoCompactionFactor != 0 ) {
// Do the compact
// NOTE: this will cause the next compaction interval to be calculated
compact();
}
}
COM: <s> re enable auto compaction after it was disabled via </s>
|
funcom_train/31077292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShadeModel(int model) {
Integer oldValue = new Integer(this.shadeModel);
this.shadeModel = model;
Object source = (this.source == null) ? this : (Object) this.source;
propertyChange(new PropertyChangeEvent(source, "shadeModel", new Integer(this.shadeModel), oldValue));
}
COM: <s> sets the shading model </s>
|
funcom_train/12557041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkAttribute(int attribute) {
if (attribute == 0) {
// OK
return;
} else {
// make sure only one bit is set
while ((attribute & 1) == 0 && attribute != 0) {
attribute >>= 1;
}
if (attribute != 1) {
// more than one bit is set in attribute
throw new IllegalArgumentException(
"Invalid attribute: " + attribute);
}
}
}
COM: <s> ensures the attribute is valid </s>
|
funcom_train/45692208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSongNumberCurrentPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Song_songNumberCurrent_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Song_songNumberCurrent_feature", "_UI_Song_type"),
EsxPackage.Literals.SONG__SONG_NUMBER_CURRENT,
false,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the song number current feature </s>
|
funcom_train/25705363 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBcancel() {
if( Bcancel == null ) {
Bcancel = new JButton();
Bcancel.setText("Cancel");
Bcancel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
exitState = false;
setVisible(false);
}
});
}
return Bcancel;
}
COM: <s> this method initializes bcancel </s>
|
funcom_train/44448511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(String filename) {
try {
DataInputStream dis = getInputStream();
FileOutputStream fos = new FileOutputStream(new File(filename));
byte[] b = new byte[dataSize + dataOffset];
dis.read(b, 0, dataOffset + dataSize);
fos.write(b);
fos.close();
} catch (FileNotFoundException e1) {
e1.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> saves the audio signal to a file </s>
|
funcom_train/17929641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCommand(Request request) {
if (request instanceof ReconnectRequest) {
Object view = ((ReconnectRequest) request).getConnectionEditPart()
.getModel();
if (view instanceof View) {
Integer id = new Integer(EcoreModelVisualIDRegistry
.getVisualID((View) view));
request.getExtendedData().put(VISUAL_ID_KEY, id);
}
}
return super.getCommand(request);
}
COM: <s> extended request data key to hold editpart visual id </s>
|
funcom_train/43589934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getOkButton() {
if (okButton == null) {
okButton = new JButton();
okButton.setName("fetchTracksButton");
okButton.setText("Ok");
okButton.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent e) {
ZensesApplication.getApplication().getZenses().getViewHandler().hidePreferencesWindow(true);
}
});
}
return okButton;
}
COM: <s> this method initializes ok button </s>
|
funcom_train/44495807 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isExpired(TransactionID key, long currentTime) {
boolean retBoolean = false;
TimeoutInformation timeoutInformation = (TimeoutInformation)transactions.get(key);
if (timeoutInformation != null) {
long lastAccessed = timeoutInformation.getLastAccessed();
if ((currentTime - lastAccessed) > timeout) {
retBoolean = true;
}
}
return retBoolean;
}
COM: <s> method is expired </s>
|
funcom_train/20876854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countStudentConflicts(ExamPeriodPlacement period) {
int conf = 0;
for (ExamStudent s : getStudents()) {
for (Exam exam : s.getExams(period.getPeriod())) {
if (exam.equals(this))
continue;
if (s.canConflict(this, exam))
continue;
conf++;
}
}
return conf;
}
COM: <s> number of students of this exam that does not have direct conflicts </s>
|
funcom_train/16480587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public byte getReg8(byte index) {
switch (index) {
case 0:
return m_state.getAL();
case 1:
return m_state.getCL();
case 2:
return m_state.getDL();
case 3:
return m_state.getBL();
case 4:
return m_state.getAH();
case 5:
return m_state.getCH();
case 6:
return m_state.getDH();
case 7:
return m_state.getBH();
default:
throw new RuntimeException();
}
}
COM: <s> returns the value of the 8bit register whose index is given </s>
|
funcom_train/45250963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sort() {
//Backward compatible. Table used to have 3 columns.
if (sortColumn > (editorsTable.getColumnCount() - 1)) {
sortColumn = 0;
}
Adapter a[] = new Adapter[elements.size()];
elements.toArray(a);
Arrays.sort(a);
elements = Arrays.asList(a);
}
COM: <s> sorts all the editors according to the table header </s>
|
funcom_train/45354362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton4() {
if (jButton4 == null) {
jButton4 = new JButton();
jButton4.setBounds(12, 119, 148, 20);
jButton4.setText("New Layby F9");
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
if (bFinished == false && slfParent.bHasSales == true)
showNewLby();
}
});
}
return jButton4;
}
COM: <s> this method initializes j button4 </s>
|
funcom_train/2579932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isOverlap() {
double y = 0.0;
for (int i = 0; i < this.labels.size(); i++) {
PieLabelRecord plr = getPieLabelRecord(i);
if (y > plr.getLowerY()) {
return true;
}
y = plr.getUpperY();
}
return false;
}
COM: <s> returns code true code if there are overlapping labels in the list </s>
|
funcom_train/18808492 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test788597() {
final DefaultTableXYDataset dataset = new DefaultTableXYDataset();
dataset.addSeries(createSeries1());
assertEquals(4, dataset.getItemCount());
dataset.removeAllSeries();
assertEquals(0, dataset.getItemCount());
}
COM: <s> a test for bug report 788597 </s>
|
funcom_train/41388908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buf = new StringBuffer();
for (int y = 0; y < getHeight(); y++) {
for (int x = 0; x < getWidth(); x++) {
buf.append(grid[y][x]).append("\t");
}
buf.append("\n");
}
return buf.toString();
}
COM: <s> convert this sample to a string </s>
|
funcom_train/18501132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void persistApplication(String filename) throws InternalException {
try {
FileOutputStream fos = new FileOutputStream(filename);
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(this);
oos.writeObject(MethodsInstanceRegistry.getInstance());
oos.writeObject(TasksInstanceRegistry.getInstance());
oos.flush();
oos.close();
} catch (java.io.IOException ioe) {
CBRLogger.log(
this.getClass(),
CBRLogger.ERROR,
"Failure storing the application");
throw new InternalException(ioe);
}
}
COM: <s> this method stores the configuration currently set for this application </s>
|
funcom_train/38578200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initMaxMinValues() {
this.maxCPContrib = 0 ;
this.maxComplexity = -1;
this.minComplexity = (int) Double.POSITIVE_INFINITY ;
this.maxAvgComp = -1;
this.minAvgComp = (int) Double.POSITIVE_INFINITY ;
this.maxCalls = -1;
this.minCalls = (int) Double.POSITIVE_INFINITY ;
}
COM: <s> initialize the values relative to the cal program max and min values </s>
|
funcom_train/46381399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendAll(WonderlandClientID senderID, CellMessage message) {
if (cellChannelRef==null) {
return;
}
if (message.getCellID() == null) {
message.setCellID(cellID);
}
if (senderID != null) {
message.setSenderID(senderID.getID());
}
cellSender.send(cellChannelRef.get(), message);
}
COM: <s> send message to all clients on this channel </s>
|
funcom_train/12181211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSelectedDeviceName() {
IStructuredSelection selection =
(IStructuredSelection) hierarchy.getSelection();
String selectedDevice = null;
if (!selection.isEmpty()) {
selectedDevice = ((Element) selection.
getFirstElement()).getAttributeValue(
DeviceRepositorySchemaConstants.
DEVICE_NAME_ATTRIBUTE);
}
return selectedDevice;
}
COM: <s> get the name of the currently selected device </s>
|
funcom_train/17584717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printBibtex(PrintWriter writer) {
assert writer != null : "writer parameter may not be null.";
for (Iterator it = this.values.iterator(); it.hasNext();) {
((BibtexAbstractValue) it.next()).printBibtex(writer);
if (it.hasNext()) {
writer.println();
writer.println();
}
}
}
COM: <s> this method will print all the bibtex values contained in this </s>
|
funcom_train/50848226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUpdateCharacterStream() throws Exception {
if (!isTestUpdates()) {
return;
}
try {
ResultSet rs = this.newUpdateableJdbcResultSet();
rs.next();
rs.updateCharacterStream(
"char_column",
new java.io.StringReader("updateCharacterStream"), 10);
} catch (Exception e) {
fail(e.toString());
}
}
COM: <s> test of update character stream method of interface java </s>
|
funcom_train/8898794 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete() {
nodeList.clear();
for (MultiEntityNode node : residentNodeList) {
node.removeFromMFrag();
}
residentNodeList = new ArrayList<ResidentNode>();
for (MultiEntityNode node : inputNodeList) {
node.removeFromMFrag();
}
inputNodeList = new ArrayList<InputNode>();
for (OrdinaryVariable variable : ordinaryVariableList) {
variable.removeFromMFrag();
}
ordinaryVariableList = new ArrayList<OrdinaryVariable>();
}
COM: <s> method responsible for deleting this mfrag but not its nodes and </s>
|
funcom_train/18569890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRecordCallVerifyWithArgs() {
tempCall = callManager.recordCall(signature, argValues);
callManager.recordReturnValueForLastCall(returnValue);
InvokedCall invokedCall = new InvokedCall(signature, argValues);
assertNotNull(callManager.getMatchingCall(invokedCall));
assertEquals(returnValue, tempCall.getReturnValue());
callManager.indicateCalled(invokedCall);
}
COM: <s> test recording calling and verifying a call with args </s>
|
funcom_train/33859899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getQuantAheadPanel() {
if (quantAheadPanel == null) {
GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
gridBagConstraints4.fill = GridBagConstraints.BOTH;
gridBagConstraints4.weighty = 1.0;
gridBagConstraints4.weightx = 1.0;
quantAheadPanel = new JPanel();
quantAheadPanel.setLayout(new GridBagLayout());
quantAheadPanel.add(getQuantAheadSplitPane(), gridBagConstraints4);
}
return quantAheadPanel;
}
COM: <s> this method initializes quant ahead panel </s>
|
funcom_train/651884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWithSingleElement() {
IDocument source = new Document(
"<?xml version=\"1.0\"?>\n" +
"<root/>"
);
XMLParser parser = new XMLParser();
parser.setSource(source);
IXMLDocument document = parser.parse();
IXMLElement root = document.getRoot();
assertEquals("root", document.getRoot().getLocalName());
assertEquals(22, root.getSourceRegion().getOffset());
assertEquals(7, root.getSourceRegion().getLength());
}
COM: <s> tests that parsing an xml document containing only a root element yields </s>
|
funcom_train/4154595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseReleased( final MouseEvent me ) {
try {
if ( me.getButton() == MouseEvent.BUTTON1 ) // left button
remotePlayer.setControlKeyState( Player.KEY_INDEX_FIRE, false );
else if ( me.getButton() == MouseEvent.BUTTON3 ) // right button
remotePlayer.setControlKeyState( Player.KEY_INDEX_ROPE, false );
}
catch ( RemoteException re ) {
}
}
COM: <s> to handle mousereleased events implementing mouse listener interface </s>
|
funcom_train/31156744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getTurnSpeed() {
double turn = Double.MAX_VALUE;
Iterator it = ships.iterator();
while (it.hasNext()) {
Ship ship = (Ship)it.next();
if (ship.getTurnSpeed() < turn) {
turn = ship.getTurnSpeed();
}
}
return turn;
}
COM: <s> get turn speed of the fleet </s>
|
funcom_train/3102270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void adjustLineIndentation(final IDocument document, final DocumentCommand command) throws BadLocationException {
Assertion.valid(document);
Assertion.valid(command);
if (command.offset >= 0 && document.getLength() > 0) {
final StringBuffer buffer= new StringBuffer(command.text);
adjustNewLineIndentation(document, command, buffer);
adjustNewLinePrefix(document, command, buffer);
command.text= buffer.toString();
}
}
COM: <s> adjusts the indentation of the a line </s>
|
funcom_train/14500315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doSign() throws Exception {
final RequestContext context = new RequestContext();
final GenericSignRequest request = new GenericSignRequest(1,
"<root/>".getBytes());
GenericSignResponse res;
// Send request to dispatcher
res = (GenericSignResponse) workerSession.process(WORKERID_1,
request, context);
Certificate cert = res.getSignerCertificate();
assertNotNull(cert);
}
COM: <s> do a dummy sign </s>
|
funcom_train/19183827 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPieceRequest( int piece_number, int piece_offset, int length ) {
DiskManagerRequest dmr = disk_manager.createRequest( piece_number, piece_offset, length );
try{
lock_mon.enter();
requests.addLast( dmr );
doReadAheadLoads();
}finally{
lock_mon.exit();
}
}
COM: <s> register a new piece data request </s>
|
funcom_train/39072010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer sb = new StringBuffer();
sb.append("rightMostX = " + getRightMostX());
sb.append("\n");
sb.append("leftMostX = " + getLeftMostX());
sb.append("\n");
sb.append("largestY = " + getLargestYPoint());
sb.append("\n");
sb.append("upperLeft = " + upperLeft);
sb.append("\n");
sb.append("hasCollided = " + hasCollided());
sb.append("\n");
sb.append("isOneNegative = " + isOneIsNegative());
sb.append("\n");
return sb.toString();
}
COM: <s> describe code to string code method here </s>
|
funcom_train/24942499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void graphEdges(Component component, Bus src) {
ComponentNode componentNode = (ComponentNode) nodeMap
.get(component);
graphEdge(componentNode, component.getGoPort());
for (net.sf.openforge.lim.Port port : component.getDataPorts()) {
if (port.getBus() == src)
graphEdge(componentNode, port);
}
}
COM: <s> graphs the incoming connections to a components ports </s>
|
funcom_train/17701372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeBlock() throws IOException {
if (logger.isLoggable(Level.FINEST)) {
logger.log(Level.FINEST, "WriteBlock: blkIdx = " + this.currBlkIdx);
}
if (this.outStream == null) {
throw new IOException("writing to an input buffer");
}
this.outStream.write(this.blockBuffer, 0, this.blockSize);
this.outStream.flush();
this.currRecIdx = 0;
this.currBlkIdx++;
}
COM: <s> write a tar buffer block to the archive </s>
|
funcom_train/21737731 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Sunipotent reflection( final int i){
try {
return Sunipotent.create(Group.getGroup(a.length).simpleReflection(i, a),
r.times(Group.getGroup(a.length).reflectionSign(i, a)));
} catch (NotARootException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
COM: <s> image of the sunipotent which calls it under the specified simple reflection </s>
|
funcom_train/46455312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveObject(XMLControl control, Object obj) {
PlottingPanel panel = (PlottingPanel) obj;
control.setValue("title", panel.axes.getTitle());
control.setValue("x axis label", panel.axes.getXLabel());
control.setValue("y axis label", panel.axes.getYLabel());
super.saveObject(control, obj);
}
COM: <s> saves plotting panel data in an xmlcontrol </s>
|
funcom_train/49645529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addRule(String symbol, StockEventType type, BigDecimal threshold, String account) {
ConcurrentLinkedQueue<Rule> newQ = new ConcurrentLinkedQueue<Rule>();
ConcurrentLinkedQueue<Rule> queue = this.rules.putIfAbsent(getKey(symbol, type), newQ);
if (queue==null) {
queue = newQ;
}
queue.add(new Rule(threshold, account));
}
COM: <s> appends new rule to analyzer active rule set </s>
|
funcom_train/50430303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getChildren(Vertex v) {
Vector vertex;
Edge e;
vertex = new Vector();
for(int i=0;i<edges.size();i++) {
e = (Edge) edges.elementAt(i);
if(v.equals(e.getVertex1())) {
vertex.add(e.getVertex2());
}
}
return vertex;
}
COM: <s> returns all the children of a particular vertex in the graph </s>
|
funcom_train/33518971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void uptadeXML() throws DBException {
try {
File file = new File(LEAGUE_PATH);
if (!file.exists()) {
file.createNewFile();
}
xstream.toXML(leaguesMap, new FileOutputStream(LEAGUE_PATH));
} catch (IOException e) {
throw new DBException(e.getMessage() + ": " + LEAGUE_PATH);
}
}
COM: <s> this method is responsible for saving the leagues information </s>
|
funcom_train/28672694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ValueType_type_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ValueType_type_feature", "_UI_ValueType_type"),
BeansPackage.Literals.VALUE_TYPE__TYPE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the type feature </s>
|
funcom_train/14317403 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
if (isCorrectMethod(method, args)) {
boolean handled = callTarget(args[0]);
setApplicationEventHandled(args[0], handled);
}
// All of the ApplicationListener methods are void; return null regardless of what happens
return null;
}
COM: <s> invocation handler implementation </s>
|
funcom_train/4868620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void publishContacts() {
while(!this.contactQueue.isEmpty()) {
Pair<List<ContactListener>, Contact> pair = this.contactQueue.poll();
List<ContactListener> listeners = pair.getFirst();
int size = listeners.size();
for(int i = 0; i < size; i++ ) {
ContactListener l = listeners.get(i);
l.touch(pair.getSecond());
}
this.contactCache.add(pair);
}
}
COM: <s> publish the contacts </s>
|
funcom_train/20885353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIllegalSingleSubRecordFLR() {
IllegalSingleSubRecordDTO dto = createIllegalSingleSubRecordDTO();
try {
JSefaTestUtil.assertRepeatedRoundTripSucceeds(FLR, dto);
fail("TypeMappingException expected but not thrown");
} catch (IOFactoryException e) {
assertTrue(true);
}
}
COM: <s> tests a dto with a complex field containing a single sub record flr </s>
|
funcom_train/19888031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateFrontendLocation(FrontendLocation location) {
open();
ContentValues args = new ContentValues();
args.put(KEY_NAME, location.Name);
args.put(KEY_ADDRESS, location.Address);
args.put(KEY_PORT, location.Port);
args.put(KEY_MAC, location.MAC);
args.put(KEY_WIFIONLY, location.WifiOnly);
int rows = db.update(FRONTEND_TABLE, args, KEY_ROWID + "=" + location.ID,
null);
close();
return rows > 0;
}
COM: <s> update the note using the details provided </s>
|
funcom_train/23011253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RadioGroup getRadioGroupByName(String name) {
if (name != null) {
int count = radioGroups.size();
for (int i = 0; i < count; i++) {
RadioGroup rg = (RadioGroup) radioGroups.elementAt(i);
if (name.equalsIgnoreCase(rg.name))
return rg;
}
}
return null;
}
COM: <s> searches for radio group with a specified name </s>
|
funcom_train/46633780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setLayout(null);
this.setSize(690, 421);
this.setTitle("Project Builder");
this.setJMenuBar(getPJMenuBar());
this.setContentPane(getJContentPane());
this.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
ProjectBuilder2.this.dispose();
}
});
}
COM: <s> this method initializes this </s>
|
funcom_train/51653582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cubicTo(float cx1, float cy1, float cx2, float cy2, float x, float y) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (!moved) {
CGPoint pt = new CGPoint();
OS.CGPathGetCurrentPoint(handle, pt);
OS.CGPathMoveToPoint(handle, null, pt.x, pt.y);
moved = true;
}
closed = false;
OS.CGPathAddCurveToPoint(handle, null, cx1, cy1, cx2, cy2, x, y);
}
COM: <s> adds to the receiver a cubic bezier curve based on the parameters </s>
|
funcom_train/181234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setConnection(String userId, String password) throws SQLException {
setJdbcConnection(DriverManager.getConnection(getObjectServer().getPersistenceManagerFactory().getConnectionURL(),
userId,
password));
// set the default
getJdbcConnection().setAutoCommit(getObjectServer().getPersistenceManagerFactory().getNontransactionalWrite());
}
COM: <s> open a target system connection </s>
|
funcom_train/3720981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRole(String role) throws ProfileException {
String oldRole = this.role;
try {
vetoableChangeSupport.fireVetoableChange("role", oldRole, role);
} catch (Exception e) {
throw new ProfileException(null, e);
}
this.role = role;
propertyChangeSupport.firePropertyChange("role", oldRole, role);
}
COM: <s> setter for property role </s>
|
funcom_train/42188411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
BorderLayout borderLayout = new BorderLayout();
borderLayout.setHgap(0);
borderLayout.setVgap(0);
jLabel = new JLabel();
jLabel.setText("NOmbre del tipo de Cosecha");
jContentPane = new JPanel();
jContentPane.setLayout(borderLayout);
jContentPane.add(getJTextField(), BorderLayout.SOUTH);
jContentPane.add(jLabel, BorderLayout.NORTH);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/47104733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemWeapon01() {
JMenuItem menuItem = new JMenuItem();
menuItem.setText(Weapon.W_01.getItemName());
menuItem.setEnabled(false);
menuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setPlrReadiedWeapon(Weapon.W_01);
}
});
return menuItem;
}
COM: <s> creates the second choice for the weapon menu </s>
|
funcom_train/19308087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFo001() throws FOrayException {
final FoDocumentReader reader = FoDocumentReader.getInstance();
try {
reader.buildFoTree("fo/invalid-fo-001.fo");
fail("Expected FOrayException indicating that the root element "
+ "is missing.");
} catch (final FOrayException e) {
/* Do nothing. This is the expected case. */
}
}
COM: <s> test of fo invalid fo 001 </s>
|
funcom_train/3814931 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean readList ( ConfigProperties cp) throws GUIReaderException, GUIWriterException {
try {
_mb.saveData(cp);
if (_panelList != null) {
for (GUIFileActionListener listener : _panelList) {
listener.saveData(cp);
}
return true;
}
return true;
} catch (GUIOperationException oe) {
return false;
}
}
COM: <s> read the gui entries and save changes to config properties </s>
|
funcom_train/36467273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double calcAngle(TableView o) {
double angle = 0.0;
double x1 = this.getX();
double y1 = this.getY();
double x2 = o.getX();
double y2 = o.getY();
angle = Math.atan((y1-y2)/(x1-x2));
return angle;
}
COM: <s> calculates the angle between this table view and another </s>
|
funcom_train/18058852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getFieldScale(UID objectId, int fieldNumber) throws RemoteException {
synchronized(SO) {
SO.rmcCount++;
CategorySource cat =
(CategorySource) SO.objectMap.get(objectId);
try {
return cat.getFieldScale(fieldNumber);
} catch(PerformanceException e) {
throw new RemoteException(e.getMessage());
}
}
}
COM: <s> retrieve the scale of the field </s>
|
funcom_train/13298167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIdPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_NegotiationProtocol_id_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_NegotiationProtocol_id_feature", "_UI_NegotiationProtocol_type"),
NegotiationPackage.Literals.NEGOTIATION_PROTOCOL__ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the id feature </s>
|
funcom_train/23898479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pasteFromClipBoard() {
XMLTreeModel xmlTreeModel = getModel();
XMLTreeNode selectedNode = getSelectedNode();
XMLTreeNode clipBoardTreeNode = getClipboardXMLTreeNode();
XMLTreeNode newTreeNode = clipBoardTreeNode.copyXMLTreeNode();
xmlTreeModel.addChildNode(selectedNode, newTreeNode);
}
COM: <s> paste xmltree node from clip board </s>
|
funcom_train/2295033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getMessage(CmsMessageContainer container) {
CmsObject cms = getCmsObject();
String result;
if ((cms == null) || (cms.getRequestContext().getLocale() == null)) {
result = container.key();
} else {
result = container.key(cms.getRequestContext().getLocale());
}
return result;
}
COM: <s> internally localizes the given code cms message container code to a string </s>
|
funcom_train/28211954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton5() {
if (savejButton == null) {
savejButton = new JButton();
savejButton.setBounds(new Rectangle(11, 2, 28, 28));
savejButton.setIcon(docSaveImg);
savejButton.setBorderPainted(false);
savejButton.setToolTipText("Zapisz do pliku");
savejButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
saveAllToFiles();
}
});
}
return savejButton;
}
COM: <s> this method initializes j button5 </s>
|
funcom_train/17174992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Parameter getParameter() throws IOException, ParsingException {
Parameter param = null;
skipWhiteSpace();
String name = getToken();
if (name != null) {
Object value = null;
int nextChar = read();
if (nextChar == '=') {
value = getToken();
} else {
value = name;
name = null;
if (nextChar >= 0) {
unread(nextChar);
}
}
param = new Parameter(name, value);
}
return param;
}
COM: <s> obtain a parameter to be added at the parsed line object </s>
|
funcom_train/31208760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUserName() throws SQLException {
try {
if(Trace.isEnabled()) Trace.trace(getId());
checkClosed();
String user=conn.user;
if(Trace.isEnabled()) Trace.traceResultQuote(user);
return user;
} catch(Throwable e) {
throw convertThrowable(e);
}
}
COM: <s> returns the user name as passed to driver manager </s>
|
funcom_train/32057925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHideCellsForChange() {
System.out.println("testHideCellsForChange");
GraphModel gm = new DefaultGraphModel();
CellViewFactory cvf = new JGraph();
GraphLayoutCache cache = new GraphLayoutCache(gm, cvf);
DefaultGraphModel dgm = new DefaultGraphModel();
GraphModelEvent.GraphModelChange o = dgm.createEdit(
new Object[] { "" }, new Object[] { "" }, new TreeMap(),
new ConnectionSet(), new ParentMap());
cache.hideCellsForChange(o);
}
COM: <s> this function tests hide cells for change function of graph layout cache </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.