__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/14310626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDomainWithSecurityAcessDenied() throws Exception {
//set configuration
setSecureConfig();
//authentication with wrong role role
authenticateUserWithRole("TEST\\test", "WRONG_ROLE");
try {
domainService.getDomain(1L);
} catch (ServiceException e) {
//exception raised : test is ok
return;
}
fail("Wrong role security check");
}
COM: <s> test of get domain method with security but access denied of class org </s>
|
funcom_train/19541441 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void paintCloseVerticalBorder(Graphics2D g, int xOff, int yOff, int gridSize, Quadrant q) {
int x = vertex.x + getXMult(q) * xOff;
int y = vertex.y + getYMult(q) * yOff;
Line2D l = new Line2D.Double(x, y, x, y + getYMult(q) * gridSize);
g.draw(l);
}
COM: <s> paint the close vertical line of a cells border </s>
|
funcom_train/49270074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private FedoraAPIA getAPIA() throws FedoraConnectionException {
FedoraAPIA fedoraAPIA;
try {
fedoraAPIA = getFedoraClient().getAPIA();
} catch (IOException e) {
throw new FedoraConnectionException("Error connecting to Fedora",
e);
} catch (ServiceException e) {
throw new FedoraConnectionException("Error connecting to Fedora",
e);
}
return fedoraAPIA;
}
COM: <s> get the api a interface to fedora </s>
|
funcom_train/40702019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void eventsEdit(Long eid, EventInfo event, AsyncCallback<Boolean> callback) {
Json j = new Json ().put ( "eid", eid ).put ( "event_info", new JSONObject ( event ).toString () );
callMethodRetBoolean ( "events.edit", j.getJavaScriptObject (), callback );
}
COM: <s> edits the details of an existing event </s>
|
funcom_train/13313866 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getBoolPref(String key) {
String str = null;
reading.lock();
try {
str = properties.getProperty(key.toLowerCase());
} finally {
reading.unlock();
}
if (str != null) {
return Boolean.parseBoolean(str);
} else {
return Boolean.parseBoolean(defaults.getProperty(key.toLowerCase()));
}
}
COM: <s> retrieves a boolean configuration option </s>
|
funcom_train/51245886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPanel() {
UpdateQueryBuilder dialog = new UpdateQueryBuilder(context, tables);
while(dialog.isVisible()) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
dialog.dispose();
System.out.println(dialog.getQueryStatement());
}
COM: <s> create a dialog to test </s>
|
funcom_train/34625140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getBracketString() {
if (bracketPairs.size() < 1) {
return "";
}
String result = "";
for (org.emftext.language.pl0.resource.pl0.IPl0BracketPair bracketPair : bracketPairs) {
String isClosingStr = "0";
if (bracketPair.isClosingEnabledInside()) {
isClosingStr = "1";
}
result += bracketPair.getOpeningBracket() + bracketPair.getClosingBracket() + isClosingStr;
}
return result;
}
COM: <s> returns this bracket set as code string code </s>
|
funcom_train/50824726 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setNameParser(FieldNameParser fnp) {
// do not reset our settings, since changing the name parser
// after the settings are discovered doesn't do anything significant.
// The only real change would be if it's also accompanied by a
// change to the field verifier.
this.fnp = fnp;
}
COM: <s> sets the name parser for the fields </s>
|
funcom_train/45483377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnText(Object element, int columnIndex) {
if (element instanceof PWTableEntry) {
PWTableEntry tEntry = (PWTableEntry) element;
switch (columnIndex) {
case 0: // COMPLETED_COLUMN
return tEntry.getName();
case 1:
return tEntry.getContent();
default:
throw new SysRuntimeException(
"Invalid attempt to get text from column "
+ columnIndex + ". This is a bug, sorry.");
}
}
return null;
}
COM: <s> get the text values for the given table row </s>
|
funcom_train/37459488 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Institution getInstitution() throws IntactException {
Institution institution = config.getDefaultInstitution();
if (institution.getAc() != null && getDataContext().getDaoFactory().getInstitutionDao().isTransient(institution)) {
institution = getDataContext().getDaoFactory().getInstitutionDao().getByAc(institution.getAc());
}
return institution;
}
COM: <s> gets the institution from the runtime config object </s>
|
funcom_train/50700775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void logWarning(String message) {
try {
if (warnClip != null) {
warnClip.start();
}
logDoc.insertString(logDoc.getLength(), "warning", logText.getStyle("WarningIcon"));
logDoc.insertString(logDoc.getLength(), message + "\n", logText.getStyle("WarningText"));
} catch (BadLocationException ble) {
}
}
COM: <s> print a warning to the log </s>
|
funcom_train/28275574 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
tasks = new ConcurrentHashMap<String, AbstractTask>();
categories = new ConcurrentHashMap<String, AbstractTaskCategory>();
queries = new ConcurrentHashMap<String, AbstractRepositoryQuery>();
archiveContainer = new TaskArchive();
defaultCategory = new UnfiledCategory();
activeTasks = new CopyOnWriteArrayList<AbstractTask>();
lastLocalTaskId = 0;
categories.put(defaultCategory.getHandleIdentifier(), defaultCategory);
categories.put(archiveContainer.getHandleIdentifier(), archiveContainer);
}
COM: <s> public for testing </s>
|
funcom_train/12190683 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetOutputStream() throws IOException {
System.out.println("testGetOutputStream");
ByteArrayDataSource source = null;
source = new ByteArrayDataSource( getInputStream(), "text/plain" );
try {
OutputStream out = source.getOutputStream();
fail( "Expected IOException" );
}
catch( IOException ioe ) {
// success.
}
}
COM: <s> test of get output stream method of class com </s>
|
funcom_train/22428375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void init() throws HttpMalformedHeaderException {
myHostPath = new String(getRequestHeader().getURIHostPath());
myQuery = new String(getRequestHeader().getURIQuery());
myReqHeader.setMessage(getRequestHeader().toStringAbsoluteUri());
myReqHeader.setSecure(getRequestHeader().getSecure());
myReqBody.setBody(getRequestBody().toString());
}
COM: <s> initialize header and query parameters </s>
|
funcom_train/47820315 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int addUpColumnWidth(ISahitsContainer parent) {
Insets insets = parent.getInsets();
int addWidth=0;
for (int i=1;i<=nbCols;i++){
addWidth += computeWidth(i, parent);
if (i<nbCols){
addWidth += gap;
}
}
addWidth += insets.left+insets.right;
return addWidth;
}
COM: <s> adding up the column width of a isahits container </s>
|
funcom_train/18846029 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setProcessServicesList(ArrayList respObj) {
ResponseMessageDisassembler rmd = new ResponseMessageDisassembler();
XStream xstream;
String serPSL = null;
String resourceID = "ProcessServicesList";
serPSL = rmd.extractDoc(respObj, resourceID);
if (! (serPSL == null)) {
// Deserialize PSL
xstream = new XStream();
this.psl = (ProcessServicesList) xstream.fromXML(serPSL);
}
}
COM: <s> set process services list </s>
|
funcom_train/10659806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetSertver() {
Enumeration<SaslServerFactory> en = Sasl.getSaslServerFactories();
assertNotNull("List of SaslServerFactories should not be null", en);
assertFalse("List of SaslServerFactories should not have elements", en
.hasMoreElements());
}
COM: <s> test for code get sasl server factories code method </s>
|
funcom_train/36147427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void delete(Vector objs) throws PersistentException {
Enumeration objsEnum = objs.elements();
Vector ls = (Vector) getParameter(OPERATION_DELETE);
while (objsEnum.hasMoreElements()) {
Object obj = objsEnum.nextElement();
if (!ls.contains(obj)) {
ls.addElement(obj);
}
}
refresh();
}
COM: <s> deletes a vector of objects in the server </s>
|
funcom_train/39872185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean sendData() {
if (mDataStream != null) {
try {
int amount = mDataStream.read(mData);
if (amount > 0) {
mLoadListener.data(mData, amount);
return false;
}
} catch (IOException ex) {
mLoadListener.error(EventHandler.FILE_ERROR, ex.getMessage());
}
}
return true;
}
COM: <s> read data from the stream and pass it to the event handler </s>
|
funcom_train/48520746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DataSource getDataSource(final String dataSourceName) throws ServiceLocatorException {
DataSource dataSource = (DataSource) cache.get(dataSourceName);
if (dataSource == null) {
try {
dataSource = (DataSource)ic.lookup(dataSourceName);
cache.put(dataSourceName, dataSource );
} catch (Exception e) {
throw new ServiceLocatorException(e);
}
}
return dataSource;
}
COM: <s> this method obtains the datasource itself for a caller </s>
|
funcom_train/39278250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isSelected(int x, int y) {
return (x >= imageXYs.startX()
&& x <= imageXYs.startX() + magWidth()
&& y >= imageXYs.startY()
&& y <= imageXYs.startY() + magHeight());
}
COM: <s> determines whether the defined coordinates lie within the image </s>
|
funcom_train/8096326 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUpdatingEquality() {
boolean[] result;
if (m_updateableClusterer) {
result = m_Tester.updatingEquality(
m_NominalPredictors,
m_NumericPredictors,
m_StringPredictors,
m_DatePredictors,
m_RelationalPredictors,
m_multiInstanceHandler);
if (!result[0])
System.err.println(
"Incremental training does not produce same result as batch training!");
}
}
COM: <s> tests whether the classifier produces the same model when trained </s>
|
funcom_train/12628302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unregisterAllLanguages() {
ExtXmlHelper xmlHelper = new ExtXmlHelper();
xmlHelper.readLanguages("languages");
List languages = xmlHelper.getLanguages();
for (Object language : languages) {
try {
unregisterLanguage((Map) language);
}
catch (Exception e) {
System.out.println("Exception: " + e.getMessage());
}
}
}
COM: <s> install the extensions </s>
|
funcom_train/44852229 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSortString() throws VException {
String lDecimal = get(QuestionHome.KEY_QUESTION_DECIMAL).toString();
String[] lParts = lDecimal.split(":")[1].split("\\" + DELIMITER);
StringBuilder out = new StringBuilder();
for (String lPart : lParts) {
String lFilled = FILL + lPart;
out.append(lFilled.substring(lFilled.length()-WIDTH)).append(DELIMITER);
}
return new String(out.substring(0, out.length()-1));
}
COM: <s> the questions decimal id made sortable i </s>
|
funcom_train/4461932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void flipLists() {
// make sure the backbuffer knows what the list is doing ...
int visible = list_sequences.getVisibleIndex();
CardLayout cl = (CardLayout) listPanel.getLayout();
cl.next(listPanel);
java.awt.List temp = list_sequences;
list_sequences = backbuffer;
backbuffer = temp;
if(list_sequences.getItemCount() > 0)
list_sequences.makeVisible(visible);
}
COM: <s> flips the lists </s>
|
funcom_train/14654165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void insertText(String text) {
//adding newline
text += "\n";
try {
doc.insertString(doc.getLength(), text, doc.getStyle(styles[0]));
} catch (BadLocationException ble) {
System.err.println("Couldn't insert initial text into text pane.");
}
}
COM: <s> insert a new line of text in the document </s>
|
funcom_train/50865894 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void waitForMapLoaded() {
MediaTracker tracker = new MediaTracker(component);
tracker.addImage(img, 0);
try {
tracker.waitForID(0);
} catch (InterruptedException e) {
logger.log(Level.SEVERE,"waitForMapLoaded()",e);
}
imageDone = true;
}
COM: <s> wait for usgs map image to load </s>
|
funcom_train/4744951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void error(Object message, Throwable t) {
if(is12) {
getLogger().log(FQCN, (Priority) Level.ERROR, message, t );
} else {
getLogger().log(FQCN, Level.ERROR, message, t );
}
}
COM: <s> log an error to the log4j logger with code error code priority </s>
|
funcom_train/3860033 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(Set set, boolean transitive) {
myTypeSet = set;
myIsTransitive = transitive;
myStrategies = new TypeLoadStrategies();
myModel = null;
Iterator itr = myTypeSet.iterator();
if (itr.hasNext()) {
Type type = (Type) itr.next();
myModel = (JModel) type.model();
}
}
COM: <s> initializes a load action which will load all details from </s>
|
funcom_train/9025248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enableActions(boolean enable) {
newAction.setEnabled(enable);
openAction.setEnabled(enable);
saveAction.setEnabled(enable);
saveAsAction.setEnabled(enable);
exitAction.setEnabled(enable);
addBookAction.setEnabled(enable);
removeBookAction.setEnabled(enable);
aboutAction.setEnabled(enable);
showBookCountAction.setEnabled(enable);
}
COM: <s> enables or disables the actions </s>
|
funcom_train/27694244 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VariableReferenceList getReferences(Variable v) {
Debug.assert(v);
updateModel();
MutableSet references = (MutableSet) element2references.get(v);
if (references == null) {
return VariableReferenceList.EMPTY_LIST;
}
int s = references.size();
if (s == 0) {
return VariableReferenceList.EMPTY_LIST;
}
VariableReferenceMutableList result = new VariableReferenceArrayList(s);
for (Enumeration e = references.elements(); s > 0; s -= 1) {
result.add((VariableReference) e.nextElement());
}
return result;
}
COM: <s> retrieves the list of references to a given variable </s>
|
funcom_train/7960119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDockable(Dockable dockable){
this.dockable = dockable;
add(dockable.getComponent(), BorderLayout.CENTER);
if (title != null){
title.setDockable(dockable);
}
// allow resizing of split pane beyond minimum size
// could be replaced by adding a JScrollPane instead of panels
setMinimumSize(new Dimension(30,30));
}
COM: <s> adds the dockables component to this dock view </s>
|
funcom_train/8100510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double squaredDifference(Dirichlet other) {
if (partition.length != other.partition.length) {
throw new IllegalArgumentException("dirichlets must have the same dimension to be compared");
}
double residual = 0.0;
for (int k=0; k<partition.length; k++) {
residual += Math.pow((partition[k] * magnitude) -
(other.partition[k] * other.magnitude), 2);
}
return residual;
}
COM: <s> compute the l2 residual between two dirichlets </s>
|
funcom_train/9238075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean callUnknownMessage(final String sMessage, final String sTarget, final String sHost) {
final CallbackOnUnknownMessage cb = (CallbackOnUnknownMessage)getCallbackManager().getCallbackType("OnUnknownMessage");
if (cb != null) { return cb.call(sMessage, sTarget, sHost); }
return false;
}
COM: <s> callback to all objects implementing the unknown message callback </s>
|
funcom_train/27673871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void CopySettings(String to) throws IOException {
InputStream in = null;
OutputStream out = null;
String from = sf.getPath();
try {
in = new FileInputStream(from);
out = new FileOutputStream(to);
int length = in.available(); // danger, use only for "small" files!
byte[] bytes = new byte[length];
in.read(bytes);
out.write(bytes);
} finally {
if (in != null)
in.close();
if (out != null)
out.close();
}
}
COM: <s> copys the current settings file to another location </s>
|
funcom_train/48511911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFullscreen() {
// To prevent errors, when called after setContentView()
if (mContentSet) {
Log.e(TAG, "ContentView already set. Unable to set fullscreen.");
return;
}
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
COM: <s> set the activity as fullscreen </s>
|
funcom_train/24940365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setThroughputLocal(Collection<Reference> enclosings, Call call) {
for (Iterator<Reference> iter = enclosings.iterator(); iter.hasNext();) {
final Call enclosingCall = (Call) iter.next();
final ApiCallIdentifier aci = call.getApiIdentifier(
ApiCallIdentifier.THROUGHPUT_LOCAL, ID.showLogical(call));
enclosingCall.setThroughputLocal(aci.getSpecifications().iterator()
.next().intValue());
}
}
COM: <s> set the throughput local spacing of the enclosing methods of the api </s>
|
funcom_train/19536169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInitiativeGroup(String aGroup) {
String name = getName();
if (aGroup == name || (aGroup != null && aGroup.equals(name))) return;
getCustomProperties().put(INIT_GROUP_PROP_NAME, aGroup);
pcs.firePropertyChange(INIT_GROUP_PROP_NAME, name, aGroup);
}
COM: <s> set the value of initiative group for this init item </s>
|
funcom_train/3713263 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteAll() {
int nspectra = server.getSpectrumStorage().size();
if (nspectra > 0) {
int[] indices = new int[nspectra];
for (int i = indices.length - 1; i >= 0; i--) {
indices[i] = i;
}
deleteSpectra(indices);
}
}
COM: <s> deletes all code spectrum code instances from the servers </s>
|
funcom_train/7672388 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String method, Object ... args) {
Object[] argsCopy = new Object[args.length];
System.arraycopy(args, 0, argsCopy, 0, args.length);
methods.add(method);
argLists.add(argsCopy);
}
COM: <s> adds a method call with a variable list of arguments </s>
|
funcom_train/15719734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void log(String log) {
try {
for (int i = 0; i < log.length(); i++) {
fos.write((byte) log.charAt(i));
}
fos.write((byte) '\n');
if (MainClass.DEBUG) System.out.println("written");
} catch (IOException ex) {
if (MainClass.DEBUG) {
System.out.println("LogWriter write file failed.");
ex.printStackTrace();
}
}
}
COM: <s> this method is called when new data is available </s>
|
funcom_train/47160908 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Node getRootNode() {
try {
return (Node)rootNodeMethod.invoke(jjtreeField.get(parser));
} catch (IllegalAccessException ex) {
throw new RuntimeException(ex);
} catch (InvocationTargetException ex) {
Throwable target = ex.getTargetException();
if (target instanceof RuntimeException) {
throw (RuntimeException)target;
} else {
throw new RuntimeException(target);
}
}
}
COM: <s> returns the root node of the abstract syntax tree using the previously </s>
|
funcom_train/18853226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void solveServiceDependencies( ServiceSelection services ) {
int[] required = getRequiredServicesIds();
if ( required != null && required.length > 0 ) {
for ( int i = required.length - 1; i > -1; i-- ) {
services.setService( required[i] );
}
}
}
COM: <s> solves dependencies on services which are required by this one </s>
|
funcom_train/48122675 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTermBuffer(String buffer) {
int length = buffer.length();
char[] newCharBuffer = growTermBuffer(length);
if (newCharBuffer != null) {
termBuffer = newCharBuffer;
}
buffer.getChars(0, length, termBuffer, 0);
termLength = length;
}
COM: <s> copies the contents of buffer into the term buffer array </s>
|
funcom_train/46702577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: // public Appendable printSequenceTable(final UjoSequencer sequence, final Appendable out) throws IOException {
// out.append("CREATE SEQUENCE ");
// printSequenceName(sequence, out);
// out.append(" START WITH " + sequence.getIncrement());
// out.append(" CACHE " + sequence.getInitDbCache());
// return out;
// }
COM: <s> print sql create sequence </s>
|
funcom_train/17269448 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetName() {
System.out.println("getName");
DocumentFrame instance = new DocumentFrame(_jwp, "text/plain");
instance.setTitle("One Two Three");
String expResult = "One Two Three";
String result = instance.getName();
assertEquals(expResult, result);
}
COM: <s> test of get name method of class com </s>
|
funcom_train/31289977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setApplications(final Map<String, String> apps) {
applications = apps;
LOGGER.info("loaded applications:");
for (String id : applications.keySet()) {
final String url = applications.get(id);
LOGGER.info(" - " + id + ": " + url);
}
}
COM: <s> sets the configured applications </s>
|
funcom_train/25073557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createParameterBox(Project aProject) {
comParam = new JComboBox();
comParam.addItem(LanguageResources
.get("AUTOMPARAMS.CHOOSE_CYCLE_PARAM.PARAM"));
for (NetLogoParameter tmpParam : aProject.getModel().getParameter()) {
if (tmpParam instanceof NetLogoSlider
&& ((NetLogoSlider) tmpParam).isRelevant()) {
comParam.addItem(tmpParam);
}
}
}
COM: <s> creates a combo box with the parameter of this project </s>
|
funcom_train/35282732 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurveTension(float curveTension) {
spline.setCurveTension(curveTension);
if (debugNode != null) {
Node parent = debugNode.getParent();
debugNode.removeFromParent();
debugNode.detachAllChildren();
debugNode = null;
attachDebugNode(parent);
}
}
COM: <s> sets the tension of the curve only for catmull rom 0 </s>
|
funcom_train/46283569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writePosByte(byte b) {
assert pos != null;
if (pos[posUpto] != 0) {
posUpto = threadState.vectorsPool.allocSlice(pos, posUpto);
pos = threadState.vectorsPool.buffer;
vector.posUpto = threadState.vectorsPool.byteOffset;
}
pos[posUpto++] = b;
}
COM: <s> write byte into pos stream of current </s>
|
funcom_train/41304676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteBloodpressureValue(String idsystole,String iddiastole,String idpulse) throws SDKException{
if(idsystole!=null && !idsystole.equals("")){
hrm.delete(idsystole.trim(), ICWEntryType.OBSERVATION);
}
if(iddiastole!=null && !iddiastole.equals("")){
hrm.delete(iddiastole.trim(), ICWEntryType.OBSERVATION);
}
if(idpulse!=null && !idpulse.equals("")){
hrm.delete(idpulse.trim(), ICWEntryType.OBSERVATION);
}
}
COM: <s> delete the blood pressure object with the given ids </s>
|
funcom_train/8127843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initAllSlaveDatas(Entity webEntity, WebData data) throws Exception{
Map<String, Class> properties = this.getCollectionPropertiesAndElementClass(data, getMeta().getModelClass());
for(String propertyName: properties.keySet()){
this.initSlaveDatas(webEntity, data, propertyName, properties.get(propertyName));
}
}
COM: <s> according the datasource name property search all properties and init these their datas </s>
|
funcom_train/18519197 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addIncomingMessage(Message message) {
if (message.emptyAddrFrom()) {
throw new IllegalArgumentException("Received message must have from address");
}
synchronized (messagesReceived) {
messagesReceived.addLast(message);
}
if (!inboxListenerNotifyThread.isBusy()) {
new Thread(inboxListenerNotifyThread, "InboxListenerNotifier").start();
}
}
COM: <s> adds a new message to the list of received messages </s>
|
funcom_train/22213449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancelEvent(AbstractTimerEvent ate) {
synchronized(ate) {
TimerQueue tq = ate.getTimerQueue() ;
// is it ours?
if (tq != this) {
// This will do the right thing...
ate.cancel() ;
} else {
// stop processing of the event
timerQueueThread.cancelEvent(ate) ;
}
}
}
COM: <s> cancel an event </s>
|
funcom_train/17705340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getText(Object arg0) {
// Get the name of the file
String text = ((File) arg0).getName();
// If name is blank, get the path
if (text.length() == 0) {
text = ((File) arg0).getPath();
}
// Check the case settings before returning the text
//return preserveCase ? text : text.toUpperCase();
return text;
}
COM: <s> gets the text to display for a node in the tree </s>
|
funcom_train/44850444 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void traceXML(Document inXML) {
try {
Transformer lSerializer = TransformerFactory.newInstance().newTransformer();
lSerializer.setOutputProperty(OutputKeys.INDENT, "yes");
lSerializer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
lSerializer.transform(new DOMSource(inXML), new StreamResult(VSys.out));
}
catch (Exception exc) {
DefaultExceptionWriter.printOut(this, exc, true);
}
}
COM: <s> traces the xml can be used for testing purposes </s>
|
funcom_train/6216755 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getMockObjectPackageName(Class classToMock) throws MockObjectGeneratorException {
//get the package name
String packageName = getPackageName(classToMock);
return new StringBuffer(packageName).append((packageName.length() > 0)? "." : "").append(MOCK_OBJECT_PACKAGE_NAME_SUFFIX).toString();
}
COM: <s> gets the mock object package name </s>
|
funcom_train/24533770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void processRemovedProject(IProject project, boolean wait) {
synchronized (PER_PROJECT) {
PerProject pp = (PerProject) PER_PROJECT.remove(project); // Get rid of it.
if (pp != null) {
RegistryResult spare = pp.getExistingSpare(true);
if (spare != null)
spare.registry.terminateRegistry(wait);
}
if (PER_PROJECT.isEmpty())
deactivate(); // We have no more projects, so let's deactivate and not waste resources.
}
}
COM: <s> the project itself has been removed </s>
|
funcom_train/18712080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void writeMarkerComment(OutputStream os, String comment, String enc) throws IOException {
try {
data = comment.getBytes(enc);
} catch(UnsupportedEncodingException uee) {
data = comment.getBytes();
} catch(NullPointerException npe) {
data = comment.getBytes();
}
writeMarkerComment(os, data);
}
COM: <s> internal method to write the jpeg comment marker </s>
|
funcom_train/11757771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cut() {
alice.util.LinkedList l = termsExecuted;
while(!l.isEmptyList()) {
((GoalInfo)l.head).context = null;
l = l.tail;
}
compatibleGoals = new alice.util.LinkedList();
nCompatibleGoals = 0;
nOpenTermsExecuted = 0;
}
COM: <s> cuts current sld tree </s>
|
funcom_train/32061531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getOfficerSkillValue(OfficerType offtype) {
Vector<Officer> officerswithskill = getOfficers(offtype);
int skillvalue = 0;
if (officerswithskill.size() > 0) {
for (Officer o : officerswithskill) {
skillvalue += o.getHero().getSkillValue(offtype.getAssociatedSkill());
}
}
return skillvalue;
}
COM: <s> if there are officers on the ship of the specified type then their </s>
|
funcom_train/29828973 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateNewMessageFlags(AlertsDockableWindow win, boolean newMsg) {
boolean select = mainFrame.isAutoPopping();
if (newMsg && select) {
selectWindow(win);
if (win.isDocked())
mainFrame.toFront();
}
super.updateNewMessageFlags(win, newMsg);
mainFrame.setNewMessage();
}
COM: <s> updates new message flags </s>
|
funcom_train/2292445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setUserAgentsRegEx(List agents) {
if ((agents == null) || (agents.size() == 0)) {
setValidConfiguration(false);
LOG.error(Messages.get().getBundle().key(Messages.LOG_NO_USER_AGENTS_0));
}
m_userAgentsRegEx = agents;
}
COM: <s> sets the valid user agents regular expressions of the editor </s>
|
funcom_train/47519787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean accept(File f) {
if (f.isDirectory()) {
return true;
}
String extension = FileFilterUtils.getExtension(f);
if (extension != null) {
if (extension.equals(FileFilterUtils.mzML)
|| extension.equals(FileFilterUtils.MZML)
|| extension.equals(FileFilterUtils.mzml)){
return true;
}
else {
return false;
}
}
return false;
}
COM: <s> accept all directories and </s>
|
funcom_train/8406231 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove(String name) {
if (name == null) {
throw new IllegalArgumentException("Property name is missing.");
}
if (isRestricted()) {
throw new IllegalStateException("DynaClass is currently restricted. No properties can be removed.");
}
// Remove, if property doesn't exist
if (values.containsKey(name)) {
values.remove(name);
}
}
COM: <s> remove the specified dynamic property and any associated data type </s>
|
funcom_train/41825491 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getLinks() {
try {
ResultSet rs = con.createStatement().executeQuery("SELECT * FROM links");
rs.next();
return rs.getObject(2);
} catch (Exception e) {
JDLogger.exception(Level.FINEST, e);
JDLogger.getLogger().warning("Database not available. Create new one: links");
}
return null;
}
COM: <s> returns the saved linklist </s>
|
funcom_train/3605700 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createPlaylistComposite() {
GridData gridData4 = new GridData();
gridData4.grabExcessHorizontalSpace = true;
gridData4.grabExcessVerticalSpace = true;
gridData4.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
gridData4.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
playlistComposite = new Composite(this, SWT.NONE);
playlistComposite.setLayout(new FillLayout());
createPlaylistTable();
playlistComposite.setLayoutData(gridData4);
}
COM: <s> this method initializes playlist composite </s>
|
funcom_train/48037555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean loadFile(String file) {
try {
SAXBuilder builder = new SAXBuilder();
doc = builder.build(file);
// store the root Element
root = doc.getRootElement();
//LOG.info("root = " + root);
} catch (Exception e) {
LOG.warning(e.toString());
return false;
}
return true;
}
COM: <s> loads a new file </s>
|
funcom_train/16670061 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean insert(float x, float y, float z, float t1u, float t1v, String t1, float t2u, float t2v, String t2) {
if (t1Path.equals(t1) && t2Path.equals(t2)) {
verts.add(new Float(x));
verts.add(new Float(y));
verts.add(new Float(z));
texs1.add(new Float(t1u));
texs1.add(new Float(t1v));
texs2.add(new Float(t2u));
texs2.add(new Float(t2v));
return true;
}
else
return false;
}
COM: <s> inserts infos if textures correspond </s>
|
funcom_train/25661489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void simpleInitGame() {
// Create the cube
cube = new Box("A Cube", // Node name
new Vector3f(0, 0, 0), // Cube center
3, 3, 3); // Cube x,y,z extents
// Attach the cube to the root of the scene graph
rootNode.attachChild(cube);
}
COM: <s> add the cube to the scene graph </s>
|
funcom_train/16790748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Method getMethod(String name) {
Class<?> clazz = this.model;
if (name == null)
return null;
while (clazz != null) {
for (Method method: clazz.getDeclaredMethods())
if (method.getName().equals(name))
return method;
clazz = clazz.getSuperclass();
}
return null;
}
COM: <s> get a method associated with the model class </s>
|
funcom_train/5164084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public User getUser(int userID) {
User u;
synchronized(idToUser) {
u = idToUser.get(userID);
if (u == null) {
u = new User(this,userID);
idToUser.put(userID, u);
Log.debug("created new user with id=" + userID + " requesting UserData from database");
u.sendDatabaseRequestForUserLoad();
}
}
return u;
}
COM: <s> retrieve a user by id </s>
|
funcom_train/13874575 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLowerPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MultiplicityElement_lower_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MultiplicityElement_lower_feature", "_UI_MultiplicityElement_type"),
EmofPackage.Literals.MULTIPLICITY_ELEMENT__LOWER,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the lower feature </s>
|
funcom_train/33312377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void openFile() {
JFileChooser fc = new JFileChooser(new File(_lastDirectory));
fc.setFileFilter(new ProgectFileFilter());
fc.setFileHidingEnabled(true);
fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
int fcRet = fc.showOpenDialog(this);
if (fcRet == JFileChooser.APPROVE_OPTION) {
File f = fc.getSelectedFile();
_lastDirectory = f.getPath();
loadProgect(f);
setLastFile(f);
_miSave.setEnabled(true);
_miSaveAs.setEnabled(true);
}
}
COM: <s> displays an file open dialog for loading </s>
|
funcom_train/43924932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Avatar getAvatar() throws BlipConnectorException {
URI uri;
try {
StringBuilder sb = new StringBuilder().append(baseUrl).append(
PATH_AVATAR);
uri = new URI(sb.toString());
} catch (URISyntaxException e1) {
throw new BlipConnectorException("Error creating URI");
}
HttpResponse<?> out = execute(METHOD_GET, uri, null, Boolean.TRUE);
String res = handleResult(out);
if (res != null) {
try {
return new Avatar(new JSONObject(res));
} catch (JSONException e) {
throw new BlipConnectorException(e);
}
} else {
return null;
}
}
COM: <s> returns avatar of current user </s>
|
funcom_train/38467857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void performActionAsSoonAsPossibleBeforeItsTooLate(LabyAction action) throws LabyException {
GameCharacter character = (GameCharacter)action.getSource();
int direction = character.getDirection();
int x = character.getX() + ms_forwardX[direction];
int y = character.getY() + ms_forwardY[direction];
character.setX(x);
character.setY(y);
}
COM: <s> checks if the game character can walk i </s>
|
funcom_train/9663107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addColumn(int beforeColumn, String name, Object[] column) throws IllegalArgumentException {
addColumn(beforeColumn, column);
getColumnNamesList().add(beforeColumn, name);
fireColumnEvent(EditableModelEvent.ADD_COLUMN, beforeColumn);
}
COM: <s> this method adds the specified column in the data model </s>
|
funcom_train/22066044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNumOnlineSessions() throws ServletException {
LogManager logManager = getLogManager();
if ( logManager == null )
throw new ServletException("LogManager not found!");
try {
return logManager.getNumOnlineSessions(
BaseConstants.ONLINE_TIMEOUT);
} catch ( LoggingException e ) {
throw new ServletException(e.getMessage(), e);
} //end try
} //end getNumOnlineSessions
COM: <s> retrieves number of online sessions </s>
|
funcom_train/41335956 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintSplitPaneDividerForeground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation) {
paintForeground(context, g, x, y, w, h, null);
}
COM: <s> paints the foreground of the divider of a split pane </s>
|
funcom_train/13993997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object deserialize(byte[] bytes) throws SerializationException {
try {
return new ObjectInputStream(new ByteArrayInputStream(bytes))
.readObject();
} catch (IOException ex) {
throw new SerializationException("deserialization of "
+ toString(bytes) + " failed.", ex);
} catch (ClassNotFoundException ex) {
throw new SerializationException(
"class of serialized object not found.", ex);
}
}
COM: <s> deserializes code data code </s>
|
funcom_train/13938209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Build getFeat2D3DByID(int id){
for(SubPart subPart : subPartList){
Build feat2D3D = subPart.getBuild();
if(feat2D3D != null && feat2D3D.ID == id){
return feat2D3D;
}
}
System.out.println("Part(getFeat2D3DByID): there was no Feat2D3D at that ID! ID=" + id + ", FIX THIS NOW!");
return null;
}
COM: <s> get a feature2 d3 d by its unique id </s>
|
funcom_train/16522333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void clearRepeat() {
// int rows;
for (int i = 0; i < repeat.length; i++) {
// rows = repeat[i].model.getRowCount();
repeat[i].removeAll();
}
//Attachement table is a spacial table we need to
// clear not only the table but also the structure behind
repeat[ATTACHEMENT].clear();
}
COM: <s> clear ligns of repeat tables </s>
|
funcom_train/31662736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Grid1D reverseMap(Grid1D grid) {
if (grid instanceof LinearGrid1D)
return new LinearGrid1D(
reverseMap(((LinearGrid1D) grid).getStart()),
reverseMap(((LinearGrid1D) grid).getEnd()),
grid.getLength());
else
return super.reverseMap(grid);
}
COM: <s> reverse maps data grid to axis </s>
|
funcom_train/51617176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo( Job j ) {
long diff = timeToRun.getMyTime() - j.timeToRun.getMyTime();
//return the appropriate value based on the difference (can't directly return diff b/c it is a long)
if( diff < 0 ) return -1;
else if( diff == 0 ) return 0;
else return 1;
}
COM: <s> comparison method jobs which run earlier will come first </s>
|
funcom_train/34558772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setStore(Store store) throws IllegalStateException {
if(!isRendered()) {
if(store instanceof SimpleStore) {
setTriggerAction(ALL);
if(!isCreated()) setMode(LOCAL);
store.load();
}
setAttribute("store", store.getJsObj(), true);
if (displayField != null) {
setFilterColParam(store.getJsObj(), displayField);
}
this.store = store;
} else {
setStoreRendered(store.getJsObj());
}
}
COM: <s> the data store to which this combo is bound defaults to undefined </s>
|
funcom_train/22208842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNumericValues() {
try {
// map prefix "xtm" to XTM 1.0 namespace
PrefixResolver pr = new XTMPrefixResolver((Node) domDocument.getDocumentElement());
iterateNumericValueTable(pr);
} catch (Exception ex) {
ex.printStackTrace();
fail("Unexpected exception: " + ex.toString());
}
}
COM: <s> tries a number of xpath queries returning numeric values </s>
|
funcom_train/12155541 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validateSelectedReversibleOption() throws UnspecifiedReversibleOptionException {
logger.debug("Entering validateSelectedReversibleOption().");
if (pseudonymisationMethodCheckBox.isSelected() && reversibleOptionRadioButton.isSelected()) {
if (0 == getSelectedPseudonymisationOptionReversibleIndex()) {
throw new UnspecifiedReversibleOptionException(bundle.getString(IConstants.ANONYM_SCP_DEIDENTIFICATION_OPTIONS_DIALOG_BOX_ERROR_SELECT_REVERSIBLE_OPTION));
}
}
logger.debug("Exiting validateSelectedReversibleOption().");
}
COM: <s> validates the selected reversible pseudonymisation option </s>
|
funcom_train/12199057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enqueue(PDU pdu) {
debug.write(DRXTX, "receiver enqueuing pdu.");
synchronized (pduQueue) {
pduQueue.enqueue(pdu);
pduQueue.notifyAll();
}
// HNK -- If you just received unbind_resp, don't block on
// socket in TCPIPConnection.receive(), call stopProcessing()
if (Data.UNBIND_RESP == pdu.getCommandId()) {
stopProcessing(null);
}
}
COM: <s> puts the code pdu code into the code pdu queue code </s>
|
funcom_train/28545287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
if (target != null) {
try {
target.addHighlight((int) toHightlight.getBeginIndex(),//
(int) toHightlight.getEndIndex(), painter);
} catch (final BadLocationException e) {
log.fine("Error adding highlight, highlighter " + target
+ " may be out " //
+ " of sync with document? " + sourceDocModel);
}
}
}
COM: <s> adds a highlight to the document indices corresponding to </s>
|
funcom_train/37611371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Closeable add(final Resource resource) {
final ResourceWrapper resourceWrapper = new ResourceWrapper(resource);
synchronized (m_reservablesMutex) {
m_reservables.add(resourceWrapper);
}
m_listeners.apply(
new ListenerSupport.Informer<Listener>() {
public void inform(Listener l) { l.resourceAdded(resource); }
});
return resourceWrapper;
}
COM: <s> adds a resource to the pool </s>
|
funcom_train/3393144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put4(int pc, int od) {
// pre: pc + 4 <= cp
put1(pc , od >> 24);
put1(pc+1, od >> 16);
put1(pc+2, od >> 8);
put1(pc+3, od);
}
COM: <s> place four bytes into code at address pc </s>
|
funcom_train/10188418 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String word){
Node node = root;
for(int i=0; i<word.length(); i++){
char c = word.charAt(i);
Node entry = node.searchCharOrAdd( c );
if(i == word.length()-1){
entry.isWord = true;
return;
}
node = entry;
}
}
COM: <s> add a word to the tree </s>
|
funcom_train/38351764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getSumOfWeightsOfAllEdges() {
int sum = 0;
for (int i = 0; i < numberOfNodes; i++) {
for (int j = 0; j < edges[i].size(); j++) {
Edge e = (Edge) edges[i].get(j);
if (e.startNode <= e.endNode)
// consider each edge only once! See comment on edges[] array.
sum += e.weight;
}
}
return (sum);
}
COM: <s> returns the sum of the weights of all edges in the graph </s>
|
funcom_train/11024192 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testExecuteWithSimpleFloatPropertyAndFloatValue() {
TestBean testBean = new TestBean();
new BeanPropertyValueChangeClosure("floatProperty", expectedFloatValue).execute(testBean);
assertTrue(expectedFloatValue.floatValue() == testBean.getFloatProperty());
}
COM: <s> test execute with simple float property and float value </s>
|
funcom_train/18388940 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHasKey() {
System.out.println("hasKey");
Node instance = new Node();
instance.addKey(new Key(1));
assertTrue(instance.hasKey(new Key(1)));
assertFalse(instance.hasKey(new Key(3)));
}
COM: <s> test of has key method of class org </s>
|
funcom_train/20504031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: /* protected ReservationFieldRequest createReservationFieldRequest(Collection<Region> regions) {
if (logger.isDebugEnabled()) {
logger.debug("ReserveFieldController.createReservationFieldRequest");
}
ReservationFieldRequest reservationFieldRequest = new ReservationFieldRequest();
reservationFieldRequest.setSuccessView(getSuccessView());
reservationFieldRequest.setRegions(regions);
return reservationFieldRequest;
}*/
COM: <s> creates a new reservation request with the given values </s>
|
funcom_train/24001721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int next(int bits) {
long oldseed, nextseed;
// AtomicLong seed = this.seed;
long seed = this.seed;
//Saman
boolean equal = false;
do {
oldseed = seed; //seed.get();
nextseed = (oldseed * multiplier + addend) & mask;
equal = (seed == oldseed);
if(equal) seed = nextseed;
} while(!equal);
// } while (!seed.compareAndSet(oldseed, nextseed));
COM: <s> generates the next pseudorandom number </s>
|
funcom_train/49318350 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void screenToCanvasCoords(Point2D.Double p, boolean isDistance) {
PlanarImage displayImage = _imageDisplay.getDisplayImage();
if (!isDistance && displayImage != null) {
p.x -= displayImage.getMinX();
p.y -= displayImage.getMinY();
}
}
COM: <s> convert the given screen coordinates to canvas coordinates </s>
|
funcom_train/9997132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeTempDtd()
{
try
{
if( createdTempDTD )
{
File dtdFile = new File( dtdJarFullFileName );
dtdFile.delete();
if( createdTempDir )
removeDirs( dtdFilePath );
tracer.println( "Removed temp directory with DTD OK" );
}
}
catch( Exception e )
{
tracer.println( "Error removing temporary DTD file: " +
"Exception.msg = " + e.getMessage() );
}
}
COM: <s> removes the dtd path if it was created </s>
|
funcom_train/44591126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDeclaration(AbstractTypeDeclaration decl) {
if (decl == null) {
throw new IllegalArgumentException();
}
// a TypeDeclarationStatement may occur inside an
// TypeDeclaration - must check cycles
ASTNode oldChild = this.typeDecl;
ChildPropertyDescriptor typeDeclProperty = typeDeclProperty();
preReplaceChild(oldChild, decl, typeDeclProperty);
this.typeDecl= decl;
postReplaceChild(oldChild, decl, typeDeclProperty);
}
COM: <s> sets the abstract type declaration of this local type declaration </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.