__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/17001905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void transformByteArrayToIntegerArray() {
byte[] tempVar = new byte[systemLevel + 1];
int offset =0;
for (int i=0; i < systemLevel+1; i++) {
System.arraycopy(destinationInBytes, offset, tempVar, 0, 4);
destinations[i] = ByteUtilities.getInt(tempVar);
offset+=4;
}
}
COM: <s> transforms an array of bytes into an array of integers </s>
|
funcom_train/38551481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addActionListener(ActionListener listener) {
this.debugCheckBox.addActionListener(listener);
this.infoCheckBox.addActionListener(listener);
this.warningCheckBox.addActionListener(listener);
this.errorCheckBox.addActionListener(listener);
this.fatalCheckBox.addActionListener(listener);
this.netTraceCheckBox.addActionListener(listener);
}
COM: <s> adds an action listener to the severity selection panel </s>
|
funcom_train/21196592 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPaused(boolean paused) {
if (this.paused != paused) {
synchronized (pausedLock) {
if (paused) {
Object[] players2stop = playersList.toArray();
for (Object player : players2stop) {
((SoundPlayer) player).pause();
}
}
this.paused = paused;
if (!paused) {
pausedLock.notifyAll();
}
}
}
}
COM: <s> sets the paused state </s>
|
funcom_train/3703130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Tuple toTuple() {
Tuple t = new Tuple(this.getTupleType());
//// 1. Get all of the Accesss.
Iterator it = iterator();
Access access;
Tuple tAccess;
while (it.hasNext()) {
access = (Access) it.next();
tAccess = access.toTuple();
t.addTuple(tAccess);
}
//// 2. Return.
return (t);
} // of method
COM: <s> get this access map in tuple form </s>
|
funcom_train/11663425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Query compileQuery(Collection col, String style, String query, NamespaceMap nsMap, Key[] keys) throws DBException, QueryException {
QueryResolver res = getResolver(style);
return res.compileQuery(col, query, nsMap, keys);
}
COM: <s> compile query compiles a query against the specified collection </s>
|
funcom_train/10626633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRevokeServiceClassBeanContextServiceProviderboolean() {
// Instantiate services, add and remove service
BeanContextServicesSupport sup = new BeanContextServicesSupport();
BeanContextServiceProvider pr = getProvider();
sup.addService(Object.class, pr, true);
sup.revokeService(Object.class, pr, true);
assertEquals("No service should be registered", 0, sup.services.size());
}
COM: <s> test method revoke service with class bean context service provider </s>
|
funcom_train/46037510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void openConnection(String queryURL) throws IOException {
try {
URL url = new URL(queryURL);
connection = url.openConnection();
connection.addRequestProperty("Referrer", referrer);
} catch (IOException ioe) {
System.err.println("Can't establish connections to Google Translate service");
throw ioe;
}
}
COM: <s> opens connection and set referrer for the connection </s>
|
funcom_train/46860940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMnuitmVehicleTypes() {
if (mnuitmVehicleTypes == null) {
mnuitmVehicleTypes = new JMenuItem();
mnuitmVehicleTypes.setText("Vehicle types...");
mnuitmVehicleTypes.setIcon(new ImageIcon(getClass().getResource("/resources/icons/vehicletypes.png")));
mnuitmVehicleTypes.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
ShowVehicleTypes();
}
});
}
return mnuitmVehicleTypes;
}
COM: <s> this method initializes mnuitm vehicle types </s>
|
funcom_train/8221353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addTable(JTable table) {
TableColumnModel tcm = table.getColumnModel();
for (int i = 0; i < tcm.getColumnCount(); i++) {
TableColumn tc = tcm.getColumn(i);
addColumn(tc);
}
tcm.addColumnModelListener(this);
_tracked.add(tcm);
}
COM: <s> adds the table </s>
|
funcom_train/26322755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHandlerMethodName(HttpServletRequest request) throws NoSuchRequestHandlingMethodException {
// get the page we were on.
String methodName = (String) request.getAttribute(WorkflowConstants.METHOD_NAME);
if (methodName == null) {
throw new NoSuchRequestHandlingMethodException(request);
}
return methodName;
}
COM: <s> this method will return a name of the method that should be executed </s>
|
funcom_train/7300960 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMD5HexLength() {
String hashMe = "this is some string that is longer than 32 characters";
String hash = DigestUtils.md5Hex(hashMe.getBytes());
assertEquals(32, hash.length());
hashMe = "length < 32";
hash = DigestUtils.md5Hex(hashMe.getBytes());
assertEquals(32, hash.length());
}
COM: <s> an md5 hash converted to hex should always be 32 characters </s>
|
funcom_train/45598070 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initShape(IShape shape, Color color, Dimension dimension) {
// Sets shape properties and size
this.shape = shape;
shape.setBackgroundColor(color);
shape.setDimension(new Dimension(dimension.width, dimension.height));
// Adds shape to this, and label to shape.
add(shape, new Rectangle(0, 0, -1, -1));
GridData data = new GridData(SWT.CENTER, SWT.CENTER, true, true);
data.horizontalSpan = 2;
shape.add(labelId, data);
}
COM: <s> initializes the shape and adds it to this figure </s>
|
funcom_train/48940126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void subscribe(String uri) {
if (uri.compareTo("") == 0 || !uri.startsWith("sip:")) {
System.out
.println("please enter a valid uri. Ex: sip:alice@ericsson.com");
return;
}
try {
buddy = PGMFactory.createBuddy(uri);
presence.subscribeToPresentity(buddy, 3600);
} catch (Exception e) {
System.out.println("Error calling Subscribe");
}
}
COM: <s> subscribe to a the user defined in the field code uri field code </s>
|
funcom_train/10670920 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result testForSelectedProperty() {
try {
certainProperties[0].addListener(1);
certainProperties[0].addListener(1);
certainProperties[0].fireAndVerify("old value", "new value");
return passed();
} catch (Exception e) {
e.printStackTrace();
return failed(e.toString());
}
}
COM: <s> disregard this test case </s>
|
funcom_train/17999761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addEntry(FolderEntry entry) {
entry.setParentEntry(null);
entry.setTopEntry(null);
entry.setParentBinder((Folder)this);
entry.setOwningBinderKey(getBinderKey().getSortKey());
entry.setHKey(new HKey(getEntryRootKey(), nextEntryNumber++));
}
COM: <s> add entry to this folder </s>
|
funcom_train/10417582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addInstanceListener(String listener) {
synchronized (instanceListeners) {
String results[] =new String[instanceListeners.length + 1];
for (int i = 0; i < instanceListeners.length; i++)
results[i] = instanceListeners[i];
results[instanceListeners.length] = listener;
instanceListeners = results;
}
fireContainerEvent("addInstanceListener", listener);
}
COM: <s> add the classname of an instance listener to be added to each </s>
|
funcom_train/28711582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireModelChange (ModelChangedEvent event) {
Object[] array = modelChangeListeners.getListeners();
for (int nX = 0; nX < array.length; nX++) {
final IModelListener l = (IModelListener) array[nX];
try {
l.modelChanged(event);
}
catch (RuntimeException e) {
e.printStackTrace();
}
}
}
COM: <s> fires the given event against the model changed listeners </s>
|
funcom_train/44222998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getThumbnail(){
Image thumbnail = null;
Image offlineImage = this.getOffScreen();
if(offlineImage == null){
return null;
}
int width = offlineImage.getWidth(this);
int height = offlineImage.getHeight(this);
width *= this.THUMBNAIL_RATIO;
height *= this.THUMBNAIL_RATIO;
thumbnail = offlineImage.getScaledInstance(width, height, Image.SCALE_SMOOTH);
return thumbnail;
}
COM: <s> get the thumbnail of the off screen buffer </s>
|
funcom_train/11727747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testModifyBooleanPropertySession() throws Exception {
testNode.setProperty(propertyName1, true);
superuser.save();
testNode.setProperty(propertyName1, false);
superuser.save();
assertEquals("Modifying property with Node.setProperty(String, boolean) and Session.save() not working",
false,
testNode.getProperty(propertyName1).getBoolean());
}
COM: <s> tests if modifying a property with code node </s>
|
funcom_train/113478 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Remote remoteLookup(String name) throws RMINamingException {
// no caching - only a single Remote here
DemoServerInterface serverStubProxy = (DemoServerInterface)
RMIReplicationManager.getInstance().newInterceptor(demoServerObj, name);
if (name.equals("ReplicateDemoServerObject")) {
return serverStubProxy;
} else {
throw new RMINamingException("Name not found", null);
}
}
COM: <s> get the remote interface via a user specified naming key </s>
|
funcom_train/34539080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Parameter findParameter(String name, boolean caseSensitive) {
for (Iterator it = _parameters.iterator(); it.hasNext(); ) {
Parameter parameter = (Parameter)it.next();
if (caseSensitive) {
if (parameter.getName().equals(name)){
return parameter;
}
} else {
if (parameter.getName().equalsIgnoreCase(name)) {
return parameter;
}
}
}
return null;
}
COM: <s> finds the parameter with the specified name using case insensitive matching </s>
|
funcom_train/4358625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void recycle() {
// Reset the instance variables associated with this Session
attributes.clear();
setAuthType(null);
creationTime = 0L;
expiring = false;
id = null;
lastAccessedTime = 0L;
maxInactiveInterval = -1;
notes.clear();
setPrincipal(null);
isNew = false;
isValid = false;
manager = null;
}
COM: <s> release all object references and initialize instance variables in </s>
|
funcom_train/27705870 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void computeBounds() {
Dimension d = component.getPreferredSize();
getBoundsReference().setRect( 0, 0, d.getWidth(), d.getHeight() );
if( !component.getSize().equals( d ) ) {
component.setBounds( 0, 0, (int)d.getWidth(), (int)d.getHeight() );
}
}
COM: <s> sets the swing components bounds to its preferred bounds </s>
|
funcom_train/2451181 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File copyFileToThisFolder(File src) throws IOException {
FileUtils.copyFileToDirectory(src, path);
File tgt = getFile(src.getName());
if(tgt.exists()) {
return tgt;
}
throw new IOException("Failed to copy the file.");
}
COM: <s> copies a file to this code folder code </s>
|
funcom_train/28548485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasSameContents(IParsedObjectAndList aOther) {
boolean result = aOther != null;
if (result) {
result = matcher.hasSameContent(getAllElements(), //
aOther.getAllElements(), IParsedObject.class);
}
if (!result) {
log.fine("No match between this " //
+ this + "\n and other " + aOther);
}
return result;
}
COM: <s> determines whether a other </s>
|
funcom_train/2388862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getCboxRatio1() {
if (cboxRatio1 == null) {
cboxRatio1 = new JComboBox();
cboxRatio1.setBounds(new Rectangle(19, 42, 177, 26));
InitializeCombobox(cboxRatio1);
cboxRatio1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
validateSelection(cboxRatio1);
}
});
}
return cboxRatio1;
}
COM: <s> this method initializes cbox ratio1 </s>
|
funcom_train/4442534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTextNode(String text, Stack<Node> nodes) {
if ((nodes.size() > 0) && (nodes.lastElement() instanceof Text)) {
Text lastText = (Text) nodes.lastElement();
lastText.setValue(lastText.getValue() + text);
} else {
nodes.add(new Text(text));
}
}
COM: <s> adds a text node </s>
|
funcom_train/37749337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createLoca(int size) {
pad4();
locaOffset = currentPos;
writeULong(locaDirOffset + 4, currentPos);
writeULong(locaDirOffset + 8, size * 4 + 4);
currentPos += size * 4 + 4;
realSize += size * 4 + 4;
}
COM: <s> create an empty loca table without updating checksum </s>
|
funcom_train/25823214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int invertAtomic(int eventindex) {
AtomicAction aa = new AtomicAction();
for (Iterator it = this.getAtomicEvents(eventindex).iterator(); it.hasNext(); ) {
aa.add(new Integer(this.getInverseAction(((Integer)it.next()).intValue())));
}
return this.getItemIndex(aa);
}
COM: <s> invert the atomic action </s>
|
funcom_train/12661519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void help() {
final HelpFormatter formatter = new HelpFormatter();
formatter.printHelp(80,
"ctl-archive -a <create|extract> -f <file> [-p <project> | -d <dir>]",
"options:",
options,
"");
}
COM: <s> writes help message to implementation specific output channel </s>
|
funcom_train/35056674 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SimpleWordQueue ShallowCopy() {
SimpleWordQueue oNew = new SimpleWordQueue();
oNew.m_alngWords = m_alngWords;
oNew.m_iHeadPos = m_iHeadPos;
oNew.m_iTailPos = m_iTailPos;
oNew.m_blnBigEndian = m_blnBigEndian;
return oNew;
}
COM: <s> creates a new queue instance but only copies the head </s>
|
funcom_train/13814787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent actionEvent) {
if ( actionEvent.getSource() == check ) {
check.setUndef( false );
// Add or remove photos from current node depending on checkbox state
if ( check.isSelected() ) {
treePane.addAllToSelectedFolder();
} else {
treePane.removeAllFromSelectedFolder();
}
setupFolder( treePane.getSelectedFolder() );
}
}
COM: <s> called when the check box is clicked </s>
|
funcom_train/44315040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getInteger( String name, int defaultValue ) throws NamedValueParseException {
String parameter = _accessor.getValue( name );
if ( isEmpty( parameter ) ) {
return defaultValue;
}
Integer value = toInteger( parameter.trim() );
if ( value != null ) {
return value.intValue();
}
throw new NamedValueParseException( name );
}
COM: <s> returns the named parameter as a primative integer </s>
|
funcom_train/51079138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JMenu createFontSizeMenu() {
CommandMenu menu = new CommandMenu("Font Size");
menu.setBackground(Color.lightGray);
int sizes[] = { 9, 10, 12, 14, 18, 24, 36, 48, 72 };
for (int i = 0; i < sizes.length; i++) {
menu.add(
new UndoableCommand(
new ChangeAttributeCommand(
Integer.toString(sizes[i]),
"FontSize",
new Integer(sizes[i]),
this
)
)
);
}
return menu;
}
COM: <s> creates the font size menu </s>
|
funcom_train/3274004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processClick(int mouseX, int mouseY) {
if (!captureMenuClick(mouseX, mouseY)) {
switch (UIState) {
case UISTATE_VIEW:
handleShipSelect(mouseX, mouseY, userInterface.isSelectAdditionalKeyDown());
break;
case UISTATE_MOVEMENT:
if (!actionsToExecute) {
handleMovePointSelect();
}
break;
case UISTATE_ATTACK:
if (!actionsToExecute) {
handleAttackSelect(mouseX, mouseY);
}
break;
}
userInterface.refreshMenu();
}
}
COM: <s> process a click inside the view window </s>
|
funcom_train/34342778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getEnviarCobro() {
if (EnviarCobro == null) {//GEN-END:|32-getter|0|32-preInit
// write pre-init user code here
EnviarCobro = new Command("EnviarCobro", Command.OK, 0);//GEN-LINE:|32-getter|1|32-postInit
// write post-init user code here
}//GEN-BEGIN:|32-getter|2|
return EnviarCobro;
}
COM: <s> returns an initiliazed instance of enviar cobro component </s>
|
funcom_train/33064426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean run(IProject project, List<String> option, List<IResource> exportResources) {
if (exportResources != null) {
for (int i = 0; i < exportResources.size(); i++) {
IResource resource = exportResources.get(i);
option.add(resource.getProjectRelativePath().toOSString());
}
}
return run(project, option);
}
COM: <s> launch tt adt </s>
|
funcom_train/7554571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void train() {
//System.out.println("Training...");
nnet.getMonitor().addNeuralNetListener(this);
nnet.getMonitor().setLearning(true);
nnet.getMonitor().setValidation(false);
nnet.go(true);
this.validate();
}
COM: <s> trains the neural network </s>
|
funcom_train/39101640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
ModelFlagContainer c[] = getAllFlags();
StringBuffer ret = new StringBuffer("ModelStatus ");
for (int i = 0; i < c.length; ++i) {
ret.append(c[i].toString() + " ");
}
return ret.toString();
}
COM: <s> returns a string representation which is mainly used for debugging purposes </s>
|
funcom_train/40560426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSelectColumn() throws SQLException {
// add table and field
select.addSelectField("TableA", "id");
// we should get 3 results back from
assertEquals(3, getSize(select));
// check to make sure that's all we're getting back.
ResultSet result = select.execute();
while (result.next()) {
try {
// this should work.
result.getInt(1);
// this shouldn't.
result.getInt(2);
fail("Should only have one result.");
} catch (SQLException e) {
assertTrue(true);
}
}
result.close();
}
COM: <s> test to insure that adding a single select field will return that entire </s>
|
funcom_train/40360988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProperty(String propertyName, List<String> propertyValues) {
if (propertyValues != null && propertyValues.size() > 0) {
List<Value> values = new ArrayList<Value>(propertyValues.size());
for (String val : propertyValues) {
values.add(Value.getStringValue(val));
}
properties.put(propertyName, Collections.unmodifiableList(values));
}
}
COM: <s> sets a multi valued </s>
|
funcom_train/35883106 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Form findFormByNameOrID(String aNameOrID) {
Form theForm = null;
ListIterator<Form> theListIterator = getForms().listIterator();
while (theListIterator.hasNext()) {
Form theNextForm = (Form) theListIterator.next();
if (theNextForm.getName().equals(aNameOrID) || theNextForm.getID().equals(aNameOrID)) {
theForm = theNextForm;
break;
}
}
return theForm;
}
COM: <s> find the form by either the name or id attribute </s>
|
funcom_train/48451425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearAll() {
for( Object node : nodeLayer.getAllNodes() )
if( node instanceof GNode )
((GNode) node).delete();
for( Object node : linkLayer.getAllNodes() )
if( node instanceof GNode )
((GNode) node).delete();
for( Object node : areaLayer.getAllNodes() )
if( node instanceof GNode )
((GNode) node).delete();
GuiManager.getInstance().update();
NameGenerator.reset();
}
COM: <s> clear the canvas deleting everything </s>
|
funcom_train/51572029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addMainClass(List<String> command) {
File jarFile = (File) getProperty(JARFILE);
if (jarFile != null) {
command.add(JAR_SWITCH);
command.add(jarFile.getPath());
} else {
String cls = (String) getProperty(CLASS);
if (cls != null) {
command.add(cls);
}
}
}
COM: <s> add the main class or jarfile to the command line </s>
|
funcom_train/43580820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getUsingWeb() {
if (automated == null) {
automated = new JButton();
automated.setBounds(new Rectangle(80, 51, 156, 35));
automated.setText("Automatic");
automated.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
FeederUIAutomatic feederUI = new FeederUIAutomatic();
feederUI.setVisible(true);
hideMe();
}
});
}
return automated;
}
COM: <s> this method initializes using web </s>
|
funcom_train/27937276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void realize() {
if(!isClosed()) {
throw new IllegalStateException("Cannot realize a hierarchy that is not closed!");
}
HParentLevel rootLevel = getRootLevel();
if(rootLevel.isRealized()) {
throw new IllegalStateException("Cannot realize a hierarchy that is already realized!");
}
rootLevel.realize();
getConfig().processLevelsDebugging();
}
COM: <s> realize the hierarchy </s>
|
funcom_train/4884628 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getOkCommand4 () {
if (okCommand4 == null) {//GEN-END:|403-getter|0|403-preInit
// write pre-init user code here
okCommand4 = new Command ("Excluir", "Excluir Falta", Command.OK, 0);//GEN-LINE:|403-getter|1|403-postInit
// write post-init user code here
}//GEN-BEGIN:|403-getter|2|
return okCommand4;
}
COM: <s> returns an initiliazed instance of ok command4 component </s>
|
funcom_train/28741348 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getSampleInfosForProcedure(Integer procedureId, String status) throws LimsException {
Collection infos;
try {
infos = controller.getSampleInfosForProcedure(procedureId, status);
}
catch (Exception ex) {
LogManager.logMessage("getting objects for procedure..", ex);
throw new LimsException();
}
return infos;
}
COM: <s> this method get sample list for a procedure in its workflow </s>
|
funcom_train/38477651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void exit() {
if (group != null) {
group.threadTerminated(this);
group = null;
}
/* Aggressively null out all reference fields: see bug 4006245 */
target = null;
/* Speed the release of some of these resources */
threadLocals = null;
inheritableThreadLocals = null;
lazyInheritedAccessControlContext = null;
blocker = null;
uncaughtExceptionHandler = null;
}
COM: <s> this method is called by the system to give a thread </s>
|
funcom_train/3815094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
Result result = recognizer.recognize();
if (doEndpointing) {
stopRecording();
}
if (result != null) {
String resultText = result.getBestResultNoFiller();
String tag = getResultTag(resultText);
cardMatchFrame.processResults(resultText, tag);
}
drain();
}
COM: <s> runs this decoding thread </s>
|
funcom_train/26492335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void dumpCategories(int pid, int depth) {
// Get the subcategories
Vector vCats = getAllSubcats(pid);
// Write them!
for (Enumeration eCats = vCats.elements(); eCats.hasMoreElements(); ) {
ObjectCategory current = (ObjectCategory)eCats.nextElement();
outputCategory(current, depth);
}
}
COM: <s> dump the subcats of the given cat </s>
|
funcom_train/11315838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeElementAt(int index) {
checkRange(index);
incrModCount();
boolean oldval = _data[index];
int numtomove = _size - index - 1;
if(numtomove > 0) {
System.arraycopy(_data,index+1,_data,index,numtomove);
}
_size--;
return oldval;
}
COM: <s> removes the element at the specified position in optional operation </s>
|
funcom_train/39212952 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void clearUp() {
VirgoFTP.changeDaemon(-1);
if(VirgoFTP.display.isDisposed() ) {
if(VirgoFTP.daemonCount == 0){
// log.log(Level.INFO,"save JobQueue And exit JVM");
JobTableManager.saveJobQueue();
System.exit(0);
}
}
}
COM: <s> destory the thread </s>
|
funcom_train/42717583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Task startTask(String taskLabel) {
if (process == null) {
throw new RuntimeException("process must be started before tasks");
}
// end the last task, if not ended by an 'end task' call
if (process.hasOpenTask()) {
endTask();
}
// add the next task
Task task = process.addTask(taskLabel);
listener.onTaskStarted(process, task);
return task;
}
COM: <s> called to start a task </s>
|
funcom_train/8376840 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getTrackWidth() {
// This strange calculation is here to keep the
// track in proportion to the thumb.
final double kIdealTrackWidth = 7.0;
final double kIdealThumbHeight = 16.0;
final double kWidthScalar = kIdealTrackWidth / kIdealThumbHeight;
if ( slider.getOrientation() == JSlider.HORIZONTAL ) {
return (int)(kWidthScalar * getThumbSize().height);
}
else {
return (int)(kWidthScalar * getThumbSize().width);
}
}
COM: <s> returns the shorter dimension of the track </s>
|
funcom_train/10926091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertValidXML(String xml, Validator validator) throws IOException, ParserConfigurationException {
try {
Document document = cmisValidator.getDocumentBuilder().parse(new InputSource(new StringReader(xml)));
validator.validate(new DOMSource(document));
} catch (SAXException e) {
fail(cmisValidator.toString(e, xml));
}
}
COM: <s> assert xml is valid according to specified validator </s>
|
funcom_train/20904574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JButton getBnUp() {
if (bnUp == null) {
bnUp = new JButton();
bnUp.setText("");
bnUp.setIcon(ImageHandler.getImageIcon(AppImages.Down));
bnUp.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
getTableListModel().moveUp(getListTables().getSelectedIndex());
}
});
bnUp.setEnabled(false);
}
return bnUp;
}
COM: <s> this method initializes bn down </s>
|
funcom_train/44566145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addListener(IDataManagerListener listener, int module) {
Collection<IDataManagerListener> c = listeners.get(module);
c = c == null ? new ArrayList<IDataManagerListener>() : c;
c.add(listener);
listeners.put(module, c);
//listener.refresh();
}
COM: <s> register a component </s>
|
funcom_train/9374648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int translateStatus(int status) {
switch(status & 0x7) {
case SmsManager.STATUS_ON_ICC_READ:
return 1;
case SmsManager.STATUS_ON_ICC_UNREAD:
return 0;
case SmsManager.STATUS_ON_ICC_SENT:
return 3;
case SmsManager.STATUS_ON_ICC_UNSENT:
return 2;
}
// Default to READ.
return 1;
}
COM: <s> translates ef sms status bits to a status value compatible with </s>
|
funcom_train/45623201 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTargetsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MSBuildType_targets_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MSBuildType_targets_feature", "_UI_MSBuildType_type"),
MSBPackage.eINSTANCE.getMSBuildType_Targets(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the targets feature </s>
|
funcom_train/4009162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNoCommand() {
String command = "wrong args" ;
StringWriter output = new StringWriter() ;
StringWriter error = new StringWriter() ;
Console console = createConsole(command,output,error) ;
console.start() ;
assertEquals("",output.toString()) ;
assertEquals("no such command: wrong\n",error.toString()) ;
}
COM: <s> test an unknown command </s>
|
funcom_train/40925847 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getGpsVolverCommand() {
if (gpsVolverCommand == null) {//GEN-END:|44-getter|0|44-preInit
// write pre-init user code here
gpsVolverCommand = new Command("Volver", Command.OK, 0);//GEN-LINE:|44-getter|1|44-postInit
// write post-init user code here
}//GEN-BEGIN:|44-getter|2|
return gpsVolverCommand;
}
COM: <s> returns an initiliazed instance of gps volver command component </s>
|
funcom_train/2538230 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void calcFaceNormal(ArrayList<VertexData> vertexList){
//We DONT NORMALIZE YET!
this.normal = ToolsGeometry.getNormal(vertexList.get(p0).getVertex(), vertexList.get(p1).getVertex(), vertexList.get(p2).getVertex(), false);
this.normalNormalized = normal.getCopy();
this.normalNormalized.normalizeLocal();
}
COM: <s> calculates this faces face normal </s>
|
funcom_train/37610750 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectBuffer(Buffer buffer) {
final Buffer oldBuffer = getSelectedBuffer();
if (buffer == null || !buffer.equals(oldBuffer)) {
synchronized (this) {
m_selectedBuffer = buffer;
}
if (oldBuffer != null) {
fireBufferStateChanged(oldBuffer);
}
if (buffer != null) {
fireBufferStateChanged(buffer);
}
}
}
COM: <s> select a buffer </s>
|
funcom_train/22116512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWritingEmptyBufferToStream() throws Exception {
RemoteInputStream is = _streamService.getRemoteStream();
try {
_streamService.writeBufferToRemoteStream(is.getStreamId(), new byte[0]);
fail("Expected IllegalArgumentException");
} catch (IllegalArgumentException e) {
// expected outcome
}
}
COM: <s> expected a illegal argument exception </s>
|
funcom_train/18740003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result getInverse() {
Result result = new Result();
for (Map.Entry<TypeNode,Set<TypeNode>> entry : this.map.entrySet()) {
TypeNode left = entry.getKey();
for (TypeNode right : entry.getValue()) {
result.add(right, left);
}
}
result.addErrors(getErrors());
return result;
}
COM: <s> returns the inverse of this relation </s>
|
funcom_train/31560624 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private byte getByte() throws IOException {
if (offset >= framesize) {
if (index + 1 >= frames.length && frames[index].getForward() != 0) {
addFrame();
}
offset = frames[++index].getDataOffset();
}
return frames[index].getByte(offset++);
}
COM: <s> retrieves the next byte </s>
|
funcom_train/28892284 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateAssociationFields() {
nameLabel.setText(association.getName());
streetLabel.setText(association.getAdd1());
street2Label.setText(association.getAdd2());
street3Label.setText(association.getAdd3());
zipLabel.setText(association.getZip());
cityLabel.setText(association.getCity());
}
COM: <s> update the displayed association fields </s>
|
funcom_train/45121665 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addBasePackagePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_RootPanel_basePackage_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_RootPanel_basePackage_feature", "_UI_RootPanel_type"),
DictionaryPackage.Literals.ROOT_PANEL__BASE_PACKAGE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the base package feature </s>
|
funcom_train/13629659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Texture loadTexture(GL gl, String path) throws IOException {
Texture texture = (Texture) textureCache.get(path);
if (texture != null) return texture;
BufferedImage bufferedImage = loadImage(path);
texture = loadTexture(gl,
bufferedImage,
gl.GL_TEXTURE_2D, // target
gl.GL_RGBA, // dst pixel format
gl.GL_LINEAR, // min filter (not used)
gl.GL_LINEAR);
textureCache.put(path, texture);
return texture;
}
COM: <s> load a texture from the filesystem </s>
|
funcom_train/5436843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentSelectRectEnd(java.awt.Point end) {
if (_state != STATE_SELECT)
return;
if (end != null && end.equals(_currentSelectRectEnd))
return;
_currentSelectRectEnd = end;
if (System.currentTimeMillis() - _currentSelectRectTime > 100)
fireSelectRectChanged();
_currentSelectRectTime = System.currentTimeMillis();
}
COM: <s> sets the current select rect end </s>
|
funcom_train/36781890 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setToLanguage(String o) {
Object[] array = new Object[1];
HashMap<String, Object> myHashMap = new HashMap<String, Object>();
myHashMap.put("value", o);
array[0] = myHashMap;
put(LANGTO, array);
}
COM: <s> set the note target language </s>
|
funcom_train/37839494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void killSpider(String name) {
final Creature creature = new Creature();
creature.put("class", "");
creature.put("subclass", "");
creature.setName(name);
creature.setHP(1);
creature.setAtkXP(1);
creature.setDefXP(1);
final Creature spider = new Creature(creature);
spider.registerObjectsForNotification(observer);
player.teleport(basement, 5, 5, null, player);
StendhalRPAction.placeat(basement, spider, 51, 50);
spider.onDead(player, true);
}
COM: <s> function for emulating killing of creature by player </s>
|
funcom_train/43245005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetStateAbbr() {
System.out.println("getStateAbbr");
StateObject instance = new StateObject();
String expResult = "";
String result = instance.getStateAbbr();
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 state abbr method of class org </s>
|
funcom_train/18133081 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dragGestureRecognized(DragGestureEvent dge) {
TreePath path = roleTree.getSelectionPath();
if (path == null) {
return;
}
DefaultMutableTreeNode node = (DefaultMutableTreeNode) path
.getLastPathComponent();
Object userObject = node.getUserObject();
if (userObject == null || !(userObject instanceof Role)) {
return;
}
Role role = (Role) userObject;
Transferable transferable = new RoleTransferable(role);
dragSource.startDrag(dge, DragSource.DefaultCopyDrop, transferable,
this);
}
COM: <s> method for starting the drag gesture </s>
|
funcom_train/34895889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteOldResults() {
/*File analysisDir = new File(getAnalysisDirWebServer());
if (!analysisDir.exists())
return true;
log.debug("Deleting old analysis directory: "+analysisDir.getAbsolutePath());
if (!FileUtils.deleteDirectory(analysisDir)) {
log.error("Old analysis directory "+analysisDir.getAbsolutePath()+" could not be deleted!");
return false;
}*/
return true;
}
COM: <s> this will delete the analysis directory in the project </s>
|
funcom_train/26222204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String info = "MarketPlace on \"" + getHomeId() + "\"";
// Add list of registered serviteurs.
final boolean EXTENDED = true;
if (EXTENDED && !serviteurList.isEmpty()) {
info += " " + serviteurList.toString();
}
// Return basic or extended string.
return info;
}
COM: <s> returns the marketplaces name </s>
|
funcom_train/13244863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Tab addNewTab() {
String[] info = SynUtil.getTabInfo("Name the new tab", false);
if (info[0] == null || info[1] == null) {
return null;
}
return addNewTab(info[0], info[1]);
}
COM: <s> adds new tabs and prompts the user for all information </s>
|
funcom_train/12188865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSpacesOnBothSides() throws ExpressionException {
final Function function = new NormalizeSpaceFunction();
Value result = function.invoke(expressionContextMock,
new Value[]{factory.createStringValue(" abc ")});
assertTrue(result instanceof StringValue);
assertEquals("abc", ((StringValue) result).asJavaString());
}
COM: <s> tests if function works correctly for strings with spaces </s>
|
funcom_train/32060293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public float getSpecificFloatValueForGood(Good agood, int subvalueindex) {
float fvalue = 0f;
GoodValue goodval = null;
if (isGoodProduced(agood)) {
goodval = getGoodValueForProducedGood(agood);
} else if (isGoodNeeded(agood)) {
goodval = getGoodValueForProducedGood(agood);
}
if (goodval != null) {
fvalue = goodval.getSubvalueByIndexAsFloat(subvalueindex);
}
return fvalue;
}
COM: <s> returns the float value of the specified subvalue of the specified </s>
|
funcom_train/49937726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
GridLayout gridLayout1 = new GridLayout();
gridLayout1.setRows(2);
gridLayout1.setColumns(1);
jContentPane = new JPanel();
jContentPane.setLayout(gridLayout1);
jContentPane.add(getTablaPanel(), null);
jContentPane.add(getSeleccionarPanel(), null);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/3651945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator entryNames() throws IOException {
flush();
final Enumeration entries = zipFile.entries();
return new Iterator() {
public boolean hasNext() {
return entries.hasMoreElements();
}
public Object next() {
ZipEntry ze = (ZipEntry)entries.nextElement();
return ze.getName();
}
public void remove() { }
};
}
COM: <s> gets the names of all entries in the zip file </s>
|
funcom_train/10587995 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHsql() throws Exception {
DataSource ds = (DataSource) this.factory.getBean(DATA_SOURCE);
Connection connection = ds.getConnection();
Statement stmt = connection.createStatement();
ResultSet result = stmt.executeQuery(SELECT_FROM_USER);
assertEquals(1, result.getFetchSize());
}
COM: <s> place a simple hsqldb query to ensure db is up </s>
|
funcom_train/18053249 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setBounds(new Rectangle(15, 65, 768, 210));
jScrollPane.setEnabled(false);
jScrollPane.setFont(new Font("Tahoma", Font.BOLD, 12));
jScrollPane.setVisible(false);
}
return jScrollPane;
}
COM: <s> this method initializes j scroll pane </s>
|
funcom_train/32144734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void perform(Document doc, JXPathContext context) {
Node existNode = XMLUtilities.getNode(doc, path);
if (existNode != null && existNode.getParentNode() != null) {
Node parent = existNode.getParentNode();
parent.removeChild(existNode);
}
}
COM: <s> perform the xml change action </s>
|
funcom_train/13314709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void visit(NadicRelationIntersect n, A argu) {
n.nodeToken.accept(this, argu);
n.nodeOptional.accept(this, argu);
n.nodeToken1.accept(this, argu);
n.relationExpCommalist.accept(this, argu);
n.nodeToken2.accept(this, argu);
}
COM: <s> node token intersect </s>
|
funcom_train/22346903 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT:
public int getLocalUsed () {
int i, j = 0;
// loop thru the details counting used entries, (status = 1)
for (i = 0; i < nbr_details; i++) {
// When in use
if (details[i].getStatus() == 1) {
// incre count
j++;
} // endif
} // end-for
// return number used
return j;
} // end-method
COM: <s> count the number of details in use in one list </s>
|
funcom_train/23645197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void set(Atom atom) {
set(atom.getResidue());
site_id = atom.getRefDatabaseId();
site_code = atom.getElement();
geometry = atom.getCoordination();
AbstractResidue res = atom.getResidue();
substructure = res instanceof MacmolResidue ? Character.toString(((MacmolResidue)res).getAtomSubstructureCode(atom)) : null;
}
COM: <s> initialise the instance with values from pdb atom </s>
|
funcom_train/3362727 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFocusLostBehavior(int behavior) {
if (behavior != COMMIT && behavior != COMMIT_OR_REVERT &&
behavior != PERSIST && behavior != REVERT) {
throw new IllegalArgumentException("setFocusLostBehavior must be one of: JFormattedTextField.COMMIT, JFormattedTextField.COMMIT_OR_REVERT, JFormattedTextField.PERSIST or JFormattedTextField.REVERT");
}
focusLostBehavior = behavior;
}
COM: <s> sets the behavior when focus is lost </s>
|
funcom_train/39365005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Throwable getNextFailure() {
if (!finished || success)
return null;
if (status == null)
return null;
for (int i = 0; i < size; i++) {
if (status[i].failureCause != null) {
Throwable t = status[i].failureCause;
status[i].failureCause = null;
return t;
}
}
return null;
}
COM: <s> return the next failure cause throwable for a completed set of tasks </s>
|
funcom_train/9352303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPaintLabels(final boolean paintLabels) {
final boolean change = this.m_paintLabels != paintLabels;
this.m_paintLabels = paintLabels;
if (change) {
this.firePropertyChange(Chart2D.PROPERTY_PAINTLABELS, new Boolean(!paintLabels), new Boolean(
paintLabels));
this.setRequestedRepaint(true);
}
}
COM: <s> decide wether labels for each chart are painted below it </s>
|
funcom_train/43902843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object visit(PropertyIsNull filter, Object extraData) throws RuntimeException {
LOGGER.finer("exporting NullFilter");
Expression expr = filter.getExpression();
try {
expr.accept(this, extraData);
out.write(" IS NULL ");
} catch (java.io.IOException ioe) {
throw new RuntimeException(IO_ERROR, ioe);
}
return extraData;
}
COM: <s> writes the sql for the null filter </s>
|
funcom_train/6269659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
while (running) {
if (nextRegister <= 0) {
register();
synchronized (this) {
while (nextRegister <= 0 && running) {
try {
wait();
}
catch (InterruptedException ie) {
}
}
}
}
try {
Thread.sleep(1000);
}
catch (InterruptedException ie) {
}
nextRegister -= 1;
/*
if (sc.stunIsInUse() && (nextRegister % 5 == 0)) {
sendNatHolePacket();
}
*/
}
}
COM: <s> runs the thread </s>
|
funcom_train/34595381 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean hasEffects(BattleField field) {
Pokemon[] pokemon = field.getActivePokemon();
for (int i = 0; i < pokemon.length; ++i) {
Pokemon p = pokemon[i];
if (p.hasAbility("Air Lock") || p.hasAbility("Cloud Nine"))
return false;
}
return true;
}
COM: <s> whether the weather should have effects </s>
|
funcom_train/42626010 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean goOn(File currentFile) {
if (currentFile.getName().equals("slide_1.pdf")) {
sendMessage(NetworkMessages.INITSENDFILE, "slide_1.pdf",
currentFile.length());
return true;
} else if (!currentFile.exists()) {
sendMessage(NetworkMessages.SFFINISH, null);
return false;
} else {
sendMessage(NetworkMessages.SENDFILE, currentFile.getName(),
currentFile.length());
return true;
}
}
COM: <s> checks which slide is sended </s>
|
funcom_train/11947529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addFilesFromPath(Set<File> files, File path, boolean recursive) {
for (File f : path.listFiles(filter)) {
if (!f.isDirectory()) {
files.add(f);
}
}
if (recursive) {
for (File d : path.listFiles((FileFilter)DirectoryFileFilter.INSTANCE)) {
addFilesFromPath(files, d, recursive);
}
}
}
COM: <s> add the files from the path to the given collection </s>
|
funcom_train/12758386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void safelyAddEventValidatorToList(EventValidator eventValidator) {
boolean found = false;
for (Iterator iter = eventValidatorTableModel.getRowData().iterator(); iter
.hasNext();) {
EventValidatorRow row = (EventValidatorRow) iter.next();
if (row.getValidator() == eventValidator) {
found = true;
}
}
if (!found) {
eventValidatorTableModel.addRowData(new EventValidatorRow(
eventValidator));
}
}
COM: <s> add an event validator to the list of validators </s>
|
funcom_train/11754561 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecuteWithCustomExitValue2() throws Exception {
CommandLine cl = new CommandLine(errorTestScript);
exec.setExitValue(SUCCESS_STATUS);
try{
exec.execute(cl);
fail("Must throw ExecuteException");
} catch(ExecuteException e) {
assertTrue(exec.isFailure(e.getExitValue()));
return;
}
}
COM: <s> invoke the error script but define that success status is a bad </s>
|
funcom_train/10912310 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addUnresolvedIDRef(String idref, Resolvable res) {
Set<Resolvable> todo = unresolvedIDRefs.get(idref);
if (todo == null) {
todo = new java.util.HashSet<Resolvable>();
unresolvedIDRefs.put(idref, todo);
}
// add Resolvable object to this HashSet
todo.add(res);
}
COM: <s> add an resolvable object with an unresolved idref </s>
|
funcom_train/48527638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writePrimitive(boolean b, String field) throws IOException {
writer.start("primitive");
if (field != null)
writer.attribute("field", field);
writer.attribute("type", "boolean");
writer.attribute("value", b);
writer.end("primitive");
}
COM: <s> method which writes a boolean to the stream as the given field name </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.