__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/7268206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean remove(Runnable task) {
boolean removed;
final ReentrantLock mainLock = this.mainLock;
mainLock.lock();
try {
removed = workQueue.remove(task);
} finally {
mainLock.unlock();
}
if (removed)
tryTerminate(); // In case SHUTDOWN and now empty
return removed;
}
COM: <s> removes this task from the executors internal queue if it is </s>
|
funcom_train/6464453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMutator(IMutator mutator) {
if(mutator == null) {
AILibException e = new AILibException(this.getClass(), "setMutator(IMutator)", Messages.get("null.argument"));
this.mutator = new NoMutator();
} else
this.mutator = mutator;
}
COM: <s> sets the mutation handler of this genome </s>
|
funcom_train/28473259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getMissingCutoffField() {
if (missingCutoffField == null) {
missingCutoffField = new JTextField();
missingCutoffField.setPreferredSize(new Dimension(60, 20));
missingCutoffField.setMaximumSize(new Dimension(60, 20));
missingCutoffField.setMinimumSize(new Dimension(60, 20));
missingCutoffField.setText("50");
}
return missingCutoffField;
}
COM: <s> this method initializes missing cutoff field </s>
|
funcom_train/30005146 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTestExecutionPreviewPanel getPreviewPanel(TestSequence sequence) {
if (sequence != null) {
if (this.previewPanel == null) {
this.previewPanel = new JTestExecutionPreviewPanel(this.plugin, this, sequence);
}
return this.previewPanel;
}
else {
throw new NullPointerException("Argument 'sequence' is empty.");
}
}
COM: <s> gets the preview panel </s>
|
funcom_train/50533603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean AssignTask(Runnable task) {
synchronized(this) {
Start(); // creates and starts the thread if not yet running
if(this.task == null) {
this.task=task;
notifyAll(); // signals run() to start working (first wait-loop)
return true;
}
else {
Trace.error("ReusableThread.AssignTask()", "already working on a thread");
return false;
}
}
}
COM: <s> assigns a task to the thread </s>
|
funcom_train/50338938 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void actionPerformed(ActionEvent e) {
if (log.isDebugEnabled()) log.debug("actionPerformed");
int newVal = Integer.valueOf(_value.getText()).intValue();
updatedTextField();
prop.firePropertyChange("Value", null, Integer.valueOf(newVal));
}
COM: <s> action listener implementations </s>
|
funcom_train/41825172 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSvnLocal(int index, String svnLocal) {
Element svnRoot = getChild(root,"scm");
Element svnLocations = getChild(svnRoot,"locations");
Element parent = getChildren(svnLocations,"hudson.scm.SubversionSCM_-ModuleLocation",index);
getChild(parent,"local").setText(svnLocal);
}
COM: <s> sets the svn local </s>
|
funcom_train/3683473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class MockPortalInfo implements PortalInfo {
public String getPortalOwner() { return "exotest" ;}
public String getRemoteUser() { return "exotest" ;}
public String getPageURI() { return "" ; }
public String getOwnerURI() { return "" ; }
public String getPreferredMimeType() { return XHTML_MIME_TYPE ; }
public ResourceBundle getApplicationResourceBundle() { return null ; }
} COM: <s> apr 26 2004 </s>
|
funcom_train/42534672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveWinPosition (int x, int y, int width, int height){
prefs.putInt(WIN_POS_X, x);
prefs.putInt(WIN_POS_Y, y);
prefs.putInt(WIN_POS_WIDTH, width);
prefs.putInt(WIN_POS_HEIGHT, height);
}
COM: <s> save the main window position and size </s>
|
funcom_train/15742204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void generateEditorActivated(@Nullable SPath path) {
this.locallyActiveEditor = path;
if (path != null && sarosSession.isShared(path.getResource()))
this.locallyOpenEditors.add(path);
editorListenerDispatch.activeEditorChanged(sarosSession.getLocalUser(),
path);
fireActivity(new EditorActivity(sarosSession.getLocalUser(),
Type.Activated, path));
}
COM: <s> sets the local editor opened and fires an </s>
|
funcom_train/36775959 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeSeparators(StringBuffer sourceLine){
while ((sourceLine.length() > 0) && ((sourceLine.charAt(0) == ' ') ||
(sourceLine.charAt(0) == '\t') || (sourceLine.charAt(0) == '\n')
|| (sourceLine.charAt(0) == '|'))) {
sourceLine.deleteCharAt(0);
}
}
COM: <s> removes all separator characters from the beginning of source line </s>
|
funcom_train/15615895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String documentToString(Document document) throws EncoderException {
StringWriter writer = new StringWriter();
XMLOutputter output = new XMLOutputter();
try {
output.output(document, writer);
} catch (IOException e) {
throw new EncoderException("Error encoding output", e);
}
return writer.toString();
}
COM: <s> encodes the xml document into a string for transmission over the network </s>
|
funcom_train/42638616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String solveAndMeasure(NumberFormat format){
solve();//to load classes and compile them to native code
long nanos = System.nanoTime();
solve();
double ms = (System.nanoTime()-nanos)*0.000001;
String time = format==null ? Double.toString(ms) : format.format(ms);
//System.out.println("Time spent to solve the task is "+time+" milliseconds");
return time;
}
COM: <s> returns formatted time of computation in milliseconds </s>
|
funcom_train/14070494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveRoom(RoomVO room) throws DataException {
try {
primaryIndex.put(room);
}
catch (DatabaseException e) {
logger.log(Level.SEVERE,"Saving room " + room.getName(),e);
throw new DataException("Unable to save room " + room.getName());
}
}
COM: <s> add create a room in the database </s>
|
funcom_train/44823715 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown()
{
_log.info(getName() + " shutting down");
java.util.Iterator iter = _threads.iterator();
while(iter.hasNext()) {
TaskThread taskthread = (TaskThread)iter.next();
taskthread.flipSwitch(false);
}
_log.info(getName() + " shutdown complete");
}
COM: <s> shutdown this thread pool </s>
|
funcom_train/33652302 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printResult() {
int index = 1;
for (int j = 0; j < 300; j++) { // floating point
if (j % 10 == 0) {
System.out.println("");
}
if (j % 100 == 0) {
System.out.println("\nMatrix" + index++ + ":\n");
}
ByteBuffer buffer = ByteBuffer.allocate(8);
buffer.put(dumpArray, j * 8, 8);
System.out.print(buffer.getDouble(0) + "\t");
}
System.out.println("\n");
}
COM: <s> print out the calculation result </s>
|
funcom_train/9437442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUIDLParserSingleFail() {
// single-line mode
Pop3Store.Pop3Folder.UidlParser parser = mFolder.new UidlParser();
// Test with null input
boolean result;
result = parser.parseSingleLine(null);
assertFalse(result);
// Test with empty input
result = parser.parseSingleLine("");
assertFalse(result);
}
COM: <s> test various rainy day operations of the uidl parser for single line responses </s>
|
funcom_train/1589542 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInterval(ReadableInterval interval) {
if (interval == null) {
throw new IllegalArgumentException("Interval must not be null");
}
long startMillis = interval.getStartMillis();
long endMillis = interval.getEndMillis();
Chronology chrono = interval.getChronology();
super.setInterval(startMillis, endMillis, chrono);
}
COM: <s> sets this interval to be the same as another </s>
|
funcom_train/1553613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Triangle neighborOpposite (Pnt site, Triangle triangle) {
if (!triangle.contains(site))
throw new IllegalArgumentException("Bad vertex; not in triangle");
for (Triangle neighbor: triGraph.neighbors(triangle)) {
if (!neighbor.contains(site)) return neighbor;
}
return null;
}
COM: <s> report neighbor opposite the given vertex of triangle </s>
|
funcom_train/46062217 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void appendPublishableSubnodeIds(CourseEditorTreeNode cetn, List<String> nodesToPublish) {
for (int i = 0; i < cetn.getChildCount(); i++) {
CourseEditorTreeNode child = (CourseEditorTreeNode) cetn.getChildAt(i);
if (child.hasPublishableChanges()) nodesToPublish.add(child.getIdent());
appendPublishableSubnodeIds(child, nodesToPublish);
}
}
COM: <s> starting from each user selected to publish node all also affected nodes </s>
|
funcom_train/44713079 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object get(HttpServletRequest request) {
Map map = getMap(request);
Object result;
// FIXME: More paranoid locking.
synchronized (map) {
if (map.containsKey(this)) {
result = map.get(this);
} else {
result = initialValue(request);
map.put(this, result);
}
}
return result;
}
COM: <s> return the request specific value for this variable for the </s>
|
funcom_train/26573740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testProjectFactory() {
ProjectFactory factory = new ProjectFactory(conParam);
Project obj = null;
try {
obj = (Project) factory.load(new java.lang.Long(1));
assertEquals(obj.getName(), "Default-Test (ID 1)");
assertEquals(obj.getDescription(), "Testproject");
assertEquals(obj.getPK(), new java.lang.Long(1));
} catch (Exception e) {
assertNull(this);
JEErrorHandler handler = new JEErrorHandler(conParam.getLogList());
handler.fatalError(e);
}
}
COM: <s> method test project factory </s>
|
funcom_train/48082623 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getIQProvider(String elementName, String namespace) {
//System.out.println("ProviderManager.getIQProvider() " + elementName + ", " + namespace);
String key = getProviderKey(elementName, namespace);
return iqProviders.get(key);
}
COM: <s> returns the iq provider registered to the specified xml element name and namespace </s>
|
funcom_train/36906779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer getResponseMessage() throws IOException {
try {
Thread.sleep(1000);
} catch (Exception e) {
} finally {
StringBuffer returnString = new StringBuffer();
String s = null;
do {
s = serverReader.readLine();
returnString.append(s + "\n");
} while (serverReader.ready() == true);
return returnString;
}
}
COM: <s> to get the entire response message </s>
|
funcom_train/28888646 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInsert() {
final TestDataModelBroker<R, L> tdmb= new TestDataModelBroker<R, L> ();
final R tdmr = (R)new TestDataModelRow("Duke", "Main Street",
"Lakeview", "CA", 12345);
final int rowsInserted = tdmb.insert(tdmr);
loginfo("Rows inserted into test table " + rowsInserted);
}
COM: <s> example insert into database table named test </s>
|
funcom_train/3889220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateParametersType_MaxLength(String parametersType, DiagnosticChain diagnostics, Map context) {
int length = parametersType.length();
boolean result = length <= 1000;
if (!result && diagnostics != null)
reportMaxLengthViolation(ImscpRootv1p1p2Package.Literals.PARAMETERS_TYPE, parametersType, length, 1000, diagnostics, context);
return result;
}
COM: <s> validates the max length constraint of em parameters type em </s>
|
funcom_train/16935253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void activate() {
moveToFront();
try {
setSelected(true);
}
catch (java.beans.PropertyVetoException pve0) {
}
m_editor.activate();
if (m_app.getDesktopManager().active() != this) {
m_app.getDesktopManager().activateFrame(this);
}
}
COM: <s> activates this frame and makes sure the editor gets focused along with </s>
|
funcom_train/17834793 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void changeStyle(int type, Color color, int fontStyle) {
Style style = addStyle(typeNames[type], null);
StyleConstants.setForeground(style, color);
if ((fontStyle & Font.BOLD) != 0)
StyleConstants.setBold(style, true);
if ((fontStyle & Font.ITALIC) != 0)
StyleConstants.setItalic(style, true);
styles[type] = style;
}
COM: <s> change the style of a particular type of token including adding bold or </s>
|
funcom_train/32632607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ExtendedIterator listImportedModels() {
ExtendedIterator i = WrappedIterator.create( getSubGraphs().iterator() );
return i.mapWith( new Map1() {
public Object map1(Object o) {
Graph g = (Graph) o;
Model temp = ModelFactory.createModelForGraph( g );
return ModelFactory.createOntologyModel( m_spec, temp );
}} );
}
COM: <s> p answer an iterator over the ontologies that this ontology imports </s>
|
funcom_train/4933672 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addKnownURIPrefixes(Map<String, URI> knownURIPrefixes) {
for (final Entry<String, URI> entry : knownURIPrefixes.entrySet()) {
this.knownURIPrefixes.put(entry.getKey(), entry.getValue());
}
knownURIPrefixesSet = true;
}
COM: <s> add an uri map used as n3 prefixes </s>
|
funcom_train/12155658 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IDicomAbstractFactory getAbstractFactory() throws DicomException {
logger.debug("Entering getAbstractFactory().");
IDicomAbstractFactory dicomAbstractFactory = getAbstractFactory(null);
if (logger.isDebugEnabled()) {
logger.debug("Exiting getAbstractFactory(); RV = " + (dicomAbstractFactory != null ? "[" + dicomAbstractFactory + "]" : null) + ".");
}
return dicomAbstractFactory;
}
COM: <s> gets the default dicom abstract factory like it is specified in </s>
|
funcom_train/10276747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _renderXhtmlAttributes(XmlSerializer serializer) throws IOException {
if (_getXhtmlAttributes() == null || _getXhtmlAttributes().isEmpty())
return;
for (String name : _getXhtmlAttributes().keySet()) {
String value = _getXhtmlAttributes().get(name);
serializer.attribute("", name, value);
}
}
COM: <s> renders all xhtml attributes given with calls to attribute and attributes methods </s>
|
funcom_train/8132130 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void processSetVisible(boolean visible) {
if (getChildren() != null) {
// then all subs
List<BaseControl> childList = new ArrayList<BaseControl>(getChildren()); // abstracting from change in the sublist
for (Iterator<BaseControl> it = childList.iterator(); it.hasNext();) {
BaseControl child = it.next();
child.processSetVisible(visible);
}
}
}
COM: <s> notification for the child objects if the parent is set to visible rsp </s>
|
funcom_train/3372513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getMultiRowSpan(int row0, int row1) {
RowView rv0 = getRow(row0);
RowView rv1 = getRow(row1);
if ((rv0 != null) && (rv1 != null)) {
int index0 = rv0.viewIndex;
int index1 = rv1.viewIndex;
int span = getOffset(Y_AXIS, index1) - getOffset(Y_AXIS, index0) +
getSpan(Y_AXIS, index1);
return span;
}
return 0;
}
COM: <s> fetch the span of multiple rows </s>
|
funcom_train/33687404 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetAllLists() throws Exception {
String expResult = "Use the Announcements list to post messages on the home page of your site.";
List result = WSSListsHelper.getAllLists(listSoapAddress, userName, password, collectionslist);
assertEquals("testGetAllLists", expResult, ((WssList) result.get(0)).getDescription());
}
COM: <s> test of get all lists method of class com </s>
|
funcom_train/46994904 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getProgram(String... statements) {
throw new UnsupportedOperationException();
// StringBuffer sb = new StringBuffer();
// int len = statements.length;
// for (int i = 0; i < len; i++) {
// if (i > 0) {
// sb.append('\n');
// }
// sb.append(statements[i]);
// }
// return sb.toString();
}
COM: <s> to do implementation missing </s>
|
funcom_train/42652398 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInstanciation() {
Application app = new ApplicationDummy();
ObjectModel model = new ObjectModel(app);
assertEquals(app, model.getApplication());
assertEquals(app.getPlatform(), model.getPlatform());
assertEquals(0, model.getAllClasses().size());
}
COM: <s> tests the instantiation of a new model and the associated getters </s>
|
funcom_train/5689313 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toByteString() {
StringBuffer str = new StringBuffer();
try {
byte [] bytes = toBytes();
for ( int i = 0; i < bytes.length; i++ ) {
str.append(Integer.toHexString(bytes[i] & 0x000000FF));
str.append(" ");
}
} catch ( Exception e ) {
str.append("toBytes() threw an exception: " + e.toString());
}
return new String(str);
}
COM: <s> serializes this instance for transmission and then writes </s>
|
funcom_train/20844413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isXAddress() {
if (address.isURN()) return false;
String schema = address.getSchema();
if (HTTPConstants.HTTP_SCHEMA.startsWith(schema)) {
return true;
} else if (HTTPConstants.HTTPS_SCHEMA.startsWith(schema)) {
return true;
} else if (SOAPConstants.SOAP_OVER_UDP_SCHEMA.startsWith(schema)) return true;
return false;
}
COM: <s> returns code true code if this endpoint reference is a http or </s>
|
funcom_train/25599884 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getCalibrateButton() {
if (calibrateButton == null) {
calibrateButton = new JButton();
calibrateButton.setText(Messages.getString("Acc3DCalibrationFrame.button_calibrate")); //$NON-NLS-1$
calibrateButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
jTabbedPane.setSelectedComponent(getCalibrateXPanel());
}
});
}
return calibrateButton;
}
COM: <s> this method initializes calibrate button </s>
|
funcom_train/22948367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateAttValueCount(double value, int attIndex) {
long valueKey2 = hashCode(value);
int count = 1;
if (allCountMaps[attIndex][attIndex].containsKey(valueKey2))
count = (Integer) allCountMaps[attIndex][attIndex].get(valueKey2) + 1;
allCountMaps[attIndex][attIndex].put(valueKey2, count);
}
COM: <s> update count of value values for attribute att index </s>
|
funcom_train/4193645 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cancel()
{ printLog("inside cancel()",LogLevel.MEDIUM);
if (statusIs(D_INVITING) || statusIs(D_ReINVITING))
{ Message cancel=MessageFactory.createCancelRequest(invite_req);
cancel(cancel);
}
else
if (statusIs(D_WAITING) || statusIs(D_ReWAITING))
{ invite_ts.terminate();
}
}
COM: <s> cancel the ongoing call request or a call listening </s>
|
funcom_train/36427693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected File getFileFromPath(String path) throws CommandAbstractException {
String newdir = validatePath(path);
if (isAbsoluteWindows(newdir)) {
return new File(newdir);
}
String truedir = ((FilesystemBasedAuthImpl) getSession().getAuth())
.getAbsolutePath(newdir);
return new File(truedir);
}
COM: <s> get the file interface from this path checking first its validity </s>
|
funcom_train/37074865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public CompoundTransaction setAnnotId(AnnotatedFeatureI annot, String id) {
//annot.setId(id);
UpdateTransaction ut = setId(annot,id); // modifies model
CompoundTransaction compoundTrans = new CompoundTransaction(this);
compoundTrans.addTransaction(ut);
return compoundTrans;
}
COM: <s> set annots id to id </s>
|
funcom_train/5347056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUDPPushFailover() throws Exception {
requestPush(rfd1);
try {
serversocket.accept();
fail("tcp attempt was made");
}catch(IOException expected){}
DatagramPacket push = new DatagramPacket(new byte[1000],1000);
udpsocket.receive(push);
ByteArrayInputStream bais = new ByteArrayInputStream(push.getData());
PushRequest pr = (PushRequest)Message.read(bais);
assertEquals(rfd1.getIndex(),pr.getIndex());
Thread.sleep(5200);
Socket s = serversocket.accept();
assertTrue(s.isConnected());s.close();
}
COM: <s> tests the scenario where an udp push is sent but no </s>
|
funcom_train/18966670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read ( char[] cbuf, int off, int len ) {
random.setSeed(seed);
for ( int i = off ; i < len ; i++ ) {
cbuf[i] = (char) random.nextInt(65536) ;
}
seed = random.nextLong() ;
return len - off ;
}
COM: <s> reads the next characters of data from this reader </s>
|
funcom_train/32908256 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IssueList getIssuesByArtifact(int artifactId, IssueTypeGroup issueType) throws DataAccessException, Exception {
try {
String sql = "select i.* from issue i where i.artifact_id = ? and i.issue_type_ref_id = ? and i.active_ind = 1";
return getIssue(sql, Db.getParameter(artifactId, issueType.getIssueTypeRefId()));
} catch (Exception ex) {
Debug.LogException(this, ex);
throw ex;
}
}
COM: <s> get issues for an artifact </s>
|
funcom_train/6489977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File fileMatrixImport(File importDir) {
LogTools.trace(logger, 25, "AnalysisController.fileMatrixImport()");
File file = _importController.doImport(importDir);
LogTools.trace(logger, 25, "AnalysisController.fileMatrixImport() - Imported file = "+file);
return file;
}
COM: <s> import a matrix </s>
|
funcom_train/33279830 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getCachedObject(final WebRequest request) {
if (HttpMethod.GET != request.getHttpMethod()) {
return null;
}
final Entry cachedEntry = entries_.get(request.getUrl().toString());
if (cachedEntry == null) {
return null;
}
synchronized (entries_) {
cachedEntry.touch();
}
return cachedEntry.value_;
}
COM: <s> returns the cached object corresponding to the specified request </s>
|
funcom_train/7616283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Graphics2D createGraphics() {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
// return ge.createGraphics(this);
// ???AWT hack, FIXME
// return AndroidGraphics2D.getInstance();
// throw new RuntimeException("Not implemented!");
return null;
}
COM: <s> creates the graphics2 d object which allows to draw into this </s>
|
funcom_train/51401276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void editMenu(CoPaintConnection ircServer) {
JMenuItem jmi1 = new JMenuItem(ircServer.getHost());
jmi1.addActionListener(new DisconnectMenuItemListener(ircServer,
disconnectMenu, tabbedPane));
disconnectMenu.add(jmi1);
JMenuItem jmi2 = new JMenuItem(ircServer.getHost());
jmi2.addActionListener(new JoinMenuItemListener(ircServer, chatFrame));
joinMenu.add(jmi2);
}
COM: <s> adds the newly connected network to the menu </s>
|
funcom_train/39877210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onConfigurationChanged() {
if (mSearchable != null && isShowing()) {
// Redraw (resources may have changed)
updateSearchButton();
updateSearchAppIcon();
updateSearchBadge();
updateQueryHint();
if (isLandscapeMode(getContext())) {
mSearchAutoComplete.ensureImeVisible(true);
}
mSearchAutoComplete.showDropDownAfterLayout();
}
}
COM: <s> called after resources have changed e </s>
|
funcom_train/3991214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Obuffer decodeFrame(Header header, io_tool stream) throws InterruptedException, DecoderException, EOFException {
//System.out.println("--> DECODE Frame");
if (!initialized) {
initialize(header);
}
output.clear_buffer();
FrameDecoder decoder = retrieveDecoder(header, stream);
// BYOHack:
// System.out.println("layer: " + layer);
// System.out.println("num subbands:" + header.number_of_subbands());
decoder.decodeFrame();
output.write_buffer(1);
//System.out.println("DECODE Frame -->");
return output;
}
COM: <s> decodes one frame from an mpeg audio bitstream </s>
|
funcom_train/8886737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateSimilarSnippets(ACESnippet snippet) {
String title = PANEL_SIMILAR_SNIPPETS_TITLE + ": ";
Set<ACESnippet> similarSnippets = ACETextManager.getActiveACEText().getSimilarSnippets(snippet);
if (similarSnippets.isEmpty()) {
title += NONE;
}
else {
title += similarSnippets.size();
}
panelSimilarSnippets.setTitle(title);
similarSnippetsTableModel.setData(similarSnippets);
}
COM: <s> p updates the similar snippets panel </s>
|
funcom_train/17805111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSourcePatternNodePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PatternNodeConnection_sourcePatternNode_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PatternNodeConnection_sourcePatternNode_feature", "_UI_PatternNodeConnection_type"),
CtbPackage.Literals.PATTERN_NODE_CONNECTION__SOURCE_PATTERN_NODE,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the source pattern node feature </s>
|
funcom_train/21643554 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOptionsRenderingAntialiasing(int optionsRenderingAntialiasing) {
this.optionsRenderingAntialiasing = optionsRenderingAntialiasing;
props.setProperty(OPTIONS_RENDERING_ANTIALIASING, "" + optionsRenderingAntialiasing);
Object value;
switch (optionsRenderingAntialiasing) {
case 1:
value = RenderingHints.VALUE_ANTIALIAS_ON;
break;
case 2:
value = RenderingHints.VALUE_ANTIALIAS_OFF;
break;
case 0:
default:
value = RenderingHints.VALUE_ANTIALIAS_DEFAULT;
}
renderingHints.put(RenderingHints.KEY_ANTIALIASING, value);
}
COM: <s> sets the options rendering antialiasing </s>
|
funcom_train/12159770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private List addIfNotNullAndNotAlreadyContained(Object object, List list) {
if (object != null) {
if (list == Collections.EMPTY_LIST) {
list = new ArrayList(changeEvents.size());
}
// we rely on the object implementing equals correctly
// oh, well we know it's an XPath
if (!list.contains(object)) {
list.add(object);
}
}
return list;
}
COM: <s> extracted logic common to undo and redo </s>
|
funcom_train/17800635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Bottle findByPK(String id) {
Bottle bottle = new Bottle();
bottle.setId(id);
List druideDB_resultat = find(bottle);
if ( druideDB_resultat != null && druideDB_resultat.size() == 1) {
return (Bottle)druideDB_resultat.get(0);
}
return null;
}
COM: <s> this method is used to find a bottle with its pk s </s>
|
funcom_train/17500445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void findPageWidgets(Element el) {
String gwtid = getElementAttribute(el, "gwtid");
if (gwtid != null) {
htmlElements.put(gwtid, el);
Widget widget = AutoRebindWidget.rebindWidget(el);
pageWidget.put(gwtid, widget);
if (widgets.get(gwtid) == null)
widgets.put(gwtid, widget);
} else {
int count = DOM.getChildCount(el);
for (int i = 0; i < count; i++) {
findPageWidgets(DOM.getChild(el, i));
}
}
}
COM: <s> find all the element which have a gwtid attribte </s>
|
funcom_train/10207333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doGameStart() {
doGameAbort();
Application.insertMenuItem(gameMenu, Application.pSpecial, Application.menu[Application.pSpecial]);
GameApp.game.init();
GameApp.game.show();
Application.show(null, GameApp.game, true);
}
COM: <s> start the game </s>
|
funcom_train/22431941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setText(MessageText.getString(
"host.gui.SessionControl.buttonEndSession"));
jButton.setForeground(Color.WHITE);
jButton.setBackground(Color.RED);
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
dispose();
}
});
}
return jButton;
}
COM: <s> this method initializes j button </s>
|
funcom_train/17724885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getReturnUrl() {
if (this.returnUrl != null) {
return this.returnUrl;
}
ValueBinding vb = getValueBinding("returnUrl"); //NOI18N
if (vb != null) {
return (String) vb.getValue(getFacesContext());
}
return null;
}
COM: <s> returns the url to which customers browser will be returned after c </s>
|
funcom_train/41665879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDateTime(String dateTimeString) {
if (dateTimePattern == null) {
dateTimePattern = EasyCalendar.DEFAULT_DATE_TIME_PATTERN;
}
try {
Date date = Transformer.date(dateTimeString, dateTimePattern);
if (date != null) {
setDateTime(date);
}
} catch (TypeRuntimeException e) {
String msg = "EasyDateTime.setDateTime --date with time does not have a valid format: "
+ dateTimeString + ": " + dateTimePattern;
throw new TypeRuntimeException(msg, e);
}
}
COM: <s> sets a date time as string </s>
|
funcom_train/45864294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IconMenu setOverlayByValue(int val, char icon) {
for (int gridY = 0; gridY < rows; gridY++) {
for (int gridX = 0; gridX < cols; gridX++) {
if (value[gridY][gridX] == val) {
over[gridY][gridX] = font.getIndex(icon);
break;
}
}
}
return this;
}
COM: <s> overlays another icon on top of the grid </s>
|
funcom_train/34758596 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
ArrayList<String> commandList = CommandUtilities.getCommandList(code);
for (int i = 0; i < commandList.size(); i++) {
try {
executeCommand(commandList.get(i));
} catch (UknownCommandException ex) {
Logger.getLogger(RuntimeScript.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
COM: <s> begin this script </s>
|
funcom_train/46695977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetOutputType() {
System.out.println("getOutputType");
CombineProperty instance = new CombineProperty();
List<IODescriptor> expResult = null;
List<IODescriptor> result = instance.getOutputType();
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 output type method of class combine property </s>
|
funcom_train/21302773 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MoleculeType createProteinMolecule(String accession, String refDB, String refDBAc) {
MoleculeType molecule = createProteinMolecule(accession);
if (refDB != null) { molecule.getXrefs().getPrimaryRef().setDb(refDB); }
if (refDBAc != null) { molecule.getXrefs().getPrimaryRef().setDbAc(refDBAc); }
return molecule;
}
COM: <s> create a protein molecule from a given protein accession with </s>
|
funcom_train/15607992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Iterator getFeatureSourcesInGenomeVersion(int versionID) {
if (genomeVersionSpace == null)
throw new IllegalStateException("No genome version space in XML for facade "+this.getClass().getName());
//return genomeVersionSpace.getGenomicAxisInputSources(versionID);
return genomeVersionSpace.getSearchableInputSources(versionID);
} // End method
COM: <s> returns all sources of features and contigs which should be queried </s>
|
funcom_train/2731569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ForallTerm visit(ForallTerm forall) {
logger.debug("<ForallTerm>");
ForallTerm newForall = ruleFactory.createForallTerm();
visitQuant(forall, newForall);
logger.debug("<Before>" + printer.visit(forall) + "</Before>");
logger.debug("<After>" + printer.visit(newForall) + "</After>");
logger.debug("</ForallTerm>");
return newForall;
}
COM: <s> makes substitutions on a forall term </s>
|
funcom_train/777159 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void quit() {
String goodbyeMsg = FTPHelper.getGoodbyeMessage();
if (goodbyeMsg.startsWith("221")) {
client.respond(goodbyeMsg);
} else {
client.respond("221 Goodbye...");
}
BNC.removeClient(client);
client.shutdown();
}
COM: <s> shuts the client down </s>
|
funcom_train/18807829 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(final Object obj) {
if (obj != null) {
if (obj instanceof Month) {
final Month target = (Month) obj;
return ((this.month == target.getMonth()) && (this.year.equals(target.getYear())));
}
else {
return false;
}
}
else {
return false;
}
}
COM: <s> tests the equality of this month object to an arbitrary object </s>
|
funcom_train/14077242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerCitation(Citation citation) {
Integer cid = new Integer(citation.getId());
if (citations.get(cid) == null)
citations.put(cid, citation);
// Refresh the filters, in case we need to add a new Citation to the current view.
Application.getCiteBook().getCitationList().refreshFilters();
}
COM: <s> mark a citation object as belonging to this book outline item </s>
|
funcom_train/43879445 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeCoordinates(CoordinateSequence seq, int dims, ValueSetter dest) {
for (int i = 0; i < seq.size(); i++) {
for (int d = 0; d < dims; d++) {
dest.setDouble(seq.getOrdinate(i, d));
}
}
}
COM: <s> write a coordinatesequence part of linear ring and linestring but not </s>
|
funcom_train/3873802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void incomingPTP(int clientId, Message msg, int extra) {
//frame.say("member "+name+": incoming PTP");
//incoming chat message. forward to the appropriate group-member tab
String what = msg.readString(); //the chat text
frame.saytab(name, clientId+" says: "+what);
}
COM: <s> a member of the group sent a message to this member </s>
|
funcom_train/25491968 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MapBlock readInternal(FileInputStream fis) throws IOException {
/*
* a block has: 4 byte header 8 * 8 cells with 3 bytes = 192 bytes
* total: 196 bytes
*/
byte[] data = new byte[MAP_BLOCK_LENGTH];
int readBytes = fis.read(data);
if (readBytes == -1) {
return null;
}
if (readBytes != MAP_BLOCK_LENGTH) {
throw new IOException(
"Cannot read data block from file, not enough bytes available");
}
MapBlock block = getMapBlock(data);
return block;
}
COM: <s> internal method to read a map block </s>
|
funcom_train/21846771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateSaveOffsets(FormatTokenPosition formatStartPosition) {
if (firstSet != null) { // it has only sense if there are any save-sets
FormatWriter.FormatTokenItem ti = (FormatWriter.FormatTokenItem) formatStartPosition
.getToken();
int offset = -formatStartPosition.getOffset();
while (ti != null) {
ti.setSaveOffset(offset);
offset += ti.getImage().length();
ti = (FormatWriter.FormatTokenItem) ti.getNext();
}
}
}
COM: <s> number the tokens so that they are ok for finding out the offsets </s>
|
funcom_train/41262035 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_contentLength() {
File file;
FileS3Object s3Object;
try {
file = File.createTempFile("unitTest", null);
file.deleteOnExit();
FileOutputStream out = new FileOutputStream(file);
out.write("12345".getBytes());
out.close();
s3Object = new FileS3Object("bucket", "key", file.toURL());
assertEquals("Unexpected value", 5, s3Object.getContentLength());
} catch (IOException e) {
e.printStackTrace();
fail("Unexpected exception");
return;
}
}
COM: <s> test the content length property </s>
|
funcom_train/46768709 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SettingModel getSetting(final long settingId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return SecurityData.getSetting(settingId, chain, call);
}}; return (SettingModel) call(method, call);
}
COM: <s> same transaction return the single setting model for the primary key </s>
|
funcom_train/49461787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Interview addInterviewToAudit(Interview itw, AuditId auditId) throws Exception{
Db db = getDb();
try {
db.enter();
if(auditId == null) throw new Exception("Can't add an interview to a null audit");
itw.setAuditId(auditId);
AuditInterviewId id = DbInterview.addInterview(db, itw, accountableUser);
//get the newly created itw to have case corrections, ...
return DbInterview.getInterview(db, id);
}
finally {
db.exit();
}
}
COM: <s> add a interview to an audit </s>
|
funcom_train/1012569 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(Buffer v) {
if ( buffer==null || sealed ) return;
if(0!=(v.remaining() % strideL)) {
throw new GLException("Buffer length ("+v.remaining()+") is not a multiple of component-stride:\n\t"+this);
}
growBufferIfNecessary(v.remaining());
BufferUtil.put(buffer, v);
}
COM: <s> generic buffer relative put method </s>
|
funcom_train/38509486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void alter( OID oid, Object newobject ) throws DBException {
Object oldobject = oid.getOldObject();
Link link = (Link)validOid.remove(oid); // temporarily invalid
if( keys != null )keys.remove( oid, oldobject );
link.setObject( newobject );
if( keys != null )keys.add( oid, newobject );
validOid.put( oid, link ); // valid again
}
COM: <s> the object has been altered and this assures the keys have been </s>
|
funcom_train/29554157 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validate(final Object newValue) {
if (newValue != null && !(this.getType().isAssignableFrom(newValue.getClass()))) {
throw new StrategyConfigurationException(incorrectTypeMessage(getType(), newValue.getClass()));
}
}
COM: <s> validates the value </s>
|
funcom_train/29513775 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
if ("AppointmentServiceInterface".equals(portName)) {
setAppointmentServiceInterfaceEndpointAddress(address);
}
else
{ // Unknown Port Name
throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
}
}
COM: <s> set the endpoint address for the specified port name </s>
|
funcom_train/8436941 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetContextsForTerms() {
System.out.println("getContextsForTerms");
String term1 = "alice";
String term2 = "joe bob";
Iterator<Corpus.Hit> result = instance.getContextsForTerms(term1, term2);
assertEquals(result.next().getText(), "alice hates joe bob");
assertFalse(result.hasNext());
}
COM: <s> test of get contexts for terms method of class nii </s>
|
funcom_train/33623545 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeConnection(BayeuxConnection connection) {
if (getConnection(connection.getClientId()) != null) {
for (String subscription : connection.getSubscriptions()) {
removeListener(subscription, connection);
}
connections.remove(connection.getClientId());
return true;
} else {
return false;
}
}
COM: <s> remove a connection from router as well as its subscriptions </s>
|
funcom_train/388474 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRecursiveProperties() {
ConfigString string = new ConfigString("@{a.a}", variables, properties);
assertTrue("sub failed in expand", string.expand("", variables,
properties));
assertEquals("c.c", string.toString());
string.reset(); // Reintialize
}
COM: <s> test recursive properties </s>
|
funcom_train/39383629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void removeFile(String id, String dir) {
File file = new File(dir + id + ".xml");
boolean deleted = file.delete();
if(deleted) {
logger.fine("Deleted the data file " + file.getName());
}
else {
logger.severe("Failed to delete the data file " + file.getName());
}
}
COM: <s> removes the given data file in the given dir </s>
|
funcom_train/46457503 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHyperlinksEnabled(boolean enabled) {
for(int i = 0; i<getTabCount(); i++) {
LaunchPanel tab = getTab(i);
Enumeration e = tab.getRootNode().breadthFirstEnumeration();
while(e.hasMoreElements()) {
LaunchNode next = (LaunchNode) e.nextElement();
setHyperlinksEnabled(next, enabled);
}
}
}
COM: <s> sets the hyperlinks enabled property for all nodes </s>
|
funcom_train/10513214 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void verifyBorlandJar(File sourceJar) {
if (version == BAS) {
verifyBorlandJarV4(sourceJar);
return;
}
if (version == BES) {
verifyBorlandJarV5(sourceJar);
return;
}
log("verify jar skipped because the version is invalid ["
+ version + "]", Project.MSG_WARN);
}
COM: <s> verify the produced jar file by invoking the borland verify tool </s>
|
funcom_train/34889762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Form getFormStartTracing() {
Form form = new Form(Texts.MENU_TRACING);
form.append(new TextField(Texts.MENU_TRACED_OBJECT, "", 20, TextField.ANY));
form.addCommand(this.OK);
form.addCommand(this.BACK);
form.setCommandListener(this);
return form;
}
COM: <s> creates form for start tracing object </s>
|
funcom_train/33666643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addExistingDatasources() {
DownloadManager manager;
PEPeer[] dataSources;
tv_.removeAllTableRows();
manager = getDownloadManager();
if (manager == null || tv_.isDisposed()) {
return;
}
dataSources = manager.getCurrentPeers();
if (dataSources == null || dataSources.length == 0) {
return;
}
tv_.addDataSources(dataSources);
tv_.processDataSourceQueue();
}
COM: <s> add datasources already in existance before we called add listener </s>
|
funcom_train/50727006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadProperties() {
DatabaseConfig config = ApplicationConfig.getConfig().getDatabaseConfig();
driver = config.getDriver();
serverURL = config.getURL();
username = config.getUsername();
password = config.getPassword();
minConnections = config.getMinConnections();
maxConnections = config.getMaxConnections();
connectionTimeout = config.getConnectionTimeout();
}
COM: <s> load properties that already exist from jive properties </s>
|
funcom_train/41207199 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initModes() {
addInputMode(QWERTY_MODE, DEFAULT_QWERTY);
addInputMode(NUMBERS_SYMBOLS_MODE, DEFAULT_NUMBERS_SYMBOLS);
addInputMode(SYMBOLS_MODE, DEFAULT_SYMBOLS);
addInputMode(NUMBERS_MODE, DEFAULT_NUMBERS);
}
COM: <s> init all virtual keyboard modes such as qwerty mode numbers symbols mode </s>
|
funcom_train/41334121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintScrollBarThumbBackground(SynthContext context, Graphics g, int x, int y, int w, int h, int orientation) {
paintBackground(context, g, x, y, w, h, orientation);
}
COM: <s> paints the background of the thumb of a scrollbar </s>
|
funcom_train/9495622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getAngle() {
if ((q0 < -0.1) || (q0 > 0.1)) {
return 2 * Math.asin(Math.sqrt(q1 * q1 + q2 * q2 + q3 * q3));
} else if (q0 < 0) {
return 2 * Math.acos(-q0);
}
return 2 * Math.acos(q0);
}
COM: <s> get the angle of the rotation </s>
|
funcom_train/44493250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deregisterEventListeners(){
endTestRun();
TestCaseListener listener;
for (Iterator it = testCaseListeners.iterator(); it.hasNext(); ) {
listener = (TestCaseListener)it.next();
TestCaseEventHandler.getInstance().removeTestCaseListener(listener);
}
}
COM: <s> remove all test case listeners registered via the register event listeners method </s>
|
funcom_train/18355424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeInt(int bytes) throws IOException{
byte[] writeBytes = new byte[4];
writeBytes[0] = (byte) (bytes & 0x000000ff);
writeBytes[1] = (byte) ((bytes>>8) & 0x000000ff);
writeBytes[2] = (byte) ((bytes>>16) & 0x000000ff);
writeBytes[3] = (byte) ((bytes>>24) & 0x000000ff);
this.write(writeBytes, 0, 4);
return;
}
COM: <s> writes an the given int onto the stream </s>
|
funcom_train/20481605 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createOrUpdate(${entity.name} ${entity.id}) {
Object pk = ${entity.id}.primaryKey();
if (pk == null || !primaryIndex.containsKey(pk)) {
create(${entity.id});
}
else {
update(${entity.id});
}
}
COM: <s> the create or update semantics of crud </s>
|
funcom_train/23793717 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void translateCMPG() {
switch (value) {
case EQUAL:
value = CMPL_EQUAL;
break;
case NOT_EQUAL:
value = CMPL_NOT_EQUAL;
break;
case LESS:
value = CMPG_LESS;
break;
case GREATER_EQUAL:
value = CMPG_GREATER_EQUAL;
break;
case GREATER:
value = CMPG_GREATER;
break;
case LESS_EQUAL:
value = CMPG_LESS_EQUAL;
break;
default:
throw new Error();
}
}
COM: <s> convert this integer compare to a floating point cmpg </s>
|
funcom_train/10925247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void writeBlock() throws IOException {
if (outStream == null) {
throw new IOException("writing to an input buffer");
}
outStream.write(blockBuffer, 0, blockSize);
outStream.flush();
currRecIdx = 0;
currBlkIdx++;
Arrays.fill(blockBuffer, (byte) 0);
}
COM: <s> write a tar buffer block to the archive </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.