__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/49427072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean openPopup() {
GUI gui = owner.getGUI();
if(gui != null) {
// a popup can't be invisible or disabled when it should open
super.setVisible(true);
super.setEnabled(true);
// owner's hasOpenPopups flag is handled by GUI
gui.openPopup(this);
requestKeyboardFocus();
focusFirstChild();
return true;
}
return false;
}
COM: <s> opens the popup window with its current size and position </s>
|
funcom_train/44315028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer getInteger( String name, Integer defaultValue ) throws NamedValueParseException {
String parameter = _accessor.getValue( name );
if ( isEmpty( parameter ) ) {
return defaultValue;
}
Integer value = toInteger( parameter.trim() );
if ( value != null ) {
return value;
}
throw new NamedValueParseException( name );
}
COM: <s> returns the named parameter as a integer </s>
|
funcom_train/3388117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() throws AccessException {
RegistryImpl.checkAccess("ActivationSystem.shutdown");
Object lock = startupLock;
if (lock != null) {
synchronized (lock) {
// nothing
}
}
synchronized (Activation.this) {
if (!shuttingDown) {
shuttingDown = true;
(new Shutdown()).start();
}
}
}
COM: <s> shutdown the activation system </s>
|
funcom_train/26645223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MetaDataBean getForPath(String subpath) {
if (subpath == null || subpath.length() == 0)
return this;
int nextDot = subpath.indexOf('.');
if (nextDot < 0)
return getChild(subpath);
MetaDataBean child = getChild(subpath.substring(0, nextDot));
if (child == null)
return null;
return child.getForPath(subpath.substring(nextDot + 1));
}
COM: <s> gets a path containing value </s>
|
funcom_train/33652263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int searchBranch(String br) {
for (int i = 0; i < lineNum; i++) {
String instruction = lineArray[i];
StringTokenizer insTokenizer = new StringTokenizer(instruction);
String first = insTokenizer.nextToken();
if (first.endsWith(":")) {
String bra = first.substring(0, first.length() - 1);
if (bra.equals(br)) {
branchTable.put(bra, i);
return i;
}
}
}
return -1;
}
COM: <s> try to find a branch by name in the instruction array </s>
|
funcom_train/50268370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e)
{ /*JButton eB = (JButton)e.getSource();
for(int i=0;i<bands; i++)
{ if(eB==(JButton)buttonVector.get(i))
graph.plot((int[])valuesVector.get(i));
}*/
}
COM: <s> displays the graph that corresponds tothe button clicked </s>
|
funcom_train/20514462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Paciente entity) {
LogUtil.log("deleting Paciente instance", Level.INFO, null);
try {
entity = entityManager.getReference(Paciente.class, entity.getId());
entityManager.remove(entity);
LogUtil.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
LogUtil.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent paciente entity </s>
|
funcom_train/1956692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCmdCharPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_BlinkMCmd_cmdChar_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BlinkMCmd_cmdChar_feature", "_UI_BlinkMCmd_type"),
CommandsPackage.Literals.BLINK_MCMD__CMD_CHAR,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the cmd char feature </s>
|
funcom_train/13717099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double compute_spatial_locality(long cachesize) {
double usedBytes=0, fetchedBytes=0;
for(int i=0; i<64; i++)
if (rdis[i] != null) {
usedBytes += rdis[i].getUsedBytes(cachesize);
fetchedBytes += rdis[i].getFetchedBytes(cachesize);
}
return usedBytes/fetchedBytes;
}
COM: <s> computes the ratio between actually used bytes and fetched bytes for a </s>
|
funcom_train/42896918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteTrigger(String triggerName, String autoScalingGroupName) throws AutoScalingException {
Map<String, String> params = new HashMap<String, String>();
params.put("TriggerName", triggerName);
params.put("AutoScalingGroupName", autoScalingGroupName);
HttpGet method = new HttpGet();
// DeleteTriggerResponse response =
makeRequestInt(method, "DeleteTrigger", params, DeleteTriggerResponse.class);
}
COM: <s> deletes a trigger </s>
|
funcom_train/39179635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initLocalData(){
//init local vars
lock = new Object();
data = Collections.synchronizedList(new ArrayList());
//dataAsAS = new gate.annotation.AnnotationSetImpl(document);
ranges = new ArrayList();
typeDataMap = new HashMap();
eventHandler = new EventsHandler();
}//protected void initLocalData()
COM: <s> initialises the local variables to their default values </s>
|
funcom_train/4303721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMaxTablesInSelect() throws SQLException {
// - soft limit is >>> than will ever be seen in any real stmnt
// - exists a fixed (non statement dependent) hard limit? No.
// - depends totally on number of table idents that can fit in
// Integer.MAX_VALUE characters, minus the rest of the stmnt
return 0;
}
COM: <s> retrieves the maximum number of tables this database allows in a </s>
|
funcom_train/43244900 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRemoveLock() {
System.out.println("removeLock");
String key = "";
Session instance = new Session();
instance.removeLock(key);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of remove lock method of class org </s>
|
funcom_train/14324630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public OpProjectNode getProjectById(long id) {
OpBroker broker = session.newBroker();
try {
OpProjectNode project = (OpProjectNode) broker.getObject(OpProjectNode.class, id);
OpTestDataFactory.initializeLazyRelationships(project);
return project;
}
finally {
broker.close();
}
}
COM: <s> get a project by id </s>
|
funcom_train/7786626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
// Check login status using login service.
LoginServiceAsync loginService = GWT.create(LoginService.class);
loginService.login(GWT.getHostPageBaseURL(),
new AsyncCallback<LoginInfo>() {
public void onFailure(Throwable error) {
}
public void onSuccess(LoginInfo result) {
loginInfo = result;
loginLabel.setText("Signed in as "
+ loginInfo.getNickname());
if (loginInfo.isLoggedIn()) {
loadPackTracker();
} else {
loadLogin();
}
}
});
}
COM: <s> entry point method </s>
|
funcom_train/44708301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void revokePermission(PermissionDescriptor permission) {
OID partyOID = permission.getPartyOID();
if (partyOID != null) {
try {
Permission p = new Permission(createPermissionOID(permission));
p.delete();
} catch (DataObjectNotFoundException e) {
// Do nothing. This means the record was already deleted.
}
}
}
COM: <s> revokes the permission that is </s>
|
funcom_train/28297627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean messageServerAccepted(ArrayList al) {
al.clear();
String msg=getNextMessage(TransSibNetMessage.netCmdTypeCtrl,
TransSibNetMessage.netCmdParamSrAcc);
if (msg!=null) {
al.add(new Integer(TransBaseTools.toInt(getMessagePart(2,msg))));
return true;
}
return false;
}
COM: <s> returns true if a message that says the server accepted was received </s>
|
funcom_train/25850983 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(String address, int port) throws IOException {
//System.out.println("Connecting...");
if (debug > 0) {
System.out.println("Telnet.connect(" + address + "," + port + ")");
}
socket = new Socket(address, port);
is = new BufferedInputStream(socket.getInputStream());
os = new BufferedOutputStream(socket.getOutputStream());
neg_state = 0;
isconn = 1;
receivedDX = new byte[256];
sentDX = new byte[256];
receivedWX = new byte[256];
sentWX = new byte[256];
}
COM: <s> connect to the remote host at the specified port </s>
|
funcom_train/43795997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void assertIsLoggedInManager(int sessionId){
UserType loggedInUserType = _userHandler
.getCurrentlyLoggedInUserType(_userHandler
.matchUsernameToSessionId(sessionId));
if (loggedInUserType == null){
// The requesting user is not logged in
throw new UnauthorizedAccessException(
"Unauthorized Manager Operation Access Exception");
}
if (loggedInUserType.compareTo(UserType.MANAGER) != 0){
throw new UnauthorizedAccessException(
"Unauthorized Manager Operation Access Exception");
}
}
COM: <s> checks whether the given session id belongs to a currently logged in manager </s>
|
funcom_train/9818569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String str = "PortBlock # " + instance_no + " has Ports:";
for (int i=0; i<portinfo_array.length; i++)
str += "\n " + portinfo_array[i];
str += "\nCellname: " + cellname;
str += "\nGenerics: " + bindings;
return str;
}
COM: <s> useful for debugging </s>
|
funcom_train/39398382 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeOldFiles() {
Iterator<Hash> iter = fileIdToPeerMap.keySet().iterator();
while (iter.hasNext()) {
Hash fileId = (Hash)iter.next();
Map<InetSocketAddressInfo,Peer> peerMap = (Map)fileIdToPeerMap.get(fileId);
if (peerMap.size() == 0) {
iter.remove();
}
}
}
COM: <s> removes all files that are not shared by any peers </s>
|
funcom_train/40504925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeSensorType(SensorConfig sensorConfig) {
if (sensorTypes.remove(sensorConfig.getId()) != null) {
for (SquareConfig square : squareTypes.values()) {
square.removeSensorType(sensorConfig);
}
pcs.firePropertyChange("sensorTypes", null, null);
}
}
COM: <s> removes the given sensor type from this game </s>
|
funcom_train/40386176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initializeKerberos() {
//Read Krb ticket and instantiate
setKrbCredentials(new Krb5Credentials(krbconfig, krbini, krbconfig));
spnegoAuth = new GssSpNegoAuth(credentials);
spnegoAuth.createServerCreds();
serverSubject = spnegoAuth.getSubject();
serverCreds = spnegoAuth.getServerCreds();
// Debug
if (logger.isDebugEnabled()) {
logger.debug("AuthenticationKerb initialize");
}
}
COM: <s> initializes kerberos server configuration </s>
|
funcom_train/8421162 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadConsumers() {
for (String consumerClass : testbedService.getConfig().getConsumers()) {
MessageConsumer consumer;
try {
consumer = (MessageConsumer) Class.forName(consumerClass)
.newInstance();
} catch (Exception e) {
log.error(e.getMessage() + ":");
for (StackTraceElement ste : e.getStackTrace())
log.error(ste);
continue;
}
receiver.registerMessageConsumer(consumer);
}
}
COM: <s> loads and registers serial message consumers from the configuration file </s>
|
funcom_train/22310016 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addImageToSideBar(PlanarImage image, String path) {
PlanarImage thumb = nailsMaker.makeThumbNail(image, getCorrectScale(image));
addToPanel(thumb, path);
workspace2d.refresh();
if (!paths.contains(path)) {
paths.add(path);
HistoryFileManager.saveHistoryFile(getFullFilePath(FILE_PATH), paths);
}
}
COM: <s> adds a image to side bar </s>
|
funcom_train/25924173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDistanceText() {
if(getWalkingRoute() == null){
return airDistance + "m";
}
String unit = getWalkingRoute().getUnit();
if(unit.equalsIgnoreCase("m") || unit.equalsIgnoreCase("ft")){
return Math.round(walkingRoute.getDistance()) + unit;
}else{
return getWalkingRoute().getDistance() + unit;
}
}
COM: <s> returns string representing the distance </s>
|
funcom_train/18882976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getI4(int id) {
Property p = (Property) properties.get(new Integer(id));
try {
int offset = p.getOffset();
stream.seek(offset);
return stream.readIntLE();
}
catch (IOException e) {
e.printStackTrace();
}
return -1;
}
COM: <s> gets the i4 attribute of the property set object </s>
|
funcom_train/49331377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getNextSimulationName() {
// Generate unique name for the simulation
int maxValue = 0;
for (Simulation s : simulations) {
String name = s.getName();
if (name.startsWith(SIMULATION_NAME_PREFIX)) {
try {
maxValue = Math.max(maxValue,
Integer.parseInt(name.substring(SIMULATION_NAME_PREFIX.length())));
} catch (NumberFormatException ignore) {
}
}
}
return SIMULATION_NAME_PREFIX + (maxValue + 1);
}
COM: <s> return a unique name suitable for the next simulation </s>
|
funcom_train/4232481 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JToolTip createToolTip() {
JToolTip toolTip = super.createToolTip();
toolTip.setBackground(Color.decode("#FFFFFC"));
toolTip.setBorder(BorderFactory.createCompoundBorder(
BorderFactory.createEtchedBorder(),
BorderFactory.createEmptyBorder(5,5,5,5)));
return toolTip;
}
COM: <s> creates the tooltip for the component </s>
|
funcom_train/14207705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNoAuthNoSessionForLoginPage() throws Exception {
WebRequest request = new GetMethodWebRequest(baseUrl + "/loginForm.jsp");
session.getResponse(request);
// Check that there is no session ID
String sessionId = session.getCookieValue("JSESSIONID");
assertNull("Got session for non-authenticated login page", sessionId);
}
COM: <s> test for session cookie on direct access of login page </s>
|
funcom_train/37048940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int activate(int targetSkill) {
if (targetSkill == HyperGame.MAX_SKILL) {
targetSkill = 1;
} else {
targetSkill++;
}
int retVal = targetSkill;
// no activation through complementary skills here
if (!skillCount.containsKey(new Integer(targetSkill))) {
retVal = -1;
}
return retVal;
}
COM: <s> returns the the int value of the activated skill i </s>
|
funcom_train/28345388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAllNodes() {
// Clean parent data of each node
Iterator<AcceleratorNode> iter = m_arrNodes.iterator();
AcceleratorNode node = null;
while (iter.hasNext()) {
node = iter.next();
node.setParent( null );
node.setAccelerator( null );
}
// Clean collection of nodes
m_arrNodes.clear();
_sequences.clear();
nodeTable.clear();
}
COM: <s> remove all nodes from the this sequence </s>
|
funcom_train/45538928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
final boolean isChecked= isChecked();
PreferenceConstants.getPreferenceStore().setValue(PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE, isChecked);
if (isChecked && fEditor != null)
fEditor.synchronizeOutlinePage(fEditor.computeHighlightRangeSourceReference(), false);
fOpenAndLinkWithEditorHelper.setLinkWithEditor(isChecked);
}
COM: <s> runs the action </s>
|
funcom_train/12332901 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isValidMetaDataPrefix(String metadataPrefix) {
boolean isValid = false;
if (metadataPrefix != null) {
for (String prefix : metadataFormats) {
if (metadataPrefix.equals(prefix)) {
isValid = true;
break;
}
}
}
if (!isValid) {
addError(new OAIError(metadataPrefix + " not supported",
OAIError.CANNOT_DISEMINATE_FORMAT_ERROR));
}
return isValid;
} //- isValidMetaDataPrefix
COM: <s> validate if the repository provides metadata in the given format </s>
|
funcom_train/25423503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(String name, String value) {
try {
openForWriting();
// delete documents matching term
writer.deleteDocuments(new Term(name, value));
return true;
} catch (Exception ex) {
LOGGER.log(Level.WARNING, "Error removing value from the collector.", ex);
return false;
}
}
COM: <s> removes string from the collection </s>
|
funcom_train/1501149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if (getNombre() == null || getNombre().length() < 1) {
errors.add("nombre", new ActionMessage("error.nombre.required"));
// TODO: add 'error.name.required' key to your resources
}
return errors;
}
COM: <s> this is the action called from the struts framework </s>
|
funcom_train/40686365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addMapZoomEndHandler(final MapZoomEndHandler handler) {
maybeInitMapZoomEndHandlers();
mapZoomEndHandlers.addHandler(handler, new IntIntCallback() {
@Override
public void callback(int oldZoomLevel, int newZoomLevel) {
MapZoomEndEvent e = new MapZoomEndEvent(MapWidget.this, oldZoomLevel,
newZoomLevel);
handler.onZoomEnd(e);
}
});
}
COM: <s> this event is fired when the map reaches a new zoom level </s>
|
funcom_train/18377489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isEnabled() {
ProjectPalette[] palettes = getProjectPalettes();
for (int i = 0; i < palettes.length; i++) {
ProjectPalette projectPalette = palettes[i];
if (projectPalette.isEnabled()) {
IComponentPeerFactory[] factories = projectPalette.getWidgetFactories();
if (factories == null)
continue;
if (factories.length > 0)
return true;
}
}
return false;
}
COM: <s> method is enabled </s>
|
funcom_train/34016965 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() {
super.init();
addComponentInstantiationListener(new SpringComponentInjector(this));
mountBookmarkablePage("BetFairConsole", BetFairConsolePage.class);
mountBookmarkablePage("VirtualConsole", VirtualConsolePage.class);
mountBookmarkablePage("MarketDetails", MarketDetailsPage.class);
mountBookmarkablePage("HistRunnerPricesChart", HistRunnerPricesChartPage.class);
mountBookmarkablePage("Test", TestPage.class);
}
COM: <s> wicket init method </s>
|
funcom_train/8097174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAnd() {
m_Filter = getFilter("(ATT1 is 'r') and (ATT2 <= 5)");
Instances result = useFilter();
assertEquals(m_Instances.numAttributes(), result.numAttributes());
assertEquals(6, result.numInstances());
}
COM: <s> tests the att1 shortcut with is and restricting it via and </s>
|
funcom_train/13865917 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void submit() {
// Fire the onSubmit event, because javascript's form.submit() does not
// fire the built-in onsubmit event.
if (formHandlers != null) {
if (formHandlers.fireOnSubmit(this)) {
return;
}
}
impl.submit(getElement(), synthesizedFrame);
}
COM: <s> submits the form </s>
|
funcom_train/42364193 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getOpenMenuItem() {
if (OpenMenuItem == null) {
OpenMenuItem = new JMenuItem();
OpenMenuItem.setText("Open Map File");
OpenMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
OpenMapFile();
SystemMenu.setEnabled(true);
Canvas.setBackground(Color.LIGHT_GRAY);
Canvas.repaint(); //repaints the map after it has been opened
}
});
}
return OpenMenuItem;
}
COM: <s> creates open map file item into file menu </s>
|
funcom_train/39531816 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private AlphabeticText buildLatinText(String latinText) {
char code = latinText.charAt(1);
if (code == 'O')
return null;
// 'L' is not yet understood by JSesh... and it gives an error...
if (code == 'L') code= 'l';
String text = latinText.substring(2);
AlphabeticText alphabeticText = new AlphabeticText(code, text);
return alphabeticText;
}
COM: <s> build a latin text or null </s>
|
funcom_train/19416884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEqualsWithDifferentLocalNames() throws Exception {
final AttributeImpl attribute1 = new AttributeImpl("x1",
"y",
"3",
this.annotation);
final AttributeImpl attribute2 = new AttributeImpl("w",
"y",
"3",
this.annotation);
assertFalse(attribute1.equals(attribute2));
}
COM: <s> test with equal with different local name </s>
|
funcom_train/44452285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addParameter(ActionEvent event) {
ParameterBean param = new ParameterBean();
param.setName(getUniqueParamName());
addParameter(param);
Util.getChangeLogger().logChange(new Change(Change.ChangeType.PARAMETER_ADD, null, param, Util.getCurrentRule(), this));
}
COM: <s> action listener method for adding parameters for this call </s>
|
funcom_train/50689387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void write(String str) throws IOException {
if (doc == null) {
throw new IOException("Writer was closed");
}
try {
doc.insertString(doc.getLength(), str, a);
} catch (BadLocationException ble) {
throw new IOException(ble.getMessage());
}
}
COM: <s> write a string </s>
|
funcom_train/29682804 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createLookupMaps() {
for (CustomEnumerationDefinition cust : customEnumerations) {
utility.addCustomEnumeration(cust.getName());
}
for (CustomChoiceDefinition cust : customChoices) {
utility.addCustomChoice(cust.getName());
}
for (CustomMessageDefinition cust : customMessages) {
utility.addCustomMessage(cust.getName());
}
for (CustomParameterDefinition cust : customParams) {
utility.addCustomParameter(cust.getName());
}
}
COM: <s> create maps to look up if a enumeration or choice is a custom </s>
|
funcom_train/22321595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void initialise() {
super.initialise();
if(fixingHolidayCalendar!=null && getPaymentCalendar()!=null && fixingAdjustmentType!=null) {
if(fixingAdjustmentType==FixingAdjustmentType.BUSINESS_DAYS) {
fixingCalendar = fixingHolidayCalendar.advanceBusinessDays(getPaymentCalendar(),fixingCalendarOffsetDays);
} else {
fixingCalendar = fixingHolidayCalendar.advance(getPaymentCalendar(),fixingCalendarOffsetDays,Calendar.DAY_OF_MONTH,BusinessDayConvention.UNADJUSTED);
}
}
}
COM: <s> initialises this period setting if possible the fixing date </s>
|
funcom_train/1056425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected T getObjectByParam(String propertyName, Object propertyValue) {
DetachedCriteria criteria = DetachedCriteria.forClass(getPersistentClass()).add(Property.forName(propertyName).eq(propertyValue));
List<T> results = getHibernateTemplate().findByCriteria(criteria);
if (results == null || results.isEmpty())
return null;
if (results.size() > 1)
throw new ObjectRetrievalFailureException(getPersistentClass(), propertyValue);
return results.get(0);
}
COM: <s> gets any object by a give param </s>
|
funcom_train/2920834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toCompactNodes() {
StringBuffer s = new StringBuffer();
for (int i = 1; i < tt.sc.length; ++i) {
if (i != 1) {
s.append("\n");
}
s.append((new Node(i)).toCompactString());
}
return s.toString();
}
COM: <s> construct the compact node representation of the ternary tree object </s>
|
funcom_train/44591411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLeftHandSide(Expression expression) {
if (expression == null) {
throw new IllegalArgumentException();
}
// an Assignment may occur inside a Expression - must check cycles
ASTNode oldChild = this.leftHandSide;
preReplaceChild(oldChild, expression, LEFT_HAND_SIDE_PROPERTY);
this.leftHandSide = expression;
postReplaceChild(oldChild, expression, LEFT_HAND_SIDE_PROPERTY);
}
COM: <s> sets the left hand side of this assignment expression </s>
|
funcom_train/3419725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void finalize() throws Throwable {
try {
if (this.passwd != null) {
java.util.Arrays.fill(this.passwd, (char) '0');
this.passwd = null;
}
if (this.key != null) {
java.util.Arrays.fill(this.key, (byte)0x00);
this.key = null;
}
} finally {
super.finalize();
}
}
COM: <s> ensures that the password bytes of this key are </s>
|
funcom_train/46616990 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getJSplitPane() {
if (jSplitPane == null) {
jSplitPane = new JSplitPane();
jSplitPane.setDividerSize(3);
jSplitPane.setDividerLocation(200);
jSplitPane.setLeftComponent(getElementTreePanel());
jSplitPane.setRightComponent(getContainerElementPanel());
}
return jSplitPane;
}
COM: <s> this method initializes j split pane </s>
|
funcom_train/2674203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected SourceViewer createViewer(Composite parent) {
SourceViewer viewer= new SourceViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
SourceViewerConfiguration configuration= new SourceViewerConfiguration() {
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
ContentAssistant assistant= new ContentAssistant();
assistant.enableAutoActivation(true);
assistant.enableAutoInsert(true);
assistant.setContentAssistProcessor(fTemplateProcessor, IDocument.DEFAULT_CONTENT_TYPE);
return assistant;
}
};
viewer.configure(configuration);
return viewer;
}
COM: <s> creates the viewer to be used to display the pattern </s>
|
funcom_train/33436514 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected CacheEntry purgeEntry() throws CacheEvictionException {
CacheEntry entry = _first;
// Notify policy listeners first. if any of them throw an
// eviction exception, then the internal data structure
// remains untouched.
CachePolicyListener listener;
for (int i = 0; i < listeners.size(); i++) {
listener = (CachePolicyListener) listeners.elementAt(i);
listener.cacheObjectEvicted(entry.getValue());
}
removeEntry(entry);
_hash.remove(entry.getKey());
entry.setValue(null);
return entry;
}
COM: <s> purge least recently used object from the cache </s>
|
funcom_train/10948183 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWriteString() {
StringBuilderWriter writer = new StringBuilderWriter();
ProxyWriter proxy = new ProxyWriter(writer);
try {
proxy.write("ABC");
} catch(Exception e) {
fail("Writing String threw " + e);
}
assertEquals("ABC", writer.toString());
}
COM: <s> test writing a string </s>
|
funcom_train/808445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMolweightPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MwFilterType_molweight_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MwFilterType_molweight_feature", "_UI_MwFilterType_type"),
MolfilterPackage.Literals.MW_FILTER_TYPE__MOLWEIGHT,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the molweight feature </s>
|
funcom_train/50530590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean check(Object obj) {
Field[] fields = obj.getClass().getDeclaredFields();
for (Field field: fields) {
int mod = field.getModifiers();
if (!Modifier.isStatic(mod) && !Modifier.isFinal(mod)) {
return false;
}
}
return true;
}
COM: <s> creates a new code fly weight checker code instance </s>
|
funcom_train/9996425 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShowJCL12PropView( boolean b )
{
if( b )
{
if( jTabbedPane.indexOfTab( JCL12_VIEW_TAB_NAME ) == -1 )
jTabbedPane.addTab( JCL12_VIEW_TAB_NAME, jposEntryViewPanel );
}
else
{
if( jTabbedPane.indexOfTab( JCL12_VIEW_TAB_NAME ) != -1 )
jTabbedPane.remove( jposEntryViewPanel );
}
}
COM: <s> called to show or hide the jcl 1 </s>
|
funcom_train/11375227 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSeekBugLocalFS() throws IOException {
Configuration conf = new HdfsConfiguration();
FileSystem fileSys = FileSystem.getLocal(conf);
try {
Path file1 = new Path("build/test/data", "seektest.dat");
writeFile(fileSys, file1);
seekReadFile(fileSys, file1);
cleanupFile(fileSys, file1);
} finally {
fileSys.close();
}
}
COM: <s> tests if the seek bug exists in fsdata input stream in local fs </s>
|
funcom_train/510821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isLegalCharacter(char c) {
if (c == 0x9 || c == 0xA || c == 0xD) {
return true;
} else if (c < 0x20) {
return false;
} else if (c <= 0xD7FF) {
return true;
} else if (c < 0xE000) {
return false;
} else if (c <= 0xFFFD) {
return true;
}
return false;
}
COM: <s> is the given character allowed inside an xml document </s>
|
funcom_train/21885005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addModelDirectoryPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ASTModel_modelDirectory_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ASTModel_modelDirectory_feature", "_UI_ASTModel_type"),
AstPackage.Literals.AST_MODEL__MODEL_DIRECTORY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the model directory feature </s>
|
funcom_train/26024567 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void installListeners(TreeNode node) {
if (node instanceof TreeNode) {
for (int i = 0, count = getChildCount(node); i < count; i++) {
Object child = getChild(node, i);
if (child instanceof TreeNode) {
installListeners((TreeNode) child);
}
}
}
if (node instanceof JGraphEditorDiagram) {
installDiagramListeners((JGraphEditorDiagram) node);
}
}
COM: <s> hook for subclassess to install the required listeners in new tree nodes </s>
|
funcom_train/18579795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printPatientLabel(PatientSummaryBean bean) {
ArrayList lst = new ArrayList();
lst.add(bean);
DocumentOutputGenerator out = new DocumentOutputGenerator();
org.opentapas.commons.util.Logger.debug("TapasPrinter - printPatientLabel() - Testing Label");
out.printDocument(out.getDocumentStream(this.PATIENT_LABEL), lst);
}
COM: <s> print patient label </s>
|
funcom_train/43098137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getAllActors(Object ns) {
if (!(ns instanceof MNamespace)) {
throw new IllegalArgumentException();
}
Iterator it = ((MNamespace) ns).getOwnedElements().iterator();
List list = new ArrayList();
while (it.hasNext()) {
Object o = it.next();
if (o instanceof MNamespace) {
list.addAll(getAllActors(o));
}
if (o instanceof MActor) {
list.add(o);
}
}
return list;
}
COM: <s> returns all actors in some namespace ns </s>
|
funcom_train/41266451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Cataventa entity) {
EntityManagerHelper
.log("deleting Cataventa instance", Level.INFO, null);
try {
entity = getEntityManager().getReference(Cataventa.class,
entity.getCatcodigo());
getEntityManager().remove(entity);
EntityManagerHelper.log("delete successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("delete failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> delete a persistent cataventa entity </s>
|
funcom_train/49469177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PageCounter countPortalMalwares(Filter filter) throws Exception {
_logger.info("soapPortalReferentiel - countPortalMalwares: "+filter);
Db db = dbRO();
try {
return DbPortalReferentiel.getListOfMalwaresCounter(db, filter);
} catch (Exception e) {
store(e);
throw e;
} finally {
db.safeClose();
}
}
COM: <s> count portal malwares </s>
|
funcom_train/18479792 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buf = new StringBuffer() ;
if (!relative) {
buf.append("/") ;
}
String delim = "" ;
for(String elem: path) {
buf.append(delim+elem) ;
delim = "/" ;
}
return buf.toString() ;
}
COM: <s> returns the string representation unix style </s>
|
funcom_train/26535029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getUNCName(String driveLetter) {
driveLetter = getDriveLetter(driveLetter);
if (driveLetter == null) return null;
String drivePath = getDrivePath(driveLetter);
String result = (String) networkDrives.get(drivePath);
logger.finer("getUNCName(" + driveLetter + ") = '" + result + "'");
return result;
}
COM: <s> get the unc name associated with a particular drive letter </s>
|
funcom_train/4923618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testType_InvalidMethod() throws Exception {
// Obtain the expected error message
Method method = InvalidMethodAsync.class.getMethod("invalid");
GwtAsyncMethodMetaData metaData = new GwtAsyncMethodMetaData(method);
final String expectedErrorMessage = "Invalid async method InvalidMethodAsync.invalid: "
+ metaData.getError();
// Test
this.doTypeTest(InvalidMethodAsync.class.getName(), null,
expectedErrorMessage);
}
COM: <s> ensure issue if invalid method on async interface </s>
|
funcom_train/38326119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addQueryObjTypeNode(QueryObjTypeNode node) {
if (node.getDeftemplate().getName().equals(Constants.INITIAL_FACT)) {
this.initialFactObjTypeNode = node;
} else {
if (!this.queryObjTypeNodeMap.containsKey(node.getDeftemplate()) ) {
this.queryObjTypeNodeMap.put(node.getDeftemplate(),node);
}
}
}
COM: <s> add a new object type node </s>
|
funcom_train/22127378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public ZKComponent accordion(Object ... objs) {
Tabbox tbox = new Tabbox();
tbox.setMold("accordion-lite");
Tabs tabs = new Tabs();
Tabpanels tabp = new Tabpanels();
for (int i = 0; i < objs.length; i++) {
String s = (String) objs[i++];
ZKComponent z = (ZKComponent) objs[i];
Tab tab = new Tab(s);
tabs.appendChild(tab);
Tabpanel tap = new Tabpanel();
tap.appendChild(z.get());
tabp.appendChild(tap);
}
tbox.appendChild(tabs);
tbox.appendChild(tabp);
return new ZKComponent(tbox);
}
COM: <s> make an accordion tabbox </s>
|
funcom_train/33606605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInitPuts() {
System.out.println("initPuts");
TemperleyLiebTerm instance = new TemperleyLiebTerm();
instance.initPuts(5);
assertEquals("[1, 2, 3, 4, 5]",instance.inputs.toString());
assertEquals("[10, 9, 8, 7, 6]",instance.outputs.toString());
}
COM: <s> test of init puts method of class scio </s>
|
funcom_train/17398811 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getObject(int index){
if(index < size() && index >= 0){
if(index < plane.size()){
return plane.get(index);
}
else if(index < plane.size() + sphere.size()){
return sphere.get(index - plane.size());
}
else if(index < plane.size() + sphere.size() + triangle.size()){
return triangle.get(index - plane.size() - sphere.size());
}
else{
return light.get(index - plane.size() - sphere.size() - triangle.size());
}
}
else{
return null;
}
}
COM: <s> get the object with the specific index from world </s>
|
funcom_train/21508385 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onClick() {
if(handleClick()) return;
if(parentContainer != null) {
parentContainer.onChildEvent( new GameEvent(onClickEventType, this, onClickEventParameters) );
} else {
GameWorldInfo.getGameWorldInfo().getEventHandler().addEvent(onClickEventType, targetEventQueue, this, onClickEventParameters);
}
}
COM: <s> processes a left click on this container </s>
|
funcom_train/3784992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setGrayPeakListCalibAccFields()
{ /* setGrayPeakListCalibAccFields */
/* Copy comma-string list to WedgeCalDataList field */
//return(dbS.setWedgeGrayListData(null, dbS.calib.wedgeGrayValues));
return(dbS.setWedgeGrayListData(null, grayDataList));
} /* setGrayPeakListCalibAccFields */
COM: <s> set gray peak list calib acc fields set the accession data gray value </s>
|
funcom_train/1864256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains(Point point) {
assert minValues.length == point.dimension();
for (int i = 0; i < point.dimension(); i++) {
double value = point.getValue(i);
if (value > maxValues[i] || value < minValues[i]) {
return false;
}
}
return true;
}
COM: <s> checks whether this bounding box contains the given point </s>
|
funcom_train/43245572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetMostRecentCareLocation() {
System.out.println("getMostRecentCareLocation");
PatientDataDG2Object instance = new PatientDataDG2Object();
String expResult = "";
String result = instance.getMostRecentCareLocation();
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 most recent care location method of class org </s>
|
funcom_train/15614558 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDisplayName() {
if (ValueUtil.isNotEmpty(this.name) && ValueUtil.isNotEmpty(this.surname)) {
return this.name + " " + this.surname;
}
if (ValueUtil.isNotEmpty(this.nick)) {
return this.nick;
}
return this.login;
}
COM: <s> get user display name </s>
|
funcom_train/6335863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof DataInfo)) {
return false;
}
DataInfo rec = (DataInfo)obj;
if (this.recordNumber == rec.recordNumber
&& Arrays.equals(this.values, rec.values)
&& Arrays.equals(this.fields, rec.fields)) {
return true;
}
return false;
}
COM: <s> compares fields and field values for equality </s>
|
funcom_train/10254062 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTransactionIsolation(int level) throws SQLException {
/* Goal at this time is to get a working XA DataSource.
* After we have multiple transaction levels working, we can
* consider how we want to handle attempts to change the level
* within a global transaction. */
validateNotWithinTransaction();
super.setTransactionIsolation(level);
}
COM: <s> interceptor method because there may be xa implications to </s>
|
funcom_train/38439108 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BufferedReader GetReader ( String aFileName ) {
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(aFileName));
} catch ( Exception e ) {
e.printStackTrace();
aLogger.severe("Can't get a buffered reader from "+aFileName+".");
return reader;
}
aLogger.config("Got buffered reader from "+aFileName+".");
return reader;
}
COM: <s> method get reader </s>
|
funcom_train/7511617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemOpenFilterSet() {
if (jMenuItemOpenFilterSet == null) {
jMenuItemOpenFilterSet = new JMenuItem();
jMenuItemOpenFilterSet.setText(Messages.getString("MainFrame.menu.loadFilterSet")); //$NON-NLS-1$
registerAction(jMenuItemOpenFilterSet, Actions.OPEN_FILTER_SET);
}
return jMenuItemOpenFilterSet;
}
COM: <s> this method initializes j menu item open filter set </s>
|
funcom_train/26073007 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setVectMonitor(Vector vect, Monitor mon) {
if (vect != null) {
int currentSize = vect.size();
Object tempListener = null;
for (int index = 0; index < currentSize; index++) {
tempListener = vect.elementAt(index);
if (tempListener != null)
((NeuralElement) tempListener).setMonitor(mon);
}
}
}
COM: <s> set the monitor object for all pattern listeners in a vector </s>
|
funcom_train/28123459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMDIBroadCast(MDIBroadCast message) {
receiveMDIBroadCast(message);
for (Iterator i = MDIWindows.iterator(); i.hasNext();) {
MDIWindow win = (MDIWindow)i.next();
if (win != message.getSourceMDIWindow()) {
win.receiveMDIBroadCast(message);
}
}
}
COM: <s> send a broadcast message to all open mdiwindows and the mdiframe </s>
|
funcom_train/5346295 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void processRequest( File apath, String rpath ) {
// Check to see if this is a control request
String rbase = rpath;
int rloc = rbase.indexOf("?");
if ( rloc > 0 )
rbase = rbase.substring(0, rloc);
if ( !apath.exists() )
_inErrorState =true;
if ( !apath.canRead() )
_inErrorState =true;
if ( _inErrorState )
writeError();
}
COM: <s> return the file if a file request </s>
|
funcom_train/43886282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHighlightLayer(MapLayer highlightLayer) {
this.highlightLayer = highlightLayer;
if (this.highlightLayer != null) {
geomName = this.highlightLayer.getFeatureSource().getSchema().getDefaultGeometry()
.getName();
if ((geomName == null) || (geomName == "")) {
geomName = "the_geom";
}
}
}
COM: <s> sets the highlighted layer </s>
|
funcom_train/2842411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Insets getBorderInsets(Component c, Insets insets) {
insets.left = insets.right = 0;
try {
insets.left = 1 + margin + c.getGraphics().getFontMetrics().stringWidth(open);
insets.right = 1 + margin + c.getGraphics().getFontMetrics().stringWidth(close);
}
catch (Exception e) {}
insets.top = insets.bottom = 0;
return insets;
}
COM: <s> reinitialize the insets parameter with this borders current insets </s>
|
funcom_train/34636658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveState(IMemento memento) {
// Add new Child to IMemento where we will save all expanded nodes
memento = memento.createChild(EXPANDED_NODES);
// For every expanded node, we add a entry to the IMemento
for (Object node : viewer.getExpandedElements()) {
if (node != null && node instanceof Fragment) {
IMemento child = memento.createChild(NODE);
Fragment fragment = (Fragment) node;
child.putString(NODE_UUID, fragment.getUUID().toString());
}
}
}
COM: <s> saves all nodes which are expanded in the tree viewer to the provided </s>
|
funcom_train/29849519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double polarToCartesianY(double rho, double alpha) {
double result = yStart
+ rho * Math.sin(alpha) * nodeDistance +
maxNodeHeight.size() * nodeDistance;
if (treeDirection == 180) {
result = yStart -
rho * Math.sin(alpha) * nodeDistance +
maxNodeHeight.size() * nodeDistance;
}
return result;
}
COM: <s> compute the y coordinate </s>
|
funcom_train/21701748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeCommentByKey(Long key){
Comment comment = this.retrieveCommentByKey(key);
if ( comment != null ) {
long entryKey = comment.getKey();
DBFactory.getInstance().deleteObject(comment);
log.info("The Comment with the key: " + entryKey + "was deleted!");
}
else {
log.warn("The Comment with the key: " + key + "could not be deleted, cause there was no such Comment in the local database");
}
}
COM: <s> removes the comment identified by the given key from the local database </s>
|
funcom_train/3830267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getId() {
Debug.debugMethodBegin( this, "getId" );
String s = XMLTools.getAttrValue( element, "fid" );
if ( s != null ) {
s = s.replace(' ','_');
} else {
s ="";
}
Debug.debugMethodEnd();
return s;
}
COM: <s> returns the id of the feature </s>
|
funcom_train/17290664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Page getInstance(PageId pageId, ByteBuffer bb) {
/*
* Get the page type
*/
bb.mark();
short pagetype = bb.getShort();
bb.reset();
/*
* Obtain the relevant PageFactory implementation
*/
PageFactory pf = getPageFactory(pagetype);
/*
* Instantiate the page
*/
Page page = pf.getInstance(pageId, bb);
return page;
}
COM: <s> unmarshalls a byte stream to a page </s>
|
funcom_train/33757553 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getExitCommand1 () {
if (exitCommand1 == null) {//GEN-END:|25-getter|0|25-preInit
// Insert pre-init code here
exitCommand1 = new Command ("Exit", Command.EXIT, 1);//GEN-LINE:|25-getter|1|25-postInit
// Insert post-init code here
}//GEN-BEGIN:|25-getter|2|
return exitCommand1;
}
COM: <s> returns an initiliazed instance of exit command1 component </s>
|
funcom_train/4362891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MBeanNotificationInfo createNotificationInfo() {
// Return our cached information (if any)
if (info != null)
return (info);
// Create and return a new information object
info = new MBeanNotificationInfo
(getNotifTypes(), getName(), getDescription());
//Descriptor descriptor = info.getDescriptor();
//addFields(descriptor);
//info.setDescriptor(descriptor);
return (info);
}
COM: <s> create and return a code model mbean notification info code object that </s>
|
funcom_train/37856188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void execute(){
try {
tmp = netEdit.download(downloadFrom);
store();
Listener listener = new Listener(this, netEdit);
Timer timer = new Timer();
timer.schedule(listener, NetEditApplet.PERIOD, NetEditApplet.PERIOD);
netEdit.open(tmp);
} catch (HttpException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
COM: <s> execute task dowload file store desrioption </s>
|
funcom_train/39314736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNextImage() {
System.out.println("testNextImage");
boolean expected1 = false;
boolean expected2 = true;
boolean actual1 = slide.nextImage();
boolean actual2 = slide.nextImage();
assertEquals(expected1,actual1);
assertEquals(expected2,actual2);
System.out.println("Done testNextImage");
}
COM: <s> test of next image method of class slide show </s>
|
funcom_train/12164748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MarinerRequestContext createContext(final String extras) {
return new MarinerRequestContext() {
public MarinerRequestContext createNestedContext()
throws IOException,
RepositoryException,
MarinerContextException {
return null;
}
public String getDeviceName() {
return "Master";
}
public String getDevicePolicyValue(String policyName) {
return extras;
}
};
}
COM: <s> creates a mock request context that will return the defined extras as </s>
|
funcom_train/12113110 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC25(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.copiaDocJButton_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c25 copia doc jbutton </s>
|
funcom_train/20916055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Object anotherIntInstant) {
if (! (anotherIntInstant instanceof IntInstant)) {
throw new ClassCastException(anotherIntInstant.toString());
}
int thisVal = this.value;
int anotherVal = ((IntInstant) anotherIntInstant).value;
return (thisVal<anotherVal ? -1 : (thisVal==anotherVal ? 0 : 1));
}
COM: <s> compares two int intstants numerically </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.