__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/28471784 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRating() {
Review testReview = new Review();
int rating1;
int rating2 = 123;
rating1 = testReview.getRating();
assertTrue(rating1 == testReview.getRating());
testReview.setRating(rating2);
assertTrue(rating2 == testReview.getRating());
}
COM: <s> this should test the methods get rating and set rating of review </s>
|
funcom_train/51128830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getGuiResource(String file) {
URL result = null;
try {
result = resources.getGuiResource(file);
if (result == null) {
logger.warning("GUI resource not found! File: " + file);
}
} catch (Exception e) {
String msg = "Gui resource load failed!";
logger.log(Level.SEVERE, msg, e);
showError(msg, e);
}
return result;
}
COM: <s> gets the gui resource attribute of the controller class </s>
|
funcom_train/38485274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getEditableRightProfiles(UserVo user) throws EJBException {
Collection collection = null;
ArrayList voList = new ArrayList();
try {
collection = HomeInterfaceFinder.getRightProfileHome().findAll();
for (Iterator it = collection.iterator(); it.hasNext();) {
RightProfileEntityLocal local = (RightProfileEntityLocal) it.next();
voList.add(local.getRightProfileVo());
}
} catch (FinderException e) {
e.printStackTrace();
throw new EJBException(e);
}
return voList;
}
COM: <s> returns the list of right profiles a user can edit </s>
|
funcom_train/3987020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void imageMode(int mode) {
if ((mode == CORNER) || (mode == CORNERS) || (mode == CENTER)) {
imageMode = mode;
} else {
String msg =
"imageMode() only works with CORNER, CORNERS, or CENTER";
throw new RuntimeException(msg);
}
}
COM: <s> the mode can only be set to corners corner and center </s>
|
funcom_train/20770583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEventRate(boolean eventRate) {
boolean old = this.eventRate;
this.eventRate = eventRate;
getPrefs().putBoolean("Info.eventRate", eventRate);
getSupport().firePropertyChange("eventRate", old, eventRate);
}
COM: <s> true to show event rate in hz </s>
|
funcom_train/26016340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTransactionPendingAck(SIPServerTransaction serverTransaction) {
String branchId = ((SIPRequest)serverTransaction.getRequest()).getTopmostVia().getBranch();
if ( branchId != null ) {
this.terminatedServerTransactionsPendingAck.put(branchId, serverTransaction);
}
}
COM: <s> add entry to transaction pending ack table </s>
|
funcom_train/31557588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator getLocations() {
/*
// TODO: WRITEME
return new Iterator() {
public boolean hasNext() {
// TODO: WRITEME
return false;
}
public Object next() {
// TODO: WRITEME
return null;
}
public void remove() {
// TODO: WRITEME
}
};
*/
return visibleLocations.iterator();
}
COM: <s> get all of the locations used by sites </s>
|
funcom_train/8632000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void freeMemoryAndFinalize() {
trace("freeMemoryAndFinalize", null, null);
Runtime rt = Runtime.getRuntime();
long mem = rt.freeMemory();
for (int i = 0; i < 16; i++) {
rt.gc();
long now = rt.freeMemory();
rt.runFinalization();
if (now == mem) {
break;
}
mem = now;
}
}
COM: <s> call the garbage collection and run finalization </s>
|
funcom_train/46738930 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOwnerRef(DisplayModel ownerRef) {
if (Converter.isDifferent(this.ownerRef, ownerRef)) {
DisplayModel oldownerRef= new DisplayModel(this);
oldownerRef.copyAllFrom(this.ownerRef);
this.ownerRef.copyAllFrom(ownerRef);
setModified("ownerRef");
firePropertyChange(String.valueOf(ACCESSES_OWNERREFID), oldownerRef, ownerRef);
}
}
COM: <s> owner of access such as user group facility role location user </s>
|
funcom_train/26210556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCorrelationMethod(String name) {
try {
this.setCorrelationMethod(
(infosapient.resolution.FzyCorrelation) Class
.forName(name)
.newInstance());
} catch (ClassNotFoundException ex) {
this.setCorrelationMethod(
new infosapient.resolution.FzyCorrelationMinimum());
} catch (InstantiationException ex) {
this.setCorrelationMethod(
new infosapient.resolution.FzyCorrelationMinimum());
} catch (IllegalAccessException ex) {
this.setCorrelationMethod(
new infosapient.resolution.FzyCorrelationMinimum());
}
}
COM: <s> set the correlation method using a name of a class </s>
|
funcom_train/28662811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSolution1(final Composite parent) {
final GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
solution1 = new Text(parent, SWT.NONE | SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.WRAP);
solution1.setLayoutData(gd);
}
COM: <s> creates a new text field to display the first part of the solution </s>
|
funcom_train/13671935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void assertEquals(String message, float expected, float actual, float delta) {
// handle infinity specially since subtracting to infinite values gives NaN and the
// the following test fails
if (Float.isInfinite(expected)) {
if (!(expected == actual))
failNotEquals(message, new Float(expected), new Float(actual));
} else if (!(Math.abs(expected-actual) <= delta))
failNotEquals(message, new Float(expected), new Float(actual));
}
COM: <s> asserts that two floats are equal concerning a delta </s>
|
funcom_train/34836367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private File buildClassesJar() throws BuildException{
log("Building test.jar ...", Project.MSG_DEBUG);
try{
File jarFile = File.createTempFile("classes", "jar");
Jar jar = (Jar) getProject().createTask("jar");
jar.setDestFile(jarFile);
for(ZipFileSet fs : classes){
jar.addFileset(fs);
}
jar.execute();
return (jarFile);
}catch(java.io.IOException ex){
throw new BuildException("Error creating web.xml", ex);
}
}
COM: <s> create jar file containing the classes </s>
|
funcom_train/3291041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MMObjectNode getNewTmpNode(String owner,String key) {
MMObjectNode node=null;
node=getNewNode(owner);
checkAddTmpField("_number");
node.setValue("_number",key);
TemporaryNodes.put(key,node);
return node;
}
COM: <s> create a new temporary node and put it in the temporary exist </s>
|
funcom_train/40613706 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeIndexOrTransferOwnership(Session session, Index index) {
boolean stillNeeded = false;
if (constraints != null) {
for (Constraint cons : constraints) {
if (cons.usesIndex(index)) {
cons.setIndexOwner(index);
database.update(session, cons);
stillNeeded = true;
}
}
}
if (!stillNeeded) {
database.removeSchemaObject(session, index);
}
}
COM: <s> if the index is still required by a constraint transfer the ownership to </s>
|
funcom_train/42345634 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean writeCrontab(List<String> data) throws IOException {
NetworkAck ack = null;
ack = sendCmd("PUTCRON");
if(ack.isOk()) {
getOut().writeUTF(StringUtils.join(data, '\n'));
getOut().flush();
ack = (NetworkAck)readObj();
if(!ack.isOk())
throw new IOException("PUTCRON command failed on server!");
return true;
} else
throw new IOException("PUTCRON command failed on server!");
}
COM: <s> save the given string as the new crontab file on the sjq server </s>
|
funcom_train/25290760 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getAngularAttenuation(Point3f[] attenuation) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_ANGULAR_ATTENUATION_READ))
throw new CapabilityNotSetException(Ding3dI18N.getString("ConeSound9"));
((ConeSoundRetained)this.retained).getAngularAttenuation(attenuation);
}
COM: <s> copies the array of attenuation values from this sound including </s>
|
funcom_train/31873432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAddString(){
final Value v = _lv1.add(_sv);
assertTrue("Return type check.", v instanceof StringValue);
assertEquals(new String("3"+text), ((StringValue)v).stringValue());
assertEquals(new StringValue(3+text), v);
}
COM: <s> tests addition of long value and string value </s>
|
funcom_train/21810588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testProtocolEvent ( ) {
X10DeviceEvent deviceEvent = randomX10DeviceEvent( );
expectedProtocolEvent = new X10ProtocolEvent (
deviceEvent.getDeviceName( ),
deviceEvent.getHouseCode( ),
deviceEvent.getDeviceCode( ),
deviceEvent.getEventCode( )
);
X10ProtocolEvent sendProtocolEvent = new X10ProtocolEvent(expectedProtocolEvent);
eventGenerator.fireEvent( sendProtocolEvent );
assertEquals ( "Unexpected number of X10ProtocolEvents", numberOfProtocolEvents, numberOfObservers);
}
COM: <s> directed test for a single x10 protocol event </s>
|
funcom_train/19302776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reportStatement(SubjectNode subject, PredicateNode predicate, ObjectNode object) throws SAXException {
try {
statementHandler.handleStatement(subject, predicate, object);
} catch (Exception e) {
// Wrap exception in a SAXException, it will be unwrapped in the
// parse() method
throw new SAXException(e);
}
}
COM: <s> reports a stament to the configured statement handler </s>
|
funcom_train/44450002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getParameter(String f_param) {
if (!m_config.getConfigElements().containsKey(f_param)) {
logger.info("Request for unsupported parameter: " + f_param);
throw new ParameterError("Unknown parameter:" + f_param);
}
if (m_settings == null) {
return null;
}
return m_settings.get(f_param);
}
COM: <s> returns the value of the given parameter </s>
|
funcom_train/26016228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addExtensionMethod(String extensionMethod) {
if (extensionMethod.equals(Request.NOTIFY)) {
if (stackLogger.isLoggingEnabled())
stackLogger.logDebug("NOTIFY Supported Natively");
} else {
dialogCreatingMethods.add(extensionMethod.trim().toUpperCase());
}
}
COM: <s> add an extension method </s>
|
funcom_train/22332836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperty(String prop, String value) {
try {
properties.load(new FileInputStream(filename));
properties.setProperty(prop, value);
properties.store(new FileOutputStream(filename), null);
} catch (IOException e) {
logger.error(e);
}
}
COM: <s> sets key prop based on value </s>
|
funcom_train/31145949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long skip(long n) throws IOException {
if (n <= 0) return 0;
int buflen = (int)Math.min(SKIPBUFLEN, n);
byte data[] = new byte[buflen];
while (n > 0) {
int r = read(data, 0, (int)Math.min((long)buflen, n));
if (r < 0) break;
n -= r;
}
return n;
}
COM: <s> skip n bytes of input </s>
|
funcom_train/13363843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int extractFile(Object obj) throws IOException {
String destDir = getDestDir(); // directory to which file will be written
startExtractFile(obj, destDir); // ready to extract file
int size = writeFile(obj, destDir); // write file to disk
endExtractFile(obj, destDir, size); // finished extracting file
return size;
}
COM: <s> extract a single file from the compressed archive </s>
|
funcom_train/18653193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void seeVertex(GGModel model, Object vertex) {
Map map = GGConstants.createMap();
Map attrib = new Hashtable();
GGConstants.setSeen(map, true);
GGConstants.setBackground(map, Color.LIGHT_GRAY);
attrib.put(vertex, map);
model.edit(attrib, null, null, null);
}
COM: <s> set a vertex to seen state </s>
|
funcom_train/27975540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Method getProcessorMethod(final Class type) {
Method processor = null;
Iterator typeIter = ClassIteratorFactory.assignableIterator( type );
while ( typeIter.hasNext() ) {
Class typeClass = (Class) typeIter.next();
processor = (Method) handlerMethods.get( typeClass );
if ( processor != null ) {
// A suitable processor has been found
break;
}
}
return processor;
}
COM: <s> returns the code method code that will process the specified code message code </s>
|
funcom_train/48152075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void move(){
int oldState = state, index = 0;
double sum = probabilities[oldState][index], t = Math.random();
while (sum < t){
index = index + 1;
sum = sum + probabilities[oldState][index];
}
state = index;
data.setValue(state);
time++;
getBall(oldState).setBallColor(defaultColor);
getBall(state).setBallColor(stateColor);
}
COM: <s> this method computes the next state to be visited </s>
|
funcom_train/50334954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void newline() {
page.drawString(line, x0, y0 + (linenum*lineheight) + lineascent);
line = "";
charnum = 0;
charoffset =0;
linenum++;
if (linenum >= lines_per_page) {
if (isPreview) pageImages.addElement(previewImage);
page.dispose();
page = null;
newpage();
}
}
COM: <s> internal method begins a new line </s>
|
funcom_train/32057155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRepaint() {
System.out.println("testRepaint");
PortRenderer portRend = new PortRenderer();
Rectangle rect = new Rectangle();
portRend.repaint(rect);
int var1 = 0, var2 = 0, var3 = 0, var4 = 0, var5 = 0;
portRend.repaint(var1, var2, var3, var4, var5);
}
COM: <s> this function tests repaint function of port renderer class </s>
|
funcom_train/13597390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void UpdateDict(Map pNewDefinedWords) {
if (pNewDefinedWords != null) {
Iterator it = pNewDefinedWords.keySet().iterator();
while (it.hasNext()) {
String w = (String) it.next();
Vector p = new Vector();
dict.put(w, p);
String[] phoneme = (String[]) pNewDefinedWords.get(w);
if (phoneme != null) {
for (int j = 0; j < phoneme.length; j++)
p.add(phoneme[j]);
}
}
}
}
COM: <s> this method will add new defined words to defined words dictionary array </s>
|
funcom_train/15919230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public X10Call createInstanceCall(Position pos, Expr receiver, Name name, Context context, List<Type> typeArgs, Expr... args) {
MethodInstance mi = createMethodInstance(receiver, name, context, typeArgs, args);
if (null == mi) return null;
return createInstanceCall(pos, receiver, mi, args);
}
COM: <s> create a call to a generic instance method </s>
|
funcom_train/51605015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private DateChooser getDateChooserFinished() {
if (dateChooserFinished == null) {
dateChooserFinished = new DateChooser();
dateChooserFinished.setDate(plantation.getFinished());
dateChooserFinished.addPropertyChangeListener("date",
new java.beans.PropertyChangeListener() {
public void propertyChange(java.beans.PropertyChangeEvent e) {
Date date = dateChooserFinished.getDate();
plantation.setFinished(date);
}
});
}
return dateChooserFinished;
}
COM: <s> this method initializes j date chooser finished </s>
|
funcom_train/9868136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dump() {
System.out.println("Size: " + objects.length);
System.out.println("Elements: " + elements);
System.out.println("Free cells: " + freecells);
System.out.println();
for (int ix = 0; ix < objects.length; ix++)
System.out.println("[" + ix + "]: " + objects[ix]);
}
COM: <s> internal used for debugging only </s>
|
funcom_train/2750069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ICipherHTTP getDecryptCipher() {
try {
Key key = (Key) this.webSession.getAttribute(this.keyName);
ICipherHTTP cipher = (ICipherHTTP) this.beanFactory.getBean(this.cipherName);
cipher.initDecryptMode(key);
return cipher;
} catch (Exception e) {
String errorMessage = HDIVUtil.getMessage("decrypt.message");
throw new HDIVException(errorMessage, e);
}
}
COM: <s> inilitializes the data decrypter </s>
|
funcom_train/33718336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeText(int atomicID, AxedChar begin, AxedChar end) {
assert atomicID != 0;
AxedEvent e = eventPool.newEvent(atomicID, AxedEvent.REMOVE_TEXT);
e.getRemoveText().issue(AxedEvent.REMOVE_TEXT, begin, end);
listeners.fireEvent(e);
eventPool.releaseEvent(e);
refresh();
}
COM: <s> removes text from begin to end </s>
|
funcom_train/19322566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String generateValueList() {
if (valueList == null || valueList.length == 0)
return "";
StringBuffer stringbuffer = new StringBuffer(valueList[0].toString());
for (int i = 1; i < valueList.length; i++) {
stringbuffer.append(", ");
stringbuffer.append(valueList[i]);
}
return stringbuffer.toString();
}
COM: <s> convert the list into string such that it could be printed out </s>
|
funcom_train/8247761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getDocumentOffset(int widgetOffset) {
if (fTextViewer instanceof ITextViewerExtension5) {
ITextViewerExtension5 extension = (ITextViewerExtension5) fTextViewer;
return extension.widgetOffset2ModelOffset(widgetOffset);
}
IRegion visible = fTextViewer.getVisibleRegion();
if (widgetOffset > visible.getLength()) {
return -1;
}
return widgetOffset + visible.getOffset();
}
COM: <s> convert a widget offset to the corresponding document offset </s>
|
funcom_train/21606266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String resolvePlaceholder(String path, String key, Preferences preferences) {
if (path != null) {
// Do not create the node if it does not exist...
try {
if (preferences.nodeExists(path)) {
return preferences.node(path).get(key, null);
}
else {
return null;
}
}
catch (BackingStoreException ex) {
throw new BeanDefinitionStoreException("Cannot access specified node path [" + path + "]", ex);
}
}
else {
return preferences.get(key, null);
}
}
COM: <s> resolve the given path and key against the given preferences </s>
|
funcom_train/36680614 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canProduceUnit(Tile from, String unitID) {
boolean canStartProduce = canStartProduceUnit(from);
boolean canProduce = unit.getStats().canProduceUnit(unitID);
int price = UnitFactory.getUnit(unitID).getPrice();
boolean canBuy = unit.getOwner().isWithinBudget(price);
return canStartProduce && canProduce && canBuy;
}
COM: <s> 1 same conditions as can start produce </s>
|
funcom_train/44707901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ACSObject getParent() {
DataObject parent = (DataObject) get(PARENT);
if (parent == null) {
return null;
}
try {
return (ACSObject)DomainObjectFactory.newInstance(parent);
} catch (PersistenceException e) {
s_log.warn ("PersistenceException thrown in getParent()", e);
throw new UncheckedWrapperException(e);
}
}
COM: <s> get the parent object </s>
|
funcom_train/46157697 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
if (!(o instanceof TimelineDate)) {
throw new IllegalArgumentException("Can't comapre to " +
o.getClass().getName());
}
TimelineDate tdo = (TimelineDate) o;
return getMinimum().compareTo(tdo.getMinimum());
}
COM: <s> compare two timeline date objects </s>
|
funcom_train/25715889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Point2D getPoint(Point2D cp, double r, double alpha) {
double angle = Math.toRadians(alpha);
double x = cp.getX() + r * Math.cos(angle);
double y = cp.getY() - r * Math.sin(angle);
return new Point2D.Double(x, y);
}
COM: <s> returns the point from center point bei alpha angle </s>
|
funcom_train/51782929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPopupMenu createContextMenu(Selection selection) {
if (selection.getElements().size() > 1) {
return createMultipleSelectionContextMenu();
} else {
UmlDiagramElement elem = (UmlDiagramElement) selection.getElement();
if (elem instanceof Connection) {
return createSingleConnectionContextMenu((Connection) elem);
}
return createSingleNodeContextMenu(elem);
}
}
COM: <s> created a popup menu for the specified selection </s>
|
funcom_train/35744228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean poll() {
boolean result;
DeferredAction action;
synchronized (stateMachine) {
queue.poll();
if (queue.peek() == null) {
stateMachine.idleEvent();
action = eventCalled(false);
result = false;
} else {
stateMachine.msgsEvent();
action = eventCalled(false);
result = true;
}
}
notifyChange();
performDeferredAction(action); // we expect none but let the state machine decide.
return result;
}
COM: <s> one message done </s>
|
funcom_train/32969033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton6() {
if (jButton6 == null) {
jButton6 = new JButton();
jButton6.setToolTipText("Research");
jButton6.setRolloverIcon(new ImageIcon(getClass().getResource("/buttons1/research2.gif")));
jButton6.setPressedIcon(new ImageIcon(getClass().getResource("/buttons1/research3.gif")));
jButton6.setIcon(new ImageIcon(getClass().getResource("/buttons1/research1.gif")));
jButton6.setBounds(new java.awt.Rectangle(16,70,34,34));
jButton6.setBorderPainted(false);
jButton6.setDoubleBuffered(true);
}
return jButton6;
}
COM: <s> this method initializes j button6 </s>
|
funcom_train/4917980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIncludeArtifact() throws Exception {
// Obtain class path
String[] classPath = this.classPathFactory.createArtifactClassPath(
TEST_GROUP_ID, TEST_JAR_ARTIFACT_ID, TEST_ARTIFACT_VERSION,
null, null);
// Obtain path to artifact
final File JAR = getTestArtifactJar(true, TEST_JAR_ARTIFACT_ID);
// Ensure jar on class path
assertClassPath(classPath, JAR);
}
COM: <s> ensure can include artifact in class path </s>
|
funcom_train/2711151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TransposerFilter getTransposerFilter(String field, Object object) {
TransposerFilter result = null;
if (field != null) {
result = (TransposerFilter) transposerFilters.get(field);
if (result == null) {
result = new TransposerFilter();
addTransposerFilter(field, result);
}
if (cascadingExcludedProperties != null && !cascadingExcludedProperties.isEmpty()) {
result.addCascadingExcludedProperties(cascadingExcludedProperties);
}
}
return result;
}
COM: <s> returns the transposer filter for a given field if one exists </s>
|
funcom_train/14009588 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writePermissionsConfiguration(String blogID, Properties permissions) throws IOException {
File permissionsFile = new File(_blojsomConfiguration.getInstallationDirectory() + _blojsomConfiguration.getBaseConfigurationDirectory()
+ blogID + "/" + _permissionConfiguration);
FileOutputStream fos = new FileOutputStream(permissionsFile);
permissions.store(fos, null);
fos.close();
}
COM: <s> write the permissions configuration file for a given blog </s>
|
funcom_train/43213426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireRowsUpdated(Map<String, Boolean> hosts, Map<String, Boolean> affectsHashSpans) {
StatusTableEvent spe = new StatusTableEvent(hosts, affectsHashSpans);
for (StatusTableListener l : getListeners()) {
try {
l.rowsUpdated(spe);
} catch (Exception e) {
}
}
}
COM: <s> p fires an event for having updated a map of hosts </s>
|
funcom_train/32776856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer s = new StringBuffer("Edge " + id + " from " + startNodeID
+ " to " + endNodeID);
s.append(" (" + length.toString() + "): ");
if (this.attrList == null) {
s.append("* no attributes *");
} else {
s.append(this.attrList.toString());
}
return s.toString();
}
COM: <s> returns a string representation of this edge description </s>
|
funcom_train/22443430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getEndAttribute(String processingInstruction) {
String endTag = getAttributeValue(processingInstruction, "end");
if (endTag.compareTo("w") == 0) {
return XPACKET_IS_WRITABLE;
} else if (endTag.compareTo("r") == 0) {
return XPACKET_IS_READONLY;
} else {
return ATTRIBUTE_NOT_FOUND;
}
}
COM: <s> returns the read write status of the xpacket </s>
|
funcom_train/44328516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateInput() {
String errorMessage = null;
if (validator != null) {
errorMessage = validator.isValid(combo.getText());
}
// Bug 16256: important not to treat "" (blank error) the same as null
// (no error)
setErrorMessage(errorMessage);
}
COM: <s> validates the input </s>
|
funcom_train/21483032 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetCounters() {
synchronized (cacheElementsLoaded) {
cacheElementsLoaded.clear();
}
synchronized (cacheElementsRemoved) {
cacheElementsRemoved.clear();
}
synchronized (cacheElementsPut) {
cacheElementsPut.clear();
}
synchronized (cacheElementsEvicted) {
cacheElementsEvicted.clear();
}
synchronized (cacheClears) {
cacheClears.clear();
}
}
COM: <s> resets the counters to 0 </s>
|
funcom_train/3391254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visitTypeDeclaration(TypeDeclaration d) {
d.accept(pre);
for(TypeParameterDeclaration tpDecl: d.getFormalTypeParameters()) {
tpDecl.accept(this);
}
for(FieldDeclaration fieldDecl: d.getFields()) {
fieldDecl.accept(this);
}
for(MethodDeclaration methodDecl: d.getMethods()) {
methodDecl.accept(this);
}
for(TypeDeclaration typeDecl: d.getNestedTypes()) {
typeDecl.accept(this);
}
d.accept(post);
}
COM: <s> visits a type declaration </s>
|
funcom_train/9430350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addErrorMessage(String msg, String sourceId, int lineNumber) {
if (mSetupComplete) {
mErrorList.addErrorMessage(msg, sourceId, lineNumber);
} else {
if (mErrorMessageCache == null) {
mErrorMessageCache = new Vector<ErrorConsoleMessage>();
}
mErrorMessageCache.add(new ErrorConsoleMessage(msg, sourceId, lineNumber));
}
}
COM: <s> adds a message to the set of messages the console uses </s>
|
funcom_train/27779230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commit() {
for (int i = 0; i < capacity(); i++) {
try {
if (slot[i] != EMPTYSLOT) {
manager.commit(slot[i]);
}
} catch (SlotException x) {
logger.log(Level.WARNING, "commit", x);
}
}
}
COM: <s> commit this object to memory </s>
|
funcom_train/20643801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean xequals(TransactionValue tv) {
if (getMoneyValue() == null) return false;
if (! getMoneyValue().xequals(tv.getMoneyValue())) return false;
if (getAverageNumber() != tv.getAverageNumber()) return false;
if (inGoingToBank() != tv.inGoingToBank()) return false;
return true;
}
COM: <s> return true if those object are equivalent </s>
|
funcom_train/27849408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetSize() {
System.out.println("org.wettp2p.creature.CreatureSize.testSetSize");
CreatureSize hillGiant = new CreatureSize();
hillGiant.setSize(CreatureSize.HUGE);
if(hillGiant.getACMod() != -2)
fail("Set Size did not set the creature's size properly.");
}
COM: <s> test of set size method of class org </s>
|
funcom_train/14378650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void nextPolygonTransformed(Polygon3D cache) {
Object obj = objects.get(iteratorIndex);
if (obj instanceof PolygonGroup) {
PolygonGroup group = (PolygonGroup) obj;
group.nextPolygonTransformed(cache);
if (!group.hasNext()) {
iteratorIndex++;
}
} else {
iteratorIndex++;
cache.setTo((Polygon3D) obj);
}
cache.add(transform);
}
COM: <s> gets the next polygon in the current iteration applying the </s>
|
funcom_train/15464401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void display () {
Properties objProp = System.getProperties();
Enumeration objName ;
String strKey;
for (objName = objProp.propertyNames() ; objName.hasMoreElements() ;) {
strKey = (String) (objName.nextElement());
if (strKey.startsWith("jsrcpd.")) {
System.out.print(strKey+" = ");
System.out.println(System.getProperty(strKey));
}
}
}
COM: <s> display a list of the jsrcpd properties </s>
|
funcom_train/38378570 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Criteria getQueryForFocus(ValueListInfo info, Session session) throws HibernateException {
if (logger.isDebugEnabled()) {
logger.debug("getting query for focus");
}
Criteria result = getQuery(info, session);
applyFocusProjection(info, result);
if (logger.isDebugEnabled()) {
logger.debug("final query for focus is: " + result);
}
return result;
}
COM: <s> if focus optimalization is true it select only focus property </s>
|
funcom_train/49608793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GuestType updateGuestType(String username,EntityManager em,GuestType vo) throws Throwable {
try {
return (GuestType)JPAMethods.merge(em, username, DefaultFieldsCallabacks.getInstance(), vo);
}
catch (Throwable ex) {
Logger.error(null, ex.getMessage(), ex);
throw ex;
}
finally {
em.flush();
}
}
COM: <s> update a guest type </s>
|
funcom_train/29716798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SVGPosition centerInCell(SVGDimension cellsize, SVGDimension entitySize, SVGPosition cellLocation) {
int x = 0;
int y = 0;
x = cellLocation.x + (cellsize.width - entitySize.width) / 2;
y = cellLocation.y + (cellsize.height - entitySize.height) / 2;
return new SVGPosition(x, y);
}
COM: <s> for a given cellsize entitysize and position calculates </s>
|
funcom_train/23679989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetchAllEvents() {
return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_EVENTNAME,
KEY_STARTDATE, KEY_STARTTIME, KEY_ENDDATE, KEY_ENDTIME}, null, null, null, null, null);
}
COM: <s> return a cursor over the list of all events in the database </s>
|
funcom_train/13539886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RoleEntityData getValueObject() {
RoleEntityData lData = new RoleEntityData();
lData.setRole_ID( getRole_ID() );
lData.setRole( getRole() );
lData.setMedCentrex( getMedCentrex() );
lData.setCore( getCore() );
lData.setPath( getPath() );
return lData;
}
COM: <s> create and return a role entity data object populated with the data from </s>
|
funcom_train/51418415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTextPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TextNode_text_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TextNode_text_feature", "_UI_TextNode_type"),
JetsetPackage.Literals.TEXT_NODE__TEXT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the text feature </s>
|
funcom_train/45248984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateListArea() {
// take care about list area if there is more than one status
if (errors.size() > 1) {
if (singleStatusDisplayArea != null) {
singleStatusDisplayArea.dispose();
}
if (statusListViewer == null
|| statusListViewer.getControl().isDisposed()) {
fillListArea(listArea);
getShell().setSize(
getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
refreshStatusListArea();
}
}
COM: <s> this methods switches status adapters presentation depending if there is </s>
|
funcom_train/25266094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public X509Certificate getSignerCert() throws FiComException {
try {
List<X509Certificate> allSignerCerts = getSignerCerts(this._sd);
return allSignerCerts.get(0);
}
catch(RuntimeException e) {
log.error("", e);
throw new FiComException(e);
}
}
COM: <s> look up the certificate of the signer of this signature </s>
|
funcom_train/33775996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void about() {
MainFrame mf = DefaultApplication.findMainFrame();
if (mf != null) {
DefaultAboutDialog dlg =
new DefaultAboutDialog(mf, getResourceString(Application.RB_KEY_ABOUT_APP_DIALOG_TITLE));
dlg.setLocationRelativeTo(mf);
dlg.setModal(true);
dlg.setVisible(true);
}
}
COM: <s> called by default by class about app action </s>
|
funcom_train/43988959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPropertyDescriptorCache() {
ValueModel beanChannel = new ValueHolder(null, true);
PropertyAdapter<TestBean> adapter = new PropertyAdapter<TestBean>(beanChannel, "readWriteObjectProperty", true);
beanChannel.setValue(new TestBean());
adapter.setValue("Test");
}
COM: <s> checks that the cached property descriptor is available when needed </s>
|
funcom_train/21974613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireTableModelEvent() {
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length-2; i>=0; i-=2) {
if (listeners[i]==TableModelListener.class) {
TableModelEvent event = new TableModelEvent(this);
((TableModelListener)listeners[i+1]).tableChanged(event);
}
}
}
COM: <s> part of the implementation of the code table model code interface </s>
|
funcom_train/51812067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void dispatchMessage(GenericMessage genericMessage) {
List<GenericMessageListener> list = listeners.get(genericMessage.getChannel().getName());
if ( list != null ) {
for ( GenericMessageListener listener : list ) {
try {
listener.onGenericMessage(genericMessage);
}
catch (Exception e) {
if ( !failSilent )
e.printStackTrace();
}
}
}
}
COM: <s> internal method that dispatches the messages to registered listeners </s>
|
funcom_train/46015205 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connectToBank(String bankName) {
//Try to connect to bank
this.bankname = bankName;
try {
bankobj = (Bank) Naming.lookup(bankName);
} catch (Exception e) {
System.out.println("Could not find bank: " + bankName);
System.exit(0);
}
System.out.println("Connected to bank: " + bankName);
}
COM: <s> connects the client to the bank </s>
|
funcom_train/51245808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private StringBuffer getMessage(Throwable e, StringBuffer msg) {
msg.append("SQL Error: " + e.getMessage());
if (e instanceof SQLException) {
SQLException sqe = (SQLException) e;
if (sqe.getNextException() != null) {
getMessage(sqe.getNextException(), msg);
}
}
return msg;
}
COM: <s> gets the message from an exception </s>
|
funcom_train/787056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setFieldValue() {
String text;
if ( m_value instanceof Double || m_value instanceof Float )
text = StringLib.formatNumber(m_value.doubleValue(),3);
else
text = String.valueOf(m_value.longValue());
m_field.setText(text);
}
COM: <s> set the text field value based upon the current value </s>
|
funcom_train/14330226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object invoke(Object obj, String name, Object[] params) throws Throwable {
Variant[] v = new Variant[params.length];
for ( int i = 0; i < v.length; i++ )
v[i] = new Variant(params[i]);
return invoke(obj, name, v);
}
COM: <s> invoke invokes the named method against the specified </s>
|
funcom_train/44546188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initPropertiesMgr () {
try {
genProp=new PropertiesManager("Resources/properties/rosco.properties");
} catch (Exception e) {
Debug.print("Exception thrown trying to load the properties file.",Debug.DEBUGOFF);
Debug.print(e,Debug.DEBUGOFF);
System.exit(-1);
}
}
COM: <s> init properties manager </s>
|
funcom_train/2903082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(Object key){
if(appletTable == null){
return;
}
FileData fd = null;
synchronized(appletTable){
fd = (FileData)appletTable.remove(key);
}
if((fd!=null) && (fd.file!=null)){
StringBuffer sb = new StringBuffer(256);
sb = sb.append(ZLocater.getAppletPropertyPath());
sb = sb.append(File.separator).append(fd.file);
File f = new File(sb.toString());
if(f.exists() && !f.delete()){
new JXError(getClass(), "Error removing applet, "+fd.file);
}
fd.applet.dispose();
}
}
COM: <s> remove an applet from the manager </s>
|
funcom_train/9727377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(Writer out, String translator[], int tabs) throws IOException {
StringBuffer sb = new StringBuffer(tabs);
for (int i = 0; i < tabs; i++)
sb.setCharAt(i, '\t');
String s = sb.toString();
out.write(s);
out.write(TokenTranslator.getName(id, translator) + ' ');
}
COM: <s> write out this element without a newline </s>
|
funcom_train/31985971 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deRegister(FileOutput file) {
if ( file == null ) {
sendWarning (
"Can not de-register FileOutput! Command ignored.",
"Experiment '"+getName()+"' method 'void deRegister(FileOutput file).'",
"The parameter given was a null reference.",
"Make sure to only connect valid FileOutputs at the Experiment.");
return;
}
fileRegistry.removeElement(file); // remove whether it was inside or not
}
COM: <s> de registers a file at the experiment </s>
|
funcom_train/1241165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Document getNewDocumentAsNode(Node target) {
Document doc = null;
Node node = null;
try {
doc = XMLUtils.newDocument();
} catch (ParserConfigurationException e) {
e.printStackTrace();
}
node = doc.importNode(target, true);
doc.appendChild(node);
return doc;
}
COM: <s> get a new document which has the specified node as the document root </s>
|
funcom_train/11321589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HtmlStringBuffer appendAttribute(String name, Object value) {
if (name == null) {
throw new IllegalArgumentException("Null name parameter");
}
if (value != null) {
append(" ");
append(name);
append("=\"");
append(value);
append("\"");
}
return this;
}
COM: <s> append the given html attribute name and value to the string buffer and </s>
|
funcom_train/12368917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonApply() {
if (jButtonApply == null) {
jButtonApply = new JButton();
jButtonApply.setName("Apply");
jButtonApply.setText("Apply");
jButtonApply.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
apply();
}
});
}
return jButtonApply;
}
COM: <s> this method initializes j button1 </s>
|
funcom_train/25694170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setAvailableCharSets(List<String> charsets) {
if (charsets == null) {
charsets = modes.get(DEFAULT_MODE);
}
charSetsComboBox.removeAllItems();
for (String charset : charsets) {
charSetsComboBox.addItem(charset);
}
charSetsComboBox.setSelectedIndex(0);
}
COM: <s> fill the encoding combo box with the list of available char sets </s>
|
funcom_train/43294133 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isProcessUpdateAvailable(ProcessLibrary processLibrary) {
// get process manager
ProcessesManager processManager = getProcessesManager();
// process manager valid?
if (processManager == null) {
OutputHandler
.writeError(20102, "", OutputHandler.EL_HIGH, new String[] {
}, this);
// not successful
return false;
}
// check for process updates
return processManager.isProcessUpdateAvailable(processLibrary);
}
COM: <s> p check if the process library has updated process documents </s>
|
funcom_train/32156393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dfs(V v, Map<V, String> marked, List<V> result) {
marked.put(v, "active");
for (V w : graph.get(v)) {
if (!marked.containsKey(w))
dfs(w, marked, result);
if (marked.get(w) == "active")
throw new RuntimeException();
}
marked.put(v, "done");
result.add(0, v);
}
COM: <s> private dfs for doing top sort2 </s>
|
funcom_train/25841665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Boolean handleLoginActivityResult(Context context, int resultCode, Intent data) {
if (resultCode == Activity.RESULT_OK) {
setSession(data.getStringExtra(LoginActivity.SESSION_KEY_EXTRA), data
.getStringExtra(LoginActivity.SECRET_EXTRA), data
.getStringExtra(LoginActivity.UID_EXTRA));
return true;
} else {
return false;
}
}
COM: <s> when a login activity activity returns a login request parse its </s>
|
funcom_train/36774011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getValueAt(int rowIndex, int columnIndex) {
switch (columnIndex) {
case 0:
return rd[rowIndex].getResRef();
case 1:
return rd[rowIndex].getExt();
case 2:
return new Integer(rd[rowIndex].getResType());
}
return null;
}
COM: <s> get value at </s>
|
funcom_train/3039520 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getProperties(Table table, Column column) {
List result = new ArrayList();
Iterator values = getValues(table, column).iterator();
while (values.hasNext() ) {
Value value = (Value) values.next();
List props = (List) propsByValue.get(value);
if (props != null) {
result.addAll(props);
}
}
return result;
}
COM: <s> returns the properties that map to a column </s>
|
funcom_train/1728560 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String describe(Object obj) {
if (!(obj instanceof String))
return null;
String filename = (String) obj;
ID3Tag tag = null;
try {
tag = new ID3Tag(filename);
} catch (IOException e) {
return null;
}
if (tag == null)
return null;
return tag.getCompleteName();
}
COM: <s> returns a description of the file </s>
|
funcom_train/29773840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RequestAnswer updateCalendar(CalendarModel calendar)throws RequestException{
if (log.isInfoEnabled())
log.info("update calendar on yahoo...");
try {
java.lang.String insertText = foundationCalendar2yahooCalendarupdate(calendar);
return postXml(getYahooProperty(Def.LINKTOEDITEVENT), insertText);
} catch (EventCreationException ex) {
throw new RequestException(ex.getMessage());
}
}
COM: <s> update a event on yahoo server </s>
|
funcom_train/167360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
if (log.isDebugEnabled())
log.debug("resolveEntity: " + "publicId=" + publicId + ", systemId=" + systemId);
return super.resolveEntity(publicId, systemId);
}
COM: <s> calls the entity resolver2 resolve entity method </s>
|
funcom_train/9241813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String renderAlterTableChangeColumnStatement(DDLTable table, DDLField oldField, DDLField field) {
StringBuilder current = new StringBuilder();
current.append("ALTER TABLE ").append(table.getName()).append(" CHANGE COLUMN ");
current.append(oldField.getName()).append(' ');
current.append(renderField(field));
return current.toString();
}
COM: <s> generates the database specific ddl statement only for altering a table and </s>
|
funcom_train/15557847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCloseButton() {
if (_myCloseButton == null) {
_myCloseButton = new Button(controlP5, this, name() + "close", 1, _myWidth + 1, -10, 12, 9);
_myCloseButton.setLabel("X");
_myCloseButton.addListener(this);
}
}
COM: <s> add a close button to the controlbar of this control group </s>
|
funcom_train/13364929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateStatus() {
final IStatus status = StatusUtil.getMostSevere(new IStatus[] {
jSrcRootStatus, jPackageStatus, jFileStatus });
setPageComplete(!status.matches(IStatus.ERROR));
StatusUtil.applyToStatusLine(this, status);
}
COM: <s> updates the status line and the ok button according to the current statuses </s>
|
funcom_train/15945888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getCargo() {
if (elementType.equals(GraphMLElementType.DATA)) {
return getData();
}
if (elementType.equals(GraphMLElementType.KEY)) {
return getKey();
}
if (elementType.equals(GraphMLElementType.GRAPH)) {
return getGraph();
}
return null;
}
COM: <s> this function returns instances of the classes or interfaces </s>
|
funcom_train/44770651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeLockToken(String lt, boolean notify) {
synchronized (lockTokens) {
if (lockTokens.remove(lt) && notify) {
try {
wsp.getLockManager().lockTokenRemoved(this, lt);
} catch (RepositoryException e) {
log.error("Lock manager not available.", e);
}
}
}
}
COM: <s> internal implementation of </s>
|
funcom_train/20881671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Element getSaveServer() {
// aks.ask("test");
// System.out.println("Sollte tun");
Element text = getUseXML();
if (text == null) {
return null;
}
else {
String name = JOptionPane
.showInputDialog("Please input a filename");
if (!name.endsWith(".xml")) {
name = name + ".xml";
}
Element elem = XMLCreator.getServerRoot();
Element preset = new Element("STOREPRESET");
preset.setAttribute("Name", name);
preset.addContent(text);
elem.addContent(preset);
return elem;
}
}
COM: <s> stores the file on the server </s>
|
funcom_train/38223894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dirty() {
RuleTrigger rt = ruleNetwork.getTrigger( this );
if ( rt == null ) {
rt = new RuleTrigger();
ruleNetwork.setTrigger( this, rt );
}
if ( parents != null ) {
for ( Iterator i = parents.iterator(); i.hasNext(); ) {
NodeRule node = (NodeRule) i.next();
node.dirty();
}
}
}
COM: <s> override base class method to trigger multiple parents </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.