__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/5734517 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setJPEGEncodeParam(JPEGEncodeParam jpegEncodeParam) {
if(jpegEncodeParam != null) {
jpegEncodeParam = (JPEGEncodeParam)jpegEncodeParam.clone();
jpegEncodeParam.setWriteTablesOnly(false);
jpegEncodeParam.setWriteJFIFHeader(false);
}
this.jpegEncodeParam = jpegEncodeParam;
}
COM: <s> sets the jpeg compression parameters </s>
|
funcom_train/39392430 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void patchAll() {
if (methodFilter.matches(jcClass) == false)
return;
Method[] methods = jcClass.getMethods();
for (int i = methods.length - 1; i >= 0; --i) {
Method mMethod = methods[i];
methods[i] = patchMethod(jcClass, mMethod, i);
}
jcClass.setConstantPool(cp.getFinalConstantPool());
}
COM: <s> patches all methods in this class </s>
|
funcom_train/46460967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMessage(int mailbox, String cargo) throws IOException {
byte [] msg = new byte [cargo.length()+5];
msg[0] = (byte)0x80;
msg[1] = (byte)0x09;
msg[2] = (byte)mailbox;
msg[3] = (byte)(cargo.length()+1);
for (int i=0; i<cargo.length(); i++) {
msg[i+4] = (byte)(cargo.charAt(i) & 0xff);
}
msg[cargo.length()+4] = 0; // null terminator
sendMessage(msg);
}
COM: <s> sends a message to a mailbox </s>
|
funcom_train/38269031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Class loadClass(String className, byte[] classAsBytes) {
String packageName = className.substring(className.lastIndexOf("."));
if (super.getPackage(packageName) == null) {
definePackage(packageName, null, null, null, null, null, null, null);
}
return defineClass(className, classAsBytes, 0, classAsBytes.length);
}
COM: <s> loads a class from a byte </s>
|
funcom_train/1750821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Position getStartPoint() {
Position startpoint = new Position();
for (int x = 0; x < mLabyrinth.length; x++) {
for (int y = 0; y < mLabyrinth[x].length; y++) {
if (mLabyrinth[x][y] == START) {
startpoint.x = x;
startpoint.y = y;
}
}
}
return startpoint;
}
COM: <s> returns the startpoint of the labyrinth </s>
|
funcom_train/42842913 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getSeconds() {
double seconds = this.coordinateInSexagesimal;
seconds = (Math.abs(seconds) - this.getDegrees()) * 60;
seconds = (seconds - (int) seconds);
seconds *= 60;
seconds = new BigDecimal(seconds).round(new MathContext(this.secondPrecision)).doubleValue();
return seconds;
}
COM: <s> returns the seconds value of the physical coordinate from degrees minutes and seconds </s>
|
funcom_train/23284677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPlayMode(PlayMode mode) throws IOException, UPNPResponseException {
ActionMessage message = messageFactory.getMessage("SetPlayMode");
message.setInputParameter("InstanceID", 0);
message.setInputParameter("NewPlayMode", mode.toString());
message.service();
}
COM: <s> applies the new play mode </s>
|
funcom_train/10878484 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Analyzer randomAnalyzer() {
switch(random.nextInt(3)) {
case 0: return new MockAnalyzer(random, MockTokenizer.SIMPLE, true);
case 1: return new MockAnalyzer(random, MockTokenizer.SIMPLE, true, MockTokenFilter.ENGLISH_STOPSET, true);
default: return new MockAnalyzer(random, MockTokenizer.WHITESPACE, false);
}
}
COM: <s> return a random analyzer simple stop standard to analyze the terms </s>
|
funcom_train/9043059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TableList filter(Filter filt) {
TableList list = new TableList();
for (int i = 0; i < size(); i++) {
if (filt.valid(get(i))) {
list.add(get(i));
}
}
list.fields = fields;
return list;
}
COM: <s> get a sublist of this list according to the filter criterion </s>
|
funcom_train/11100281 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Map createApplicationContextWrapper(final WebApplicationContext context) {
Map wrapper = new AbstractMap() {
public WebApplicationContext getContext() {
return context;
}
public Object get(Object key) {
if (key == null) {
return null;
}
return context.getBean(key.toString());
}
public Set entrySet() {
return Collections.EMPTY_SET;
}
};
return wrapper;
}
COM: <s> creates a wrapper around the web application context so that it can be </s>
|
funcom_train/8640294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPrint(String subtype, boolean printstate) {
PdfDictionary usage = getUsage();
PdfDictionary dic = new PdfDictionary();
dic.put(PdfName.SUBTYPE, new PdfName(subtype));
dic.put(PdfName.PRINTSTATE, printstate ? PdfName.ON : PdfName.OFF);
usage.put(PdfName.PRINT, dic);
}
COM: <s> specifies that the content in this group is intended for </s>
|
funcom_train/5870404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPhysical(boolean b) {
if (_physical != b) {
if (!b && "physical".equals(_mapType)) {
if (isNormal()) setMapType("normal");
else if (isHybrid()) setMapType("hybrid");
else if (isSatellite()) setMapType("satellite");
else return; //cannot do it if no more maps!
}
_physical = b;
smartUpdate("z.pmap", b);
}
}
COM: <s> sets whether support physical map default to false </s>
|
funcom_train/21430511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getBestAccuracy(int s_ind) {
double best_acc = Double.MAX_VALUE;
for( Annotation e : annotations.elementAt(s_ind) ) {
double acc = e.getAccuracy(peak);
if( Math.abs(acc)<Math.abs(best_acc) )
best_acc = acc;
}
return best_acc;
}
COM: <s> return the minimum difference between experimental and </s>
|
funcom_train/21302003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sessionCreated(HttpSessionEvent httpSessionEvent) {
if(log.isTraceEnabled())log.trace("New session created.");
//DatasetHolder instance for this dataset is not created yet.
//It will get created on first use.
//Therefore the constructor is responsible for registering
//the Envision2 session to the static allInstances Map
//in the DatasetHolder Class
}
COM: <s> method is executed when new session is created </s>
|
funcom_train/17776200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleChangedResources() {
if (!changedResources.isEmpty()
&& (!isDirty() || handleDirtyConflict())) {
editingDomain.getCommandStack().flush();
for (Iterator<Resource> i = changedResources.iterator(); i
.hasNext();) {
Resource resource = i.next();
if (resource.isLoaded()) {
resource.unload();
try {
resource.load(Collections.EMPTY_MAP);
} catch (IOException exception) {
// TODO
// FloozePlugin.getDefault().addErrorLog("",exception) ;
}
}
}
}
}
COM: <s> handles what to do with changed resources on activation </s>
|
funcom_train/31906728 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLineNumber(Element e) {
String uri = ((SVGDocument)e.getOwnerDocument()).getURL();
DocumentState state = (DocumentState)cacheMap.get(uri);
if (state == null) {
return -1;
} else {
return state.desc.getLocationLine(e);
}
}
COM: <s> returns the line in the source code of the specified element or </s>
|
funcom_train/47833105 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHashCode() {
String val = partner + operationName;
Iterator it = parameters.values().iterator();
while (it.hasNext()) {
Object obj = it.next();
if (obj instanceof Variable)
val += ((Variable) obj).getHashCode();
else if (obj instanceof Function)
val += ((Function) obj).getHashCode();
}
return val;
}
COM: <s> returns a hash uk </s>
|
funcom_train/41183565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commandAction(Command com, Displayable dis) {
if (com == back)
remote.backCommandPressed(Remote.APPLIST);
if (com == helpcmd)
remote.helpCommandPressed(Remote.APPLIST);
if (com == List.SELECT_COMMAND)
remote.appListElementSelected(this.getSelectedIndex());
}
COM: <s> handler for the list selected back and help commands </s>
|
funcom_train/48868982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getOperatingSystem(){
String operatingSystem = System.getProperty("os.name").toLowerCase();
if (operatingSystem.indexOf("linux")==0)
operatingSystem = "linux";
else if (operatingSystem.indexOf("windows")==0)
operatingSystem = "windows";
else if (operatingSystem.indexOf("mac")==0)
operatingSystem = "mac";
return operatingSystem;
}
COM: <s> this method get the operating system name on which the it simple running </s>
|
funcom_train/4361954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPublicId(String publicId) {
if (log.isDebugEnabled())
log.debug("Setting deployment descriptor public ID to '" +
publicId + "'");
String oldPublicId = this.publicId;
this.publicId = publicId;
support.firePropertyChange("publicId", oldPublicId, publicId);
}
COM: <s> set the public identifier of the deployment descriptor dtd that is </s>
|
funcom_train/49746423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String singularize( Object word ) {
if (word == null) return null;
String wordStr = word.toString().trim();
if (wordStr.length() == 0) return wordStr;
if (isUncountable(wordStr)) return wordStr;
for (Rule rule : this.singulars) {
String result = rule.apply(wordStr);
if (result != null) return result;
}
return wordStr;
}
COM: <s> returns the singular form of the word in the string </s>
|
funcom_train/3328370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
Object[] lList = listenerList;
String s = "EventListenerList: ";
s += lList.length + " listeners: ";
for (int i = 0 ; i < lList.length ; i++) {
s += " listener " + lList[i+1];
}
return s;
}
COM: <s> returns a string representation of the event listener list </s>
|
funcom_train/34180149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUpdateRate( float ups ) {
// updateRate = timer.getResolution() / ups;
updateRate = 1.0f / ups;
Logger.getLogger( PhysicsSpace.LOGGER_NAME ).log( Level.INFO,
"Changed the number of updates in a second of PhysicsWorld to: " + ups );
}
COM: <s> sets how many updates per second that is wanted </s>
|
funcom_train/8066303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFillColor(Color col) {
if (col == null) {
if (_fillColor == null)
return;
} else {
if (col.equals(_fillColor))
return;
}
if (col != null) {
firePropChange("fillColor", _fillColor, col);
_fillColor = col;
} else {
firePropChange("filled", _filled, false);
_filled = false;
}
MutableGraphSupport.enableSaveAction();
}
COM: <s> sets the color that will be used if the fig is filled </s>
|
funcom_train/140687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setTabMenu(final IGBTabPanel plugin) {
JMenu menu = tabMenus.get(plugin);
TabState tabState = getTabState(plugin);
for (int i = 0; i < menu.getItemCount(); i++) {
JMenuItem menuItem = menu.getItem(i);
if (menuItem != null && menuItem instanceof TabStateMenuItem) {
menuItem.setSelected(((TabStateMenuItem)menuItem).getTabState() == tabState);
}
}
}
COM: <s> set the tab menu for a tab pane </s>
|
funcom_train/11319149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMLText getInnerText() {
boolean hadText = false;
StringBuffer sb = new StringBuffer();
for (XMLText text : getInnerTexts()) {
sb.append(text.getText());
hadText = true;
}
if (hadText) {
return new XMLText(sb.toString());
} else {
return null;
}
}
COM: <s> get the complete inner text </s>
|
funcom_train/19387892 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getIntegerProperty(String name, int defaultValue) {
boolean defaultValueFlag;
String obj = getProperty(name);
if (obj == null) {
return defaultValue;
} else {
try {
return Integer.parseInt(obj);
} catch (NumberFormatException e) {
return defaultValue;
}
}
} //}}}
//{{{ setIntegerProperty() method
COM: <s> returns the value of an integer property </s>
|
funcom_train/34564587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(final byte[] p, final byte[] u, final int pre) {
if(!newns) {
root = root.add(new NSNode(pre));
newns = true;
}
final int k = addPref(p);
final int v = addURI(u);
root.add(k, v);
if(p.length == 0) uriStack[uriL] = v;
}
COM: <s> adds the specified namespace to the namespace structure </s>
|
funcom_train/17573479 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BuilderConfig addTypeHandler(ITypeHandler typeHandler) {
if (typeHandler == null) {
throw new NullPointerException("typeHandler cannot be null");
}
if (typeHandler.getApplicableClass() == null) {
throw new NullPointerException("ITypeHandler.getApplicableClass() cannot be null");
}
typeHandlers.put(typeHandler.getApplicableClass(),typeHandler);
return this;
}
COM: <s> adds a type handler for a particular class and all of its children </s>
|
funcom_train/21487612 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageItem getImageItem() {
if (imageItem == null) {
// write pre-init user code here
imageItem = new ImageItem("", getImage1(),
ImageItem.LAYOUT_CENTER |
Item.LAYOUT_TOP | Item.LAYOUT_VCENTER | ImageItem.LAYOUT_NEWLINE_BEFORE |
ImageItem.LAYOUT_NEWLINE_AFTER, "");
// write post-init user code here
}
return imageItem;
}
COM: <s> returns an initiliazed instance of image item component </s>
|
funcom_train/3122465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeListener(List list, Map map, EventListener l) {
list.remove(l);
//// 2. Remove from all known bound properties.
Iterator it = map.keySet().iterator();
String key;
Set setListeners;
while (it.hasNext()) {
key = (String) it.next();
setListeners = (Set) map.get(key);
setListeners.remove(l);
}
} // of method
COM: <s> remove a listener on all bound properties </s>
|
funcom_train/32874632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Place getStartingPlace() {
AreaList areas = getAreaList();
Object areaKey = areas.firstKey();
Area area = (Area)areas.get(areaKey);
PlaceList places = area.getPlaceList();
Object placeKey = places.firstKey();
Place place = (Place)places.get(placeKey);
return place;
}
COM: <s> get the starting place for this world area ref 0 place ref 0 </s>
|
funcom_train/26020394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void markMessageFailedForSession(String sessionId){
ContentValues values = new ContentValues();
values.put(RichMessagingData.KEY_STATUS, EventsLogApi.STATUS_FAILED);
cr.update(databaseUri,
values,
RichMessagingData.KEY_CHAT_SESSION_ID +" = \""+sessionId+"\"" +" AND " + RichMessagingData.KEY_TYPE + " = " + EventsLogApi.TYPE_OUTGOING_CHAT_MESSAGE,
null);
}
COM: <s> a session initiation failed and the message was not delivered </s>
|
funcom_train/21847619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deinstall(JTextComponent c) {
component = null; // invalidate
if (flasher != null) {
setBlinkRate(0);
}
Utilities.getEditorUI(c).removeLayer(DrawLayerFactory.CARET_LAYER_NAME);
c.removeMouseMotionListener(this);
c.removeMouseListener(this);
if (focusListener != null) {
c.removeFocusListener(focusListener);
focusListener = null;
}
c.removePropertyChangeListener(this);
modelChanged(listenDoc, null);
}
COM: <s> called when ui is being removed from jtext component </s>
|
funcom_train/23840198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseMetaCommand() {
String token;
int count =3;
while(count>0 && tokens.hasNext()) {
token = tokens.getNextToken(1);
count--;
}
String la = tokens.lookAhead(0, 1);
if (la.equals("ALTER")) {
token = tokens.getNextToken(1);
parseAlter();
} else
tokens.skipAllComments("--");
}
COM: <s> purpose to parse a metadata command extension to ddl </s>
|
funcom_train/34635591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setOrigin(int x, int y) {
int destX = x - originX;
int destY = y - originY;
org.eclipse.swt.graphics.Rectangle ca = getClientArea();
try {
scroll(destX, destY, 0, 0, ca.width, ca.height, false);
} catch (Exception e) {}
originX = x;
originY = y;
}
COM: <s> scrolls to the given position in the widget </s>
|
funcom_train/2553959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateTitle(Experiment experiment, Errors errors) {
if (errors.getFieldError("title") == null) {
/* The individual fields have passed validation. */
if (this.getExperimentService().findByTitle(experiment.getTitle()) != null) {
errors.reject("error.match.title");
}
}
}
COM: <s> determines if the experiments email address and confirm email address </s>
|
funcom_train/20617838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getImage(String imageName, int width, int height){
sLogger.debug("getImage called");
Image image = null;
try {
image = Utility.loadImage(new URL(imagePathURL+"/"+imageName));
image = Utility.scaleImage(image, width, height, BufferedImage.TYPE_INT_RGB);
} catch (Exception e){
sLogger.error("Error while getting note image!",e);
}
return image;
}
COM: <s> returns an image </s>
|
funcom_train/22178959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void readFiles() {
for (int i=0; i<threadList.size(); i++) {
logger.debug("Running THREAD " + ((PovMessageThread)threadList.get(i)).getFile().getName());
Display.getDefault().asyncExec((PovMessageThread)threadList.get(i));
}
}
COM: <s> reads all message files in a parallel manner </s>
|
funcom_train/3924034 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString( Object o1, Object o2 ) {
return "x > " + ((Transform)o1).x + " x < " + ((Transform)o2).x +
"y > " + ((Transform)o1).y + " y < " + ((Transform)o2).y +
"z > " + ((Transform)o1).z + " z < " + ((Transform)o2).z;
}
COM: <s> this is used to construct where clause of sql query </s>
|
funcom_train/22552925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRejectHost() {
CATCHER.endpoint =
new ExtendedEndpoint("localhost", Backend.REJECT_PORT);
RouterService.connect();
sleep();
assertEquals("connect should have succeeded", 1, CATCHER.connectSuccess);
assertEquals("connect should have failed", 0, CATCHER.connectFailures);
}
COM: <s> tests to make sure that a host is still added to the host </s>
|
funcom_train/4966578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void create() {
if (this.isConnected()) {
return;
}
try {
this.datasource.setConnectionAttributes("create=true");
this.connection = this.datasource.getConnection();
} catch (SQLException e) {
Log("Failed to create: " + e.getMessage());
}
}
COM: <s> creates the database and connects to it </s>
|
funcom_train/43892339 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSampleScheme(int length, int[] sampleScheme) {
this.sampleScheme[length - 2] = sampleScheme;
if ((minCount == -1) || (minCount > length)) {
minCount = length;
}
if ((maxCount == -1) || (maxCount < length)) {
maxCount = length;
}
}
COM: <s> indexed setter for property sample scheme </s>
|
funcom_train/36046785 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getElementIndex(Element e) {
if (e != null && getDocument() != null) {
Element root = getDocument().getDefaultRootElement();
if (root != null) {
for (int i = 0; i < root.getElementCount(); i++) {
if (root.getElement(i).equals(e)) {
return i;
}
}
}
}
return -1;
}
COM: <s> get index of an element in the dom document object model </s>
|
funcom_train/886013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateEnabled() {
Instance selectedInstance = controller.getSelectedInstance();
boolean hasTarget = selectedInstance != null;
boolean hasSomethingToPaste = (controller.getMarkedForCopy() != null)
|| (controller.getMarkedForCut() != null);
boolean canModifyCurrentObject = controller.canModifyInstance(selectedInstance);
setEnabled(canModifyCurrentObject &&
hasTarget &&
hasSomethingToPaste &&
getPastableLinks().size() > 0);
}
COM: <s> determines whether this command should be enabled or not depending on </s>
|
funcom_train/51616173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSort(String select, String datatype, String order, AttributeList attrs) {
builder.begin("sort");
builder.addAttributes(attrs .addAttribute("select", select)
.addAttribute("data-type", datatype)
.addAttribute("order", order));
builder.end();
}
COM: <s> create an sort element </s>
|
funcom_train/46060284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initUpgradesHistories() {
File upgradesDir = new File(OLATContext.getUserdataRoot(), SYSTEM_DIR);
File upgradesHistoriesFile = new File(upgradesDir, INSTALLED_UPGRADES_XML);
if (upgradesHistoriesFile.exists()) {
this.upgradesHistories = (Map) XStreamHelper.readObject(upgradesHistoriesFile);
}
if (this.upgradesHistories == null) {
this.upgradesHistories = new HashMap();
}
}
COM: <s> load all persisted upgrade history data objects from the filesystem </s>
|
funcom_train/43421582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTask(Task task) {
tasks.add(task);
if (!(task instanceof RegularTask)) modified = true;
task.addPropertyChangeListener(this);
propertyChangeSupport.firePropertyChange(new PropertyChangeEvent(this, "tasks", null, tasks));
}
COM: <s> adds new task to plan of day </s>
|
funcom_train/35727382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IconResource getIcon(int idx) {
int size = (width*height*depth)/8;
byte[] icon = new byte[size];
for (int j=0, k=idx*size; j<icon.length && k<data.length; j++, k++) icon[j] = data[k];
IconResource i = new IconResource(type, id, getAttributes(), name, icon);
i.width = width; i.height = height; i.depth = depth; i.maskdepth = 0;
return i;
}
COM: <s> returns an icon in this icon list as an icon resource </s>
|
funcom_train/28362767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MachineSnapshot loadChannelSnapshotsInto( final MachineSnapshotSP machineSnapshotSP ) throws StateStoreException {
ChannelSnapshot[] snapshots = fetchChannelSnapshotsForMachine( machineSnapshotSP.getId() );
ChannelSnapshot[] snapshotsSP = fetchChannelSnapshotsForMachineSP( machineSnapshotSP.getId() );
machineSnapshotSP.setChannelSnapshots( snapshots );
machineSnapshotSP.setChannelSnapshotsSP(snapshotsSP);
return machineSnapshotSP;
}
COM: <s> fetch the channel snapshots from the data source and populate the machine snapshot </s>
|
funcom_train/24698229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setQNameElementHandler( String qName, S1CFXmlCoreElementHandler handler ) {
assert elementQName == null : "Element context QName has already been set";
assert qName != null && qName.length() > 0 : "qName (arg 1) is null or empty";
assert handler != null : "handler (arg 2) is null";
elementHandler = handler;
elementQName = new String( qName );
}
COM: <s> set the element handler and qname for this processing context </s>
|
funcom_train/6295076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOwnerComponent(java.awt.Component ownerComponent) {
/* Get the old property value for fire property change event. */
java.awt.Component oldValue = fieldOwnerComponent;
/* Set the ownerComponent property (attribute) to the new value. */
fieldOwnerComponent = ownerComponent;
/* Fire (signal/notify) the ownerComponent property change event. */
firePropertyChange("ownerComponent", oldValue, ownerComponent);
return;
}
COM: <s> sets the owner component property java </s>
|
funcom_train/10188394 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add( int index, E element ) {
int size = size();
Object tempData[] = new Object[size + 1];
if( size > 0 ) {
System.arraycopy( elementData, 0, tempData, 0, index );
System.arraycopy( elementData, index, tempData, index + 1, size - index );
}
elementData = (E[])tempData;
elementData[index] = element;
}
COM: <s> inserts the specified element at the specified position in this list </s>
|
funcom_train/19379915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void retrieveByResumeId(int resumeId) throws SQLException, DataStoreException {
setDistinct(true);
setOrderBy(PublicationModel.PUBLICATION_TYPE_DESCRIPTION + " , " + PublicationModel.PUBLICATION_TITLE);
retrieve(PublicationModel.PUBLICATION_RESUMEID + "=" + resumeId);
gotoFirst();
}
COM: <s> retrieves the publication rows that match with a given resume identification </s>
|
funcom_train/1148062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand6() {
if (okCommand6 == null) {//GEN-END:|172-getter|0|172-preInit
// write pre-init user code here
okCommand6 = new Command("Ok", Command.OK, 0);//GEN-LINE:|172-getter|1|172-postInit
// write post-init user code here
}//GEN-BEGIN:|172-getter|2|
return okCommand6;
}
COM: <s> returns an initiliazed instance of ok command6 component </s>
|
funcom_train/48764778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void prettyPrint(CodeWriter w, PrettyPrinter tr) {
if (!targetImplicit) {
// explicit target.
if (target instanceof Expr) {
printSubExpr((Expr) target, w, tr);
}
else if (target instanceof TypeNode) {
print(target, w, tr);
}
w.write(".");
}
w.write(name);
}
COM: <s> write the field to an output file </s>
|
funcom_train/26395782 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPluginHTML(final String projectName) {
final PluginInfoParser parser = parsePlugins(projectName);
try {
final ConfigHtmlGenerator gen = new ConfigHtmlGenerator();
return gen.generate(parser);
} catch (Exception e) {
e.printStackTrace();
return "ERROR; projectName: " + projectName + "; msg: " + e.getMessage();
}
}
COM: <s> generates the html documentation for the plugins </s>
|
funcom_train/1804293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ErrorElement setSendReport(String sendReport) {
Preconditions.checkNotNull(sendReport, "Send report uri must not be null.");
Preconditions.checkArgument(
sendReport.matches(GOOGLE_URI_PATTERN),
"Invalid send report URI: %s", sendReport);
errorSendReport = sendReport;
return this;
}
COM: <s> set uri to send report to </s>
|
funcom_train/7640992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
synchronized (sProcessCache) {
if (mProcess != null) {
// remove the process from the list
sProcessCache.remove(mLibrary);
// then stops the process
mProcess.destroy();
// set the reference to null.
// this allows to make sure another thread calling getAddress()
// will not query a stopped thread
mProcess = null;
}
}
}
COM: <s> stops the command line process </s>
|
funcom_train/18006434 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeFieldsFromPage(int page) {
if (page < 1)
return false;
boolean found = false;
for (Iterator it = fields.keySet().iterator(); it.hasNext();) {
boolean fr = removeField((String)it.next(), page);
found = (found || fr);
}
return found;
}
COM: <s> removes all the fields from code page code </s>
|
funcom_train/44286334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Plan getLatestActivePlan(TransactionXML transaction) {
Plan latestPlan = null;
for (Plan plan: transaction.getServer().projects.plans) {
if (plan.project != null && plan.project.equals(this) &&
plan.isActive())
latestPlan = plan;
}
return latestPlan;
}
COM: <s> returns the latest active plan for the project </s>
|
funcom_train/38447381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sortColumn(int index) {
if (index == lastSorted) {
ascending = !ascending;
} else {
ascending = true;
}
lastSorted = index;
Collections.sort(songs, new SongComparator(index, ascending));
TableModelEvent ev = new TableModelEvent(this, 0, songs.size() - 1,
TableModelEvent.ALL_COLUMNS, TableModelEvent.UPDATE);
publishEvent(ev);
}
COM: <s> sorts the rows in the table according to the values in the specified </s>
|
funcom_train/44285316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void remove(JSLFrame f) {
//if (f == null) return;
ErrorMsg.reportStatus("JSLWindowMenu.remove : " + f.getTitle());
if (windows.containsKey(f)) {
JSLWindowMenuItem i = (JSLWindowMenuItem) windows.remove(f);
bg.remove(i);
remove(i);
}
}
COM: <s> removes the specified menu item from this menu </s>
|
funcom_train/10197466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColumnIndexByPrimaryKeyIndex(int primaryKeyIndex) {
if (primaryKeyIndex < 0 || primaryKeyIndex > keySize()) {
throw new IndexOutOfBoundsException("Cannot get ColumnIndex by primaryKeyIndex " + primaryKeyIndex);
}
return ((Integer) primaryKey.get(primaryKeyIndex)).intValue();
}
COM: <s> gets column index by primary key index </s>
|
funcom_train/34673046 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearCache(String productName) {
try {
new URL(getConfigureRootUrl()+"/configureOperationServlet?op=clearProductCache&productName=" + productName).getContent();
} catch (Exception e) {
logger.error("Failed to clear cache for product '" + productName + "'.", e);
}
}
COM: <s> invoke the configure systems cache clearing service for a specific product </s>
|
funcom_train/17755841 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean matchWord() {
IDocument doc= fText.getDocument();
try {
int pos = fPos;
char c;
while (pos >= 0) {
c = doc.getChar(pos);
if (!isWordPart(c)) {
break;
}
--pos;
}
fStartPos = pos;
pos = fPos;
int length = doc.getLength();
while (pos < length) {
c = doc.getChar(pos);
if (!isWordPart(c)) {
break;
}
++pos;
}
fEndPos= pos;
return true;
} catch (BadLocationException e) {
AntxrUIPlugin.log(e);
}
return false;
}
COM: <s> select the word at the current selection </s>
|
funcom_train/37824472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLanguage(boolean german){
Hashtable table = germanText;
if( !german )
table = englishText;
Enumeration enumeration = table.keys();
while( enumeration.hasMoreElements() ){
AbstractButton button = (AbstractButton) enumeration.nextElement();
button.setText((String) table.get(button));
}
fileMenu.setLanguage(german);
modulesMenu.setLanguage(german);
systemMenu.setLanguage(german);
configMenu.setLanguage(german);
descriptionMenu.setLanguage(german);
defaultMenu.setLanguage(german);
debugMenu.setLanguage(german);
}
COM: <s> change the language of all menus and windows </s>
|
funcom_train/31431153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Subalgebra Sg(List<IntArray> elems) {
final int[] gens = new int[elems.size()];
for (int i = 0; i < gens.length; i++) {
gens[i] = elementIndex(elems.get(i));
}
return sub().Sg(gens);
}
COM: <s> the subalgebra generated by elems given as arrays of ints </s>
|
funcom_train/51782684 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double truncateToMinimumHeight(double diffy, BooleanHolder success) {
double dy = northernSwap(diffy);
if (node.getSize().getHeight() + dy < node.getMinimumSize().getHeight()) {
dy = node.getMinimumSize().getHeight() - node.getSize().getHeight();
success.setValue(true);
}
return northernSwap(dy);
}
COM: <s> truncate the specified diffy depending on the resizing direction </s>
|
funcom_train/540941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JMenu getHelpMenu() {
if (myHelpMenu == null) {
myHelpMenu = new JMenu();
myHelpMenu.setText("Help");
myHelpMenu.setMnemonic('h');
myHelpMenu.add(getDebugLogMenuItem());
myHelpMenu.add(getOpenBugMenuItem());
}
return myHelpMenu;
}
COM: <s> this method initializes help menu </s>
|
funcom_train/20612431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addUsedServiceArgsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Binding_usedServiceArgs_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Binding_usedServiceArgs_feature", "_UI_Binding_type"),
GCLACSPackage.Literals.BINDING__USED_SERVICE_ARGS,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the used service args feature </s>
|
funcom_train/48150389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParameters(double a, double b) {
if (a >= b) b=a+1;
minValue = a;
maxValue = b;
double step = 0.01 * (maxValue - minValue);
super.setParameters(minValue, maxValue, step, CONTINUOUS);
super.setMGFParameters(0.0, 5.0, 100);
}
COM: <s> this method sets the parameters the minimum and maximum values of the </s>
|
funcom_train/50371872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private EndpointReferenceType createDataTransfer(Map<String, Object> initParams) throws Exception{
String id = Kernel.getKernel().createServiceInstance(DMI.DTI, initParams);
EndpointReferenceType epr = AddressingUtil.newEPR();
epr.addNewAddress().setStringValue(Utilities.makeAddress(DMI.DTI, id));
AddressingUtil.addUGSRefparamToEpr(epr, id);
return epr;
}
COM: <s> delegate method to create a data transfer instance </s>
|
funcom_train/21656372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtReporteCronologia() {
if (btReporteCronologia == null) {
btReporteCronologia = new JButton();
btReporteCronologia.setBounds(new Rectangle(10, 559, 159, 29));
btReporteCronologia.setText("Generar Reporte");
btReporteCronologia.setMnemonic('e');
btReporteCronologia.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
mostrarReporte();
}
});
}
return btReporteCronologia;
}
COM: <s> this method initializes bt reporte cronologia </s>
|
funcom_train/17544371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void performAction(Node[] nodes) {
for (int i = 0; i < nodes.length; i++) {
BlitzInstanceNode cookie = (BlitzInstanceNode)nodes[i].getCookie(BlitzInstanceNode.class);
if (cookie != null) {
cookie.viewServerOutput();
}
}
}
COM: <s> performs the action </s>
|
funcom_train/13669936 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int intToByteArray2(int l, Bytes arrayWhereToWrite, int offset, String label) {
int i, shift;
for (i = 0, shift = 24; i < 4; i++, shift -= 8) {
arrayWhereToWrite.set(offset+i, (byte) (0xFF & (l >> shift)));
}
if(debug){
DLogger.debug(String.format(" writing at %d : int '%d' : %s",offset,l,label));
}
return INT_SIZE;
}
COM: <s> this method writes the byte directly to the array identification </s>
|
funcom_train/45484186 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButtonRemove() {
if (jButtonRemove == null) {
jButtonRemove = new JButton();
jButtonRemove.setBounds(new Rectangle(494, 194, 86, 26));
jButtonRemove.setText("Remove");
jButtonRemove.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
}
});
}
return jButtonRemove;
}
COM: <s> this method initializes j button remove </s>
|
funcom_train/26201717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Collection subinterfaces(ClassDoc cd) {
Collection ret = (Collection)classToSubinterface.get(cd);
if (ret == null) {
ret = new TreeSet();
List subs = classtree.subinterfaces(cd);
if (subs != null) {
ret.addAll(subs);
for (Iterator it = subs.iterator(); it.hasNext();) {
ret.addAll(subinterfaces((ClassDoc)it.next()));
}
}
addAll(classToSubinterface, cd, ret);
}
return ret;
}
COM: <s> return all subinterfaces of an interface and fill in class to subinterface map </s>
|
funcom_train/39063880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeLineMark(IMarkingAnnotationNode note) {
if (note == null)
return false;
IMarker[] markers = MarkingCore.getMatchingMarkers(note);
boolean result = true;
if (markers.length > 0) {
try {
markers[0].delete(); //just get rid of the first one.
} catch (CoreException e) {
result &= false;
}
}
IMarkingContainer parent = note.getParent();
if (parent != null) {
parent.getChildren().remove(note);
} else {
result &= false;
}
return result;
}
COM: <s> removes the line marker note for a project or scheme </s>
|
funcom_train/38537124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NodeChangeEvent remove(Node node) {
if (list.remove(node)) {
Integer type = (Integer) nodeMap.remove(node);
nodeArcs.remove(node);
NodeChangeEvent ev = new NodeChangeEvent(node);
ev.setType(type.intValue());
return ev;
}
return null;
}
COM: <s> removes a node change from the queue </s>
|
funcom_train/23226762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addConfiguredProduces( FileSet fs ) {
producesSpecified = true;
if( !fs.getDir(getProject()).exists() ) {
log(
fs.getDir(getProject()).getAbsolutePath()+" is not found and thus excluded from the dependency check",
Project.MSG_INFO );
} else
addIndividualFilesTo( fs, producesSet );
}
COM: <s> nested lt produces element </s>
|
funcom_train/48749135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getAutoCommit() throws DBException {
String myName = new String(thisClass + "setAutoCommit(boolean)");
try {
return myConnection.getAutoCommit();
} catch(SQLException se) {
throw new DBException(myName + ":Could not get auto commit setting"
+ " (" + myDescription + ")", se.getMessage());
}
} /* getAutoCommit() */
COM: <s> return the state of the auto commit flag </s>
|
funcom_train/13851260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkInboundRation() {
assert Thread.holdsLock(sessionLock);
assert !inRationInfinite;
if (inState >= FINISHED) {
return;
}
int mark = mux.initialInboundRation / 2;
int used = inBufRemaining + inRation;
if (used <= mark) {
int inc = mux.initialInboundRation - used;
mux.asyncSendIncrementRation(sessionID, inc);
inRation += inc;
}
}
COM: <s> sends ration increment if read drained buffers below </s>
|
funcom_train/51348164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dump(AbstractTripleStore store) {
System.err.println("capacity=" + capacity + ", numStmts=" + numStmts);
for (int i = 0; i < numStmts; i++) {
final ISPO stmt = stmts[i];
System.err.println("#" + (i+1) + "\t" + stmt.toString(store));
}
}
COM: <s> dumps the state of the buffer on </s>
|
funcom_train/26393236 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String modeToString(int p_mode) {
switch (p_mode) {
case MODE_UNKNOWN :
return "unknown";
case MODE_INMEMORY :
return "in-memory";
case MODE_URL :
return "url";
case MODE_EXECUTABLE :
return "executable";
}
return "unknown mode code " + p_mode;
}
COM: <s> convert the specified mode value into a string </s>
|
funcom_train/20826616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void nextChannel() throws ShowFileException {
int channelNumber = nextInteger("channel number", 1, getShow().getNumberOfChannels());
String name = nextString("channel name");
Channel channel = getShow().getChannels().get(channelNumber - 1);
channel.setName(name);
}
COM: <s> interprete channel line </s>
|
funcom_train/25332010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetReverseComplementSequenceAsString_0args() {
GapSequence i = GapSequence.makeGap(10);
String result = i.getReverseComplementSequenceAsString();
assertEquals(result,"NNNNNNNNNN");
i = GapSequence.makeGap(0);
result = i.getReverseComplementSequenceAsString();
assertEquals(result,"");
}
COM: <s> test of get reverse complement sequence as string method of class gap sequence </s>
|
funcom_train/25146282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dump(String prefix, IFormulaContext context, IFormulaRenderer renderer) {
System.out.println(toString(prefix, context, renderer));
if (children != null) {
for (int i = 0; i < children.length; ++i) {
ASTBaseNode n = (ASTBaseNode) children[i];
if (n != null) {
n.dump(prefix + " ", context, renderer);
}
}
}
}
COM: <s> debug helper to dump the formula tree and sub nodes with partial evaluation </s>
|
funcom_train/1683737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void returnToLoginFrame(){
//TODO Is this necessary? (All frames are disposed when exited. Is this enough?)
newGameFrame = null;
newAccountFrame = null;
loadGameFrame = null;
waitingForPlayersFrame = null;
//
loginFrame.setEnabledElementsBasedOnLoggedInStatus();
loginFrame.setVisible(true);
}
COM: <s> shows the login frame </s>
|
funcom_train/3990249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSzmeryPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BadanieOkresowe_szmery_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BadanieOkresowe_szmery_feature", "_UI_BadanieOkresowe_type"),
PrzychodniaPackage.Literals.BADANIE_OKRESOWE__SZMERY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the szmery feature </s>
|
funcom_train/4385605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HITS ( WebGraph graph ) {
this.graph = graph;
this.hubScores = new HashMap();
this.authorityScores = new HashMap();
int numLinks = graph.numNodes();
for(int i=0; i<numLinks; i++) {
hubScores.put(new Integer(i),new Double(1));
authorityScores.put(new Integer(i),new Double(1));
}
computeHITS();
}
COM: <s> constructor for hits </s>
|
funcom_train/47844762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(String patch) throws IOException {
FileOutputStream fis = new FileOutputStream(patch);
BufferedWriter bf = new BufferedWriter(new OutputStreamWriter(fis));
for( Article art: dict ) {
bf.write(art.getKey() + "="+ art.getValue() + "\n");
}
bf.flush();
}
COM: <s> save dictionary in file </s>
|
funcom_train/40403067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateAddToWidget() {
// make the dependencies.
FlowPanel panel = new FlowPanel();
Label label = new Label();
TextBox textBox = new TextBox();
// create the bundle.
UiBundleWidget<Label, TextBox> uiBundleWidget = new UiBundleWidget<Label, TextBox>(
panel, label, textBox);
// add to a panel.
SimplePanel simplePanel = new SimplePanel();
simplePanel.add(uiBundleWidget);
// check it was added.
assertEquals(uiBundleWidget, simplePanel.getWidget());
}
COM: <s> test creating it and adding it to a widget </s>
|
funcom_train/41024199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJSaveImageButton() {
if (jSaveImageButton == null) {
jSaveImageButton = new JButton();
jSaveImageButton.setText("Capture current status");
jSaveImageButton.setToolTipText("Capture current status and save as an image file.");
jSaveImageButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
saveImage();
}
});
}
return jSaveImageButton;
}
COM: <s> this method initializes j save image button </s>
|
funcom_train/51481518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HandleEnumeration handles() {
List handles = CollectionsFactory.current().createList(fPoints.size());
handles.add(new ChangeArcCurvatureHandle(this));
handles.add(new ChangeConnectionStartHandle(this));
for (int i = 1; i < fPoints.size()-1; i++) {
handles.add(new PolyLineHandle(this, locator(i), i));
}
handles.add(new ChangeConnectionEndHandle(this));
return new HandleEnumerator(handles);
}
COM: <s> gets the handles of the figure </s>
|
funcom_train/32057873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetColumnRule() {
System.out.println("testSetColumnRule");
GPGraphpad pad = new GPGraphpad();
GPGraph graph = new GPGraph();
GraphUndoManager undo = new GraphUndoManager();
GPDocument newDoc = new GPDocument(pad, "test", null, graph, null, undo);
try {
newDoc.setColumnRule(null);
} catch (Exception e) {
fail();
}
}
COM: <s> test of set column rule method of class gpdocument </s>
|
funcom_train/20728650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TableModel getJFreeReportTable(String rapName, int compId) {
AccTableToCloseAtEnd = (ChartAccountTable) buttonGetReportOld(true, rapName, compId);
return (TableModel) AccTableToCloseAtEnd;
}//}}}
//{{{ +setReportProperties(JFreeReport, String, String, String, int) : void
COM: <s> gets the j free report table attribute of the acc chart report object </s>
|
funcom_train/5445158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getLong(int Index) {
if ((Index < 1) || (Index >= ItemType.length) || (ItemType[Index] != CONSTANT_LONG))
throw new ClassFormatError("Constant pool item does not exist");
return ((Long)ItemValue1[Index]).longValue();
}
COM: <s> get the long value of a long constant </s>
|
funcom_train/47303113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
startCompareAction.setEnabled(false);
db = getDatabase();
if (db != null) {
// disable start button (listers will reenable it when
// finished)
if (((JComboBox) (e.getSource())).getSelectedIndex() == 0) {
startCompareAction.setEnabled(false);
}
new Thread(this).start();
} else {
catalogDropdown.removeAllItems();
catalogDropdown.setEnabled(false);
schemaDropdown.removeAllItems();
schemaDropdown.setEnabled(false);
}
}
COM: <s> checks the datasource selected in the database dropdown and </s>
|
funcom_train/8354664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopProfile(IoEventType type) {
switch (type) {
case MESSAGE_RECEIVED :
profileMessageReceived = false;
return;
case MESSAGE_SENT :
profileMessageSent = false;
return;
case SESSION_CREATED :
profileSessionCreated = false;
return;
case SESSION_OPENED :
profileSessionOpened = false;
return;
case SESSION_IDLE :
profileSessionIdle = false;
return;
case SESSION_CLOSED :
profileSessionClosed = false;
return;
}
}
COM: <s> stop profiling an </s>
|