__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/50872613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeByteArray(int fIndent, OMByteArray fByteArray) {
writeIndent(fIndent);
mPrintWriter.print("<OMB");
writeAttributes(fByteArray.getAttributes());
mPrintWriter.print(">");
mPrintWriter.print(fByteArray.getByteArrayAsString());
mPrintWriter.print("</OMB>");
if (mPrettyPrint) {
mPrintWriter.println();
}
}
COM: <s> write an ombyte array </s>
|
funcom_train/15928528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cleanUp(String project) throws Exception {
SWTBotView pkgView = bot.viewByTitle("Package Explorer");
SWTBotTree pkgTree = pkgView.bot().tree();
SWTBotTreeItem projItem = pkgTree.getTreeItem(project);
projItem.select();
bot.menu(WizardConstants.EDIT_MENU).menu(WizardConstants.DELETE_MENU_ITEM).click();
SWTBotShell deleteShell= bot.shell(WizardConstants.DELETE_RESOURCES_SHELL);
deleteShell.activate();
bot.checkBox(WizardConstants.DELETE_PROJECT_CONTENTS).select();
bot.button(WizardConstants.OK_BUTTON).click();
}
COM: <s> this method cleans up the workspace it deletes the project created </s>
|
funcom_train/12522545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateCode(BlockScope blockScope, CodeStream codeStream) {
if ((this.bits & ASTNode.IsReachable) == 0) {
return;
}
if ((this.bits & ASTNode.HasBeenGenerated) != 0)
return;
int pc = codeStream.position;
if (this.binding != null)
((NestedTypeBinding) this.binding)
.computeSyntheticArgumentSlotSizes();
generateCode(codeStream.classFile);
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
COM: <s> bytecode generation for a local inner type api as a normal statement </s>
|
funcom_train/12752183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() throws Exception {
super.setUp();
mCDAO = new JdbcCategoryDAO("hsql");
/*
* In further iterations, the following should be replaced by
* sql scripts which are executed by ant
*/
JdbcManager manager=new JdbcManager("hsql");
manager.connect();
manager.performSqlUpdate("DELETE FROM CATEGORIES", null);
manager.commit();
manager.closeConnection();
}
COM: <s> overrides the default set up method of the test case class </s>
|
funcom_train/50327345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Consist addConsist(DccLocoAddress address){
if(consistList.contains(address)) // no duplicates allowed.
return consistTable.get(address);
LocoNetConsist consist;
consist = new LocoNetConsist(address,memo);
consistTable.put(address,consist);
consistList.add(address);
return consist;
}
COM: <s> add a new loco net consist with the given address to </s>
|
funcom_train/3596497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintLabel(Graphics g, String s, Point p) {
Rectangle rect = measureString(g,s);
int x = p.x-rect.width/2;
int y = p.y+rect.height/2;
g.drawString(s,x,y);
}
COM: <s> p paints a label so that its centre is at the specified point </s>
|
funcom_train/24243100 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadContentType() {
contentType.clear();
contentType.put("xml", "text/xml");
contentType.put("json", "text/html");
contentType.put("html", "text/html");
contentType.put("boolean", "text/html");
contentType.put("void", "text/html");
}
COM: <s> load the mime type </s>
|
funcom_train/18753708 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLogarithmic(boolean logarithmic) {
if (logarithmic) {
try {
this.xyplot.setRangeAxis(new LogarithmicAxis(""));
} catch(Exception e) {
// In case we try to use a logarithmic axis when the values go below 1
this.xyplot.setRangeAxis(new NumberAxis(""));
}
} else {
this.xyplot.setRangeAxis(new NumberAxis(""));
}
}
COM: <s> define this graph as logarithmic or not </s>
|
funcom_train/48666917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getRepresentation() {
if(!isValid()) {
return INVALID;
}
if(!isValidPart(this.agentID)) {
return HOST;
}
if(!isValidPart(this.entityID)) {
return AGENT;
}
if(!isValidPart(this.counterID)) {
return ENTITY;
}
return COUNTER;
}
COM: <s> if this resource represents a host it returns host </s>
|
funcom_train/45622949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDependsOnTargetsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_TargetType_dependsOnTargets_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_TargetType_dependsOnTargets_feature", "_UI_TargetType_type"),
MSBPackage.eINSTANCE.getTargetType_DependsOnTargets(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the depends on targets feature </s>
|
funcom_train/34889725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public short startTracing(String login) throws ConnectionException {
// ask the server to trace
short errCode = this.traceUser(true, login);
if (errCode == OK){
// just set the initial information -- add the user to the list of the tracked users
this.userLocations.updateUser(login, null);
}
return errCode;
}
COM: <s> starts tracing of the specified user if this user has been granted the </s>
|
funcom_train/43334289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fire() throws IllegalActionException {
super.fire();
inA = a.get(0);
inB = b.get(0);
if(! (inA instanceof BitwidthToken))
inA = ((BitwidthDirector) getDirector()).newTokenInstance(inA);
out = quantize(inA.multiply(inB));
output.send(0, out);
}
COM: <s> if there is at least one token on the input ports add </s>
|
funcom_train/21935316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getWeapon(String weapon_id){
/* This doesnt seem to quite work yet for
* some reason or other */
if(weapon_id.equals("Best")){
sendMessage("CHANGEWEAPON {Id Best}\r\n");
} else{
sendMessage("CHANGEWEAPON {Id "+state.getMapName()+"."+weapon_id+"}\r\n");
}
}
COM: <s> allows passing of information to the server to allow </s>
|
funcom_train/776800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(String params) {
if (checkPassword(params)) {
// if we do it the other way around, the conenction will just freeze waiting for a reply, and that will mess things up.
client.respond("200 Command successful. (shutdown) -[bnc]");
BNC.shutdown();
}
}
COM: <s> executiong shuts down the bnc </s>
|
funcom_train/1572640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WOComponent pageWithName(String _name) {
pageLog.debug("pageWithName: " + _name);
// TODO: SOPE uses the WOResourceManager directly
WOApplication app = this.application();
if (app == null) {
pageLog.error("component has no application, cannot lookup page: "+_name);
return null;
}
return app.pageWithName(_name, this.context());
}
COM: <s> looks up and instantiates a new component with the given name </s>
|
funcom_train/35838682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NodePosition getNodePosition(PCSession session, String sViewID, String sNodeID) throws NoSuchElementException , SQLException {
//
// DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()) ;
//
// NodePosition nodePos = DBViewNode.getNodePosition(dbcon, sViewID, sNodeID, session.getUserID());
//
// getDatabaseManager().releaseConnection(session.getModelName(),dbcon);
return null;
}
COM: <s> returns the nodeposition with the given id </s>
|
funcom_train/50274591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HtmlRendererContext open(java.net.URL url, String windowName, String windowFeatures, boolean replace) {
BrowserFrameJFrameImpl newBrowserFrame = BrowserFrameJFrameImpl.getInstance(
this.browserFrame.getBrowserApplication(), this, url, windowName, windowFeatures, replace);
return newBrowserFrame.getHtmlRendererContext();
}
COM: <s> it should open a new browser window </s>
|
funcom_train/19259663 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(GLAutoDrawable drawable) {
// Store the drawable.
this.canvas = drawable;
// Create event listeners for the 3D canvas.
drawable.addMouseMotionListener(this);
drawable.addMouseListener(this);
drawable.addKeyListener(this);
// Create an animator for this drawable.
animator = new Animator(canvas);
GL gl = drawable.getGL();
// Setup the rendering contex.
setupRC(gl);
// Set the drawing mode context.
setDrawModeContext(gl, gLand.getDrawMode());
// Start our animation thread.
startAnimating();
}
COM: <s> called by the drawable immediately after the open gl context is initialized </s>
|
funcom_train/38354864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int numMessages() {
output.println("STAT");
output.flush();
String r = nextLine();
if (r.startsWith("+OK")) {
String[] res = r.split(" ", 4);
try {
int num = Integer.parseInt(res[1]);
return num;
} catch (NumberFormatException e) {}
}
return 0;
}
COM: <s> returns the number of messages that are in the mailbox </s>
|
funcom_train/41725631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSoftbar(int leftKey, int centerKey, int rightKey) {
if (softbar == null)
throw new IllegalStateException("Softbar not defined");
softbar.setSoftkeyLabel(SoftBar.LEFT, leftKey);
softbar.setSoftkeyLabel(SoftBar.MIDDLE, centerKey);
softbar.setSoftkeyLabel(SoftBar.RIGHT, rightKey);
}
COM: <s> sets softbar three buttons label </s>
|
funcom_train/41836905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Location getLocation() {
if (this.location == null) {
Location bestLastKnownLocationOrNull = LocationUtils.getBestLastKnownLocation(this);
if (bestLastKnownLocationOrNull != null) {
this.setLocation(bestLastKnownLocationOrNull);
}
// enable location updates if necessary
if (!this.locationUpdatesEnabled) {
LocationUtils.enableLocationUpdates(this, this);
this.locationUpdatesEnabled = true;
}
}
return this.location;
}
COM: <s> initialize the location updates if necessary </s>
|
funcom_train/47135618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addEndDatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_HistPrice_endDate_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_HistPrice_endDate_feature", "_UI_HistPrice_type"),
TradingPackage.Literals.HIST_PRICE__END_DATE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the end date feature </s>
|
funcom_train/18219010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String formatForSQLStatement(String value) {
if (needsQuotationMarks()) {
return "\'" + value.replace("\\", "\\\\").replace("'", "\\\'").replace("\"", "\\\"") + "\'";
} else {
return value;
}
}
COM: <s> returns the given string to be used in an sql statement </s>
|
funcom_train/123915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttribute(String name, String value) {
if ((_formatAttributes == null) || (_elemName == null))
attributeSettingError();
if (value == null)
return;
CharSequence csqValue = toCharSeq(value);
_formatAttributes.addAttribute(name, csqValue);
}
COM: <s> sets the specified code string code attribute </s>
|
funcom_train/6477257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FOS privateReplaceConstants() {
if (isConstant()) {
return new FOS("?" + functor);
} else if (isVariable()) {
return new FOS(functor);
} else {
FOS fos = new FOS(functor);
for (int i=0; i<this.numArguments(); i++) {
fos.addArgument(argAt(i).replaceConstants());
}
return fos;
}
}
COM: <s> need this function below for recursion the first time the </s>
|
funcom_train/37393979 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean implementsHttpResponse(Object object) {
if (!(object instanceof HttpServletResponse)) {
return false;
}
// test if an HttpServlet response is implemented
HttpServletResponse response = (HttpServletResponse)object;
try {
response.encodeURL(null);
}
catch (Exception e) {
return false;
}
return true;
}
COM: <s> p confirms that the response object actually implements its interface </s>
|
funcom_train/10666822 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Method findMethod(Class c, String methodName) {
try {
Method m = c.getMethod(methodName, new Class[0]);
int mod = m.getModifiers();
return (Modifier.isPublic(mod) || Modifier.isProtected(mod)) ? m
: null;
} catch (Exception e) {
return null;
}
}
COM: <s> retrieves the method with specified name </s>
|
funcom_train/13560842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int cleanUp() {
int gain = 0;
for (EdgeFlowI EI : _flow) {
gain += EI.cleanup();
}
for (IndexedNodeI source : this._sources) {
SourceIntervals si = this._sourceoutflow[source.getIndex()];
if (si != null)
gain += si.cleanup();
}
for (IndexedNodeI sink : this._sinks) {
SinkIntervals si = this._sinkflow[sink.getIndex()];
if (si != null)
gain += si.cleanup();
}
return gain;
}
COM: <s> call the cleanup method for each edge </s>
|
funcom_train/36559028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerContext(GameContext context, String methodName) {
if (context == null || methodName == null)
throw new IllegalArgumentException("Null parameter. context: " + context + ", methodName: " + methodName);
contextRegistry.put(methodName, context);
}
COM: <s> a context may register multiple entry points </s>
|
funcom_train/34453128 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateEventsSelected() {
if(this.eventids==null){
for(Event event : this.events)
event.setSelected(false);
}else{
for(Event event : this.events){
if( this.eventids.contains(event.getId()) ){
event.setSelected(true);
}else
event.setSelected(false);
}
}
}
COM: <s> sets the selected property of the event instance to true when </s>
|
funcom_train/44011514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetPmtChange() {
System.out.println("getPmtChange");
PaymentBO instance = new PaymentBO();
double expResult = 0.0;
double result = instance.getPmtChange();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get pmt change method of class edu </s>
|
funcom_train/18358141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void RegistrarAvailable(Collection regs) {
// start monitoring for the requested services
StartServiceMonitor(regs);
// register any services we're supposed to manage
RegisterServices(regs);
// now tell the client that the registrar is available.
Iterator anIt = listeners.values().iterator();
while (anIt.hasNext() == true) {
RemoteServiceAnnouncerListener aListener = (RemoteServiceAnnouncerListener) anIt.next();
aListener.RegistrarAvailable();
}
}
COM: <s> registrars refreshed is called when registrars are available </s>
|
funcom_train/36999819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String now() {
if(!haveDateFormat) return String.valueOf(System.currentTimeMillis());
try {
if(_form==null)
_form = new java.text.SimpleDateFormat("MMM dd HH:mm:ss", java.util.Locale.ENGLISH);
return ((java.text.SimpleDateFormat)_form).format(new Date());
} catch (Throwable t) {
haveDateFormat=false;
return now();
}
}
COM: <s> create a string containing the current date time </s>
|
funcom_train/5002479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getTitle() {
String title = ""; //$NON-NLS-1$
for(Property p : this.properties)
if (p instanceof StructuralUnitProperty)
{
StructuralUnitProperty sp = (StructuralUnitProperty)p;
title += sp.getFullName()+", "; //$NON-NLS-1$
}
else
title += p.getName()+", "; //$NON-NLS-1$
if (title.length() == 0)
title = Messages.ReferencePattern_3;
else
title = title.substring(0, title.length()-2);
return title;
}
COM: <s> gets the title </s>
|
funcom_train/26450613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changePalette(int paletteIndex, int argb) {
palette[paletteIndex] = argb;
try {
colorChanged[(paletteIndex - gdi.colorOffset) >> gdi.gfx.planes] = true; // TO DO: this is not
// correct if the machine
// has a color table too.
colorsChanged = true;
} catch (Exception e) {
// The color that is changed is not used by the layer that is using this
// GfxManager. We don't check, we just catch.
}
}
COM: <s> notify me if something changed the palette </s>
|
funcom_train/17156778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getStringValue(final Object value) {
String stringValue = "";
if (value instanceof String) {
stringValue = (String) value;
}
if (value instanceof ArrayList<?>) {
ArrayList<?> values = (ArrayList<?>) value;
if (values.size() > 0) {
stringValue = (String) values.get(0);
}
}
return stringValue;
}
COM: <s> gets the string value </s>
|
funcom_train/25505112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isValidCheckSum() throws IOException {
if (this.checkSums.length==0) return true;
String checkSum = CheckSum.toString(CheckSum.getChecksum(source));
for (String validCheckSum : this.checkSums) {
if (validCheckSum.equals(checkSum)) return true;
}
// System.out.println (source + " invalid checksum");
return false;
}
COM: <s> tests whether the file has a valid checksum or not </s>
|
funcom_train/8809885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String composeXAxisTitle(PivotChartElement element) {
if (element.getCategoryAxisTitle() != null) {
return element.getCategoryAxisTitle();
}
if (element.getCategoryDimensions().size() == 0) {
return null;
}
// TODO : localize
return element.getCategoryDimensions()
.get(element.getCategoryDimensions().size() - 1).getType().toString();
}
COM: <s> composes a title for the x axis </s>
|
funcom_train/3795843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected IContextuable getUserContextForCmd() {
IContextSupplier ics = ST_Cp.getActiveIContextSupplier();
IContextuable ic;
if (this.isCmdFlagged(MOUSE_CONTEXT)) {
ic = ics.getCurrentSoftIContextuable();
} else {
ic = ics.getCurrentHardIContextuable();
}
return ic;
}
COM: <s> returns the icontextuable contains a command context that has currently </s>
|
funcom_train/18195584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TestElement set(int index, TestElement element) {
TestElement oldElement = children.set(index, element);
// if there was an element at the specified place, and it has an author,
// decrement that author's references
if (oldElement != null && oldElement.getAuthor() != null) {
oldElement.getAuthor().decrementReferences();
}
return oldElement;
}
COM: <s> replaces the element at the specified position in this list with the </s>
|
funcom_train/3081656 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String addToggleEventId(RenderingContext rc, CssStyle cssStyle, Tree tree, Object treeNode, TreePath treeNodePath) {
String eventElementId = createEventId(tree, "expando", "toggle", treeNode, treeNodePath);
if (tree.isRenderEnabled()) {
cssStyle.setAttribute("cursor", "pointer");
}
return eventElementId;
}
COM: <s> adds the event handler id for toggling the nodes expanded or contracted </s>
|
funcom_train/7302631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SHA1 (SHA1 md) {
this();
data = (int[])md.data.clone();
digest = (int[])md.digest.clone();
tmp = (byte[])md.tmp.clone();
w = (int[])md.w.clone();
buffer = (byte[])md.buffer.clone();
buffered = md.buffered;
count = md.count;
}
COM: <s> this constructor is here to implement cloneability of this class </s>
|
funcom_train/27973048 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int sendReply(int replyCode, String replyText) {
// Write a reply line to the PrintWriter and return the reply code
if (replyText.endsWith("\n")) {
replyText = replyText.substring(0, replyText.length() -1);
}
output.println("[" + replyCode + "] - " + replyText + ";;");
return replyCode;
}
COM: <s> used to send a reply code and a reply text </s>
|
funcom_train/31144267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSchemaGroup (Class theClass) {
try {
Method m = theClass.getMethod ("getStaticSchemaGroup", new Class[0] );
return (String) m.invoke( theClass, new Object[0] );
} catch (Exception e) {
//e.printStackTrace ();
}
//throw new IllegalArgumentException ("Could not find schema group for " + theClass);
return null;
}
COM: <s> attempts to invoke get static schema group on the given class </s>
|
funcom_train/5543608 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /* this.static */ public void addClause(HornClause C,ITermMap ktable) {
String k=C.getKey();
// overwrites previous definitions
if ( null!=ktable && null!=ktable.get(k) ) {
ktable.remove(k);
this.remove(k);
}
this.out(k,C,false);
}
COM: <s> adds a horn clause to the joint linda and predicate table </s>
|
funcom_train/12745847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkDataRowValuesEquality(Object value1, Object value2) {
if (value1 == null && value2 == null) {
return true;
}
if (value1 != null && value1.equals(value2)) {
return true;
}
if (XValidator.choiceID(value1.toString()).equals(XValidator.choiceID(value2.toString()))) {
return true;
}
return false;
}
COM: <s> checks if two data row values are equal </s>
|
funcom_train/16499075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void discard() {
char[] discardBuf = new char[4096];
try {
// read all available output from chasen process and discard it
while (chasenOut.read( discardBuf) > 0)
;
} catch (IOException ex) {
// ignore errors when discarding
ex.printStackTrace();
}
expectedEOS = 0;
nextLine = null;
}
COM: <s> discard all remaining result lines </s>
|
funcom_train/31801702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFullCoverage() {
AssertionCoverageDecorator cd =
new AssertionCoverageDecorator(FullCoverage.class,
COVERED);
TestResult result = new TestResult();
cd.run(result);
Util.dumpResult(result);
// No failures
assertEquals(0, result.failureCount());
// No errors
assertEquals(0, result.errorCount());
}
COM: <s> all of the code is covered </s>
|
funcom_train/48932742 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RelationUpdateSet_I connect(ConnectParameter_I cp) {
RelationUpdateSet_I result = null;
try {
result = new Relation_UpdateSet(
new Relation_Update(null,
new Relation_("", cp.getUser(),
"successfully connected to ", "", cp
.getKBAddress())));
cp.getKBAddress();
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
COM: <s> connect to a jena kb at the defined cp </s>
|
funcom_train/10626901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateWithMethodCallWhichIsSetter() {
InvocationObject invocationObject = new InvocationObject();
SampleEvent event = new SampleEvent("bean");
SampleListener listener = EventHandler.create(SampleListener.class,
invocationObject, "doSomething", "i", null);
listener.fireSampleEvent(event);
assertEquals("doSomething", getMethodName());
assertEquals(event.getI(), invocationObject.getIntValue());
}
COM: <s> the test checks the event is fired for object created with the create </s>
|
funcom_train/33396803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String deTranslit(String src) {
if (!filled) return src;
if (src==null) return null;
for (int i=0; i<translit[0].size(); i++) {
src=StringUtils.stringReplace(src, (String) translit[0].elementAt(i), (String) translit[1].elementAt(i));
}
return src;
}
COM: <s> creates a new instance of de translit </s>
|
funcom_train/47545662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisible (boolean visible) {
checkWidget ();
if (OS.GTK_WIDGET_VISIBLE (handle) == visible) return;
if (visible) {
/*
* It is possible (but unlikely), that application
* code could have disposed the widget in the show
* event. If this happens, just return.
*/
sendEvent (SWT.Show);
if (isDisposed ()) return;
OS.gtk_widget_show (handle);
} else {
OS.gtk_widget_hide (handle);
sendEvent (SWT.Hide);
}
}
COM: <s> makes the receiver visible if the argument is code true code </s>
|
funcom_train/3787023 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setRowData(String newRowData[], int rowNbr)
{ /* setRowData */
if(tCols!=newRowData.length || rowNbr>=tRows)
return(false);
for(int i=0;i<tCols;i++)
tData[rowNbr][i]= newRowData[i];
return(true);
} /* setRowData */
COM: <s> set row data set new row data for specific row in the table </s>
|
funcom_train/28424370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doShowParentDirectoryThumbnails() {
msg("-#- doShowParentDirectoryThumbnails...");
if (thumbnailsBaseNode == null)
return;
TreeNode parent = thumbnailsBaseNode.getParent();
// msg( "-#- node= " + thumbnailsBaseNode + " parent= " + parent );
if (parent != null) {
showThumbnailsForDirectory((DirectoryTreeNode) parent);
}
}
COM: <s> goto the image directly preceding the current image in the parent upper </s>
|
funcom_train/47853374 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getRecordingInfo() {
String return_string = AudioMethods.getAudioFormatData(audio_format);
String number_samples = getNumberSamplesPerChannel() + " samples\n";
String duration = getDuration() + " seconds\n";
String max_sample_value = getMaximumAmplitude() + "\n";
return_string += new String("SAMPLES PER CHANNEL: " + number_samples);
return_string += new String("DURATION: " + duration);
return_string += new String("MAX SIGNAL AMPLITUDE: " + max_sample_value);
return return_string;
}
COM: <s> returns a formatted description of the audio format of the samples as well </s>
|
funcom_train/50720927 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEncodeBytesToBytes_byteArr() {
fail("TODO encodeBytesToBytes");
byte[] source = null;
byte[] expResult = null;
byte[] result = Base64.encodeBytesToBytes(source);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
//fail("The test case is a prototype.");
}
COM: <s> test of encode bytes to bytes method of class base64 </s>
|
funcom_train/951270 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int compareKey(Document doc1, Document doc2, String key) {
String[] strings1 = getStrings(doc1, key);
String[] strings2 = getStrings(doc2, key);
if (strings1 == null || strings2 == null) {
return 0;
}
if (strings1.length == 1 || strings2.length == 1) {
return strings1[0].compareToIgnoreCase(strings2[0]);
} else {
return 0;
}
}
COM: <s> compare two documents depending on given key </s>
|
funcom_train/44706555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateXML(PageState state, Element parent) {
if ( isVisible(state) ) {
ContentItem item = getContentItem(state);
ContentSection section = getContentSection(state);
// Take advantage of caching in the CMS Dispatcher.
XMLGenerator xmlGenerator = section.getXMLGenerator();
xmlGenerator.generateXML(state, parent, SUMMARY);
}
}
COM: <s> generate xml representation of an item summary </s>
|
funcom_train/32791194 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleLogOr(String codeSrcExp, List<String> args, StringBuffer rule, StringBuffer spec) {
assert(args.size() == 1) : "Logical expression or needs exactly one argument";
codeAgent.setArgument("rel_exp_1", codeSrcExp);
codeAgent.setArgument("rel_exp_2", args.get(0));
rule.append("logical_expression_tail");
spec.append("or");
}
COM: <s> parameterizes the code agent for a logical or operation </s>
|
funcom_train/28295232 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getIsTracked() {
if (_Debug) {
System.out.println(" :: SeqActivity --> BEGIN - getIsTracked");
System.out.println(" ::--> " + mIsTracked);
System.out.println(" :: SeqActivity --> END - getIsTracked");
}
return mIsTracked;
}
COM: <s> retrieves the value of the delivery control </s>
|
funcom_train/9104446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void shutdown() {
try {
OptionsController.saveOptions(simOptions);
} catch (Exception ex) {
JOptionPane.showMessageDialog(this, "Failed to save the options: "
+ ex.getMessage(), "Error Saving Options",
JOptionPane.ERROR_MESSAGE);
}
try {
saveDetails();
} catch (Exception ex) {
JOptionPane.showMessageDialog(this,
"Failed to save the UI settings: " + ex.getMessage(),
"Error Saving UI Settings", JOptionPane.ERROR_MESSAGE);
}
dispose();
System.exit(0);
}
COM: <s> method used to terminate the application </s>
|
funcom_train/21417509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItem() {
if (jMenuItem == null) {
jMenuItem = new JMenuItem();
jMenuItem.setText("Txartela Eman");
jMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
txart_eman.setVisible(true);
}
});
}
return jMenuItem;
}
COM: <s> this method initializes j menu item </s>
|
funcom_train/2883415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expectConcat(String first, String second, String expected) {
String merged = LivenessPageChecker.concatPaths(first, second);
assertEquals("Expected concat of "
+ quote(first)
+ " and " + quote(second)
+ " to be " + quote(expected)
+ " but got " + quote(merged),
expected,
merged);
}
COM: <s> check that two paths concatenate together as expected </s>
|
funcom_train/44583849 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int computeProblemLength(int loc, int length) {
if (length > 0) {
return length;
}
int lineStartOffset = Location.toOffset(loc);
int line = javafe.util.Location.toLineNumber(loc);
int nextLineLoc = Location.make(Location.toStreamId(loc), line+1, 0);
int lineEndOffset = Location.toOffset(nextLineLoc - 1);
return lineEndOffset - lineStartOffset;
}
COM: <s> in general esc java2 doesnt provide us with an accurate representation </s>
|
funcom_train/49791714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Properties loadProperties(String filename) throws Exception {
// refresh the workspace
assertTrue(getProject().refreshProject().isOK());
IFile target = getProject().getFile(filename);
assertTrue("File '" + target + "' exists", target.exists());
Properties p = new Properties();
target.refreshLocal(IResource.DEPTH_INFINITE, monitor); // refresh
p.load(target.getContents());
return p;
}
COM: <s> load a properties file in the testing workspace </s>
|
funcom_train/28592193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(Object o) {
boolean result = super.add(o);
int idx = size - 1;
while(idx > 0) {
int parentIdx = parent(idx);
if (check(array[idx], array[parentIdx])) {
swap(idx, parentIdx);
idx = parentIdx;
}
else {
break;
}
}
return result;
}
COM: <s> this adds an item and sorts it into place </s>
|
funcom_train/51144131 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void post(final boolean publish) {
writeToModel();
try {
if (_preferencesModel.spellCheckOnPost())
_spellerAction.actionPerformed(null);
_model.post(publish);
} catch (Exception ex) {
LOG.error("error posting to the blog", ex);
showErrorMessage();
}
}
COM: <s> if check spelling before posting is specified in the options check spelling </s>
|
funcom_train/1916770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object newInstance(Class c) throws SQLException {
try {
return c.newInstance();
} catch (InstantiationException e) {
throw new SQLException(
"Cannot create " + c.getName() + ": " + e.getMessage());
} catch (IllegalAccessException e) {
throw new SQLException(
"Cannot create " + c.getName() + ": " + e.getMessage());
}
}
COM: <s> factory method that returns a new instance of the given class </s>
|
funcom_train/45055604 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readCustom(CustomContainer localroot, String prefix) {
int fileMax;
String filePrefix;
fileMax = Integer.parseInt(model.getProperty("" + prefix + COUNT));
for (int fileCount = 0; fileCount < fileMax; fileCount++) {
filePrefix = prefix + "." + fileCount;
readFile(localroot, filePrefix);
} // end of file loop
}
COM: <s> read custom container from the glossary including all of its descendants </s>
|
funcom_train/4361757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasScheme(String uri) {
int len = uri.length();
for(int i=0; i < len ; i++) {
char c = uri.charAt(i);
if(c == ':') {
return i > 0;
} else if(!URL.isSchemeChar(c)) {
return false;
}
}
return false;
}
COM: <s> determine if a uri string has a code scheme code component </s>
|
funcom_train/21017914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ElementPath getHitTextLine(IElementLocator locator, IMouseEvent event) {
ElementPath result = null;
ElementPath path = locator.getElementAt(event.getX(), event.getY(), 1);
if (path != null) {
path.removeLastElement();
result = path.findSubPath(Line.TYPE, true);
}
return result;
}
COM: <s> returns the text line if an element inside a line is hit </s>
|
funcom_train/20315155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Word getWord(String lemma, POS pos, long offset) {
Word result = null;
lemma = lemma.replace(" ", "_");
Synset synset = getSynset(pos, offset);
List<Word> words = getWords(synset);
for (Word word : words) {
if (lemma.equalsIgnoreCase(word.getLemma())) {
result = word;
break;
}
}
return result;
}
COM: <s> gets associated word object by given lemma parts of speech and file offset </s>
|
funcom_train/31689884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasCurrentRowBeenRead() {
boolean bReturn = false;
if ((m_mark >= 0) && (m_mark < this.m_readMarks.size())) {
bReturn = ((Boolean) m_readMarks.get(m_mark)).booleanValue();
}
return bReturn;
}
COM: <s> returns code true code if the current row has been read </s>
|
funcom_train/34635989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Point computeValidLocation(int x, int y) {
Point shellSize = widget.getShell().getSize();
Point popupSize = popup.getSize();
if (x + popupSize.x > shellSize.x ){
x = shellSize.x - popupSize.x - 20;
}
if (y + popupSize.y > shellSize.y ){
y = shellSize.y - popupSize.y - 20;
}
return new Point(x,y);
}
COM: <s> checks if popup shell fit into the display bounds </s>
|
funcom_train/48632702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processBaseLayer(BaseLayer baseLayer, PortalSession portalSession) {
if (! baseLayer.getDisabled()) {
MapLayer mapLayer = remoteMap.baseLayer(baseLayer);
if (mapLayer != null) {
portalSession.addBaseLayer(mapLayer);
}
}
else {
logger.info(
"skipping loading service " + baseLayer.getId() + " at " +
baseLayer.getUri() + " because it is disabled in configuration file"
);
}
}
COM: <s> process the base layers </s>
|
funcom_train/24218823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeWithDefaults() {
this.contentMap.clear();
Field[] fields = this.command.getFields();
for (Field field : fields) {
byte[] defaultValue = field.getDefaultValue();
this.contentMap.put(field.getName(), defaultValue);
}
}
COM: <s> initializes the request with its default values </s>
|
funcom_train/28298068 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onShortestPath() {
TransSibMainPanel sp=mainPane.getScrollPanel();
if (sp!=null) {
sp.setShowShortestPath(prefShortestPathM.isSelected());
}
TransSibCtrlPanel cp=mainPane.getCtrlPanel();
if (cp!=null) cp.actualize();
}
COM: <s> toggles if shortest path shall be shown if a point is clicked </s>
|
funcom_train/50465744 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addServiceRefLoader(ServiceDescStub serviceRef) throws ServiceNotFoundException {
if (serviceRef.getName() == null) return;
if (serviceRef.getName().equals("*")) {
serviceLoaderRefs.addAll(ServiceClassLoader.getAllServiceLoaders());
} else {
serviceLoaderRefs.add(ServiceClassLoader.getServiceLoader(serviceRef));
}
}
COM: <s> add a service loader to this services classpath </s>
|
funcom_train/3416795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read(byte[] buf, int off, int len) throws IOException {
if (buf == null) {
throw new NullPointerException();
}
int endoff = off + len;
if (off < 0 || len < 0 || endoff > buf.length || endoff < 0) {
throw new IndexOutOfBoundsException();
}
return bin.read(buf, off, len, false);
}
COM: <s> reads into an array of bytes </s>
|
funcom_train/331441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void saveSettings(long timeNow) {
PamControlledUnit pcu;
PamSettingsSource settingsSource;
for (int iU = 0; iU < pamControlledUnits.size(); iU++) {
pcu = pamControlledUnits.get(iU);
if (PamSettingsSource.class.isAssignableFrom(pcu.getClass())) {
settingsSource = (PamSettingsSource) pcu;
settingsSource.saveStartSettings(timeNow);
}
// pamControlledUnits.get(iU).pamHasStopped();
}
}
COM: <s> gets called in pam start and may will attempt to store all </s>
|
funcom_train/5435379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getFloat(int offset) {
long l = (long) getByte(offset + 0) | ((long) getByte(offset + 1) << 8)
| ((long) getByte(offset + 2) << 16) | ((long) getByte(offset + 3) << 24);
return Float.intBitsToFloat((int) l);
}
COM: <s> method get float </s>
|
funcom_train/14233503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadProperties() {
Preferences prefs = Application.getWorkspace().systemNodeForPackage(PmdOptions.class);
_cpdTokens.setText( prefs.get(PmdOptions.MINIMUM_TOKENS, "100") );
// _classpathPicker.setPath(prefs.get(PmdOptions.ADDITIONAL_RULESETS ,""));
}
COM: <s> load the properties </s>
|
funcom_train/22262351 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set() {
if (this.offset != Offset.UNSET) throw new RuntimeException("Cannot \"set()\" Offset more than once");
this.offset = CodeContext.this.currentInserter.offset;
this.prev = CodeContext.this.currentInserter.prev;
this.next = CodeContext.this.currentInserter;
this.prev.next = this;
this.next.prev = this;
}
COM: <s> set this offset to the offset of the current inserter insert </s>
|
funcom_train/35724873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IRegion getTextBlockFromSelection(Point selection) {
try {
IDocument document= getDocument();
IRegion line= document.getLineInformationOfOffset(selection.x);
int length= selection.y == 0 ? line.getLength() : selection.y + (selection.x - line.getOffset());
return new Region(line.getOffset(), length);
} catch (BadLocationException x) {
}
return null;
}
COM: <s> creates a region describing the text block something that starts at </s>
|
funcom_train/1556631 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getXML(StringBuilder sb) {
boolean oldValue = kernel.isPrintLocalizedCommandNames();
kernel.setPrintLocalizedCommandNames(false);
// make sure numbers are not put in XML in eg Arabic
boolean oldI8NValue = kernel.internationalizeDigits;
kernel.internationalizeDigits = false;
getElementOpenTagXML(sb);
getXMLtags(sb);
sb.append(getCaptionXML());
getElementCloseTagXML(sb);
kernel.setPrintLocalizedCommandNames(oldValue);
kernel.internationalizeDigits = oldI8NValue;
}
COM: <s> save object in xml format </s>
|
funcom_train/36255922 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ValueExpression getValueExpression(FaceletContext ctx, Class type) {
try {
ExpressionFactory f = ctx.getExpressionFactory();
return new TagValueExpression(this, f.createValueExpression(ctx,
this.value, type));
} catch (Exception e) {
throw new TagAttributeException(this, e);
}
}
COM: <s> create a value expression using this attributes literal value and the </s>
|
funcom_train/26328905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getControlLinkTargets(String source) {
Vector targets = new Vector();
for(int i=0; i<this.ControlLinks.size(); i++) {
WSFLControlLink tmpCLink = (WSFLControlLink)this.ControlLinks.get(i);
if(tmpCLink.hasSource(source)) {
targets.add(tmpCLink.getTarget());
}
}
return targets;
}
COM: <s> return all activity names control links point </s>
|
funcom_train/51604995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JInternalFrame getJInternalFramePreview() {
if (jInternalFramePreview == null) {
jInternalFramePreview = new JInternalFrame();
jInternalFramePreview.setBounds(new Rectangle(30, 5, 243, 223));
jInternalFramePreview.setJMenuBar(getJJMenuBarPreview());
jInternalFramePreview.setContentPane(getJPanelWindowPreview());
jInternalFramePreview.setVisible(true);
}
return jInternalFramePreview;
}
COM: <s> this method initializes j internal frame preview </s>
|
funcom_train/1802589 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFile(File file, String mimeType) {
MediaFileSource fileSource = new MediaFileSource(file, mimeType);
MediaContent content = new MediaContent();
content.setMediaSource(fileSource);
content.setMimeType(new ContentType(mimeType));
setContent(content);
}
COM: <s> associate a file with this entry with the specified mime type </s>
|
funcom_train/45142331 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(
this.is));
Vector lines = new Vector(10);
String line = null;
while ((line = reader.readLine()) != null) {
lines.addElement(line);
}
this.lines = new String[lines.size()];
lines.copyInto(this.lines);
} catch (IOException e) {
}
}
COM: <s> copies data from the input stream to the output string </s>
|
funcom_train/31207798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addVariables() {
if (printBoolean) {
System.out.println("Adding variables, hashmap:");
System.out.println("isMemberVariable: " +isMemberVariable);
printHashMap();
}
this.variableMap.setClassStopped(true);
this.arrayList.add(this.variableMap.clone());
this.variableMap.clear();
}
COM: <s> add hashmap variables to the arraylist </s>
|
funcom_train/885443 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String isAcceptableFile(File f) {
if ((f.getAbsolutePath() != null)
&& !(f.getAbsolutePath().toLowerCase().endsWith("." //$NON-NLS-1$
+ getAllowableFileExtensions()[0].toLowerCase()))) {
return ViewManagerImpl.getMessage("com.foursoft.foureveredit.view.incorrectFileEnding"); //$NON-NLS-1$
}
return null;
}
COM: <s> is the file ok to be opened by the command </s>
|
funcom_train/39165619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer add(Node start, Node end, String type, FeatureMap features) {
// the id of the new annotation
Integer id = doc.getNextAnnotationId();
// construct an annotation
annFactory.createAnnotationInSet(this, id, start, end, type, features);
return id;
} // add(Node, Node, String, FeatureMap)
COM: <s> create and add an annotation with pre existing nodes and return its id </s>
|
funcom_train/42711596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JButton getJButtonDeletePhone() {
if (jButtonDeletePhone1 == null) {
jButtonDeletePhone1 = new JButton();
jButtonDeletePhone1.setBounds(new Rectangle(270, 190, 121, 21));
jButtonDeletePhone1.setText("Delete");
jButtonDeletePhone1.setActionCommand("DeleteAdress");
}
return jButtonDeletePhone1;
}
COM: <s> this method initializes j button delete phone1 </s>
|
funcom_train/50458470 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void logFailure(PrintWriter out, String testName, Exception e) {
if (out == null) {
return;
}
out.println(">>>>>> Exception caught while testing." + e);
e.printStackTrace(out);
out.println(">>>>>> END STACK TRACE");
}
COM: <s> prints a failure report based on an exception </s>
|
funcom_train/47886622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createFlippersPanel() {
win.panFlippersCtl = new JPanel();
win.panCtl.add(win.panFlippersCtl,
new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0,
GridBagConstraints.NORTH,
GridBagConstraints.BOTH,
new Insets(0, 0, 0, 0), 0, 0));
win.panFlippersCtl.setLayout(null);
}
COM: <s> create the flippers panel </s>
|
funcom_train/14245273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void spawnCritiquer(Object root) {
/* needs-more-work really should be a separate class */
_critiquer = new Thread(this, "CritiquingThread");
_critiquer.setDaemon(true);
_critiquer.setPriority(Thread.currentThread().getPriority() - 1);
_critiquer.start();
_CritiquingRoot = root;
}
COM: <s> start a separate thread to continually select and execute </s>
|
funcom_train/31126585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dumpClosest(RangeReadings rr, DataOutputStream dos, float x, float y) throws IOException {
int closest = findClosest(x, y);
MCLParticle p = getParticle(closest);
dos.writeInt(closest);
RangeReadings particleReadings = p.getReadings(rr, map);
particleReadings.dumpObject(dos);
dos.writeFloat(p.getWeight());
dos.flush();
}
COM: <s> find the closest particle to specified coordinates and dump its </s>
|
funcom_train/21701639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Module findModuleByName(String name){
String query = "from de.xman.module.ModuleImpl as module where module.name = ?";
List modules = DBFactory.getInstance().find(query, new Object[]{name}, new Type[]{Hibernate.STRING});
int size = modules.size();
if (size == 0) return null;
if (size != 1) throw new AssertException("non unique key with: " + name);
return (Module) modules.get(0);
}
COM: <s> get a module by a unique name </s>
|
funcom_train/43245410 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetTmpStreetAddr2() {
System.out.println("getTmpStreetAddr2");
PatientDemographicsDG5Object instance = new PatientDemographicsDG5Object();
String expResult = "";
String result = instance.getTmpStreetAddr2();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get tmp street addr2 method of class org </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.