__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/6402954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updatePosition(Vector3f flarePoint, Vector2f midPoint) {
Vector3f tempPoint = FlareQuad.this.getWorldTranslation();
tempPoint.x = (flarePoint.x * positionPercent.x) + midPoint.x;
tempPoint.y = (flarePoint.y * positionPercent.y) + midPoint.y;
tempPoint.z = 0;
}
COM: <s> updates world translation of this flare quad </s>
|
funcom_train/17905266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void paintStatusLabel() {
Runnable update = new Runnable() {
public void run() {
repaint();
Dimension dim = statusLabel.getSize();
statusLabel.paintImmediately(0, 0, dim.width, dim.height);
}
};
SwingUtilities.invokeLater(update);
}
COM: <s> forces a repaint using paint immediately </s>
|
funcom_train/44161544 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveContainer(ActionEvent ae) {
setRefreshData();
BaseTakenUp btu = returnContainer(this.selectedTableId, this.container);
if (btu != null) {
btu.getAttributes().putAll(this.attributes);
} else {
findContainerBaseElement(this.selectedTableId,
this.container).getAttributes().putAll(this.attributes);
}
}
COM: <s> save container saves container </s>
|
funcom_train/43245676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetRank() {
System.out.println("getRank");
SponsorDemographicDG1Object instance = new SponsorDemographicDG1Object();
String expResult = "";
String result = instance.getRank();
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 rank method of class org </s>
|
funcom_train/46377683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void randomize() {
for (ConfigType type : ConfigType.values()) {
List<ConfigElement> el = getElements(type);
if (el.size() > 0) {
int rand = (int) (Math.random() * 100) % el.size();
setElement(type, rand);
}
}
// XXX What about randomizing the colors?
}
COM: <s> randomizes the settings for this set of character parameters </s>
|
funcom_train/3928013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateGzipSaveAsName() {
String name = generateGzipName( true );
String beforeChiseled = name.substring( 0, name.indexOf( ".chiseled" ));
saveAsCounter++;
String newName = beforeChiseled + "_" + saveAsCounter + ".chiseled.wrz";
return( newName );
}
COM: <s> generate a name for gzip save as name n </s>
|
funcom_train/42702426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean writeScriptFile() {
System.out.println("-- generating virtual camera script --");
XMLOutput xmlOutput;
xmlOutput = new XMLOutput();
xmlOutput.setCommentLevel(XMLOutput.COMMENT_LEVEL_MAX);
OutputStream os;
try {
os = new FileOutputStream(files[VCS]);
xmlOutput.write(script, os);
os.close();
} catch (Exception e) {
e.printStackTrace();
}
if (!files[VCS].exists()) {
System.out.println("failed!");
return false;
} else {
System.out.println("VCS XML file written.");
}
return true;
}
COM: <s> writes the script to the desired file </s>
|
funcom_train/21650073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getProductID(){
byte[] buf = new byte[8];
int failed = this.getData(0x08, buf, 8);
if(failed!=0) return "failed. ";
String str="l:";
for(int i=0; i<8; i++){
str+=(char)buf[i];
}
return str;
}
COM: <s> method used to know the product id </s>
|
funcom_train/3381529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getContentLength() {
try {
getInputStream();
} catch (Exception e) {
return -1;
}
int l = contentLength;
if (l < 0) {
try {
l = Integer.parseInt(properties.findValue("content-length"));
setContentLength(l);
} catch(Exception e) {
}
}
return l;
}
COM: <s> call this routine to get the content length associated with this </s>
|
funcom_train/13546970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean inputsAllPrimals(ArrayList uselist) {
boolean isAllPrimal = true;
for (Iterator its = ((ArrayList)uselist.clone()).iterator();
its.hasNext(); ) {
Operand op_Operand = (Operand)its.next();
if(op_Operand != null)
if(!(op_Operand.isPrimal()))
isAllPrimal = false;
}
return isAllPrimal;
}
COM: <s> checks if all inputs to an instruction are primal </s>
|
funcom_train/26484649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Parameter findParameterByName(String name) {
if (name == null || name.length() == 0)
return null;
name = name.toLowerCase();
for (Iterator iter = parameters.values().iterator(); iter.hasNext(); ) {
Parameter p = (Parameter)iter.next();
if (name.equals(p.getName().toLowerCase()))
return p;
}
return null;
}
COM: <s> returns the parameter with the specified name or code null code </s>
|
funcom_train/28432088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isUseNaming() {
boolean useNaming = true;
// Reading the "catalina.useNaming" environment variable
String useNamingProperty = x.java.lang.System.getProperty("catalina.useNaming");
if ((useNamingProperty != null)
&& (useNamingProperty.equals("false"))) {
useNaming = false;
}
return useNaming;
}
COM: <s> return true if naming should be used </s>
|
funcom_train/12800734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setEpisode (int s, int e, int v) {
fillSeasonList(s);
if (seasonList.get(s).size() > e) {
seasonList.get(s).set(e, v);
} else {
for (int i = seasonList.get(s).size(); i < e; i++) {
seasonList.get(s).add(0);
}
seasonList.get(s).add(v);
}
}
COM: <s> adds an episode to the downloaded list </s>
|
funcom_train/20046498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showMessage( String sMessage ) {
javax.swing.JFrame jframe = new javax.swing.JFrame();
jframe.setLocation(100, 100);
jframe.setSize(300, 200);
jframe.setVisible(true);
javax.swing.JOptionPane.showMessageDialog(
jframe, sMessage, "Debugging information",
javax.swing.JOptionPane.INFORMATION_MESSAGE);
jframe.dispose();
}
COM: <s> showing the stack trace in a joption pane </s>
|
funcom_train/15866350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setName(String name) {
this.setComponentChanged(true);
this.name = name;
this.eventSupport.fire( new Event(this, "Name set on '" + this.getIdentifier() + "'.", EventType.CHANGED_COMPONENT_UNPOOLABLE_NAME) );
}
COM: <s> set the name of the component </s>
|
funcom_train/22175129 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getObjectIdentitiesForObject(ExecutionContext context, Object targetObject) {
List objList = getRepoObjectIdentitiesForObject(context, null, targetObject);
if (objList == null || objList.isEmpty()) {
log.debug("ObjectIdentity not found with object \"" +
targetObject + "\"");
return null;
} else {
return makeObjectIdentityClientList(objList);
}
}
COM: <s> client object identities for the given object including all parents </s>
|
funcom_train/24112171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setSelectedUser(final IUser user) {
if (user == null) {
userLabel.setText(Messages.getString("UserBrowserView.nouser.text")); //$NON-NLS-1$
} else {
userLabel.setText(user.getFullName(true));
}
}
COM: <s> displays the given user as the selected one </s>
|
funcom_train/36536335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showCurrentPrompt() {
int rowIndex = wordsTable.getSelectedRow();
int columnIndex = wordsTable.getSelectedColumn();
showPrompt(rowIndex);
wordsTable.setRowSelectionInterval(rowIndex, rowIndex);
if(columnIndex >= 0)
{
wordsTable.setColumnSelectionInterval(columnIndex, columnIndex);
}
}
COM: <s> shows prompt for currently selected word </s>
|
funcom_train/18807969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setUp() {
this.jan1900 = new Month(Month.JANUARY, 1900);
this.feb1900 = new Month(Month.FEBRUARY, 1900);
this.nov9999 = new Month(Month.NOVEMBER, 9999);
this.dec9999 = new Month(Month.DECEMBER, 9999);
}
COM: <s> common test setup </s>
|
funcom_train/5315829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect() throws ClassNotFoundException, SQLException {
if (connection == null || connection.isClosed()) {
Class.forName(HCSettings.getParameterValue("db_driver_name"));
// initialize the connection with the database
connection = DriverManager.getConnection(HCSettings
.getParameterValue("db_connection_string").replaceAll(
"%language%",
HCSettings.getParameterValue("language")),
HCSettings.getParameterValue("db_user_name"), HCSettings
.getParameterValue("db_password"));
}
}
COM: <s> the connection method </s>
|
funcom_train/27904566 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean shouldWipeUnusedCache() {
// here is how it works: if the cache havent been accessed in the last
// "Configuration.MAX_KEEP_UNUSED_PARTIAL_CACHE" garbage collection, then we
// will wipe its contecnt since partial clean costs too much
if(access_last_gc == num_access) cache_not_used_count++;
else cache_not_used_count = 0;
access_last_gc = num_access;
return (cache_not_used_count > Configuration.MAX_KEEP_UNUSED_PARTIAL_CACHE);
}
COM: <s> if this function returns true we should wipe the cache entirely instead </s>
|
funcom_train/6451076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getParametersStr(String sep) {
StringBuilder out = new StringBuilder();
if (parameters.size() > 0) {
Iterator<String> i = parameters.iterator();
while (i.hasNext()) {
out.append(i.next());
if (i.hasNext()) out.append(sep);
}
}
return out.toString();
}
COM: <s> returns parameters with space as separator </s>
|
funcom_train/215112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu buildReactionMenu() {
JMenuItem item;
JMenu menu = createMenu("Reaction", 'F');
item = createMenuItem("Add New", 'R');
menu.add(item);
item = createMenuItem("Edit", 'O');
menu.add(item);
item = createMenuItem("List", 'O');
menu.add(item);
item = createMenuItem("Save all", 'O');
menu.add(item);
return menu;
}
COM: <s> builds and returns a code jmenu code to manipulate </s>
|
funcom_train/18569768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEqualsReturnsFalseIfArgumentTypesDoNotMatch() {
Class[] newArgTypes = new Class[] {Object.class, Object.class};
Signature newSignature =
new Signature(Signature.class, "myMethod", newArgTypes);
assertFalse(signature.equals(newSignature));
}
COM: <s> test the equals method when argument types dont match </s>
|
funcom_train/8088564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element clone() {
try {
Element clone = (Element) super.clone();
int[] cloneEvents = new int[m_Events.length];
for (int i = 0; i < m_Events.length; i++) {
cloneEvents[i] = m_Events[i];
}
clone.setEvents(cloneEvents);
return clone;
} catch (CloneNotSupportedException exc) {
exc.printStackTrace();
}
return null;
}
COM: <s> returns a deep clone of an element </s>
|
funcom_train/45388790 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawRegion(Object gfx,Object Img, int x_src, int y_src,int width, int height, int x_dest, int y_dest ){
Graphics g =(Graphics)gfx;
g.drawRegion( (Image)Img, x_src, y_src, width, height,
javax.microedition.lcdui.game.Sprite.TRANS_NONE,
x_dest, y_dest, Graphics.TOP | Graphics.LEFT );
}
COM: <s> draws the specfied region of source image to the destination </s>
|
funcom_train/34962615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createEntityListPageModel(String viewId, String entityClassName, String relatedPageViewId) {
if (pages.containsKey(viewId)) {
throw new IllegalArgumentException("View already in the model: " + viewId);
}
AbstractPageModel page = new EntityListPageModel(viewId, entityClassName, relatedPageViewId);
pages.put(viewId, page);
}
COM: <s> adds an entity list page model to the entity model </s>
|
funcom_train/32057627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPaintGrid() {
System.out.println("testPaintGrid");
// Add your test code below by replacing the default call to fail.
Graphics g = null;
Rectangle r = new Rectangle();
BasicGraphUI x = new BasicGraphUI();
x.paintGrid(1, g, r);
}
COM: <s> test of paint grid method of class basic graph ui </s>
|
funcom_train/44385044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setJar(String newJar) {
ensure(module == null,
"The dependency is already set to a module " + module
+ ". Create another dependency for jar " + newJar);
ensure(!inheritEuList,
"Cannot inherit eu list from a jar dependency");
this.jar = newJar;
}
COM: <s> set the jar value </s>
|
funcom_train/27791230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FileTransfer getCopyType(String copytype) throws CommandException {
if (copytype.equals("gsiscp")) {
GSISCPTransferBean fileTransferBean = new GSISCPTransferBean();
return (FileTransfer)fileTransferBean;
} else if (copytype.equals("gsiftp")) {
GSIFTPTransferBean fileTransferBean = new GSIFTPTransferBean();
return (FileTransfer)fileTransferBean;
} else {
throw new CommandException("Invalid copytype parameter: copytype=" + copytype);
}
}
COM: <s> returns a file transfer interface based on the copytype </s>
|
funcom_train/2712354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void displayStyle() {
Style selectedStyle = getStyleForSelectedDocTypeAndCategory();
// Font Style
String fontStyle =
selectedStyle.getFontStyle() == null
? Fonts.REGULAR
: selectedStyle.getFontStyle();
Color color = selectedStyle.getForeground();
// Color
UIConfigurationUtility.showColor(color, syntaxColorLabel,
sampleSyntaxColor);
fontStyles.setSelectedItem(fontStyle);
}
COM: <s> displays a sample text with selected font style and selected font color </s>
|
funcom_train/48072184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sort(String colName, SortDir direction) {
ListingOp listingOp = new ListingOp();
listingOp.setOp(ListingOp.SORT);
listingOp.setSorting(new Sorting(colName, direction));
IListingCommand lc = new com.tll.client.data.ListingCommand(listingDef.getListingName(), listingOp);
this.listingCommand = lc;
}
COM: <s> issue a sort command to the server </s>
|
funcom_train/25749174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XMLElement addSimpleTableItemHeading(XMLElement table, String text) {
/**
* <TD VALIGN="top" CLASS="LIST_ITEM"><U>text</U></TD>
*/
XMLElement td = addTD(table, Classes.CLASS_LIST_ITEM);
td.setAttribute("VALIGN", "top");
XMLElement u = td.appendChildElement("U");
u.setElementValue(text);
return td;
}
COM: <s> creates a table heading </s>
|
funcom_train/50531476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItem2() {
if (jMenuItem2 == null) {
jMenuItem2 = new JMenuItem();
jMenuItem2.setText(I18n.getString("delcontact"));
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
deleteContact();
}
});
}
return jMenuItem2;
}
COM: <s> this method initializes j menu item2 </s>
|
funcom_train/46756781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ImageAction createImageAction(IControlInteraction interaction) {
ImageAction action = new ImageAction();
action.setSource(this);
action.setContextRefId(interaction.getContextRefId());
if (interaction.getDefaultActionRefId() > 0) {
action.setActionReference(ActionReference.get(new Long(interaction.getDefaultActionRefId())));
}
action.setActionViewRefId(interaction.getActionViewRefId());
action.setApplicationControlId(interaction.getApplicationControlId());
return action;
}
COM: <s> create a table action </s>
|
funcom_train/40618952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String nameList(String dir) throws IOException {
passive();
send("NLST " + dir);
readCode(150);
ByteArrayOutputStream out = new ByteArrayOutputStream();
IOUtils.copyAndClose(inData, out);
readCode(226);
byte[] data = out.toByteArray();
return new String(data);
}
COM: <s> get the directory listing nlst </s>
|
funcom_train/3687795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int createThreads(int numberOfThreads) {
int ncreated = 0;
for (int i = 0; i < numberOfThreads; ++i) {
synchronized (poolLock) {
if (getPoolSize() < getMaximumPoolSize()) {
++ncreated;
addThread(null);
} else {
break;
} // if
} // synchronized
} // for
return ncreated;
} // createThreads
COM: <s> create and start up to number of threads threads in the </s>
|
funcom_train/26595051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean last() throws com.daffodilwoods.database.resource.DException {
checkInSecondIterator = true;
if (!leftIterator.last()) {
state = BEFOREFIRST;
return false;
}
if (!rightIterator.last()) {
checkInSecondIterator = false;
state = VALIDSTATE;
return true;
}
return (state = alignPrevious() ? VALIDSTATE : BEFOREFIRST) != BEFOREFIRST;
}
COM: <s> this method is responsible for retrieving the last record </s>
|
funcom_train/50223662 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reshape(int x, int y, int width, int height) {
super.reshape(x, y, width, height);
//save the settings
setIntSetting("x", x);
setIntSetting("y", y);
setIntSetting("width", width);
setIntSetting("height", height);
}
COM: <s> moves and resizes this component </s>
|
funcom_train/46289427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String mapFileName(String sourceFileName) {
if (StringUtils.equals(sourceFileName, fromPrefix)) {
return sourceFileName;
}
if (fromPrefix == null || !modifyName(sourceFileName).startsWith(modifyName(fromPrefix)) || !modifyName(sourceFileName).endsWith(modifyName(fromPostfix))) {
return null;
}
return toPrefix + extractVariablePart(sourceFileName) + toPostfix;
}
COM: <s> returns null if the source file name doesnt match the quot from quot </s>
|
funcom_train/2860696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void displayMailto(ElementInfoObject eio, StringBuffer out){
String tmp = eio.value;
if (tmp==null)
tmp = "";
out.append("<td>");
out.append("<a href=\"mailto:" + tmp + "\">" + tmp + "</a>");
out.append("</td>\n");
}//displayMailto
COM: <s> generate the html to display a mailto display </s>
|
funcom_train/17398876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Vector initCc(){
if(z!=0.0f && image!=null){
Vector roomedC = c.times(z);
Vector timedCr = cr.times(image.getWidth()/2).times(-1);
Vector timedCd = cd.times(image.getHeight()/2).times(-1);
return ce.plus(roomedC).plus(timedCr).plus(timedCd);
}
else{
System.err.println("Zoom value and/or image is not set");
return null;
}
}
COM: <s> calculate the upper left hand corner vector of the image </s>
|
funcom_train/42918013 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void beforeRendering() {
// Reset the matrices to the identity.
gl.glMatrixMode(GL.GL_PROJECTION);
gl.glLoadIdentity();
gl.glMatrixMode(GL.GL_MODELVIEW);
gl.glLoadIdentity();
// Reset the clear color.
gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
// Clear the buffers.
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT | GL.GL_STENCIL_BUFFER_BIT);
camera.prepareRendering();
enableLights();
}
COM: <s> called before rendering </s>
|
funcom_train/28492702 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processBuffer() throws IOException {
LOGGER.log(Level.FINE, "current state: {0}", state);
switch (state) {
case HEADER:
readHeader();
break;
case BODY:
readBody();
break;
case TUNNEL:
if (buffer.hasRemaining()) {
forwardData(buffer, buffer.remaining());
}
break;
default:
LOGGER.log(Level.WARNING, "unknown state {0}", state);
}
}
COM: <s> processes any buffered data </s>
|
funcom_train/2921725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean shallSuspend(final boolean lastState, final Object element, final int flag) {
final boolean shallSuspend = lastState || forceSuspend || stepping
&& suspendBaseLevel - (flag == NORMAL_FRAME ? 0 : 1) >= iterationLevel;
if (!monitor.getAdapter(element).shallSuspend(element, flag) && shallSuspend) {
suspendBaseLevel++;
return false;
}
return shallSuspend;
}
COM: <s> return true in case of a users suspend request or dependend on the </s>
|
funcom_train/22367954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialize() {
covers = new ArrayList<Cover>(6);
for (int i = 0; i < 5; i++) {
covers.add(new Cover(fullScreenImageSizeCalculator.getImageSize(i)));
}
covers.add(new HiddenCover());
setOpaque(false);
arrangeCovers();
}
COM: <s> initializes cover flow </s>
|
funcom_train/50397373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DetailedStatusDocument getDetailedStatus(){
if(haveStatusUpdate==true){
haveStatusUpdate=false;
return detailedStatus;
}
try{
DSLDelegate dsl=WorkflowFactoryImpl.getDelegate(getDialect());
if(dsl!=null){
detailedStatus=dsl.getDetailedStatus(getUniqueID(),conversionResult,getSecurityContext());
haveStatusUpdate=true;
return detailedStatus;
}
}catch(Exception e){
LogUtil.logException("Could not get status!",e,logger);
}
DetailedStatusDocument dsd=DetailedStatusDocument.Factory.newInstance();
dsd.addNewDetailedStatus();
return dsd;
}
COM: <s> queries the current detailed status from the dsl delegate </s>
|
funcom_train/27740719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
// listens for the TorrentEvent TRACKER_FAILED to start locating a
// peer
torrentManager.get().addEventListener(new LocatorTorrentEventListener());
// listens for the DHTEvent CONNECTED to re-attempt locating a peer
dhtManager.get().addEventListener(new DHTEventListenerForLocator());
}
COM: <s> adds the required listeners to torrent manager and dhtmanager </s>
|
funcom_train/18746755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isOmegaOnly() {
boolean result = false;
if (getTransitions().size() == 1) {
CtrlTransition trans = getTransitions().iterator().next();
result = trans.getCall().isOmega() && trans.getGuard().isEmpty();
}
return result;
}
COM: <s> indicates if this state currently only has a single unguarded outgoing omega transition </s>
|
funcom_train/30005547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemDuplicate() {
if (jMenuDuplicate == null) {
jMenuDuplicate = new JMenuItem();
jMenuDuplicate.setText(LanguageController.getInstance().getString(
this.plugin, "Popup_Duplicate"));
jMenuDuplicate.addActionListener(this);
}
return jMenuDuplicate;
}
COM: <s> returns a menu item to duplicate testcases </s>
|
funcom_train/15607842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List allMatchingIn(FeatureBean lModel) {
List lReturnList = new ArrayList();
if (lModel.getAxisOfAlignment().equals(mAxisOid) && (lModel.getParent() == null) && lModel.isObsolete()) {
lReturnList.add(lModel);
} // Got it
return lReturnList;
} // End method: allMatchingIn
COM: <s> in the given model find all that adhere to the rule is obsolete </s>
|
funcom_train/1481244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(char ch) {
if (b.length <= i + EXTRA) {
char[] new_b = new char[b.length+INC];
System.arraycopy(b, 0, new_b, 0, b.length);
b = new_b;
}
b[i++] = ch;
}
COM: <s> add a character to the word being stemmed </s>
|
funcom_train/3143474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean parseExpression(BooleanTokenizer t) throws PreprocessorException {
boolean result = parseTerm(t);
while (true) {
if (t.getTokenType() == BooleanTokenizer.TYPE_OR) {
t.nextToken();
result = result | parseTerm(t);
}
else if (t.getTokenType() == BooleanTokenizer.TYPE_XOR) {
t.nextToken();
result = result ^ parseTerm(t);
}
else {
return result;
}
}
}
COM: <s> parses a boolean expression </s>
|
funcom_train/14272770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPluginSettings(PluginSettings settings) {
String name = settings.getName();
this.pluginSettingsHashMap.put(name, settings);
this.jConduitNames.add(name);
this.isJConduitActive.put(name, new Boolean(true));
listModel.addElement(name);
} // end-method
COM: <s> add the specified plug in settings object to this panel </s>
|
funcom_train/35279158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initWall() {
float startpt = brickLength / 4;
float height = 0;
for (int j = 0; j < 15; j++) {
for (int i = 0; i < 4; i++) {
Vector3f vt =
new Vector3f(i * brickLength * 2 + startpt, brickHeight + height, 0);
makeBrick(vt);
}
startpt = -startpt;
height += 2 * brickHeight;
}
}
COM: <s> this loop builds a wall out of individual bricks </s>
|
funcom_train/16683542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long getApplicationId() {
final FxPK pk = getPagePK();
if (pk.isNew()) {
throw new FxApplicationException("universal.error.instancePkNotSpecified").asRuntimeException();
}
FxPK applicationPk = (FxPK) getPageContent().getValue("/applicationreference").getBestTranslation();
return applicationPk.getId();
}
COM: <s> returns application id </s>
|
funcom_train/50983486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHorizontalAlignment( final int alignment ) {
switch ( alignment ) {
case TableLayout.LEFT:
case TableLayout.RIGHT:
case TableLayout.CENTER:
case TableLayout.JUSTIFY:
horizontalAlignment_ = alignment;
break;
default:
throw new DetailedIllegalArgumentException( "alignment", new Integer(alignment) );
}
}
COM: <s> set the horizontal alignment </s>
|
funcom_train/2882325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sfDeploy() throws SmartFrogException , RemoteException{
super.sfDeploy();
Object storage = sfResolveHere("storeLastOnly",false);
if (storage != null) {
storeLastOnly = (storage instanceof String) ? Boolean.valueOf((String)storage).booleanValue(): ((Boolean)storage).booleanValue();
}
}
COM: <s> look up for the context storage attribute </s>
|
funcom_train/39181970 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getQualifiedName(Class actionClass)
{
for (Iterator i=actions.values().iterator(); i.hasNext(); )
{
ActionMapping a=(ActionMapping)i.next();
if (a.getParametrizedClass().equals(actionClass))
{
return a.getQualifiedName();
}
}
return null;
}
COM: <s> returns the qualified name the action class is mapped to </s>
|
funcom_train/10224609 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModel(T model) {
this.model = model;
Dimension d;
if (this.model != null) {
d = renderer.calculateSize((Graphics2D) getGraphics(), this.model);
d = new Dimension(d.width * 2, d.height * 2);
setMinimumSize(d);
setPreferredSize(d);
setMaximumSize(d);
}
invalidate();
revalidate();
repaint();
}
COM: <s> sets the model </s>
|
funcom_train/28343641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initializeFrom( final Probe probe ) {
final ProbeState initialState = probe.getTrajectory().initialState();
if ( initialState != null ) {
applyState( initialState );
}
setAlgorithm( probe.getAlgorithm() );
setTimestamp( new Date() );
setComment( probe.getComment() );
}
COM: <s> initialize this probe from the one specified </s>
|
funcom_train/42680025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getCmbSource() {
if (cmbSource == null) {
cmbSource = new JComboBox();
cmbSource.setBounds(482, 107, 148, 24);
cmbSource.setToolTipText("Select the quality of the Youtube Video");
ArrayList<String> options = new Youtube().getFmtList();
for (int i = 0;i<options.size();i++)
cmbSource.addItem(options.get(i));
}
return cmbSource;
}
COM: <s> this method initializes cmb source </s>
|
funcom_train/4031064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getCustomStackTrace(Throwable aThrowable) {
// add the class name and any message passed to constructor
final StringBuilder result = new StringBuilder();
result.append(aThrowable.toString());
final String NEW_LINE = System.getProperty("line.separator");
// add each element of the stack trace
for (StackTraceElement element : aThrowable.getStackTrace()) {
result.append(element);
result.append(NEW_LINE);
}
return result.toString();
}
COM: <s> defines a custom format for the stack trace as string </s>
|
funcom_train/14115880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTransition(Transition<N,A> t) {
if(mode != Mode.DEFINITION) {
throw new IllegalStateException("Cannot add a new transition, current status is " + mode);
}
automaton.addArc(t, t.fromState, t.toState);
}
COM: <s> adds a transition to the model </s>
|
funcom_train/34663074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean matching(MagicCardPhysical phi2) {
MagicCardPhysical phi1 = this;
if (!phi1.card.equals(phi2.card))
return false;
if (phi1.isOwn() != phi2.isOwn())
return false;
if (Math.abs(phi1.price - phi2.price) >= 0.01)
return false;
if (!eqNull(phi1.getCustom(), phi2.getCustom()))
return false;
if (!eqNull(phi1.getComment(), phi2.getComment()))
return false;
if (!eqNull(phi1.special, phi2.special))
return false;
return true;
}
COM: <s> kind of equals but ignores count and location </s>
|
funcom_train/4757063 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void rotateCW() {
final T tmpElt = element;
element = left.element;
left.element = tmpElt;
final Node tmpNode = left;
left = tmpNode.left;
tmpNode.left = tmpNode.right;
tmpNode.right = right;
right = tmpNode;
if (left != null) {
left.parent = this;
}
if (right.right != null) {
right.right.parent = right;
}
}
COM: <s> perform a clockwise rotation rooted at the instance </s>
|
funcom_train/8145769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeItem(MenuItem item) {
int idx = items.indexOf(item);
if (idx == -1) {
return;
}
Element container = getItemContainerElement();
DOM.removeChild(container, DOM.getChild(container, idx));
items.remove(idx);
}
COM: <s> removes the specified menu item from the bar </s>
|
funcom_train/16620933 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(long key) {
int prevPos = hash(key) % capacity;
int pos = nextPtr[prevPos];
while (pos != LAST) {
if (keys[pos - capacity] == key) {
nextPtr[prevPos] = nextPtr[pos];
nextPtr[pos] = nextFree;
nextFree = pos;
count--;
return true;
}
prevPos = pos;
pos = nextPtr[pos];
}
return false;
}
COM: <s> removes the key and its corresponding value from this </s>
|
funcom_train/43382106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String createDirectory(List<WikiLink> links) {
StringBuilder sb = new StringBuilder();
sb.append("<ul>");
for (WikiLink page : links) {
sb.append("<li>" + wikiLink(page) + "</li>");
}
sb.append("</ul>");
return sb.toString();
}
COM: <s> creates a simple list of page links </s>
|
funcom_train/9887004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private float getMean(float [] vals) {
float mean = 0;
int n = 0;
for(int i = 0; i < vals.length; i++) {
if(!Float.isNaN(vals[i])) {
n++;
mean += vals[i];
}
}
return (n > 0 ? ((float)(mean/n)) : 0f);
}
COM: <s> returns a mean value for input </s>
|
funcom_train/4814097 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setBackground(Team team) {
if (Team.HUMANS.equals(team)) {
setBackground(TileButton.COLOR_HUMANS);
}
else if (Team.PREDATORS.equals(team)) {
setBackground(TileButton.COLOR_PREDATORS);
}
else {
throw new IllegalArgumentException("Unexpected team: " + team);
}
}
COM: <s> sets the background colour for this panel based on the given team </s>
|
funcom_train/10584037 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setup(Usecase usecase) {
this.usecaseName = usecase.getName();
String[] keys = usecase.getParameterNames();
for (int i = 0; i < keys.length; i++) {
this.parameters.put(keys[i], usecase.getParameter(keys[i]));
}
}
COM: <s> initializes the job </s>
|
funcom_train/47555207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node disambiguate(ContextVisitor ar) throws SemanticException {
Position pos = position();
Disamb disamb = ar.nodeFactory().disamb();
Node n = disamb.disambiguate(this, ar, pos, null, name);
if (n instanceof Expr) {
return n;
}
throw new SemanticException("Could not find field or local " +
"variable \"" + name + "\".", pos);
}
COM: <s> disambiguate the expression </s>
|
funcom_train/1058674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBackgroundColorPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PBDiagram_backgroundColor_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PBDiagram_backgroundColor_feature", "_UI_PBDiagram_type"),
PosterboardPackage.Literals.PB_DIAGRAM__BACKGROUND_COLOR,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the background color feature </s>
|
funcom_train/14080219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testValidation() throws ValidationException {
VAlarm alarm = new VAlarm();
alarm.getProperties().add(new Trigger(new DateTime(System.currentTimeMillis())));
alarm.getProperties().add(Action.DISPLAY);
assertValidationException(alarm);
alarm.getProperties().add(new Description("Testing display"));
alarm.validate();
}
COM: <s> test component validation </s>
|
funcom_train/44714511 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processOptionGroup(FormSectionEvent formEvent) {
FormData formData = formEvent.getFormData();
PageState pageState = formEvent.getPageState();
String nOptions = formData.get("nOptions").toString();
// This value is used in the redirect from the FormBuildingPage
m_nOptions.set(pageState, nOptions);
}
COM: <s> store the number of options in a request local variable </s>
|
funcom_train/173698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocType setElementName(String elementName) {
// This can contain a colon so we use checkXMLName()
// instead of checkElementName()
String reason = Verifier.checkXMLName(elementName);
if (reason != null) {
throw new IllegalNameException(elementName, "DocType", reason);
}
this.elementName = elementName;
return this;
}
COM: <s> this will set the root element name declared by this </s>
|
funcom_train/35843878 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initActions() {
if (isAdd()) {
addAction.setTarget(getTarget());
}
if (isNew()) {
newAction.setTarget(getTarget());
}
if (isDelete()) {
deleteAction.setObjectToRemove(getSelectedValue());
deleteAction.setTarget(getTarget());
}
}
COM: <s> tell the actions what objects they should work on </s>
|
funcom_train/12157472 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSatZoomIn(String t,int offx,int offy){
GGeoString gString = new GGeoString(t,offx,offy);
GGeoString zoomInString = this.calc.getZoomInGeoString(gString);
return getMainSatImagesList(zoomInString);
}
COM: <s> return satellite images for zoom in operation </s>
|
funcom_train/4137939 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEdge(Name vname1, Name vname2) {
Vertex vertex1 = vertices.get(vname1);
Vertex vertex2 = vertices.get(vname2);
//create vertex1<----vertex2 edge
Edge e = new Edge(/*to*/ vertex1, /*from*/ vertex2);
vertex1.addEdge(e);
vertex2.addEdge(e);
}
COM: <s> adds an i j edge to the graph </s>
|
funcom_train/17008703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdownInput() throws IOException {
try {
if (comm_socket_ != null) {
comm_socket_.shutdownInput();
}
if (data_sockets_ != null) {
for (int i = 0; i < number_of_streams_; i++) {
data_sockets_[i].shutdownInput();
}
}
}
catch (IOException e) {
throw e;
}
}
COM: <s> places the input stream for this socket at end of stream </s>
|
funcom_train/34983053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMobile(String newVal) {
if ((newVal != null && this.mobile != null && (newVal.compareTo(this.mobile) == 0)) ||
(newVal == null && this.mobile == null && mobile_is_initialized)) {
return;
}
this.mobile = newVal;
mobile_is_modified = true;
mobile_is_initialized = true;
}
COM: <s> setter method for mobile </s>
|
funcom_train/6408700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector3f localToWorld(final Vector3f in, Vector3f store) {
if (store == null)
store = new Vector3f();
// multiply with scale first, then rotate, finally translate (cf.
// Eberly)
return getWorldRotation().mult(
store.set(in).multLocal(getWorldScale()), store).addLocal(
getWorldTranslation());
}
COM: <s> convert a vector in from this spatials local coordinate space to world </s>
|
funcom_train/13448688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Listener removeListener(Listener oldl) {
if (oldl == a) return b;
if (oldl == b) return a;
Listener a2 = removeInternal(a, oldl);
Listener b2 = removeInternal(b, oldl);
if (a2 == a && b2 == b) {
return this; // it's not here
}
return addListener(a2, b2);
}
COM: <s> removes a listener from this multicaster and returns the </s>
|
funcom_train/48261150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUpdate() throws Exception {
/*System.out.println("update");
ManagedItemListDTO managedItemListDTO = null;
ManagedItemListDAO instance = new ManagedItemListDAO();
instance.update(managedItemListDTO);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
* */
}
COM: <s> test of update method of class managed item list dao </s>
|
funcom_train/25395814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scale(final JVector3d aScaleFactors, final boolean aIncludeChildren) {
// scale current object
scaleObject(aScaleFactors);
// scale children
if (!aIncludeChildren) {
return;
}
for (int i = 0; i < childrens.size(); i++) {
JGenericObject nextObject = childrens.get(i);
// scale the position of this child
nextObject.scale(aScaleFactors, aIncludeChildren);
}
}
COM: <s> non uniform scale optionally include children </s>
|
funcom_train/23271533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setYAxisGridlinesVisible(boolean visible) {
XYPlot plot = (XYPlot) this.chart.getPlot();
if (plot != null) {
boolean old = plot.isRangeGridlinesVisible();
plot.setRangeGridlinesVisible(visible);
firePropertyChange("yAxisGridlinesVisible", old, visible);
}
}
COM: <s> sets a flag that controls whether or not the y axis gridlines are </s>
|
funcom_train/11705668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enqueueFSArrayElements(int addr) throws SAXException {
final int size = cas.ll_getArraySize(addr);
int pos = cas.getArrayStartAddress(addr);
int val;
for (int i = 0; i < size; i++) {
val = cas.getHeapValue(pos);
if (val != CASImpl.NULL) {
enqueue(val);
}
++pos;
}
}
COM: <s> enqueues all fs reachable from an fsarray </s>
|
funcom_train/12674901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processVariableDef(SymTabAST tree) {
VariableDef def = makeVariableDef( tree, symbolTable.getCurrentScope() );
symbolTable.defineVariable(def);
SymTabAST assignmentNode
= tree.findFirstToken(TokenTypes.ASSIGN);
if (assignmentNode != null) {
walkTree((SymTabAST)assignmentNode.getFirstChild(), false);
}
}
COM: <s> process the given sym tab ast as a variable definition </s>
|
funcom_train/21087637 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLabelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_Debut_label_feature"), getString(
"_UI_PropertyDescriptor_description",
"_UI_Debut_label_feature", "_UI_Debut_type"),
SNI_Package.Literals.DEBUT__LABEL, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
COM: <s> this adds a property descriptor for the label feature </s>
|
funcom_train/2853924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toXml () {
StringBuffer sb = new StringBuffer(" ");
if (prefix != null)
sb.append(prefix).append(":");
sb.append(name).append("=\"").append(value).append("\"");
return sb.toString();
}
COM: <s> convert the node to xml form </s>
|
funcom_train/19421450 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int doEndTag() throws JspException {
StringBuffer buffer = new StringBuffer();
buffer.append(EaasyStreet.getThemeProperty("contentRow_end"));
buffer.append(Constants.LF);
String template = EaasyStreet.getThemeProperty("controlRow");
buffer.append(StringUtils.replace(template, "{0}", getControls()));
buffer.append(Constants.LF);
buffer.append(EaasyStreet.getThemeProperty("contentContainer_end"));
try {
pageContext.getOut().print(buffer.toString());
} catch (Exception e) {
throw new JspException(e);
}
return EVAL_PAGE;
}
COM: <s> p process the end of this tag </s>
|
funcom_train/25654090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void release() {
ConcurrentSprite sprite = null;
synchronized (this) {
if (!acquiredSprites.isEmpty()) {
sprite = acquiredSprites.remove(0);
}
}
if (sprite != null) {
synchronized (sprite) {
sprite.notify();
}
}
semaphore.release();
displayPermits();
setState(2);
}
COM: <s> process release button action </s>
|
funcom_train/18316200 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void internalLogMessage( String msg, FrameworkLogEventType type )
{
StringBuffer sMsgBuffer = new StringBuffer();
ISecurityUser securityUser = getSecurityUser();
if ( securityUser != null )
{
sMsgBuffer.append( "[UserID:");
sMsgBuffer.append( securityUser.getUserID() );
sMsgBuffer.append( "]-" );
}
sMsgBuffer.append( msg );
super.logMessage( sMsgBuffer.toString(), type );
COM: <s> logs the message by first pre appending the users session info </s>
|
funcom_train/8296491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Mass createmass(NamedNodeMap nodeMap) {
int x = getAttrInt(nodeMap, "x");
int y = getAttrInt(nodeMap, "y");
double weight = getAttrDouble(nodeMap, "weight");
return new Mass(new Point(x, y), DEFAULT_SIZE, Color.GREEN, weight);
}
COM: <s> called by make movers method reflectively to create a single instance </s>
|
funcom_train/12078188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setEnabled(boolean enabled) throws BluetoothException {
String methodName = "enable";
if (!enabled) {
methodName = "disable";
}
try {
Method enableDisableMethod = bluetoothServiceClass.getMethod(methodName, new Class[] {});
Boolean returnValue = (Boolean) enableDisableMethod.invoke(bluetoothService, new Object[] {});
return returnValue.booleanValue();
} catch (Throwable t) {
throw new BluetoothException(t);
}
}
COM: <s> enables the bluetooth service on this handset </s>
|
funcom_train/10519012 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Class createTemplateClass(Project project, Object templateObject) {
Class templateClass = null;
if (templateObject instanceof PreSetDefinition) {
PreSetDefinition preset = (PreSetDefinition) templateObject;
templateClass = preset.getTypeClass(project);
} else {
templateClass = templateObject.getClass();
}
return templateClass;
}
COM: <s> creates a template class to a given object </s>
|
funcom_train/2459532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTargetLanguage(String targetLanguage, String userName) throws UMException {
UNameVals val = (UNameVals) s.users.getVal(userName);
if (val == null) throw new UMException("User " + userName + " does not exist");
val.targetLang = targetLanguage;
}
COM: <s> set the target language for a particular user </s>
|
funcom_train/22156605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void scrollCalendar(int keycode, boolean notify) {
if(scrollable) {
boolean update = false;
switch (keycode) {
case SWT.ARROW_DOWN:
adjustDays(Calendar.DATE, 7);
update = true;
break;
case SWT.ARROW_UP:
adjustDays(Calendar.DATE, -7);
update = true;
break;
case SWT.END:
adjustDays(Calendar.DATE, 52*7);
update = true;
break;
case SWT.HOME:
adjustDays(Calendar.DATE, -52*7);
update = true;
break;
case SWT.PAGE_DOWN:
adjustDays(Calendar.DATE, 4*7);
update = true;
break;
case SWT.PAGE_UP:
adjustDays(Calendar.DATE, -4*7);
update = true;
break;
}
if(update) {
updateHeader();
updateDays();
}
}
}
COM: <s> perform the scroll by making a call to </s>
|
funcom_train/40735681 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValue1(Integer newVal) {
if ((newVal != null && value1 != null && (newVal.compareTo(value1) == 0)) ||
(newVal == null && value1 == null && value1IsInitialized)) {
return;
}
value1 = newVal;
value1IsModified = true;
value1IsInitialized = true;
}
COM: <s> setter method for value1 </s>
|