__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/10628630 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testZeroOne() {
String numA = "0";
String numB = "1";
String res = "1";
BigInteger aNumber = new BigInteger(numA);
BigInteger bNumber = new BigInteger(numB);
BigInteger result = aNumber.xor(bNumber);
assertTrue(res.equals(result.toString()));
}
COM: <s> xor for zero and one </s>
|
funcom_train/18366334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void retrieveData() throws SQLException {
ResultSet rs;
Statement statement;
statement = SQLHandler.openNewStatement();
rs = SQLHandler.queryGetGroupData(statement, this);
/*Get the first record*/
rs.next();
gName = rs.getString("GROUP_NAME");
gDescription = rs.getString("GROUP_DESCRIPTION");
gDepartment = rs.getString("GROUP_DEPARTMENT");
gCreationDate = rs.getString("CREATION_DATE");
statement.close();
}
COM: <s> retrieve the data from the database based on the data </s>
|
funcom_train/8076107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setXindex(int x) {
m_xIndex = x;
for (int i=0;i<m_plots.size();i++) {
((PlotData2D)m_plots.elementAt(i)).setXindex(m_xIndex);
}
determineBounds();
if (m_JitterVal != 0) {
updatePturb();
}
m_axisChanged = true;
this.repaint();
}
COM: <s> set the index of the attribute to go on the x axis </s>
|
funcom_train/19035866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateLinks(LinkCollection linkCollection) {
if(isConnected()) {
try {
synchronized(this) {
this.getOutputStream().writeInt(ServerMessageCode.UPDATELINKS.getIndex());
linkCollection.sendData(this.getOutputStream());
this.getOutputStream().flush();
}
} catch (IOException e) {
this.messageFailed(e);
}
}
}
COM: <s> updates information about the post </s>
|
funcom_train/1376850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Step getStep(String step) throws StepNotFoundException {
Step s;
if (game.containsKey(step)) {
s = game.get(step);
} else {
s = current;
throw new StepNotFoundException("ERROR: step not found. cannot go to step '" + step + "'");
}
return s;
}
COM: <s> get step information using string key does not advance game </s>
|
funcom_train/51345029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() {
if (readerFuture == null) {
// not running.
return;
}
// attempt to cancel the reader.
readerFuture.cancel(true/* mayInterruptIfRunning */);
// shutdown the thread running the reader.
readService.shutdownNow();
if (process != null) {
// destroy the running process.
process.destroy();
process = null;
is = null;
}
readerFuture = null;
}
COM: <s> stops the process </s>
|
funcom_train/624771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUml() throws Exception {
MofRepository umlInMof = new EveRepository();
MofModelFacade mofModelFacade = new MofModelFacade(umlInMof);
Lexer lexer =
new Lexer(
new PushbackReader(
new InputStreamReader(
this.getClass().getResourceAsStream(
"/de/tuberlin/cs/cis/ocl/eval/test/resources/mof/test.ocl"))));
OclParser p = new OclParser(lexer);
Evaluator eval = new Evaluator(mofModelFacade);
Report report = eval.evaluate(p.parse());
System.out.println(report);
}
COM: <s> interpretes the correct files included in test files eval mof test </s>
|
funcom_train/40420164 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTypePerDefault() throws Exception {
CRResolvableBean bean = new CRResolvableBean();
bean.set("mimetype", "somefrigginwrongthing");
String type = ImageMimetypeMapper.getTypeFromBean(bean);
String shouldbe = "png";
assertEquals("The type (" + type + ") should be (" + shouldbe + ")",
type, shouldbe);
}
COM: <s> test for default </s>
|
funcom_train/43014752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Section getParent() {
if (Section_Type.featOkTst && ((Section_Type) jcasType).casFeat_parent == null) {
jcasType.jcas.throwFeatMissing("parent", "org.apache.uima.mediawiki.types.Section");
}
return (Section) jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Section_Type) jcasType).casFeatCode_parent));
}
COM: <s> getter for parent gets the parent section if any of this current one </s>
|
funcom_train/7295172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void buildCharCategories(Vector tempRuleList) {
super.buildCharCategories(tempRuleList);
categoryFlags = new boolean[categories.size()];
for (int i = 0; i < categories.size(); i++) {
UnicodeSet cs = (UnicodeSet)categories.elementAt(i);
cs.retainAll(dictionaryChars);
if (!cs.isEmpty()) {
categoryFlags[i] = true;
}
}
}
COM: <s> the other half of the logic to handle the dictionary characters happens here </s>
|
funcom_train/46471668 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean connect(Connection c) {
if (this.peers.size() >= this.maxPeers) return false;
Iterator itr = this.peers.iterator();
while (itr.hasNext()) {
Connection pc = (Connection) itr.next();
if (c.getRemoteNodeId() == pc.getRemoteNodeId() &&
c.getNodeProxy() == pc.getNodeProxy()) return false;
}
c.start();
this.peers.add(c);
this.displayMessage("Established connection " + c.toString());
return true;
}
COM: <s> adds the specified connection object to the list stored by this node </s>
|
funcom_train/14069837 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExtendedData(int[] data) {
if (data.length > EXT_LENGTH) {
throw new IllegalArgumentException("Data packet too long: " +
data.length);
}
extendedBuffer = new int[EXT_LENGTH];
System.arraycopy(data,0,extendedBuffer,0,EXT_LENGTH);
}
COM: <s> sets the extended data buffer to the indicated bytes </s>
|
funcom_train/35812167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int countTables() {
int result = -1;
Statement stat = null;
ResultSet rs = null;
try {
stat = conn.createStatement();
rs = stat
.executeQuery("SELECT count(1) FROM sqlite_master where name not like '%sequence%'");
if (rs.next()) {
int count = rs.getInt(1);
if (count > 0) {
result = count;
}
}
} catch (Exception e) {
// nothing todo here
} finally {
Cleanup(stat, rs);
}
return result;
}
COM: <s> counts tables in database </s>
|
funcom_train/50077659 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMruCacheExpiration() {
Cache localCache =
(Cache) Lookup.getInstance().fetchComponent(MRU_CACHE_NAME);
localCache.get(new Integer(1));
mruItemLoaded = false;
try {
Thread.sleep(600);
} catch(InterruptedException e) { }
localCache.get(new Integer(1));
TestCase.assertTrue("DataLoader was not called for expired cache object",
mruItemLoaded);
}
COM: <s> tests the expiration ablity of the mrucache </s>
|
funcom_train/5584091 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decrypt(StreamBlockReader input, StreamBlockWriter output, Key key, Mode mode) throws Exception {
this.calcKeyParts((SingleKey)key);
TripleDESMode tdesmode = (TripleDESMode) mode;
Block cryptblock = new Block(0);
Block plainblock = new Block(0);
Block lastblock = new Block(0);
while (true) {
cryptblock = input.read(64);
if (cryptblock.getLength() == 0)
break;
else
output.write(lastblock);
plainblock = tdesmode.decryptBlock(cryptblock);
lastblock = plainblock;
}
plainblock = tdesmode.decryptPadding(lastblock);
output.write(plainblock);
}
COM: <s> decrypt a inputstream to an outputstream using a key with a special mode </s>
|
funcom_train/10802076 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean hasConcretePCSuperclass() {
if (_super == null)
return false;
if (!Modifier.isAbstract(_super.getModifiers()) &&
(!getPCSuperclassMetaData().isAbstract()))
return true;
return getPCSuperclassMetaData().hasConcretePCSuperclass();
}
COM: <s> return true if this class has a concrete persistent superclass </s>
|
funcom_train/29706000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected UpdatableBooleanFieldEditor addBooleanSelector(String key_p, Composite parent_p) {
// Get label
String label = Messages.getString(key_p);
// Build editor
UpdatableBooleanFieldEditor editor = new UpdatableBooleanFieldEditor(key_p, label, parent_p);
// Add it
addField(editor);
// Listen to mouse
addMouseTrackListener(editor.getButton(parent_p), key_p);
// OK
return editor;
}
COM: <s> creates and return a boolean editor </s>
|
funcom_train/46327629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Cursor fetch(long id) {
// Set selectionArgs, groupBy, having, orderBy and limit to be null.
Cursor mCursor = database.query(true, DATABASE_TABLE, KEYS, KEY_ID + "=" + id, null, null,
null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;
}
COM: <s> return a cursor pointing to the record matches the log action id </s>
|
funcom_train/36490590 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComponent grid(int width, int height, JButton... buttons) {
// Aufpassen: GridLayout(rows, cols), also (Y, X)
JPanel rv = new JPanel(new GridLayout(height, width, 8, 8));
for (JButton b : buttons)
rv.add(b == null ? new JPanel() : b);
currentDefault = null;
return rv;
}
COM: <s> baut das panel </s>
|
funcom_train/12181251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearMarkers(IResource resource) {
try {
if (resource.exists()) {
resource.deleteMarkers(IMarker.PROBLEM,
true,
IResource.DEPTH_INFINITE);
}
} catch (CoreException e) {
e.printStackTrace();
EclipseCommonPlugin.handleError(
ControlsPlugin.getDefault(), e);
}
}
COM: <s> clear the markers for this resource only if the resource exists it may </s>
|
funcom_train/12188733 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPopNonResourceOwner() throws Exception {
TestRecoverableResourceOwnerStack trros =
new TestRecoverableResourceOwnerStack();
final Object toPop = new Object();
trros.push(toPop, false);
Object popped = trros.pop();
assertSame("Unexpected object popped.", toPop, popped);
assertTrue("Expected popped stack to be empty.",
trros.poppedResourceOwners.isEmpty());
}
COM: <s> test the method pop with a non resource owner object </s>
|
funcom_train/42570823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCompartmentPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AbstractCompartmentChildDesc_compartment_feature"),
getString(
"_UI_PropertyDescriptor_description",
"_UI_AbstractCompartmentChildDesc_compartment_feature",
"_UI_AbstractCompartmentChildDesc_type"),
DescPackage.Literals.ABSTRACT_COMPARTMENT_CHILD_DESC__COMPARTMENT,
true, false, true, null, null, null));
}
COM: <s> this adds a property descriptor for the compartment feature </s>
|
funcom_train/26467574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isArchivePath(IPath path) {
String ext = path.getFileExtension();
if (ext != null && ext.length() != 0) {
String[] acceptedExtensions = getAcceptedExtensions();
for (int i = 0; i < acceptedExtensions.length; i++) {
if (ext.equalsIgnoreCase(acceptedExtensions[i])) {
return true;
}
}
}
return false;
}
COM: <s> verify the correct extension </s>
|
funcom_train/31804607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SharedSecret getSharedSecret(String domainName) {
if (domainName == null || domainName.equals("")) {
throw new IllegalArgumentException("No domain name for shared secret.");
}
Enumeration secrets = secrets();
if (secrets == null) {
return null;
}
while (secrets.hasMoreElements()) {
SharedSecret secret = (SharedSecret)secrets.nextElement();
if (domainName.equals(secret.getDomainName())) {
return secret;
}
}
return null;
}
COM: <s> gets a shared secret </s>
|
funcom_train/17724419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void configureAction(UIComponent component, String name, String value) {
if (value == null) {
return;
}
if (isValueReference(value)) {
MethodBinding mb =
getFacesContext().getApplication().
createMethodBinding(value, ACTION_SIGNATURE);
((ActionSource) component).setAction(mb);
} else {
((ActionSource) component).setAction(new ConstantMethodBinding(value));
}
}
COM: <s> p configure an action method binding or literal outcome </s>
|
funcom_train/2496852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove() throws DataAccessException {
DNSMessage message = new DNSMessage(DNSMessage.REMOVE_ZONE, toZone());
try {
message.validate();
DAOFactory factory = (DAOFactory) DAOFactory.getFactory();
DomainDAO domainDAO = (DomainDAO) factory.getDomainDAO();
domainDAO.remove(entity);
publish(message);
}
catch(ValidationException e) {
FacesMessages.instance().add(e.getMessage());
e.printStackTrace();
}
}
COM: <s> removes the domain entity from the persistence store </s>
|
funcom_train/27787632 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String name, int type, boolean isConstant, double value) {
if (!variables.containsKey(name)) {
Variable variable = new Variable(name, type, isConstant, value);
variables.put(name, variable);
} else {
//This can happen if a user enters one of the implicit
//parameters which is always added.
assert false;
}
}
COM: <s> add a new variable </s>
|
funcom_train/39366934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void read() throws SeisException {
String filePath = _datasetPath + File.separator + Seisio.FILE_PROPERTIES_XML;
try {
_rootParameterSet = ParameterSetIO.readFile(filePath);
} catch (IOException e) {
throw new SeisException("Error reading file XML file '" + filePath + "'");
}
}
COM: <s> reads the properties tree from disk </s>
|
funcom_train/20826244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copyDimmerNamesToChannels() {
Dimmers dimmers = context.getShow().getDimmers();
for (int i = 0; i < dimmers.size(); i++) {
Dimmer dimmer = dimmers.get(i);
Channel channel = dimmer.getChannel();
if (channel != null) {
channel.setName(dimmer.getName());
}
}
}
COM: <s> sets the names of the channels to the names of names of the </s>
|
funcom_train/34628388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isUpToDate(IProject project) {
long lastBuildStamp = getOutputFileDate(project);
IResource[] files = TexlipseProperties.getAllProjectFiles(project);
for (int i = 0; i < files.length; i++) {
long stamp = files[i].getLocalTimeStamp();
if (stamp > lastBuildStamp) {
return false;
}
}
return true;
}
COM: <s> check if the given project needs a rebuild </s>
|
funcom_train/44388648 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(){
while(!stop){
try {
Socket client = listen_socket.accept();
if(checkMD5SUM(client)) {
server.addConnection(client, service);
} else {
client.close();
}
} catch (InterruptedIOException iioe) {
// logger.logp(Level.FINEST, this.getClass().toString(), "run", iioe.toString());
} catch (IOException ioe){
logger.logp(Level.SEVERE, this.getClass().toString(), "run", ioe.toString());
}
}
}
COM: <s> wait for client connects an pass them to the </s>
|
funcom_train/24515147 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValues( String search, boolean matchCase, boolean down, boolean mword, boolean replace, String rtext) {
if ( search != null && (search.length() > 0)) {
setEnabled( true);
}
this.search = search;
this.matchCase = matchCase;
this.down = down;
this.matchWord = mword;
this.doReplace = replace;
this.replaceText = rtext;
}
COM: <s> sets the previous search values </s>
|
funcom_train/9296556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isRoot(FileObject f) {
try {
if (f == null || f.getChildren() != null
|| f.getChildren().length != 0) {
return false;
}
} catch (FileSystemException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
FileObject[] roots = getRoots();
for (int i = 0; i < roots.length; i++) {
if (roots[i].equals(f)) {
return true;
}
}
return false;
}
COM: <s> determines if the given file is a root in the navigatable tree s </s>
|
funcom_train/12836625 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInReplyTo(String aRep) {
try {
attName = soapEnv.createName(IN_REPLY_TO, soapPrefix, soapNamespace);
rootElement.addChildElement(attName).addTextNode(aRep);
} catch (SOAPException e) {
e.printStackTrace();
}
}
COM: <s> method to set the in reply to fipa parameter </s>
|
funcom_train/15482911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private InputStream getStreamFromClient() throws IOException {
if (CLIENT_IS_CONSOLE) {
return System.in;
}
if (m_soToClient == null) {
throw new IllegalStateException(Messages.getInstance(
Messages.DEFAULT_BUNDLE_NAME, this.getClass()).getString(
"SSL.not_connected_to_client")); //$NON-NLS-1$
}
InputStream clientIn = m_soToClient.getInputStream();
return clientIn;
}
COM: <s> precond socket to client must be connected </s>
|
funcom_train/4549753 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getNextId() {
long id = -1;
try {
conn = dataSource.getConnection();
stmt = conn.createStatement();
rs = stmt.executeQuery(genID);
rs.next();
id = rs.getLong(1);
} catch (Exception e) {
logger.error("Cannot generate ID", e);
throw new DAOException("Cannot generate ID", e);
} finally {
try {
rs.close();
} catch (Exception e) {
}
try {
stmt.close();
} catch (Exception e) {
}
try {
conn.close();
} catch (Exception e) {
}
}
return id;
}
COM: <s> returns the next id for bookmark table or </s>
|
funcom_train/22279187 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setClassNameForMarker(String className,String aMarker) {
Hashtable r = rulesForMarker(aMarker);
if( r == null )
r = new Hashtable();
r.put(REPRESENTATION_KEY,className);
setRulesForMarker( r, aMarker );
}
COM: <s> convenience to define the class that should be used to store an html </s>
|
funcom_train/22233308 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void getAngularAttenuation(Point3f[] attenuation) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_ANGULAR_ATTENUATION_READ))
throw new CapabilityNotSetException(J3dI18N.getString("ConeSound9"));
((ConeSoundRetained)this.retained).getAngularAttenuation(attenuation);
}
COM: <s> copies the array of attenuation values from this sound including </s>
|
funcom_train/8630620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getObject(int columnIndex, Map<String, Class< ? >> map) throws SQLException {
try {
if (isDebugEnabled()) {
debugCode("getObject(" + columnIndex + ", map);");
}
throw Message.getUnsupportedException("map");
} catch (Exception e) {
throw logAndConvert(e);
}
}
COM: <s> not supported gets a column as a object using the specified type </s>
|
funcom_train/18255480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Iterator withinIterator(final Coordinate origin, Conditional condition, boolean includeSelf, final double distance) {
Conditional allConditions = createSpatialConditional(origin, condition, includeSelf, distance);
if (allConditions != null) {
return conditionalIterator(iterator(), allConditions);
} else {
return iterator();
}
}
COM: <s> returns an iteration across all agents the specified distance from the </s>
|
funcom_train/26239628 | /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 instanceof StudentQuestion))
return false;
StudentQuestion other = (StudentQuestion) obj;
return ((other.clientSideId == this.clientSideId ||
other.serverSideId == this.serverSideId) &&
((this.questionText != null && this.questionText.equals(other.questionText)) ||
(this.questionText == null && other.questionText == null)));
}
COM: <s> returns true if the given object is an instance of student question </s>
|
funcom_train/36244459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getErrorMessage(String errorRef) {
String result = "";
Error error = null;
for (int i = 0; i < length(); i++) {
error = get(i);
if (error.getErrorRef().equalsIgnoreCase(errorRef)) {
result = error.getErrorMessage();
break;
}
}
return result;
}
COM: <s> get the error message by ref </s>
|
funcom_train/34627489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getIndentation(String text, int tabWidth) {
String indentation = "";
char[] array = text.toCharArray();
if (array.length == 0){
return indentation;
}
if (array[0] == ' ' || array[0] == '\t'){
int tabs = numberOfTabs(text);
int spaces = numberOfSpaces(text) - tabs + (tabs * tabWidth);
if (spaces > 0) {
for (int i = 0; i < spaces; i++) {
indentation += " ";
}
}
}
return indentation;
}
COM: <s> returns the indentation of the given string </s>
|
funcom_train/4518102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getMillisInDay() {
Calendar cal = getCalendar();
long h = cal.get(Calendar.HOUR_OF_DAY);
long m = cal.get(Calendar.MINUTE);
long s = cal.get(Calendar.SECOND);
return h * MILLIS_PER_HOUR + m * MILLIS_PER_MINUTE + s * MILLIS_PER_SECOND;
}
COM: <s> calculate the milliseconds from 0 00 ignoring the millisecond field </s>
|
funcom_train/3988873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PImage loadImageMT(Image awtImage) {
MediaTracker tracker = new MediaTracker(this);
tracker.addImage(awtImage, 0);
try {
tracker.waitForAll();
} catch (InterruptedException e) {
//e.printStackTrace(); // non-fatal, right?
}
PImage image = new PImage(awtImage);
image.parent = this;
return image;
}
COM: <s> load an awt image synchronously by setting up a media tracker for </s>
|
funcom_train/22397552 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invoke(MethodInvocation mi) {
this.invocations.addElement(mi);
for (int i = 0; i < getNumberOfExpectations(); i++) {
getExpectation(i).invoke(mi);
if (mi.isEvaluated()) {
return;
}
}
if ((mi.getMethod().isAbstract()) || (this.stubConcreteMethods)) {
mi.setReturnValue(DefaultValues.getDefaultValue(mi.getMethod()
.getReturnClass()));
}
}
COM: <s> processes a method invocation on a spy object </s>
|
funcom_train/25858468 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(String key, String data) throws Exception {
if (writer != null) {
Document doc = new Document();
doc.add(new Field(KEY_FIELD, key, Field.Store.NO, Field.Index.NO_NORMS));
doc.add(new Field(VALUE_FIELD, data, Field.Store.YES, Field.Index.NO));
writer.addDocument(doc);
}
}
COM: <s> put key and data into index </s>
|
funcom_train/13272324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isTextureTransparent(Texture texture) {
synchronized (this.textures) { // Use one mutex for both maps
// Search which key matches texture
for (TextureKey key : textures.keySet()) {
if (key.getTexture() == texture) {
return key.isTransparent();
}
}
return texture.getFormat() == Texture.RGBA;
}
}
COM: <s> returns code true code if the texture is shared and its image contains </s>
|
funcom_train/23173707 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void askForDefiningSportTypes () {
if (document.getSportTypeList ().size () == 0) {
if (context.showConfirmDialog (context.getMainFrame (), "common.info",
"st.main.confirm.define_first_sporttype") == JOptionPane.YES_OPTION) {
showSportTypeEditor ();
}
}
}
COM: <s> checks for existing sport types </s>
|
funcom_train/25501397 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateThisAlignment(de.fzi.kadmos.api.Alignment result) throws AlignmentException {
Iterator<Cell> iter = this.iterator();
while (iter.hasNext()){
iter.next();
iter.remove();
}
for (Correspondence<? extends OWLEntity> c : result.getCorrespondences()){
this.addAlignCell(c.getEntity1(), c.getEntity2(), new EquivRelation().toString(), c.getConfidence());
}
}
COM: <s> cleans this alignment and adds the correspondences of the given alignment </s>
|
funcom_train/38289738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getSharedFullPath(String path, String file) {
String fullPath;
if (file == null) {
fullPath = PathUtil.concatPath(sharedFoldersPath, path);
} else {
fullPath = PathUtil.concatPath(sharedFoldersPath, path, file);
}
fullPath = PathUtil.trimR(fullPath);
return fullPath;
}
COM: <s> gets fullpath from entry point path and file </s>
|
funcom_train/2360180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ElementType getType(String s) {
if (s.equals("node"))
return ElementType.t_node;
if (s.equals("way"))
return ElementType.t_way;
if (s.equals("relation"))
return ElementType.t_relation;
this.interrupt();
return ElementType.t_none;
}
COM: <s> transform an element typename to elementtype </s>
|
funcom_train/38827610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BasicNurbsSurface toDimension(int newDim) {
if (getPhyDimension() == newDim) return this;
ControlPointNet nCNet = _cnet.toDimension(newDim);
BasicNurbsSurface srf = BasicNurbsSurface.newInstance(nCNet, getSKnotVector(), getTKnotVector());
return copyState(srf); // Copy over the super-class state for this object to the new one.
}
COM: <s> return the equivalent of this surface converted to the specified number </s>
|
funcom_train/32112285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int addCoreBone(final CoreBone coreBone) {
// get next bone id
int boneId;
boneId = vectorCoreBone.size();
vectorCoreBone.add(coreBone);
// if necessary, add the core bone to the root bone list
if(coreBone.getParentId() == -1) {
vectorRootCoreBoneId.add(boneId);
}
// add a reference from the bone's name to its id
mapCoreBoneName( boneId, coreBone.getName() );
return boneId;
}
COM: <s> adds a core bone </s>
|
funcom_train/34522680 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parseIPARAMVALUE() throws CimError, CimInvalidParameter {
push(Element.IPARAMVALUE);
final String name = getAttribute("NAME");
final String type = peek();
if (type == null)
params.addNull(name);
else if (Element.CLASSNAME.matches(type))
params.add(name, parseCLASSNAME());
else if (Element.INSTANCENAME.matches(type))
params.add(name, parseINSTANCENAME());
else if (Element.VALUE.matches(type))
params.add(name, parseVALUE());
else if (Element.VALUE_ARRAY.matches(type))
params.add(name, parseVALUE_ARRAY());
pop(Element.IPARAMVALUE);
}
COM: <s> parses the iparamvalue </s>
|
funcom_train/15628422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void iterateState(final int modifiers) {
if (!getModel().isEnabled()) {
return;
}
grabFocus();
final TristateButtonModel buttonModel = getTristateModel();
buttonModel.setTristateState(nextState(buttonModel.getTristateState()));
fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, getText(), System.currentTimeMillis(), modifiers));
}
COM: <s> increments the state </s>
|
funcom_train/28268350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void text(String s) throws SAXException {
char[] data = s.toCharArray();
for (int i = 0; i < data.length; i++) {
char c = data[i];
if (c < 32 && c != '\r' && c != '\n' && c != '\t') {
data[i] = ' ';
}
}
hd.characters(data, 0, data.length);
}
COM: <s> non whitespace ascii control characters may not be in </s>
|
funcom_train/17379639 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void commitTransaction(SessionScope sessionScope) throws SQLException {
try {
// Auto batch execution
if (sessionScope.isInBatch()) {
executeBatch(sessionScope);
}
sqlExecutor.cleanup(sessionScope);
txManager.commit(sessionScope);
} catch (TransactionException e) {
throw new NestedSQLException("Could not commit transaction. Cause: " + e, e);
}
}
COM: <s> commit the transaction on a session </s>
|
funcom_train/8101740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getAveragePrecision () {
int nc = 0;
int ni = 0;
double totalPrecision = 0.0;
for (int i=confidences.size()-1; i >= 0; i--) {
EntityConfidence c = (EntityConfidence) confidences.get (i);
if (c.correct()) {
nc++;
totalPrecision += (double)nc / (nc + ni);
}
else ni++;
}
return totalPrecision / nc;
}
COM: <s> ir average precision measure </s>
|
funcom_train/28420136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toResult(Source source, Result result) throws TransformerException {
if (source == null) {
return;
}
Transformer transformer = createTransfomer();
if (transformer == null) {
throw new TransformerException("Could not create a transformer - JAXP is misconfigured!");
}
transformer.setOutputProperty(OutputKeys.ENCODING, defaultCharset);
transformer.transform(source, result);
}
COM: <s> converts the given input source into the required result </s>
|
funcom_train/43245190 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetNOKTwoWorkPhone() {
System.out.println("getNOKTwoWorkPhone");
EmergencyContactDG2Object instance = new EmergencyContactDG2Object();
String expResult = "";
String result = instance.getNOKTwoWorkPhone();
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 noktwo work phone method of class org </s>
|
funcom_train/31126440 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadObject(DataInputStream dis) throws IOException {
int numReadings = dis.readInt();
this.clear();
for (int i = 0; i < getNumReadings(); i++) {
add(new RangeReading(dis.readFloat(),dis.readFloat()));
}
}
COM: <s> load the readings from a data input stream </s>
|
funcom_train/43753045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AxisPanel2 idExt(String idExt) {
String parentId = getTargetableParentIdOf(getTarget());
getTarget().id = ((parentId != null)? (parentId+"-") : "") + idExt;
getTarget().getElement().setId(getTarget().id);
return this;
}
COM: <s> extend the id of parent panel to create id of the target panel </s>
|
funcom_train/22497802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initDialogContents() {
jbtnCancel.setEnabled(false);
jrbUp.setSelected(false);
jrbDown.setSelected(true);
jcbWholeWords.setSelected(false);
jcbMatchCase.setSelected(false);
jcbStartOnTop.setSelected(true);
jcbProject.setSelected(false);
jtfPhrase.setText("");
jtfReplace.setText("");
}
COM: <s> set dialog components to their inital state </s>
|
funcom_train/37444245 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer getRequiredInteger(final String key) {
CDebug.checkParameterNotEmpty(key, "key");
final String stringResource = getRequiredString(key, null);
try {
return Integer.valueOf(stringResource);
} catch (final NumberFormatException exception) {
LOGGER.error(createNotAnIntegerMessage(key, stringResource));
throw exception;
}
}
COM: <s> gets a required integer resource from the list of resource bundles </s>
|
funcom_train/46739216 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFormTypeRef(DisplayModel formTypeRef) {
if (Converter.isDifferent(this.formTypeRef, formTypeRef)) {
DisplayModel oldformTypeRef= new DisplayModel(this);
oldformTypeRef.copyAllFrom(this.formTypeRef);
this.formTypeRef.copyAllFrom(formTypeRef);
setModified("formTypeRef");
firePropertyChange(String.valueOf(APPLICATIONCONTROLVALUES_FORMTYPEREFID), oldformTypeRef, formTypeRef);
}
}
COM: <s> form type for these values </s>
|
funcom_train/38578418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
layout.setEditorAreaVisible(false);
layout.setFixed(true);
// Add the control view
layout.addStandaloneView(TraciGenControlView.ID, true, IPageLayout.TOP, 0.50f, editorArea);
layout.addStandaloneView(TraciGenLogView.ID, true, IPageLayout.LEFT, 0.50f, editorArea);
}
COM: <s> this class creates and initializes the perspectives for traci gen tool </s>
|
funcom_train/15416464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Authenticate createAuthenticate(String dftl) {
String cn = GlobalProperties.get("ebean.server.authenticate", dftl);
if (cn == null){
return null;
}
try {
Class<?> cls = Class.forName(cn);
Authenticate auth = (Authenticate)cls.newInstance();
return auth;
} catch (Exception ex){
throw new PersistenceException(ex);
}
}
COM: <s> create the authenticate </s>
|
funcom_train/16826872 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long timeDelay(long sleep) {
LOG.debug("sleeping " + sleep + "ms");
final long start = System.nanoTime();
doSleep(sleep);
final long ms = (System.nanoTime() - start) / 1000000L;
LOG.debug("actually slept:" + ms);
final long delta = ms - sleep;
LOG.debug("delta=" + delta);
return delta;
}
COM: <s> time the milliseconds that were actually slept using the implementations sleep method </s>
|
funcom_train/9763328 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String readString(final int length) {
final byte[] buffer;
// Recycle single buffer if possible
if (length <= scratchBuffer.length) {
buffer = scratchBuffer;
} else {
buffer = new byte[length];
}
readBytes(buffer, 0, length);
return new String(buffer,0,length);//StringUtil.bytesToString(buffer, 0, length);
}
COM: <s> read a string off the input stream as ascii bytes </s>
|
funcom_train/32735174 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showAbout() {
if ( !showingAbout ){
showingAbout = true;
AboutDialog aboutMessageBox = new AboutDialog(
shellMGCT,
"About " + ApplicationConst.APP_NAME,
ApplicationConst.APP_INFO + "\r\n" +
"Author : " + ApplicationConst.APP_AUTHOR + "\r\n" +
"Version : " + ApplicationConst.APP_VERSION + "\r\n" +
ApplicationConst.APP_COPYRIGHT,
imageLogoSmall,
ApplicationConst.APP_LINK
);
showingAbout = false;
}
}
COM: <s> shows the about information </s>
|
funcom_train/5016254 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Table getTable(String _tableName) {
Iterator<Table> iter = tables.iterator();
while (iter.hasNext()) {
Table table = iter.next();
// table names are typically case insensitive
if (table.getName().equalsIgnoreCase(_tableName)) {
return table;
}
}
return null;
}
COM: <s> get database table specified by table name </s>
|
funcom_train/33886025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void assignLayers() {
this.rootLayer = new Layer<V>(
(DirectedGraph<Virtualizable<V>, ?>) this.virtualGraph, null,
null);
for (Virtualizable<V> root : this.roots) {
assignLayers(root, rootLayer);
}
}
COM: <s> for each of the roots found in the graph distribute the following </s>
|
funcom_train/1539416 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long degree(int i) {
if ( val.size() == 0 ) {
return 0; // 0 or -1 ?;
}
int j = ring.nvar - 1 - i;
long deg = 0;
for ( ExpVector e : val.keySet() ) {
long d = e.getVal(j);
if ( d > deg ) {
deg = d;
}
}
return deg;
}
COM: <s> degree in variable i </s>
|
funcom_train/20116771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSMTPServer() {
String serverName = getAttribute(getCurrentXml(),SMTP_ATTRIBUTE);
if (serverName.isEmpty()) {
serverName = appContext.getSmtpServer();
if (serverName.isEmpty()) {
serverName = "localhost";
}
}
return serverName;
}
COM: <s> special method to calculate </s>
|
funcom_train/460525 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String getStringFromInputStream(InputStream in) throws java.io.IOException {
int count;
byte[] by = new byte[256];
StringBuffer buf = new StringBuffer();
while ( (count=in.read(by)) > 0 ) {
for (int i=0; i<count; i++) {
by[i] &= 0x7f;
}
buf.append(new String(by,0,count));
}
return new String(buf);
}
COM: <s> given an input stream converts it to a string </s>
|
funcom_train/29416961 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setToolBarVisible(boolean bVisible) {
try {
bToolBarVisible = setToolVisible("ToolBarVisible", "private:resource/toolbar/toolbar", bToolBarVisible,
bVisible);
} catch (java.lang.InterruptedException aExc) {
logger.fine("setToolBarVisible.\n" + aExc.getStackTrace());
bMenuBarVisible = bVisible;
}
}
COM: <s> sets the tool function bar visibilty </s>
|
funcom_train/37009493 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double blueMean() {
double mean=0.f;
for (int v = 0; v < getHeight(); v++)
{
for (int u = 0; u < getWidth(); u++)
{
mean += blue(u, v);
}
}
mean /= getWidth()*getHeight();
return mean;
}
COM: <s> returns the mean blue pixel value in band 2 </s>
|
funcom_train/11687293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void startJmxAdapter() {
Properties synapseProperties = SynapsePropertiesLoader.loadSynapseProperties();
JmxInformation jmxInformation = JmxInformationFactory.createJmxInformation(
synapseProperties, serverConfigurationInformation.getHostName());
// Start JMX Adapter only if at least a JMX JNDI port is configured
if (jmxInformation.getJndiPort() != -1) {
jmxAdapter = new JmxAdapter(jmxInformation);
jmxAdapter.start();
}
}
COM: <s> starts the jmx adaptor </s>
|
funcom_train/41164102 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(CoResponseMchoiceE2 entity) {
EntityManagerHelper.log("saving CoResponseMchoiceE2 instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved co response mchoice e2 </s>
|
funcom_train/25622149 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
Parameter[] params = getParameters();
if (params != null) {
for (int i = 0; i < params.length; i++) {
if (APPEND_KEY.equals(params[i].getName())) {
append = params[i].getValue();
break;
}
}
}
}
COM: <s> initializes the appendix if it is available from the parameters </s>
|
funcom_train/49943788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setAccessible(final Control control, final String name) {
if (control == null)
return;
final String n = name;
control.getAccessible().addAccessibleListener(new AccessibleAdapter() {
@Override
public void getName(final AccessibleEvent e) {
if (e.childID == ACC.CHILDID_SELF) {
e.result = n;
}
}
});
}
COM: <s> specifically set the reporting name of a control for accessibility </s>
|
funcom_train/98844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public ijResult AsyncStatement() throws ParseException, SQLException {
Token s = null;
String n = null;
jj_consume_token(ASYNC);
n = identifier();
s = jj_consume_token(STRING);
{if (true) return executeAsync(stringValue(s.image), n);}
throw new Error("Missing return statement in function");
}
COM: <s> async like execute immediate without using </s>
|
funcom_train/41266289 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(RequiDoc entity) {
EntityManagerHelper.log("saving RequiDoc instance", Level.INFO, null);
try {
getEntityManager().persist(entity);
EntityManagerHelper.log("save successful", Level.INFO, null);
} catch (RuntimeException re) {
EntityManagerHelper.log("save failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> perform an initial save of a previously unsaved requi doc entity </s>
|
funcom_train/32790898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getCode(OclExpression exp) {
StringBuffer result = new StringBuffer("");
if (exp != null) {
try {
result.append((String) visit(exp));
} catch (NoSuchMethodException e) {
// some method is missing in the visitor implementation
e.printStackTrace();
} catch (java.lang.reflect.InvocationTargetException e) {
e.getTargetException().printStackTrace();
}
}
return result.toString();
}
COM: <s> generates sql code for an ocl expression </s>
|
funcom_train/46703998 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Employee createEmployee(Long id, String name, Double wage, Company company) {
Employee person = new Employee();
person.set(ID, id);
person.set(NAME, name);
person.set(WAGE, wage);
person.set(COMPANY, company);
return person;
}
COM: <s> create the list of persons </s>
|
funcom_train/35716177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void formatMaster(final IFormattingContext context, final IDocument document, int offset, int length) {
try {
final int delta= offset - document.getLineInformationOfOffset(offset).getOffset();
offset -= delta;
length += delta;
} catch (BadLocationException exception) {
// Do nothing
}
if (fMaster != null) {
context.setProperty(FormattingContextProperties.CONTEXT_PARTITION, new TypedPosition(offset, length, fType));
fMaster.formatterStarts(context);
fMaster.format();
fMaster.formatterStops();
}
}
COM: <s> formats the document specified in the formatting context with the master </s>
|
funcom_train/26045764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void restoreState(State state) {
if (state == null) return;
do {
AttributeImpl targetImpl = attributeImpls.get(state.attribute.getClass());
if (targetImpl == null)
throw new IllegalArgumentException("State contains an AttributeImpl that is not in this AttributeSource");
state.attribute.copyTo(targetImpl);
state = state.next;
} while (state != null);
}
COM: <s> restores this state by copying the values of all attribute implementations </s>
|
funcom_train/44552451 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void saveCurrentVisibleSettings() {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
if (node.getUserObject() instanceof SettingsPanel) {
SettingsPanel panel = (SettingsPanel) node.getUserObject();
panel.saveSettings();
}
DataCrow.mainFrame.applySettings();
toFront();
}
COM: <s> saves the settings of the current visible panel </s>
|
funcom_train/44492667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clickElementWithXPath(String xpath) {
HtmlElement element = getHtmlElementByXPath(xpath);
if ( element != null ) {
try {
element.click();
} catch ( IOException ioe ) {
throw new RuntimeException(ioe.getMessage(), ioe);
}
} else {
throw new RuntimeException("No element found to click on that matches the given XPath '"+xpath+"'");
}
}
COM: <s> clicks on an html element clickable element defined by the provided xpath expression </s>
|
funcom_train/5028370 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void revertToDefaultAvailabilityForWednesday() {
IElementWrapper iew = this.getParentWrapper();
if (iew instanceof PersonWrapper) {
PersonWrapper personWrapper = (PersonWrapper) iew;
getAvailabilityRecord().setWednesdayValue(-1);
persisting(personWrapper);
}
if (iew instanceof OrganizationWrapper) {
OrganizationWrapper organizationWrapper = (OrganizationWrapper) iew;
getAvailabilityRecord().setWednesdayValue(-1);
persisting(organizationWrapper);
}
}
COM: <s> remove the availability on wednesday so that it then defaults </s>
|
funcom_train/13626834 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(){
if (queue.size() == 0) {
done = true;
return;
}
int processes = Math.min(maxRunning, queue.size());
for (int i = 0; i < processes; i++){
run(queue.remove(0));
}
}
COM: <s> sets up the initial conditions for the batcher </s>
|
funcom_train/44018241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void GenerationCleanup() {
ControllerThread = null;
MosaicController = null;
StatusUI.setIndeterminate(false);
StatusUI.setProgress(0);
TabbedPane.setEnabledAt(
TabbedPane.indexOfComponent(AdvancedOptionsTab), true);
InputImageText.setEnabled(true);
BrowseButton.setEnabled(true);
SearchQueryText.setEnabled(true);
MosaicResolutionText.setEnabled(true);
GenerateMosaicButton.setEnabled(true);
CancelButton.setEnabled(false);
SaveButton.setEnabled(GeneratedMosaic.isValid());
System.gc();
}
COM: <s> do any cleanup neccessary after we are finished generating a mosaic </s>
|
funcom_train/7525621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void returnState(byte[] state, String state_id) {
try {
StateTransferInfo state_info=new StateTransferInfo(null, state_id, 0L, state);
applstate_exchanger.exchange(state_info);
}
catch(InterruptedException e) {
Thread.currentThread().interrupt();
}
}
COM: <s> returns a substate as indicated by state id </s>
|
funcom_train/17134146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void runLogger(String levelRequested) {
LogAtLevel level = LogAtLevel.INFO;
if (levelRequested != null) {
level = LogAtLevel.valueOf(levelRequested);
}
InputStreamReader is = new InputStreamReader(new BufferedInputStream(System.in));
LineLogger lineLogger = new LineLogger(is, level);
lineLogger.run();
}
COM: <s> parses the requested level and starts the logger at the given level or </s>
|
funcom_train/47516241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Matrix getDatamat(int sessionNum) {
double [][] val = ((MLDouble)stInfo.get(sessionNum).get("datamat")).getArray();
//double [][] val = ((MLDouble)stInfo.get(sessionNum).get("datamat")).getArray();
return new Matrix(val);
}
COM: <s> getters for session info </s>
|
funcom_train/17255579 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTexture(int direction, Texture texture) {
if (direction < 0 || direction > 5) {
throw new JmeException("Direction " + direction
+ " is not a valid side for the skybox");
}
skyboxQuads[direction].clearRenderState(RenderState.RS_TEXTURE);
setTexture(direction, texture, 0);
}
COM: <s> set the texture to be displayed on the given side of the skybox </s>
|
funcom_train/47106347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemWeapon16() {
JMenuItem menuItem = new JMenuItem();
menuItem.setText(Weapon.W_16.getItemName());
menuItem.setEnabled(false);
menuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
setPlrReadiedWeapon(Weapon.W_16);
}
});
return menuItem;
}
COM: <s> creates the seventeenth choice for the weapon menu </s>
|
funcom_train/49813719 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeContactPerson(String requestorLoginId, String organizationName, String newContactLoginId, Boolean adminOverride, String magicToken) throws NoSuchObjectException, IMExCentralSecurityException {
workerFacade.changeContactPerson(requestorLoginId, organizationName, newContactLoginId, adminOverride, magicToken);
}
COM: <s> returns the abstract person instance responsible for receiving email from the system </s>
|
funcom_train/22277895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void decode(Decoder decoder) throws CodingException {
super.decode(decoder);
contentView = (View)decoder.decodeObject(CONTENTVIEW_KEY);
backgroundColor = (Color)decoder.decodeObject(BACKGROUNDC_KEY);
scrollBars = (Vector)decoder.decodeObject(SCROLLERS_KEY);
scrollBarUpdatesEnabled = decoder.decodeBoolean(SCROLLERUPDATES_KEY);
transparent = decoder.decodeBoolean(TRANSPARENT_KEY);
}
COM: <s> decodes the scroll view instance </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.