__key__ stringlengths 16 21 | __url__ stringclasses 1
value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/26618233 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onRenderFrameStart(IContext context) {
if (m_renderListeners.isEmpty()) {
return;
}
for (Iterator it = m_renderListeners.iterator(); it.hasNext();) {
((IRenderListener) it.next()).onRenderFrameStart(context);
}
}
COM: <s> frame start rendering </s>
|
funcom_train/31155226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ConstantModifier getConstantModifier(double param) {
ConstantModifier m = new ConstantModifier(param);
ConstantModifier hm =
(ConstantModifier) this.modifiers.get(new Integer(m.hashCode()));
if (m.equals(hm)) {
return hm;
} else {
this.modifiers.put(new Integer(m.hashCode()), m);
return m;
}
}
COM: <s> return a constant modifier </s>
|
funcom_train/8157211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void sort() {
Collections.sort(resultsList, new Comparator<IType>() {
public int compare(IType t1, IType t2) {
IMember member1 = (IMember)t1;
IMember member2 = (IMember)t2;
String name1 = member1.getElementName();
String name2 = member2.getElementName();
return name1.compareTo(name2);
}});
}
COM: <s> sorts the list alphabetically </s>
|
funcom_train/20308409 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Document translatePattern( TriplePattern pattern, DIGAdapter da ) {
DIGConnection dc = da.getConnection();
Document query = dc.createDigVerb( DIGProfile.ASKS, da.getProfile() );
Element disjoint = da.createQueryElement( query, DIGProfile.DISJOINT );
da.addClassDescription( disjoint, pattern.getObject() );
da.addClassDescription( disjoint, pattern.getSubject() );
return query;
}
COM: <s> p answer a query that will test disjointness between two classes p </s>
|
funcom_train/17396531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMethodPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MethodInvocation_method_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MethodInvocation_method_feature", "_UI_MethodInvocation_type"),
TracePackage.Literals.METHOD_INVOCATION__METHOD,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the method feature </s>
|
funcom_train/46857795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SchoolType getSchoolType() {
if (age <= 5) {
return SchoolType.Kindergarden;
} else if ((age >= 6) && (age <= 12)) {
return SchoolType.Elementary;
} else if ((age >= 13) && (age <= 15)) {
return SchoolType.Middle;
} else if ((age >= 16) && (age <= 18)) {
return SchoolType.High;
}
return SchoolType.Kindergarden;
}
COM: <s> returns the childs school type based on its age </s>
|
funcom_train/14601494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void chooseFileAction() {
JFileChooser fc = new JFileChooser();
fc.setAcceptAllFileFilterUsed(false);
fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
fc.setFileFilter(new DocFilter());
int returnval = fc.showOpenDialog(editDocumentDialog);
if(returnval == JFileChooser.APPROVE_OPTION)
{
File f = fc.getSelectedFile();
try
{
String filename = f.getCanonicalPath();
documentView.setChoosenFileName(filename);
} catch(IOException ie) { ie.printStackTrace(); }
}
}
COM: <s> action for the choose file </s>
|
funcom_train/10365499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DownloadResults install(PluginListType pluginsToInstall, String defaultRepository, boolean restrictToDefaultRepository, String username, String password) {
DownloadResults results = new DownloadResults();
install(pluginsToInstall, defaultRepository, restrictToDefaultRepository, username, password, results);
return results;
}
COM: <s> installs a configuration from a remote repository into the local geronimo server </s>
|
funcom_train/46492753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void write(ByteBuffer data) {
DatagramChannel sc = (DatagramChannel)sk.channel();
if(sc.isOpen()) {
if(data.hasRemaining()) {
try {
sc.write(data);
} catch(IOException e) {
closeComplete();
}
}
commonEndWrite(data);
}
}
COM: <s> write out a byte buffer </s>
|
funcom_train/4644752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addRecurrenceIndicatorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Task_recurrenceIndicator_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Task_recurrenceIndicator_feature", "_UI_Task_type"),
TassooPackage.Literals.TASK__RECURRENCE_INDICATOR,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the recurrence indicator feature </s>
|
funcom_train/28125905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPositiveInterval() throws Exception {
try {
new TimeSpan(_dateFormat.parse("11/20/2002 12:34:56.012"),
_dateFormat.parse("11/20/2002 12:34:56.011"));
fail("Didn't throw IllegalArgumentException for negative interval");
}
catch (IllegalArgumentException iae) {
/* Pass */
}
}
COM: <s> tests that the end time must be than the start time </s>
|
funcom_train/42652408 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInstanciation() {
ObjectClass cl = new ObjectClassDummy();
ObjectDefinition def = new ObjectDefinitionDummy();
Property property = new Property(cl,
"property",
def,
false,
false,
false,
false) ;
assertEquals(cl, property.getOwnerClass());
assertEquals("property", property.getName());
assertEquals(def, property.getDefinition());
}
COM: <s> tests basic instanciation and associated getters </s>
|
funcom_train/49457131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void assertObjectNullEquals(Object o1, Object o2) throws Exception {
if (o1 == null && o2 == null) return; // OK
if (o1 == null && o2 != null) assertTrue(false);
if (o1 != null && o2 == null) assertTrue(false);
assertTrue(o1.equals(o2));
}
COM: <s> object comparision with some sense added </s>
|
funcom_train/4922856 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExtractQuotedValue() {
List<HttpHeader> headers = new ArrayList<HttpHeader>(1);
headers.add(this.createCookieHttpHeader("test", "\"value\""));
// Record
this.recordReturn(this.httpRequest, this.httpRequest.getHeaders(),
headers);
// Extract the http cookie
this.replayMockObjects();
HttpCookie cookie = HttpCookieUtil.extractHttpCookie("test",
this.httpRequest);
this.verifyMockObjects();
// Ensure correct cookie
assertEquals("Incorrect cookie", "value", cookie.getValue());
}
COM: <s> ensure able to extract the </s>
|
funcom_train/14520279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getNumOfApprovalRequired(Admin admin,int action, int caid, int certprofileid) {
CAInfo cainfo = caadminsession.getCAInfo(admin, caid);
return ApprovalExecutorUtil.getNumOfApprovalRequired(action, cainfo, certificatestoresession.getCertificateProfile(admin,certprofileid));
}
COM: <s> help method that checks the ca data config if specified action </s>
|
funcom_train/34069014 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createNode(String title, int x, int y) {
//creating graphics node and putting it to thr composite model
GraphicsNode gnode = new GraphicsNode(title, x, y);
pict.addObject(gnode);
resetEditors();
setChanged();
notifyObservers(new Msg(Msg.NODE_CREATED));
}
COM: <s> creates new rectangle node </s>
|
funcom_train/3111968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) //only for performance reasons
{
return true;
}
if (!(obj instanceof ConfigurationPanel)) {
return false;
}
ConfigurationPanel panel = (ConfigurationPanel) obj;
if (!getName().equals(panel.getName())) {
return false;
}
if (!getTreeLocation().equals(panel.getTreeLocation())) {
return false;
}
return true;
}
COM: <s> a simple equals method that will check the validity of both </s>
|
funcom_train/46760139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AccessModel getAccessModel(final Long accessId, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() {
public Object execute() throws Exception {
return BaseData.get(AccessModel.class, accessId, call);
}}; return (AccessModel) call(method, call, checkCache);
}
COM: <s> return the access model by id </s>
|
funcom_train/32741963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cache(String cacheName, Object key, Object value) {
LinkedHashMap<Object, Object> cache = caches.get(cacheName);
if (cache == null) {
cache = new LinkedHashMap<Object, Object>();
caches.put(cacheName, cache);
}
cache.put(key, value);
}
COM: <s> caches an object in a specific cache </s>
|
funcom_train/29578708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addListener( final File root, final FilesystemAlterationListener listener ) {
FilesystemWatcher observer;
synchronized (observersLock) {
observer = observers.get(root);
if (observer == null) {
final Map<File, FilesystemWatcher> newObservers =
new HashMap<File, FilesystemWatcher>(observers);
observer = new FilesystemWatcher(root);
newObservers.put(root, observer);
observers = Collections.unmodifiableMap(newObservers);
}
}
observer.addListener(listener);
}
COM: <s> add a new listener to the pool </s>
|
funcom_train/926442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String setTemplate(Integer moblogID, Integer graphicID, Integer layoutID) throws Exception {
Vector parameters = prepareDefaultRequestParameters();
parameters.add(moblogID);
parameters.add(graphicID);
parameters.add(layoutID);
Object response = xmlRpcClient.execute(TA_TEMPLATE_SETTEMPLATE, parameters);
return (String) response;
}
COM: <s> sets a template for a specified moblog from the textamerica template library </s>
|
funcom_train/46766505 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
sText = new JLabel();
sText.setText("Editing options");
jLabel = new JLabel();
jLabel.setText("Status: ");
//this.setSize(300, 55);
this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
this.add(jLabel, null);
this.add(sText, null);
}
COM: <s> this method initializes this </s>
|
funcom_train/31487217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Component controls[][], Component rights[], Component fills[]) {
if(controls != null)
add(controls);
if(rights != null)
setAnchorValues(rights, GridBagConstraints.NORTHEAST);
if(fills != null) {
setFillValues(fills, GridBagConstraints.BOTH);
setWeightXValues(fills, 1);
setWeightYValues(fills, 1);
}
}
COM: <s> similar to the create layout method but this one will allow you </s>
|
funcom_train/27976392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void notifyListeners (EventObject event) {
if (listeners != null) {
java.lang.Object[] listenerList = listeners.getListenerList ();
for (int i = 1; i < listenerList.length; i += 2) {
Object object = (Object) listenerList [i];
object.handleEvent (event);
}
}
}
COM: <s> notify all listeners of an event </s>
|
funcom_train/37421129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean writeToSocket(String str) {
try {
for (int k = 0; k < str.length() ; k++) {
oStream.write(str.charAt(k));
}
oStream.flush();
} catch (IOException ioe) {
stop = true;
ioe.printStackTrace();
}
if (stop == true) {
return false;
}
return true;
}
COM: <s> write to socket writes a string to a given socket </s>
|
funcom_train/14077870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setExporter() throws Exception {
if (outputFormatType == OUTPUT_TYPE_TABLE)
exporter = new TabularCitationExporter(this, document, leftColumnTextType, rightColumnTextType);
else if (this.useFootnotes) {
exporter = new FootnotedCitationExporter(this, document, sequentialMainTextType, footnoteTextType);
}
else exporter = new SequentialCitationExporter(this, document, sequentialMainTextType);
}
COM: <s> set up the pdfcitation exporter according to the users choice </s>
|
funcom_train/40900488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParams(String videoServerIP, String videoServerPort) {
String debugData = "VideoChat.setParams enter " + " ip:"
+ videoServerIP + " videoServerPort:" + videoServerPort;
Log.i("Video.setParams: ", debugData);
this.videoServerIP = videoServerIP;
this.videoServerPort = Integer.parseInt(videoServerPort);
}
COM: <s> set the paramaters of the video chat and start the thread </s>
|
funcom_train/11103796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeDialogContextManagerListener(DialogContextManagerListener listener) {
if (listener == null) {
throw new IllegalArgumentException("Cannot remove null DialogContextManagerListener");
}
boolean removed;
synchronized (listeners) {
removed = listeners.remove(listener);
}
if (removed) {
listener.setDialogContextManager(null); // detach self reference
}
}
COM: <s> p deregister an existing </s>
|
funcom_train/33011162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean sendMessage(Socket socket, AbstractNetworkMessage msg) {
try {
ObjectOutputStream oos = new ObjectOutputStream(socket
.getOutputStream());
oos.writeObject(msg);
oos.flush();
oos.close();
socket.getOutputStream().flush();
} catch (Exception e) {
Logger.printERROR(this.getClass().getName(),
"Couldn't send message to socket ("
+ socket.getInetAddress().getHostAddress() + ":"
+ socket.getPort() + "): " + e);
return false;
}
return true;
}
COM: <s> to send a message to the server </s>
|
funcom_train/1115455 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOutput(String line) {
Calendar cal = Calendar.getInstance();
DateFormat formater = DateFormat.getTimeInstance(DateFormat.MEDIUM);
String head = new String("<" + formater.format(cal.getTime()) + "> ");
if (outputText.length() == 0) {
outputText = head + line;
} else {
outputText = head + line + "<br>" + outputText;
}
outputTextArea.setText(outputText);
}
COM: <s> method to output plain text </s>
|
funcom_train/18846435 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void serializeAutomatedPTCT(ArrayList ptctCollObj, AutomatedProcessTaskContextType aptct) {
String serObj = null;
int idx = ptctCollObj.indexOf(aptct);
aptct = new AutomatedProcessTaskContextType();
aptct = (AutomatedProcessTaskContextType) ptctCollObj.get(idx);
serObj = aptct.serializePTCT();
if(log.isDebugEnabled()) {
log.debug(componentID + ":: Serialized Automated PTCT = " + serObj);
}
ptctCollObj.set(idx, serObj);
}
COM: <s> serialize automated process task context type </s>
|
funcom_train/48528167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasLease(NodeHandle nh) {
long curTime = timeSource.currentTimeMillis();
long leaseOffset = curTime-LEASE_PERIOD;
if (nh != null) {
Long time = (Long) lastTimeReceivedBLS.get(nh);
if (time == null
|| (time.longValue() < leaseOffset)) {
// we don't have a lease
return false;
}
}
return true;
}
COM: <s> do we have a lease from this node </s>
|
funcom_train/9070447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int withinNum() {
try {
return withinNum = Integer.parseInt(findOption("-within").getOptParams().get(0));
}
catch (NumberFormatException e) {
System.err.print(findOption("-within").getOptUsage());
}
return withinNum;
}
COM: <s> within num parameter of within option </s>
|
funcom_train/38827739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateSurace() {
if (size() < _q+1)
throw new IllegalArgumentException( RESOURCES.getString("incDefiningCrvCount").
replace("<REQ/>",String.valueOf(_q+1)).replace("<NUM/>",String.valueOf(size())) );
}
COM: <s> validate that the surface is properly formed otherwise throw an exception </s>
|
funcom_train/14365482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean modifyModelElement() {
boolean modified = false;
ModelElement modelElement = getElement();
// Change the model only if this one is modified.
String currentName = getName();
if (isElementModified(currentName)) {
setName(modelElement, currentName);
modified = true;
}
return modified;
}
COM: <s> handle model element modification from data collected from the page </s>
|
funcom_train/5463234 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void push() {
if (index == highWater) {
trail.add(new Value[MAX_VAR]);
highWater++;
}
Value[] newenv = (Value[]) trail.get(++index);
System.arraycopy(environment, 0, newenv, 0, MAX_VAR);
environment = newenv;
}
COM: <s> save the current environment on an internal stack </s>
|
funcom_train/3379564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int retrieveEntry(PrincipalName service, int keyType) {
int found = -1;
KeyTabEntry e;
if (entries != null) {
for (int i = 0; i < entries.size(); i++) {
e = entries.elementAt(i);
if (service.match(e.getService()) &&
(keyType == -1 || e.keyType == keyType)) {
return i;
}
}
}
return found;
}
COM: <s> retrieves the key table entry with the specified service name </s>
|
funcom_train/48491466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void nextState(char c) {
while(this.currentIndex != -1 &&
this.sequence.charAt(this.currentIndex+1) != c) {
this.currentIndex = this.backEdges[this.currentIndex];
}
if (c == this.sequence.charAt(this.currentIndex+1)) {
this.currentIndex++;
}
}
COM: <s> moves to next state in automat </s>
|
funcom_train/35615438 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemAPropos() {
if (jMenuItemApropos == null) {
jMenuItemApropos = new JMenuItem();
jMenuItemApropos.setText("A propos");
jMenuItemApropos.setMnemonic(KeyEvent.VK_A);
jMenuItemApropos.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
apropos.setVisible(true);
}
});
}
return jMenuItemApropos;
}
COM: <s> this method initializes j menu item apropos </s>
|
funcom_train/3371003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void collapse(boolean adjustRows) {
if(isExpanded) {
if(isVisible() && adjustRows) {
int childCount = getTotalChildCount();
isExpanded = false;
adjustRowCountBy(-childCount);
// We can do this because adjustRowBy won't descend
// the children.
adjustRowBy(-childCount, 0);
}
else
isExpanded = false;
if(adjustRows && isVisible() && treeSelectionModel != null)
treeSelectionModel.resetRowSelection();
}
}
COM: <s> collapses the receiver </s>
|
funcom_train/32962311 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Date getDate() {
try {
SimpleDateFormat HL7TSformat = new SimpleDateFormat("yyyyMMddHHmmssZZ");
HL7TSformat.setTimeZone(TimeZone.getTimeZone("GMT"));
if (getTimestamp() == null || getTimestamp().length() == 0)
return null;
return HL7TSformat.parse(getTimestamp());
} catch (Exception e) {
throw new IllegalStateException( "Invalid date format in tolvenId");
}
}
COM: <s> return the stored timestamp as a java date </s>
|
funcom_train/7690592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeInternalNode(Node node) {
assert ! isExternal(node) && getRootNode() != node;
MutableRootedNode parent = (MutableRootedNode)getParent(node);
for( Node n : getChildren(node) ) {
parent.addChild((MutableRootedNode)n);
}
parent.removeChild(node);
internalNodes.remove(node);
}
COM: <s> remove internal node </s>
|
funcom_train/48447007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateFilterQuery(String filter) throws QueryException {
if(!filter.contains(":") || filter.indexOf(":") == 0) {
throw new QueryException("Filter query " + filter + " must contain the field name");
}
if(filter.indexOf(":") == filter.length() - 1) {
throw new QueryException("Filter query " + filter + " must contain a field value");
}
}
COM: <s> validate that the filter query contains a field and a value </s>
|
funcom_train/2712750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateCaretColor(Color caretColor) {
TypingMode mode = getDocument().getProperty("TypingMode") == null
? TypingMode.INSERT
: (TypingMode) getDocument().getProperty("TypingMode");
if (mode == TypingMode.INSERT) {
this.setCaretColor(caretColor);
} else {
this.originalCaretColor = caretColor;
}
}
COM: <s> updates caret color </s>
|
funcom_train/35716292 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeAffectedPositions(IDocument document) {
int size= fOverlappingPositionReferences.size();
for (int i= 0; i < size; i++) {
PositionReference r= (PositionReference) fOverlappingPositionReferences.get(i);
try {
document.removePosition(r.getCategory(), r.getPosition());
} catch (BadPositionCategoryException x) {
// can not happen
}
}
}
COM: <s> removes the affected positions from their categories to avoid </s>
|
funcom_train/5372566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTopLeft(Control c) {
checkWidget();
if (c != null && c.getParent() != this) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
if (this.topLeft != null && !this.topLeft.isDisposed()) {
Point size = this.topLeft.getSize();
this.topLeft.setLocation(OFFSCREEN - size.x, OFFSCREEN - size.y);
}
this.topLeft = c;
layout(false);
}
COM: <s> set the control that appears in the top left corner of the pane </s>
|
funcom_train/10482480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void appendAnd(AndTerm term, String charset) throws MessagingException {
// ANDs are pretty easy. Just append all of the terms directly to the
// command as is.
SearchTerm[] terms = term.getTerms();
for (int i = 0; i < terms.length; i++) {
appendSearchTerm(terms[i], charset);
}
}
COM: <s> append imap search term information from an and term item </s>
|
funcom_train/20741821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getIsDirectory() {
boolean result = false;
if (isNotBlank(m_kind)) {
result = m_kind.equalsIgnoreCase(KIND_DIR);
} else if (isNotBlank(m_name)) {
result = m_name.endsWith("/") || m_name.endsWith("\\");
}
return result;
}
COM: <s> tests if the entry is a directory </s>
|
funcom_train/3935183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ILightWeightItem getLightWeight() throws BOMException {
try {
return new LightWeightTerm(((BigDecimal)get(TermHome.KEY_ID)).longValue(),
get(TermHome.KEY_TITLE).toString(), getChecked(TermHome.KEY_TEXT),
(Timestamp)get(TermHome.KEY_CREATED), (Timestamp)get(TermHome.KEY_MODIFIED));
}
catch (Exception exc) {
throw new BOMException(exc.getMessage());
}
}
COM: <s> returns the lightweight version of this model </s>
|
funcom_train/32614214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPolicy(String policies, SpaceURI space) throws TSAPIException {
try {
String ret = getPort().setPolicy(policies, space.toString(), securityCookie,securityAssertionsToSend,createSignature("setPolicy",space));
updateSecurityInfo(ret);
return;
} catch (Exception e) {
if(e instanceof TSAPIException)
throw((TSAPIException)e);
else
throw new TSAPIException(e);
}
}
COM: <s> set a triplespace security policy </s>
|
funcom_train/50140756 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void configure(Element config){
super.configure(config);
Element sqlElem = config.getChild("sql");
statements.clear();
List children = sqlElem.getChildren("run");
Iterator iter = children.iterator();
while (iter.hasNext()) {
statements.add(iter.next());
}
}
COM: <s> configures the procedure </s>
|
funcom_train/7641448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String label) {
MenuItem item = new MenuItem(mMenu, SWT.NONE);
item.setText(label);
item.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
// update the dropdown's text to match the selection
MenuItem sel = (MenuItem) e.widget;
mDropdown.setText(sel.getText());
}
});
}
COM: <s> add an item to the dropdown menu </s>
|
funcom_train/15580055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendEmail(String toAddr, String subject, String message) {
try {
emailer.sendMail(Engine.getDefault().getProperty(ConfigKeys.MAIL_FORUM_NAME)
, toAddr, subject, message);
} catch (Exception e) {
// TODO Auto-generated catch block
logger.severe(".sendEmail(): Could't sent an email\n"+ForumUtil.toString(e));
}
}
COM: <s> just sends any email from forum account </s>
|
funcom_train/11786385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object execute(ExecutionEvent event) throws ExecutionException {
IWorkbenchPage page = HandlerUtil
.getActiveWorkbenchWindowChecked(event).getActivePage();
try {
Action.openController(page, Helper.getSelectedFile(page));
} catch (Throwable e) {
String clazz = event.toString();
System.err.println("OpenCakeFile can not process event: " + clazz);
e.printStackTrace();
}
return null;
}
COM: <s> the command has been executed so extract extract the needed information </s>
|
funcom_train/24117417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeActionListenerFromMenuItems(ActionListener l) {
itmNew.removeActionListener(l);
itmOpen.removeActionListener(l);
itmClose.removeActionListener(l);
itmSave.removeActionListener(l);
itmSaveAs.removeActionListener(l);
itmPrint.removeActionListener(l);
itmExit.removeActionListener(l);
itmCut.removeActionListener(l);
itmCopy.removeActionListener(l);
itmPaste.removeActionListener(l);
itmDelete.removeActionListener(l);
itmAbout.removeActionListener(l);
}
COM: <s> remove the same action listener from all menu items </s>
|
funcom_train/11120279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean exists() {
try {
return m_fileObject.exists();
} catch (final FileSystemException e) {
if (this.getLogger().isWarnEnabled()) {
this.getLogger().warn("Unable to determine existence for " + m_location, e);
}
return false;
}
}
COM: <s> whether this resource exists or not </s>
|
funcom_train/4918360 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testLoadNullValues() throws Exception {
// Obtain input to XML
File xmlFile = this.findFile(this.getClass(), NULL_XML_FILE_NAME);
// Load the xml onto the target object
this.xmlUnmarshaller.unmarshall(new FileInputStream(xmlFile),
this.targetObject);
// Validate target object loaded appropriately
validateTargetObjectNulls(this.targetObject);
}
COM: <s> ensures able to appropriately load null xml values </s>
|
funcom_train/7685118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayClassZeroMessage(Context context, SmsMessage sms) {
// Using NEW_TASK here is necessary because we're calling
// startActivity from outside an activity.
Intent smsDialogIntent = new Intent(context, ClassZeroActivity.class)
.putExtra(CLASS_ZERO_BODY_KEY, sms.getMessageBody())
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
context.startActivity(smsDialogIntent);
}
COM: <s> displays a class zero message immediately in a pop up window </s>
|
funcom_train/29397118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void seek(long pos) throws java.io.IOException {
// skips to absolute location 'point' in the file
if (pos < 0 || pos >= size)
throw new java.io.IOException("MSILInputStream.seek: Seek position outside of file bounds: " + pos);
current = (int) pos;
}
COM: <s> moves the file pointer to the given location </s>
|
funcom_train/6290012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int indexOf(final Vector/*<MessageHeaders>*/ messages, final String threadingMessageID) {
final int size = messages.size();
MessageHeader header;
for (int i = 0; i < size; ++i) {
header = (MessageHeader)messages.elementAt( i );
if ( threadingMessageID.equals( header.getThreadingMessageID() ) ) {
return i;
}
}
return -1;
}
COM: <s> p returns the index at which the message is stored in vector </s>
|
funcom_train/32192100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isIndividualType(String individualID, String conceptID) {
try {
return getIndividualFromExternalID(individualID, false).hasProperty(RDF.type,
getConceptFromExternalID(conceptID));
} catch (InvalidIDException e) {
e.printStackTrace();
} catch (NoOntResourceFoundException e) {
e.printStackTrace();
} catch (ZSLayerException e) {
e.printStackTrace();
}
return false;
}
COM: <s> check if an individual has a specific type </s>
|
funcom_train/17009518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object o) {
double thisValue1 = this.value1;
double thisValue2 = this.value2;
double thatValue1 = ((V2DDataWritable)o).getValue1();
double thatValue2 = ((V2DDataWritable)o).getValue2();
if(thisValue1<thatValue1 && thisValue2<thatValue2){
return -1;
}else if(thisValue1>thatValue1 && thisValue2>thatValue2){
return 1;
}else if(thisValue1==thatValue1 && thisValue2==thatValue2){
return 0;
}else{
return 2;
}
}
COM: <s> compares two float writables </s>
|
funcom_train/36014320 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processBody(Scanner in, PrintWriter out) {
this.printLinesTo(in, out, this.unit.getBodyBeginLine()-1);
// so far, the One Line Body method is not going to be processed
// on account of readability
if (this.unit.hasOneLineBody())
return;
this.addPreCheck(in, out);
this.addPostCheck(in, out);
}
COM: <s> the method to process the method body java codes into test codes </s>
|
funcom_train/32870146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String writeBasicAspect(ImportsManager imports, String lineDelimiter) {
imports.addImport("ch.ethz.prose.DefaultAspect");
StringBuffer buf = new StringBuffer();
buf.append("public class "); //$NON-NLS-1$
buf.append(getAspectName());
buf.append(" extends DefaultAspect {");
buf.append(lineDelimiter);
buf.append(lineDelimiter);
buf.append('}');
buf.append(lineDelimiter);
return buf.toString();
}
COM: <s> write basic aspect class without any decorations like comments </s>
|
funcom_train/36168761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getTarget() {
if (target != null && target.eIsProxy()) {
InternalEObject oldTarget = (InternalEObject) target;
target = (Node) eResolveProxy(oldTarget);
if (target != oldTarget) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, NetworkPackage.CHANNEL__TARGET,
oldTarget, target));
}
}
return target;
}
COM: <s> returns the value of the em b target b em reference </s>
|
funcom_train/7732625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void terminate(WsConnector ws_client) {
if (preWp != null) {
// DEBUG
// System.out.print("[" + (System.currentTimeMillis() % 1000000) + "]");
// System.out.println("Final WP");
ws_client.push(preWp.toHttpQuery());
preWp = null;
}
}
COM: <s> terminate the waypoint buffer </s>
|
funcom_train/18079574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void joinGame(int gameid, boolean spectator) {
/*
* if (createdGame) throw new IllegalStateException( "I have already
* created a game.");
*/
this.gameid = gameid;
if (spectator) {
game.emit(GameCommands.JOIN_GAME_AS_SPECTATOR.command() + gameid);
}
game.emit(GameCommands.JOIN_GAME.command() + gameid);
LogMessenger.instance().fireLog("Joining game " + gameid);
}
COM: <s> the gameid of the game that this player created if appropriate </s>
|
funcom_train/3076993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveUserInternal(User user) {
Session session = SessionFactoryUtils.getSession(getSessionFactory(), false);
try {
session.saveOrUpdate(user);
} catch (HibernateException ex) {
logger.error("Error in saveUser: ", ex);
throw SessionFactoryUtils.convertHibernateAccessException(ex);
}
}
COM: <s> save user only for internal use without security checking </s>
|
funcom_train/7266791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void prepareSocket(final Socket socket) throws IOException {
socket.setTcpNoDelay(HttpConnectionParams.getTcpNoDelay(this.params));
int linger = HttpConnectionParams.getLinger(this.params);
if (linger >= 0) {
socket.setSoLinger(linger > 0, linger);
}
}
COM: <s> sets parameters of code socket code based on default </s>
|
funcom_train/20374603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getProgressPanel() {
if (progressPanel == null) {
progressPanel = new JPanel();
progressPanel.setLayout(
new GridLayout(1, getStepRadioButtons().length));
progressPanel.setBounds(
new Rectangle(0, 60, SIZE_WINDOW_WIDTH, 25));
for (int i = 0; i < getStepRadioButtons().length; i++) {
progressPanel.add(getStepRadioButtons()[i]);
}
}
return progressPanel;
}
COM: <s> progress panel init </s>
|
funcom_train/13275708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getFurnitureGroupCount(List<HomePieceOfFurniture> furniture) {
int i = 0;
for (HomePieceOfFurniture piece : furniture) {
if (piece instanceof HomeFurnitureGroup) {
i += 1 + getFurnitureGroupCount(((HomeFurnitureGroup)piece).getFurniture());
}
}
return i;
}
COM: <s> returns the count of furniture groups among the given list </s>
|
funcom_train/9792610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendWYSIWYGDocumentHasChangedRemove(int offset,int length){
try{
MessageWYSIWYGDocumentSyncFromClientRemove mwysfc = new MessageWYSIWYGDocumentSyncFromClientRemove(email,username,offset,length);
sendMessage(mwysfc);
//System.out.println("WYSIWYGIN CLEVENTHANDLER2");
}catch (Exception e){
// EMUI.println(getUsername(),"ERROR SENDING WYSIWYG REMOVE");
}
}
COM: <s> sends offset and length of text removed from wysiwyg chat window interface </s>
|
funcom_train/48213247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String get(String paramName) {
String lcParamName = paramName.toLowerCase();
if (!params.containsKey(lcParamName)) {
throw new IllegalArgumentException(
"DEF_PARAM version " + params.get("SCHEMA_VERSION") +
" doesn't have the parameter " + paramName);
}
return (String) params.get(paramName.toLowerCase());
}
COM: <s> gets the specified parameter from our snapshot of the </s>
|
funcom_train/44136250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHTMLModel(String modelFileName) throws Throwable {
String retStr;
try{
FileInputStream fis = new FileInputStream(new File(modelFileName));
byte[] data = new byte[fis.available()];
fis.read(data, 0, data.length);
fis.close();
retStr = new String(data);
} catch(Throwable e) {
throw e;
}
return retStr;
}
COM: <s> this method gets the hmtl model </s>
|
funcom_train/18806593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLabelType(int type) {
// check the argument...
if ((type != NO_LABELS) && (type != VALUE_LABELS)) {
throw new IllegalArgumentException("MeterPlot.setLabelType(int): unrecognised type.");
}
// make the change...
if (this.labelType != type) {
this.labelType = type;
notifyListeners(new PlotChangeEvent(this));
}
}
COM: <s> sets the label type </s>
|
funcom_train/17492716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ClassInfo add(String cn, ClassInfo ci) {
classes.put(cn, ci);
// Add the inner classes to the pool
ClassInfo[] infos = ci.getDeclaredClasses();
for (int i = 0; i < infos.length; i++) {
String s = infos[i].getName();
if (!classes.containsKey(s)) {
add(s, infos[i]);
}
}
return ci;
}
COM: <s> adds a classinfo to the pool </s>
|
funcom_train/45459690 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addEmptyPlaylist(String playlistName) {
if (!_items.containsKey(playlistName)) {
Playlist newPlaylist = new Playlist(playlistName);
newPlaylist.setDate(new Date());
newPlaylist.setPosition(_items.size());
_items.put(playlistName, newPlaylist);
Controller.getInstance().getEventController().firePlaylistChange(EventConstants.EVT_ADD_PLAYLIST, null, newPlaylist);
return true;
} else
return false;
}
COM: <s> add an empty playlist to the list </s>
|
funcom_train/31405872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTechnologyBase( int tech) {
techBase.set(tech);
setEngineType(engineType.get());
setGyroType(gyroType.get());
setCockpitType(cockpitType.get());
setArmorType(armorType.get());
// updateStatusBar();
}
COM: <s> sets the technology base and tries to reapply all other type settings </s>
|
funcom_train/10299121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getURLString (String file) {
String url;
if (remove != null && (file.startsWith(remove))) {
url = file.substring(remove.length(), file.length());
} else {
url = file;
}
if (prepend != null) {
url = prepend + url;
}
if (File.separatorChar != '/') {
url = url.replace(File.separatorChar, '/');
}
return url;
}
COM: <s> returns the url filename of a file in string format </s>
|
funcom_train/124723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restoreLastState() {
// restore last state
File lastStateFile = new File(LAST_STATE_PATH);
if (lastStateFile.canRead()) {
ProjectTreeNode node = ProjectManager.getInstance()
.deSerializeProject(lastStateFile);
node.setLastState(true);
}
}
COM: <s> the i last state i is retrieved which is just a project </s>
|
funcom_train/1342796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String replaceEnvVars(String source) {
Enumeration en=envVars.keys();
while (en.hasMoreElements()) {
String key=(String) en.nextElement();
if (source.indexOf("$"+key)!=-1) {
source=source.replaceAll("\\$"+key,envVars.getProperty(key));
}
}
return source;
}
COM: <s> replaces all env vars in source with their content </s>
|
funcom_train/37218829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateTables() throws CMException {
// Update the Passwords, Key pairs, and Trusted Certificates tables with
// the Keystore entries
((PasswordsTableModel) passwordsTable.getModel()).load(credManager);
((KeyPairsTableModel) keyPairsTable.getModel()).load(credManager);
((TrustCertsTableModel) trustCertsTable.getModel()).load(credManager);
}
COM: <s> update the applications tables with the keystore trustore contents </s>
|
funcom_train/8357349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPanel() {
if (jContentPanel == null) {
jContentPanel = new JPanel();
jContentPanel.setLayout(new BorderLayout());
PNROCChart chart = new PNROCChart("ROC Curve for " + this.testSet.getName(), this.testSet);
jContentPanel.add(chart, BorderLayout.CENTER);
}
return jContentPanel;
}
COM: <s> this method initializes j content panel </s>
|
funcom_train/3785462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean delete()
{ /* delete */
int n= lookup(this);
if(n==-1)
return(false);
for(int i=n;i<(nMaps-1);n++)
flkDemos[i]= flkDemos[i+1];
flkDemos[nMaps-1]= null;
nMaps--;
return(true);
} /* delete */
COM: <s> delete rmv entry from database flk demos 0 n maps 1 </s>
|
funcom_train/5898073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
if (_selected) {
final Tab tab = selectNextTab();
if (tab != null) {
final Set<Tab> selItems = new HashSet<Tab>(2);
selItems.add(tab);
Events.postEvent(new SelectEvent<Tab, Object>(Events.ON_SELECT, tab, selItems));
}
}
//Cache panel before detach , or we couldn't get it after tab is detached.
final Tabpanel panel = getLinkedPanel();
detach();
if (panel != null)
panel.detach();
}
COM: <s> closes this tab and the linked tabpanel </s>
|
funcom_train/8222515 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFuzzParameter(int index, Parameter parameter, FuzzSource fuzzSource, int priority) {
_logger.info("Setting a parameter at index " + index + ", source is " + fuzzSource);
_fuzzParameters.set(index, parameter);
_fuzzSources.set(index, fuzzSource);
_parameterPriorities.set(index, new Integer(priority));
fireFuzzParameterChanged(index);
resetFuzzer();
}
COM: <s> sets the fuzz parameter </s>
|
funcom_train/25792305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTextLineNumber(String source) {
String sourceFile = source;
int lineNumbers = 0;
int firstEndLine = 0;
int nextLine = 0;
while (sourceFile.length() != 0) {
if (sourceFile.contains("\n")) {
firstEndLine = sourceFile.indexOf("\n");
nextLine = firstEndLine + 1;
} else {
firstEndLine = sourceFile.length();
nextLine = firstEndLine;
}
sourceFile = sourceFile.substring(nextLine, sourceFile.length());
lineNumbers++;
}
return lineNumbers;
}
COM: <s> returns the total line numbers </s>
|
funcom_train/44701495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
String line;
InputStreamReader reader = new InputStreamReader(stream);
BufferedReader buffer = new BufferedReader(reader);
try {
line = buffer.readLine();
while (line != null) {
if ((writer != null) && (line != null)) {
writer.write(line + "\n");
}
line = buffer.readLine();
}
} catch (IOException e) {
throw new RuntimeException(e);
}
} //run()
COM: <s> consumes the output </s>
|
funcom_train/23351879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getLongestLabel() {
String longest = getLabel();
if (nodes.size() == 0) {
return longest;
}
for(Node n : nodes) {
String lbl = n.getLongestLabel();
if (lbl.length() > longest.length()) {
longest = lbl;
}
}
return longest;
}
COM: <s> returns the longest label of any node in the tree </s>
|
funcom_train/7880300 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addi(String bin) {
// determine registers and immediate value in decimal
int r1 = Integer.parseInt(bin.substring(8, 11), 2);
int r2 = Integer.parseInt(bin.substring(11, 14), 2);
int imm = twosCompliment(bin.substring(16));
// perform arithmetic
try {
int temp = twosCompliment(getBinReg(r2)) + imm;
// test for overflow
setReg(r1, temp);
} catch (NumberFormatException e) {
// overflow occurs
}
}
COM: <s> description add imediate br </s>
|
funcom_train/10584580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getLanguage(String urlWithoutSuffix) {
String language = "";
String url = urlWithoutSuffix;
int languageSeparatorIndex = url.lastIndexOf("_");
if (languageSeparatorIndex > -1) {
String suffix = url.substring(languageSeparatorIndex + 1);
if (suffix.length() <= 5) {
language = suffix;
}
}
return language;
}
COM: <s> returns the language of a url </s>
|
funcom_train/30075595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ModelAndView onSubmit(Object command) throws ServletException {
// the edited object
OsVersion osVersion = (OsVersion) command;
// delegate the update to the Business layer
getGpir().storeOsVersion(osVersion);
return new ModelAndView(getSuccessView(), "osVersionId", Integer.toString(osVersion.getId()));
}
COM: <s> method updates an existing code os version code when the form is committed </s>
|
funcom_train/16955043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void assertText(String xpath, String expected) {
final HtmlElement h1 = getHtmlElement(xpath);
assertNotNull("Element " + xpath + " not found on the page", h1);
assertEquals("Text not found in path " + xpath, expected, h1.asText());
}
COM: <s> checks the content of the html elements </s>
|
funcom_train/14233212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void abortGame(WC3Packet packet) {
GameState localGS = GameState.instance();
playersNoticed = new HashMap<String,Boolean>();
localGS.gameHosted = false;
inGame = false;
try {
if (!localGS.gameStarted) {
// Mark that you aborted the game
} else {
localGS.gameStarted = false;
gameTimer.kill();
// Mark that you left the game, attempt to move the replay
MiscTools.moveReplay();
}
} catch (NullPointerException e) {
// This is fine, game packets may come before GameState is initialized
}
}
COM: <s> processes game abort packets </s>
|
funcom_train/17848949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDescriptionForFunctions(String function) {
String translation = mLocalizer.msg("function_" + function, "");
if (translation.startsWith("[ParamLibrary.function")) {
return mLocalizer.msg("noDescription", "No Description available");
}
return translation;
}
COM: <s> get the description for a specific function </s>
|
funcom_train/2911620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Person get(){
Person person = null;
synchronized (MAP_REPOSITORIES) {
Map<Resource, Person> mapResource = MAP_REPOSITORIES
.get(repository);
if (mapResource == null) {
mapResource = new HashMap<Resource, Person>();
MAP_REPOSITORIES.put(repository, mapResource);
}
person = mapResource.get(uri);
if (person == null && uri != null) {
person = new PersonImpl(uri, repository);
mapResource.put(uri, person);
}
}
return person;
}
COM: <s> returns instance of the person for internal operations only </s>
|
funcom_train/23714213 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setupRuntimeHelpers() {
try {
m_getMirrorRepository = m_wagonManager.getClass().getMethod("getMirrorRepository",
new Class[] { ArtifactRepository.class });
} catch (RuntimeException e) {
m_getMirrorRepository = null;
} catch (NoSuchMethodException e) {
m_getMirrorRepository = null;
}
}
COM: <s> use reflection to find if certain runtime helper methods are available </s>
|
funcom_train/20352490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTf_username() {
tf_username = new JTextField();
tf_username.setBounds(new Rectangle(26, 190, 179, 20));
tf_username.setFont(new java.awt.Font("Tahoma",0,11));
tf_username.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER && checkemptEntry()) {
Connect_To_Server();
}
}
});
return tf_username;
}
COM: <s> create a text field and catch inputed data on that text field </s>
|
funcom_train/19455170 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String asPrintString(Object unknownObjectType) {
String result = null;
try {
java.lang.reflect.Method method =
getClass().getMethod(
"asPrintString",
new Class[] { unknownObjectType.getClass()});
result = (String) method.invoke(this, new Object[] { unknownObjectType });
} catch (Exception exc) {
throw new IllegalArgumentException("Unknown Object Type");
}
return result;
}
COM: <s> returns a given code java </s>
|
funcom_train/47037134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void generateZipIndividualTarget(String zipName, String source) {
script.println();
script.printTargetDeclaration(zipName, TARGET_INIT, null, null, null);
script.printZipTask(Utils.getPropertyFormat(PROPERTY_BASEDIR) + '/' + zipName, Utils.getPropertyFormat(PROPERTY_BASEDIR) + '/' + source, false, false, null); //$NON-NLS-1$ //$NON-NLS-2$
script.printTargetEnd();
}
COM: <s> add a code zip code target to the given ant script </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.