__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/15452293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Chat getChat(String toUserId) {
String protocolComplement = "@" + xmppConnection.getServiceName();
Chat chat = (Chat) currentChats.get(toUserId);
if (chat == null) {
chat = initChat(toUserId + protocolComplement);
currentChats.put(toUserId, chat);
}
removeUsedChat(toUserId);
usedChats.put(new Date(), toUserId);
return chat;
}
COM: <s> returns the chat </s>
|
funcom_train/22292895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setSuperNode(SuperNode supernode_) {
if(supernode_ != null) {
//setHidden(true); // ** testing ** used to be commented
setRange(new Range2D(0,0,0,0));
supernode_.addNode(this);
} else {
setHidden(false);
if(supernode != null)
supernode.removeNode(this);
// range will get updated next time the node is drawn
}
supernode = supernode_;
}
COM: <s> if a node is put into a supernode use this to </s>
|
funcom_train/46877813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Collection findAllAttributes(Class clazz) {
loadPropertiesIfNecessary();
Collection attributes=new ArrayList();
Set keys=properties.keySet();
for(Iterator i=keys.iterator();i.hasNext();) {
String key=(String)i.next();
if( key.startsWith(clazz.getName())
&& key.indexOf(FIELD_ELEMENT_SEPARATOR)==-1 ) {
String value=(String)properties.get(key);
attributes.add(new AttributeData(key,value));
}
}
return attributes;
}
COM: <s> returns all the properties found for the given class </s>
|
funcom_train/3099242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void serviceProve(String cyclist,String returnpath, String query) {
try {
sendAnswers(returnpath, cyc.converseObject( "(fi-prove '" +
toCycListString(query) + " #$InferencePSC)"));
} catch ( Exception e ) {
sendMessage(returnpath, ""+ e);
}
}
COM: <s> process a prove command query with proof </s>
|
funcom_train/50862897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getTotalAmountResourcesStored() {
if (totalResourcesStoredSet) return totalResourcesStored;
else {
totalResourcesStored = 0D;
if (typeStorage != null) totalResourcesStored += typeStorage.getTotalAmountResourceTypesStored();
if (phaseStorage != null) totalResourcesStored += phaseStorage.getTotalAmountResourcePhasesStored();
totalResourcesStoredSet = true;
return totalResourcesStored;
}
}
COM: <s> gets the total amount of resources stored </s>
|
funcom_train/22402011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJEdit() {
if (jEdit == null) {
jEdit = new JTextField();
jEdit.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent e) {
jEdit.setText("");
jLabel.setText( e.paramString());
}
});
//jEdit.setActionMap( this.getRootPane().getActionMap());
}
return jEdit;
}
COM: <s> this method initializes j button </s>
|
funcom_train/22351054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addThread(File source, SftpFile dest){
FileSinkSftphronizer sk = new FileSinkSftphronizer(source,super.handler);
sk.setSftpClient(client);
sk.addLogHandler(super.lh);
tf = new FileSinkThreadFactory(dest,tg);
Thread toAdd = tf.newThread(sk);
toRun.add(toAdd);
}
COM: <s> implement thread adding to the thread list </s>
|
funcom_train/50250490 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean abort() {
if (succeeded == false) {
return false;
} else if (succeeded == true && commitSucceeded == false) {
// login succeeded but overall authentication failed
succeeded = false;
} else {
// overall authentication succeeded and commit succeeded,
// but someone else's commit failed
logout();
}
return true;
}
COM: <s> method to abort the authentication process phase 2 </s>
|
funcom_train/15697229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void onNew() {
if (!closeWorkingFile()) {
return;
}
this.manifest = new Manifest();
this.manifest.setRoot(new Directory(null, 0, 0, 0, 0));
this.content.loadManifest(this.manifest);
setWorkingFileName(NEW_FILE, false);
}
COM: <s> creates a new file </s>
|
funcom_train/38999594 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isSubSet(InstructionsCombined comb1, InstructionsCombined comb2) {
if (comb1.getMnemonic().contains(comb2.getMnemonic()) ||
comb2.getMnemonic().contains(comb1.getMnemonic())) {
//Miscellaneous.println("Sub-Set ");
return true;
}
return false;
}
COM: <s> returns true if either input combination is a subset of other </s>
|
funcom_train/38536095 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isAnyATrue() {
if (gaexpr != null) return gaexpr.isAnyTrue();
if (aexpr != null) return aexpr.isTrue();
if (currentConstVal != null) return currentConstVal.booleanValue();
return currentGenConstVal.isAnyTrue();
}
COM: <s> returns true if any a node is true </s>
|
funcom_train/49079487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addConfiguredVariable( Variable variable ) {
if (variable.getName() == null) {
throw new BuildException("nested element variable needs to have the attribute [name] defined.");
} else if (variable.getValue() == null) {
throw new BuildException("nested variable [" + variable.getName() + "] needs to have the attribute [value] defined.");
}
this.variables.add( variable );
}
COM: <s> adds a nested variable definition to this preprocess </s>
|
funcom_train/4966495 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect() {
Client client = (Client) super.getUserObject();
if (client.isAuthenticated()) {
client.connect();
this.addExistingTables();
this.connect.setEnabled(false);
this.disconnect.setEnabled(true);
this.openQuery.setEnabled(true);
} else {
new ConnectDBForm(this).setVisible(true);
}
}
COM: <s> connect to the database </s>
|
funcom_train/51644393 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RefactoringStatus checkVarargOrder() {
for (Iterator iter= fParameterInfos.iterator(); iter.hasNext();) {
ParameterInfo info= (ParameterInfo)iter.next();
if (info.isOldVarargs() && iter.hasNext()) {
return RefactoringStatus.createFatalErrorStatus(Messages.format(
RefactoringCoreMessages.ExtractMethodRefactoring_error_vararg_ordering,
info.getOldName()));
}
}
return new RefactoringStatus();
}
COM: <s> checks if varargs are ordered correctly </s>
|
funcom_train/44403060 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XPathQueryService getService() {
XPathQueryService returnService = null;
String strFullCollectionPath = serviceURI + collectionPath;
logger.info("getService() : strFullCollectionPath - " + strFullCollectionPath);
returnService = (XPathQueryService) xpathQueryServices.get(strFullCollectionPath);
return returnService;
}
COM: <s> given the service uri and collection return an appropriate service </s>
|
funcom_train/12596818 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuilder stb = new StringBuilder(super.toString());
if (accessor != null) {
stb.append(" >>> ");
stb.append("accessor: ");
stb.append(getAccessor());
if (injecting) {
stb.append(", value: ");
stb.append(value);
stb.append(", value class: ");
stb.append(value != null ? value.getClass() : "unknown");
}
}
return stb.toString();
}
COM: <s> returns a string representation of this exception </s>
|
funcom_train/43866595 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // protected void relayMessage(Message message) {
// RouteNodeList targets = message.getTargetNodes();
// message.setTargetNodes(targets.get(0).getForwardNodeList());
// message.setData(new Data(message.getData().getServiceId(), message.getData().getValue(), nodeInfo));
// send(message);
// return;
// }
COM: <s> a function that relays an incoming message upon request </s>
|
funcom_train/21997271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getProperty(String param_name) throws LauncherException {
try {
Properties props = HelperServlet.getProperties(this,
JREC_HOME,
JREC_PROPS);
if (props == null)
throw new LauncherException("cannot get properties");
return (String)props.get(param_name);
}
catch (IOException e) {
throw new LauncherException("io-problem getting "+param_name+" from properties", e);
}
}
COM: <s> obtain a jrec specific property from a servlet init parameter </s>
|
funcom_train/32057543 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateCellRendererPane() {
System.out.println("testCreateCellRendererPane");
// Add your test code below by replacing the default call to fail.
CellRendererPane y = new CellRendererPane();
BasicGraphUI x = new BasicGraphUI();
y = x.createCellRendererPane();
}
COM: <s> test of create cell renderer pane method of class basic graph ui </s>
|
funcom_train/20928096 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint(Graphics g, Window2D w) {
a.x = (int) w.getXPixel(x1);
b.x = (int) w.getXPixel(x2);
a.y = (int) w.getYPixel(y1);
b.y = (int) w.getYPixel(y2);
if (fill || drawOutline) {
g.setColor(color);
g.drawLine(a.x, a.y, b.x, b.y);
}
}
COM: <s> draws this line using the transformation information calculated in </s>
|
funcom_train/32236448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeChildFromParentOrganization(Organization organization, Organization parentOrganization) {
List<Organization> children = parentOrganization.getChildrenOrganizations();
boolean toReturn = false;
if (children.isEmpty()){
toReturn = children.remove(organization);
if (children.size() == 0){
parentOrganization.setIsParentOrganization(false);
}
daoSupport.update(parentOrganization);
}
return toReturn;
}
COM: <s> removes a child organization organization from its parent parent organization </s>
|
funcom_train/251347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleHttpConnection(HttpConnection anHttpConnection) {
WriteFileTask writeTask = new WriteFileTask(new File("C:\\write.html"),
anHttpConnection, getHandleName(), anHttpConnection.getPath().getBytes());
try {
enqueue("filereader", writeTask);
} catch (TaskQueueException e) {
e.printStackTrace();
} catch (UnknownTaskQueueException e) {
e.printStackTrace();
}
}
COM: <s> got a new http connection lets write its path to the write </s>
|
funcom_train/50343829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setClockStartChanged() {
int sel = Timebase.NONE;
if (clockStartBox.getSelectedIndex()==startNixieClock)
sel = Timebase.NIXIE_CLOCK;
else if (clockStartBox.getSelectedIndex()==startAnalogClock)
sel = Timebase.ANALOG_CLOCK;
else if (clockStartBox.getSelectedIndex()==startLcdClock)
sel = Timebase.LCD_CLOCK;
clock.setStartClockOption(sel);
changed = true;
}
COM: <s> method to handle start clock combo box change </s>
|
funcom_train/14360801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColumnType(String parColName) {
//int retValue = -1;
Integer ct_intRet = (Integer) this.c_htaColumnType.get(parColName);
if (ct_intRet == null) {
return -1;
} else {
return ct_intRet.intValue();
}
} // getColumnType
COM: <s> return the type of a column br </s>
|
funcom_train/4644627 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addTypePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AttachmentType_type_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AttachmentType_type_feature", "_UI_AttachmentType_type"),
TassooPackage.Literals.ATTACHMENT_TYPE__TYPE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the type feature </s>
|
funcom_train/21105285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected MJButton getBtCustRepShowReport() {
if (btCustRepShowReport == null) {
btCustRepShowReport = new MJButton();
btCustRepShowReport.setPreferredSize(new Dimension(100, 20));
btCustRepShowReport.setText("aF3 Open");
btCustRepShowReport.setMnemonic(KeyEvent.VK_F3);
}
return btCustRepShowReport;
}
COM: <s> this method initializes bt cust rep show report </s>
|
funcom_train/18315703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDefaultLDAPConnectionImpl()
throws Throwable
{
try
{
assertNotNull( FrameworkManagerFactory.getObject().getDefaultLDAPConnectionImpl() );
}
catch( Throwable exc )
{
FrameworkBaseObject.logMessage( "FrameworkManagerTest.testGetDefaultLDAPConnectionImpl() failed - " + exc.toString() );
throw exc;
}
COM: <s> tests get default ldapconnection impl on framework manager </s>
|
funcom_train/8685516 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getClassContainer(String classname) throws IOException {
String classLocation = classname.replace('.', '/') + ".class";
// we look through the classpath elements. If the element is a dir
// we look for the file. IF it is a zip, we look for the zip entry
return getResourceContainer(classLocation, classPath.list());
}
COM: <s> get the file that contains the class definition </s>
|
funcom_train/29372523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel_ColorPreview() {
if (jPanel_ColorPreview == null) {
jPanel_ColorPreview = new JPanel();
jPanel_ColorPreview.setLayout(new GridBagLayout());
jPanel_ColorPreview.setBounds(new Rectangle(47, 31, 180, 62));
}
return jPanel_ColorPreview;
}
COM: <s> this method initializes j panel color preview </s>
|
funcom_train/7675192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DalvInsn hrPrefix() {
RegisterSpecList regs = registers;
int sz = regs.size();
if (hasResult()) {
if (sz == 1) {
return null;
}
regs = regs.withoutFirst();
} else if (sz == 0) {
return null;
}
return new HighRegisterPrefix(position, regs);
}
COM: <s> gets the instruction prefix required if any to use in a high </s>
|
funcom_train/33813218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void refresh(boolean bAsynchronous) {
final Device device = this;
if ( !device.isMounted()){
try{
device.mount();
}
catch(Exception e){
Log.error("011",getName(),e); //mount failed //$NON-NLS-1$
Messages.showErrorMessage("011",getName()); //$NON-NLS-1$
return;
}
}
if ( bAsynchronous){
new Thread(){
public void run(){
refreshCommand(device);
}
}.start();
}
else{
refreshCommand(device);
}
}
COM: <s> refresh scan asynchronously the device to find tracks </s>
|
funcom_train/18722184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCorpusDocument(String text) {
corpusDocCount++;
String[] sentences = getSentences(text);
for (String sentence : sentences) {
List<String> tokens = getTokens(sentence);
while (!tokens.isEmpty()) {
rootNode.prepareDocumentFrequency(tokens, corpusDocCount);
tokens.remove(0);
}
}
}
COM: <s> use this method to train a suffix tree for a corpus </s>
|
funcom_train/43245536 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSpEmpZipcode() {
System.out.println("getSpEmpZipcode");
EmploymentDataDG2Object instance = new EmploymentDataDG2Object();
String expResult = "";
String result = instance.getSpEmpZipcode();
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 sp emp zipcode method of class org </s>
|
funcom_train/1476496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getRowNumber(String sql) {
StringBuilder rownumber = new StringBuilder(50).append("rownumber() over(");
int orderByIndex = sql.toLowerCase().indexOf("order by");
if ( orderByIndex>0 && !hasDistinct(sql) ) {
rownumber.append( sql.substring(orderByIndex) );
}
rownumber.append(") as rownumber_,");
return rownumber.toString();
}
COM: <s> render the tt rownumber over </s>
|
funcom_train/7595432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(final V value) throws KeyAlreadyInIndexException {
Indexable<K> field = accessor.get().getKey(value);
if (containsKey(field.get()))
throw new KeyAlreadyInIndexException("Cannot put value as "+field.get()+" already in Index");
put( field.get(), value);
field.addListener(this);
}
COM: <s> used to add a new value to the index </s>
|
funcom_train/514040 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object newInstance (Class pvClass) {
super.newInstance(pvClass);
Object lvProxyObject = Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] {pvClass}, this);
if (log.isDebugEnabled()) { log.debug("Generated proxy for class: " + pvClass); }
return lvProxyObject;
}
COM: <s> create a proxy object for the interface pv class </s>
|
funcom_train/26152036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isConnected() {
try {
Socket socket = new Socket(getHost(), getPort());
} catch (UnknownHostException e) {
WebAppPlugin.log(e, "isConnected() handling UnknownHostException"); //$NON-NLS-1$
return false;
} catch (IOException e) {
// this exception is thrown until server starts
// WebAppPlugin.log(e, "isConnected() handling IOException"); //$NON-NLS-1$
return false;
}
return true;
}
COM: <s> a convenience method that indicates if a connection can be established </s>
|
funcom_train/45045803 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ResultSet getAdditionalInfoMovieResultSet(int index) {
ResultSet resultSet = null;
try {
/* Gets the fixed additional info... */
resultSet = _sql.executeQuery("SELECT \"Additional Info\".* "+
"FROM \"Additional Info\" "+
"WHERE \"Additional Info\".\"ID\"="+index+";");
} catch (Exception e) {
log.error("Exception: " + e);
checkErrorMessage(e);
}
/* Returns the data... */
return resultSet;
}
COM: <s> returns the additional info result set </s>
|
funcom_train/3167585 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setType(int type) throws java.beans.PropertyVetoException {
if ( this.type == type ) return;
PropertyChangeEvent pce = new PropertyChangeEvent(this, CHANGE_EVENT_TYPE_CHANGE , new Integer(this.type), new Integer(type));
this.fireVetoableChangeListenerVetoableChange(pce);
this.type = type;
this.firePropertyChangeListenerPropertyChange(pce);
return;
}
COM: <s> setter for property type </s>
|
funcom_train/33492997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testScoreResetAtMaxScore() {
System.out.println("incrementPlayerTwoScore");
for(int i=0; i < 13; i++){
//add one to the player two score
ScoreManager.incrementPlayerTwoScore();
}
assertEquals(ScoreManager.getPlayerTwoScore(), 2);
}
COM: <s> test of increment player two score method of class ballsoffury </s>
|
funcom_train/45121636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDocumentationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AbstractPersistentField_documentation_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_AbstractPersistentField_documentation_feature", "_UI_AbstractPersistentField_type"),
DictionaryPackage.Literals.ABSTRACT_PERSISTENT_FIELD__DOCUMENTATION,
true,
true,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the documentation feature </s>
|
funcom_train/6206141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void generateWebFlowGroups(List groups, IProgressMonitor monitor) {
Iterator it = groups.iterator();
while (it.hasNext()) {
IGaijinWebFlowGroup group = (IGaijinWebFlowGroup) it.next();
GenWebFlowGroupBeansOperation beans = new GenWebFlowGroupBeansOperation(group);
try {
beans.run(monitor);
} catch (CoreException e) {
getErrors().add(e.getStatus());
}
if (monitor.isCanceled()) {
throw new OperationCanceledException();
}
}
}
COM: <s> generate the resources for all sub groups </s>
|
funcom_train/12155458 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSelectedPseudonymisationOptionOneWayIndex() {
logger.debug("Entering getSelectedPseudonymisationOptionOneWayIndex().");
int selectedPseudonymisationOptionOneWayIndex = oneWayAlgorithmComboBox.getSelectedIndex();
if (logger.isDebugEnabled()) {
logger.debug("Exiting getSelectedPseudonymisationOptionOneWayIndex(); RV = [" + selectedPseudonymisationOptionOneWayIndex + "].");
}
return selectedPseudonymisationOptionOneWayIndex;
}
COM: <s> gets the index of the chosen one way pseudonymisation option </s>
|
funcom_train/32649079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createHAlignComboBox() {
GridData gridData = new GridData();
gridData.widthHint = 70;
hAlignComboBox = new ThemeComboBox(this, SWT.NONE);
hAlignComboBox.setEnumClass("net.sf.tapestry_jsmenu.themegui.xmlbinding.HAlign");
hAlignComboBox.setEmbeddedInBindableGroup(false);
hAlignComboBox.setBindingSubPath("hAlign");
hAlignComboBox.setLayoutData(gridData);
}
COM: <s> this method initializes h align combo box </s>
|
funcom_train/23026700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeMixer(String mixerName){
//stop current line
this.line.stop();
this.line.close();
this.line.flush();
//set the new mixer and line
Mixer mx = AudioSystem.getMixer(getMixerInfo(mixerName));
this.setMixer(mx);
this.line = (TargetDataLine) getDataLineForMixer();
//restart
openLine();
System.out.println("LineInfo:[" + mixerName + "] " + theApp.myAudio.line.getLineInfo());
this.line.start();
}
COM: <s> change the mixer and restart the target data line </s>
|
funcom_train/29313981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static final public String getTextContent(final Node node) {
String s = "";
switch (node.getNodeType()) {
case Node.ELEMENT_NODE:
final NodeList list = node.getChildNodes();
for(int i = 0, N = list.getLength(); i < N; i++) {
final Node child = list.item(i);
s += getTextContent(child);
}
break;
case Node.TEXT_NODE:
case Node.ATTRIBUTE_NODE:
s = node.getNodeValue();
break;
default:
throw new NotImplemented("getTextContent for node of type "
+ node.getNodeType());
}
return s;
}
COM: <s> substitute for the dom3 implementation </s>
|
funcom_train/19322049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getLeaderPatternWidth(final FObj fobj, final FoContext context) {
final PdLeaderPatternWidth property = (PdLeaderPatternWidth)
getProperty(FoProperty.LEADER_PATTERN_WIDTH);
if (property != null) {
return property.getValue(context, fobj);
}
return PdLeaderPatternWidth.getValueNoInstance(context, fobj);
}
COM: <s> returns the leader pattern width </s>
|
funcom_train/374958 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean transferOwnership(JMemory memory) {
if (!memory.owner || this.physical == 0 || this.physical != memory.physical) {
return false;
}
memory.owner = false;
this.owner = true;
this.keeper = null; // Release any kept references
if (this.ref != null) {
throw new IllegalStateException(
"Can not transfer ownership when already own memory");
}
this.ref = createReference(memory.ref.address, memory.ref.size);
memory.ref.remove();
memory.ref = null;
return true;
}
COM: <s> a special method that allows one object to transfer ownership of a memory </s>
|
funcom_train/18322043 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void compile(StateMachine sm, ControlledObjectHandler co) {
if (co.getName() == null || co.getName().equals("")) {
fireNullName(sm, co);
}
if (co.getImplName() == null || co.getImplName().equals("")) {
fireNullImplClass(sm, co);
}
}
COM: <s> compiles given controlled object </s>
|
funcom_train/2897282 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testexecuteQueryMethod() throws Exception {
WebRequest request = new GetMethodWebRequest(services
+ "SoapDBC?method=executeQuery");
WebResponse response=makeErrorRequest(request);
String body = response.getText();
assertTrue(body.indexOf("<?xml") ==0);
assertTrue(body.indexOf("<soapenv:Fault>")>0);
assertTrue(body.indexOf("java.lang.NullPointerException")>0 || body.indexOf("java.lang.IllegalArgumentException")>0);
}
COM: <s> test execute query call </s>
|
funcom_train/32057406 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testIsEditing() {
System.out.println("testIsEditing");
JGraph jg=new JGraph();
BasicGraphUI x = new BasicGraphUI();
GraphLayoutCache g = new GraphLayoutCache( new DefaultGraphModel(),jg );
x.installUI(jg);
assertFalse(x.isEditing(jg));
}
COM: <s> test of is editing method of class basic graph ui </s>
|
funcom_train/8528242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String buildStop() {
RequestMessage rq = new RequestMessage();
rq.setId("1");
rq.setDate(new SimpleDateFormat(ConvertionProtocol.DATE_FORMAT_PATTERN)
.format(new Date(), new StringBuffer(), new FieldPosition(0))
.toString());
rq.setType(ConvertionProtocol.TYPE_STOP);
rq.addParam(ConvertionProtocol.STOP_KEY_PARAM, new StopKeyGenerator()
.readStopKey());
return rq.getXml().toPrettyString();
}
COM: <s> builds the stop </s>
|
funcom_train/34536189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getTransitionAttributeNames() {
Set keys = m_transitionAttributes.keySet();
Set names = new HashSet();
synchronized (m_transitionAttributes) {
for (Iterator i=keys.iterator(); i.hasNext(); ) {
names.add(i.next());
}
}
return names;
}
COM: <s> retrieve the currently defined transition attribute names </s>
|
funcom_train/18474442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setXmlParameters(Document document, Map parameters) /*throws JaxenException*/ {
// tables etc may be *very* large, so we search for
// parameters only in <xform ..> documents.
Element root = document.getDocumentElement();
if (root != null && "xform".equals(root.getNodeName()))
setXmlParameters(document.getChildNodes(), parameters);
}
COM: <s> sets the parameters to the xml document </s>
|
funcom_train/17750154 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void crashClasses() {
for (Class<?> c: classes) {
final List<Block> blockList = executingPlanner.getBlocks(c, MAX_TEST_CASES_TRIED_CLASS);
final Block[] blocks = blockList.toArray(new Block[blockList.size()]);
final TestCaseWriter testCaseWriter = new JUnitTestCaseWriter(
c, "No comment", Constants.JUNIT_FILTERING, blocks);
testCaseWriter.write();
}
}
COM: <s> heart of jcrasher generate test cases for classes under test </s>
|
funcom_train/48655694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(Product prod, Connection conn) throws Exception{
// check the dirty flag in the object. if it is dirty,
// run update or insert
if (prod.isDirty()) {
if (prod.isInDB()) {
update(prod, conn);
}else{
insert(prod, conn);
}
}
}
COM: <s> private save method of a product </s>
|
funcom_train/43557137 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int start() {
this.isRunning = true;
Collection mediators = null;
try {
mediators = getTransportMediators();
CollectionUtils.forAllDo(mediators, new ExceptionalClosure() {
protected void basicExecute(final Object o) throws Exception {
((TransactionMediator) o).start();
}
});
} finally {
if (null != mediators) {
releaseTransportMediators(mediators);
}
}
return 0;
}
COM: <s> used to start the clock for this transactional scope </s>
|
funcom_train/3665968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int newUTF8(final String value) {
key.set('s', value, null, null);
Item result = get(key);
if (result == null) {
pool.putByte(UTF8).putUTF8(value);
result = new Item(index++, key);
put(result);
}
return result.index;
}
COM: <s> adds an utf8 string to the constant pool of the class being build </s>
|
funcom_train/22910955 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getUnicodeDescription(int tag) throws MetadataException {
if (!_directory.containsTag(tag))
return null;
byte[] commentBytes = _directory.getByteArray(tag);
try {
// decode the unicode string
// trim it, as i'm seeing a junk character on the end
return new String(commentBytes, "UTF-16LE").trim();
} catch (UnsupportedEncodingException ex) {
return null;
}
}
COM: <s> the windows specific tags uses plain unicode </s>
|
funcom_train/12178485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void endPhase1BeginPhase2() {
if (processingPhase != ProcessingPhase.PHASE1) {
throw new IllegalStateException("Expected to be in " +
ProcessingPhase.PHASE1 + " but was in " + processingPhase);
}
if (logger.isDebugEnabled()) {
logger.debug("Moving from " + ProcessingPhase.PHASE1 + " to " +
ProcessingPhase.PHASE2);
}
processingPhase = ProcessingPhase.PHASE2;
}
COM: <s> called after processing all the markup but before rendering the layout </s>
|
funcom_train/42180432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isTopRightVertexAt(float x, float y, float margin) {
float [][] points = getPoints();
return Math.abs(x - points[1][0]) <= margin && Math.abs(y - points[1][1]) <= margin;
}
COM: <s> returns code true code if the top right vertex of this piece is </s>
|
funcom_train/43600059 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onModuleLoad() {
singleton = this;
final LoginServiceAsync userService = (LoginServiceAsync) GWT.create(LoginService.class);
userService.getLoginInfo(GWT.getHostPageBaseURL(), new AsyncCallback<LoginInfo>() {
public void onSuccess(LoginInfo lgInfo) {
RootPanel.get("w4tstarting").setVisible(false);
hideLoading();
setLoginInfo(lgInfo);
renderView();
}
public void onFailure(Throwable caught) {
}
});
}
COM: <s> this is the entry point method </s>
|
funcom_train/31703528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoomOut(Stack zoomStack) {
if (null == zoomStack || zoomStack.isEmpty()) {
return;
}
Rectangle2D.Double rectU = this.rectU;
Rectangle2D.Double backupRectU = (Rectangle2D.Double) zoomStack.pop();
Transformer.copyRectU(backupRectU, rectU);
}
COM: <s> zooms out of the last zooming in </s>
|
funcom_train/41842152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getJaccardCoefficient(Vector<String>queryTokens, Vector<String> eachResult){
double score = 0;
int count = 0;
for (int i =0; i<queryTokens.size();i++){
if(eachResult.contains(queryTokens.get(i))){
count = count+1;
}
}
int union = (queryTokens.size()+eachResult.size())-count;
score = (double)((double) count/(double) union);
return score;
}
COM: <s> get the jaccard coefficient value for that result when compared </s>
|
funcom_train/32057002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExportDone() {
System.out.println("testExportDone");
String name = "test";
String[] files = new String[2];
for (int x = 0; x < 2; x++)
files[x] = "file" + x;
GPLibraryPanel lPanel = new GPLibraryPanel(name, files, 2);
GPLibraryPanel.DNDTransferHandler handle = lPanel.new DNDTransferHandler();
handle.exportDone(null, null, 0);
}
COM: <s> test of export done of class gplibrary panel </s>
|
funcom_train/35649610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object convertIfNeeded(Object value, String type) {
Class <?> clazz = null;
try {
Class.forName(type);
} catch (Exception ex) {
log.handleExceptionError("Type sent was not found:" + type, ex);
}
return objectRegistry.convertObject(value, clazz);
}
COM: <s> converts the value if the type is set </s>
|
funcom_train/19912887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processFileDifference() {
Iterator it = orderedSelection.iterator();
List list = (List) ht.get("files");
while (it.hasNext()) {
File current = (File) it.next();
if (!list.contains(current))
it.remove();
}
it = list.iterator();
ArrayList increment = new ArrayList();
while (it.hasNext()) {
File current = (File) it.next();
if (!orderedSelection.contains(current)) {
increment.add(current);
}
}
orderedSelection.addAll(increment);
}
COM: <s> this method will compare the file list in </s>
|
funcom_train/40627814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testListen_Extreme_2() throws Exception {
checkListen_Extreme_2(false);
assertEquals(10000, getEventCount());
assertEquals(5000, getEventCount(TEST_DOMAIN));
assertEquals(5000, getEventCount(TEST_DOMAIN_2));
assertEquals(0, getEventCount(TEST_DOMAIN_3));
}
COM: <s> adding 10000 events and a single listen at the end without threads </s>
|
funcom_train/37421245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getParticipants(){
String list ="";
Iterator i = participants.iterator();
while(i.hasNext()){
Contact contact = (Contact) i.next();
list+=contact.getNickname();
if(i.hasNext())
list+=", ";
}
return list;
}
COM: <s> returns participants nicknames in a formatted string </s>
|
funcom_train/3473067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clear() {
if (this.hotSpot != null && this.cursorImage != null) {
paintMode = CLEAR;
repaint(this.mouseX - this.hotSpot.x, this.mouseY - this.hotSpot.y,
this.cursorImage.getWidth(null),
this.cursorImage.getHeight(null));
}
}
COM: <s> clears the glass pane and removes the mouse pointer </s>
|
funcom_train/20574576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void build() throws Exception {
try {
if(options != null)
// set the options
filter.setOptions(options);
// setInputFormat
filter.setInputFormat(data);
for (int i = 0; i < data.numInstances(); i++) {
filter.input(data.instance(i));
}
// Signify that this batch of input to the filter is finished
filter.batchFinished();
Instances newData = filter.getOutputFormat();
Instance processed;
while ((processed = filter.output()) != null) {
newData.add(processed);
}
} catch (Exception exception){
exception.printStackTrace();
}
}
COM: <s> the execute method for the unsupervised resample filter </s>
|
funcom_train/25540349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPhasePlot() {
PhaseParameterDialog phaseDialog = getPhaseParameterDialog();
phaseDialog.showDialog();
if (!phaseDialog.isCancelled()) {
double period = phaseDialog.getPeriod();
double epoch = phaseDialog.getEpoch();
Map<SeriesType, Boolean> seriesVisibilityMap = analysisTypeMap.get(
analysisType).getObsAndMeanChartPane().getObsModel()
.getSeriesVisibilityMap();
performPhasePlot(period, epoch, seriesVisibilityMap);
}
}
COM: <s> create a phase plot first asking for period and epoch </s>
|
funcom_train/6274386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean excluded(MentionContext mention, DiscourseEntity entity) {
MentionContext cec = entity.getLastExtent();
return mention.getSentenceNumber() == cec.getSentenceNumber() &&
mention.getIndexSpan().getEnd() <= cec.getIndexSpan().getEnd();
}
COM: <s> excludes entities which you are not compatible with the entity under consideration </s>
|
funcom_train/43873357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object evaluate(final InputStream script, final String sourceName) throws IOException {
try {
return evaluateScript(script, sourceName);
} catch (final JavaScriptException e) {
LOG.error("JavaScriptException occured: " + e.getMessage());
throw e;
} finally {
Context.exit();
}
}
COM: <s> evaluates a script from a stream </s>
|
funcom_train/4190211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getStatusDesc() {
if (this.getStatus() == BUFFERING) {
return resBundle.getString("_(buffering_") + getPerCentProgress()
+ "%)";
} else if (this.getStatus() == READING) {
return resBundle.getString("_(recording)");
}
return "";
}
COM: <s> text description of the current status eg quot buffering 5 quot </s>
|
funcom_train/30225506 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private OutputStream getOutputStream(OutputStream stm, IType type) {
if (stm == null) {
String fileName = _compiler.compileFileName(type.getName(),
_stringConverter,
BrowserHelper.getDestinationDirectory(getParent()));
try {
return new FileOutputStream(new File(fileName));
}
catch (FileNotFoundException e) {
throw new CodeGenException("Could not create output file '" +
fileName + "'!", e);
}
}
else {
return stm;
}
}
COM: <s> returns stm code output stream code object if it isnt code null code </s>
|
funcom_train/645079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void postWindowOpen() {
super.postWindowOpen();
IWorkbenchWindowConfigurer windowConfigurer = getWindowConfigurer();
windowConfigurer.setTitle(Activator.getResourceString("Application.SQLExplorer.WindowTitle"));
windowConfigurer.setShowCoolBar(false);
windowConfigurer.setShowPerspectiveBar(false);
windowConfigurer.setShowProgressIndicator(true);
}
COM: <s> set properties after application window is created </s>
|
funcom_train/1942349 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSystemLockCount() throws SQLException {
int ret = 0;
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT count(*) FROM LockTable WHERE lock_table='System'");
if (rs.first()) ret = rs.getInt(1);
stmt.close();
return ret;
}
COM: <s> counts locked systems </s>
|
funcom_train/29698521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMovementString(int mtype) {
switch(mtype) {
case IEntityMovementType.MOVE_SKID :
return "Skidded";
case IEntityMovementType.MOVE_NONE :
return "None";
case IEntityMovementType.MOVE_WALK :
return "Cruised";
case IEntityMovementType.MOVE_RUN :
return "Flanked";
case IEntityMovementType.MOVE_JUMP :
return "Jumped";
default :
return "Unknown!";
}
}
COM: <s> returns the name of the type of movement used </s>
|
funcom_train/43827584 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLowPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CPNInt_low_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CPNInt_low_feature", "_UI_CPNInt_type"),
CpntypesPackage.Literals.CPN_INT__LOW,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the low feature </s>
|
funcom_train/24219657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Partner getPartner(String oftpId) {
String query = "SELECT * FROM partner WHERE oftpid='" + oftpId + "'";
List<Partner> partner = this.getPartnerByQuery(query);
if (partner == null || partner.isEmpty()) {
return (null);
}
return (partner.get(0));
}
COM: <s> loads a specified partner from the db </s>
|
funcom_train/37581996 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Connection openConnection(Database database, String password) throws DataException {
if (isConnected(database))
return null;
Connection connection = (Connection) connections.get(database);
if (connection != null) {
// should not happen
closeConnection(database);
}
connection = internalOpenConnection(database, password);
connections.put(database, connection);
notifyMessageListeners(IMessageListener.LEVEL_LOG, StateChangeEvent.TYPE_DATABASE_OPENED, database, database.getConfiguration().getUrl());
return connection;
}
COM: <s> returns null if the connection is already open </s>
|
funcom_train/26335465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHitDice( String dice ) {
this.hitDice = dice;
if( this.hitBonus != 0 ) {
dice += ( this.hitBonus > 0 ? "+" : "" ) + this.hitBonus;
}
this.maxHp = 4;
for( int i = 0; i < this.level; i++ ) {
this.maxHp += DiceRoll.roll( dice );
}
this.hp = this.maxHp;
}
COM: <s> set hit dice must be called once when character created rolls </s>
|
funcom_train/7742412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ParseNode createChain(int[] symbols, ParseNode leaf) {
ParseNode top = leaf;
for (int i = symbols.length - 1; i >= 0; --i) {
ParseNode parent = create(symbols[i]);
if (top != null) {
parent.addChild(top);
}
top = parent;
}
return top;
}
COM: <s> makes linked list of parse nodes corresponding to given array of symbol codes </s>
|
funcom_train/33268910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(PrettyPrintBox box) {
if (box instanceof HorizontalBox) {
HorizontalBox hbox = (HorizontalBox) box;
for (int i = 0; i < hbox.boxes.size(); i++) {
add((PrettyPrintBox) hbox.boxes.elementAt(i));
}
} else {
boxes.addElement(box);
}
}
COM: <s> adds a pretty printed box to the box contents </s>
|
funcom_train/50501889 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IPlugin getPlugin(String id) {
synchronized(plugins){
Iterator iter = plugins.iterator();
while(iter.hasNext()) {
IPlugin plugin = (IPlugin) iter.next();
if(plugin.getID().equals(id)) {
return plugin;
}
}
return null;
}
}
COM: <s> gets the targets attribute of the ejbdoclet task object </s>
|
funcom_train/6474407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void installActivity(String className) {
try {
Activity a = (Activity) Class.forName(className).newInstance();
installActivity(a);
} catch (ClassNotFoundException e) {
Logger.getLogger(LOGNAME).log(Level.SEVERE,
"Problem installing Activity: " + className, e);
} catch (InstantiationException e) {
Logger.getLogger(LOGNAME).log(Level.SEVERE,
"Problem installing Activity: " + className, e);
} catch (IllegalAccessException e) {
Logger.getLogger(LOGNAME).log(Level.SEVERE,
"Problem installing Activity: " + className, e);
}
}
COM: <s> install an activity </s>
|
funcom_train/2579656 | /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 (obj == this) {
return true;
}
if (!(obj instanceof StackedAreaRenderer)) {
return false;
}
StackedAreaRenderer that = (StackedAreaRenderer) obj;
if (this.renderAsPercentages != that.renderAsPercentages) {
return false;
}
return super.equals(obj);
}
COM: <s> checks this instance for equality with an arbitrary object </s>
|
funcom_train/34805239 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getColumnType(int pPosition) throws ExCursorRoot {
try {
return mRsetMeta.getColumnType(pPosition);
} catch (SQLException e) {
//TODO: handle this Oracle/SQL exception in a nicer way
throw new ExCursorRoot(" No column datatype found ", e);
}
}
COM: <s> returns the sql column datatype from the result set </s>
|
funcom_train/37190422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected FixedOrderHashMap getSchemas() throws SQLException {
final FixedOrderHashMap schemaList = new FixedOrderHashMap();
final ResultSet resultSet = metaData.getSchemas();
final int columnCount = resultSet.getMetaData().getColumnCount();
String databaseName = null;
while(resultSet.next()) {
if(columnCount > 1) databaseName = resultSet.getString(2);
schemaList.put(resultSet.getString(1), databaseName);
}
return schemaList;
}
COM: <s> returns a list of schemas availiable to this server </s>
|
funcom_train/32134208 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
while (true) {
if(( liter >= (max - margin)) && ( getState() == true)){
Debug.message( "lytt.xenu.WaterLevel::run() WaterInlet Closed");
deactivate();
pump.deactivate();
}
else if ((liter < (max - margin)) && getState() == false){
Debug.message( "lytt.xenu.WaterLevel::run() WaterInlet Opened");
activate();
pump.activate();
}
sleep( interval);
}
}
catch (Exception e) {
Debug.exception(e);
}
}
COM: <s> starts thread checks waterlevel </s>
|
funcom_train/28125902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstructorArguments() {
try {
new TimeSpan(new Date(), null);
fail("Didn't throw IllegalArgumentException for null dates.");
}
catch (IllegalArgumentException iae) {
/* Pass */
}
try {
new TimeSpan(null, new Date());
fail("Didn't throw IllegalArgumentException for null dates.");
}
catch (IllegalArgumentException iae) {
/* Pass */
}
}
COM: <s> tests that null dates cant be passed to the constructor </s>
|
funcom_train/25792576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeBreakpoint(ProcessInstance processInstance) {
if (m_breakPointsProcInst.contains(processInstance)) {
m_debugToolbus.removeProcessInstanceBreakPoint(processInstance
.getProcessId());
m_breakPointsProcInst.remove(processInstance);
for (IProcessInstanceBreakPointListener processInstanceBreakPointLstr : m_processInstanceListeners) {
processInstanceBreakPointLstr.removeBreakpoint(processInstance);
}
} else {
ExceptionReporter.report("Could not remove breakpoint: not present.");
}
}
COM: <s> remove breakpoint for a specific process instance </s>
|
funcom_train/13122077 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedRows(String[] encodedSelections) throws Exception {
if(encodedSelections != null) {
int[] selectedIndexes = new int[encodedSelections.length];
for(int i = 0; i < encodedSelections.length; i++) {
selectedIndexes[i] = Integer.parseInt(encodedSelections[i]);
}
tableSorter.setSelectedIndexes(selectedIndexes);
}
else {
tableSorter.setSelectedIndexes(new int[0]);
}
}
COM: <s> sets the selected rows </s>
|
funcom_train/17711636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPanel_AvailableTop() {
if (panel_AvailableTop == null) {
jLabel = new JLabel();
jLabel.setText("Available Addons");
panel_AvailableTop = new JPanel();
panel_AvailableTop.setLayout(new BorderLayout());
panel_AvailableTop.add(jLabel, BorderLayout.WEST);
panel_AvailableTop.add(getText_Filter(), BorderLayout.EAST);
}
return panel_AvailableTop;
}
COM: <s> this method initializes panel available top </s>
|
funcom_train/12868364 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private URL toURL(File path, boolean trailingSlash) {
URL url = null;
try {
url = new URL(path.toURI().toString() + ((trailingSlash) ? "/" : ""));
} catch (Exception e) {
getLog().error("Could not resolve \"" + path.getPath() + "\".", e);
}
return url;
}
COM: <s> converts the given path to an url </s>
|
funcom_train/32776079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File file) {
if (file.isDirectory()) {
return true;
}
String ext = null;
String s = file.getName();
int i = s.lastIndexOf('.');
if (i > 0 && i < s.length() - 1) {
ext = s.substring(i + 1).toLowerCase();
}
if (ext != null) {
if (ext.equals("xml")) {
return true;
} else {
return false;
}
}
return false;
}
COM: <s> accepts all directories and xml files </s>
|
funcom_train/22187260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void drawPicture(Picture source, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2) {
backbuffer.drawPicture(source, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2);
}
COM: <s> draw a scaled image onto the backbuffer where </s>
|
funcom_train/3594993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void highlightQueryResults(List results) {
for (Iterator rit=results.iterator(); rit.hasNext(); ) {
Object result = rit.next();
if (result instanceof NOMElement) {
NOMElement element = (NOMElement) result;
if (isResultRelevant(element)) {
acceptQueryResultRecursive(element);
}
} else if (result instanceof List) {
List subList = (List) result;
highlightQueryResults(subList);
}
}
}
COM: <s> display query results including sub lists </s>
|
funcom_train/42476547 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean deleteList(long rowId) {
boolean ret = mDb.delete(TABLE_LIST, LIST_KEY_ROWID + "=" + rowId, null) > 0;
ret &= mDb.delete(TABLE_ITEMS, ITEM_KEY_ROWID + "=" + rowId, null) > 0;
return ret;
}
COM: <s> delete the list with the given row id </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.