__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/885838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public File getLastOpenedFile() {
String fileName = ControllerManagerImpl.getInstance().getUserPrefs().
get(openLocationKey, ""); //$NON-NLS-1$
if(fileName.length() == 0) {
return null;
}
return new File(fileName);
}
COM: <s> get the last opened file or null if there is none </s>
|
funcom_train/49665950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkAndSetParameter() {
boolean good = true;
// check parametre
good = paramDialog.checkAndSetParameter();
// check description
if (descritpionField.getText().isEmpty())
{// pb description
good = false;
descriptionPanel.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, Color.RED));
}
else
descriptionPanel.setBorder(null);
return good;
}
COM: <s> check if the parameter are correct and update them in the parameter object </s>
|
funcom_train/3945808 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateVersionType_MaxLength(String versionType, DiagnosticChain diagnostics, Map context) {
int length = versionType.length();
boolean result = length <= 20;
if (!result && diagnostics != null)
reportMaxLengthViolation(ImscpRootv1p1p2Package.eINSTANCE.getVersionType(), versionType, length, 20, diagnostics, context);
return result;
}
COM: <s> validates the max length constraint of em version type em </s>
|
funcom_train/17046992 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Feature setFeature(String type, Serializable value, Object source) {
Feature result = new Feature(type, value, 1.0, source);
if (this.features == null) this.features = new Features();
this.features.add(result);
return result;
}
COM: <s> convenience method for setting a feature on this token with a </s>
|
funcom_train/21261882 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPartControl(Composite parent) {
shell = parent.getShell();
//System.out.print("create part\n");
player = new FlashPlayer(parent, 0);
makeActions();
fillLocalToolBar();
fillLocalPullDown();
String latest = recents.getMostRecent();
if (latest != null) {
loadMovie(latest);
}
}
COM: <s> this is a callback that will allow us </s>
|
funcom_train/26273278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addContext(ContextConfig context ) {
if ( context.getName() == null || context.getName().length() < 1 )
throw new AssemblyConfigException(
"Context does not define a `name' identifier." );
contextMap.put( context.getName(), context ); /*1*/
context.setParentAssemblyConfig( this ); /*2*/
}
COM: <s> adds a context configuration to the assembly </s>
|
funcom_train/46376692 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void performCloseAction(Action action) {
switch (action.type) {
case CLOSE_BUTTON_ENTER:
closeButton.setMouseInside(true);
break;
case CLOSE_BUTTON_EXIT:
closeButton.setMouseInside(true);
break;
case CLOSE_BUTTON_PRESSED:
SwingUtilities.invokeLater(new Runnable () {
public void run () {
notifyAllListeners();
}
});
break;
}
}
COM: <s> process the close button action </s>
|
funcom_train/4348740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void cancelTimeline(Timeline timeline) {
getAnimatorThread();
if (this.runningTimelines.contains(timeline)) {
this.runningTimelines.remove(timeline);
TimelineState oldState = timeline.getState();
while (timeline.getState() != TimelineState.IDLE)
timeline.popState();
timeline.pushState(TimelineState.CANCELLED);
this.callbackCallTimelineStateChanged(timeline, oldState);
timeline.popState();
this.callbackCallTimelineStateChanged(timeline,
TimelineState.CANCELLED);
}
}
COM: <s> cancels the specified timeline instance </s>
|
funcom_train/4233203 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void postDataXY(ChannelMap channelMap, ChannelMap cachedChannelMap) {
//loop over all channels and see if there is data for them
int seriesCount = dataCollection.getSeriesCount()-localSeries;
for (int i=0; i<seriesCount; i++) {
postDataXY(channelMap, cachedChannelMap, i);
}
lastTimeDisplayed = time;
}
COM: <s> posts the data in the channel map when in x vs </s>
|
funcom_train/49790772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSyncDisabled() throws Exception {
String value = "Hello, world!";
beginAtSitemapThenPage("Home");
assertLabelTextNotPresent(value);
// disable sync
{
String target = getLabelIDForText("Allow Sync?");
assertLabeledFieldEquals(target, "true");
setLabeledFormElementField(target, "false");
}
{
String target = getLabelIDForText("Field");
assertLabeledFieldEquals(target, ""); // empty
setLabeledFormElementField(target, value);
}
// the label has not changed
assertLabelTextNotPresent(value);
}
COM: <s> if we change allow sync to false we prevent the label from syncing </s>
|
funcom_train/941711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LogFile consistancyCheck() throws ISphereException {
// Do the SOAP call
Object result = this.doSoapCall("consistancyCheck");
// Check that the result is a ProcessProxy
if (!(result instanceof LogFile)) {
throw new ISphereException(this.getTarget() + ".consistancyCheck()"
+ ": Result is not a LogFile object.");
}
// Return the result
return (LogFile) result;
}
COM: <s> checks the consistancy of the isphere </s>
|
funcom_train/8196636 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setInteriorGap(double percent) {
if ((percent < 0.0) || (percent > MAX_INTERIOR_GAP)) {
throw new IllegalArgumentException(
"Invalid 'percent' (" + percent + ") argument.");
}
if (this.interiorGap != percent) {
this.interiorGap = percent;
notifyListeners(new PlotChangeEvent(this));
}
}
COM: <s> sets the interior gap and sends a </s>
|
funcom_train/42273018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Query createQuery(final String criteria) throws LuceneException {
try {
Query result = new QueryParser(Constants.TITLE,
new StandardAnalyzer()).parse(criteria);
logger.debug("createQuery(" + criteria + ") " + result.toString());
return result;
} catch (ParseException e) {
throw new LuceneException("Cannot parse query.", e);
}
}
COM: <s> create a search query </s>
|
funcom_train/19274615 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireChangeEvent(UIListModelEvent event) {
for (int i = 0; i < this.listeners.size(); i++) {
UIListModelListener listener = this.listeners.get(i);
try {
listener.listModelChanged(event);
} catch (Throwable t) {
handleListenerException(listener, t);
}
}
}
COM: <s> this method sends the given event to all registered listeners of this </s>
|
funcom_train/4033559 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invoke(Method method) {
if (method != null){
try {
// Call the method with this object as the argument!
method.invoke(this, null);
} catch (Exception e) {
// Error handling
System.err.println("GLApp.invoke(): couldn't invoke method " + method.getName() + " on object " + this.getClass().getName());
}
}
}
COM: <s> similar to the static invoke function this execute a method on the </s>
|
funcom_train/26548427 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void genSemPredMap() {
if (DEBUG_CODE_GENERATOR) {
println(";genSemPredMap");
}
Enumeration e = semPreds.elements();
println("private String _semPredNames[] = {");
while(e.hasMoreElements())
println("\"" + e.nextElement() + "\",");
println("};");
}
COM: <s> write an array of strings which are the semantic predicate </s>
|
funcom_train/46375838 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getActions(Class clazz, Set<Action> actions) {
Actions classActions = (Actions) clazz.getAnnotation(Actions.class);
if (classActions != null) {
for (Class ac : classActions.value()) {
actions.add(Action.getInstance(ac));
}
}
// search the superclass for any actions
if (clazz.getSuperclass() != null) {
getActions(clazz.getSuperclass(), actions);
}
}
COM: <s> find all action annotations on a given class </s>
|
funcom_train/24512500 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setViewSelectionModel(ListSelectionModel selection) {
ListSelectionModel old = this.viewSelection;
if (old != null) {
old.removeListSelectionListener(viewSelectionListener);
// modelSelection.clearSelection();
clearModelSelection();
}
this.viewSelection = selection;
mapTowardsModel();
viewSelection.addListSelectionListener(getViewSelectionListener());
isListening = true;
}
COM: <s> sets the view selection model </s>
|
funcom_train/28493082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtnSalir() {
if (btnSalir == null) {
btnSalir = new JButton();
btnSalir.setBounds(new Rectangle(144, 461, 121, 21));
btnSalir.setMnemonic(KeyEvent.VK_ESCAPE);
btnSalir.setText("Exit");
btnSalir.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
dispose();
}
});
}
return btnSalir;
}
COM: <s> this method initializes btn salir </s>
|
funcom_train/20294473 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getHtmlSelectDefaultNone(String selectName) {
HtmlSelect thisSelect = new HtmlSelect();
thisSelect.addItem(-1, "-- None --");
for (LookupElement thisElement : this) {
thisSelect.addItem(
thisElement.getCode(),
thisElement.getDescription());
}
return thisSelect.getHtml(selectName);
}
COM: <s> gets the html select default none attribute of the lookup list object </s>
|
funcom_train/9575435 | /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 ("Clinic".equals(portName)) {
setClinicEndpointAddress(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/26019774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Capabilities requestCapabilities(String contact) throws ServerApiException {
if (logger.isActivated()) {
logger.info("Request capabilities for contact " + contact);
}
// Check permission
ServerApiUtils.testPermission();
// Test IMS connection
ServerApiUtils.testIms();
try {
// Request contact capabilities
return Core.getInstance().getCapabilityService().requestContactCapabilities(contact);
} catch(Exception e) {
throw new ServerApiException(e.getMessage());
}
}
COM: <s> request capabilities for a given contact </s>
|
funcom_train/1674087 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() {
if (thread != null) {
shutdownRequest = true;
while (thread.isAlive()) {
synchronized (synchronizer) {
synchronizer.notifyAll();
}
try {
thread.join(JOIN_MILLIS);
} catch (InterruptedException e) {
/*
* Klockwork - ok
* Don't say anything about exceptions here.
*/
}
}
thread = null;
}
}
COM: <s> requests shutdown and calls join to wait for the thread to stop </s>
|
funcom_train/4361303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConnector(Connector connector) {
this.connector = connector;
if("AJP/1.3".equals(connector.getProtocol())) {
// default size to size of one ajp-packet
outputBuffer = new OutputBuffer(8184);
} else {
outputBuffer = new OutputBuffer();
}
outputStream = new CoyoteOutputStream(outputBuffer);
writer = new CoyoteWriter(outputBuffer);
}
COM: <s> set the connector through which this request was received </s>
|
funcom_train/17939798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel createFruitsPanel(){
JPanel fruits=new JPanel(new GridLayout(1,4));
JLabel label;
label = UIHelper.createLabel("", "p1","jpg");
fruits.add(label);
label = UIHelper.createLabel("", "p2","jpg");
fruits.add(label);
label = UIHelper.createLabel("", "p3","jpg");
fruits.add(label);
label = UIHelper.createLabel("", "p3","jpg");
fruits.add(label);
label = UIHelper.createLabel("", "p3","jpg");
fruits.add(label);
fruits.setBackground(Color.WHITE);
return fruits;
}
COM: <s> panel which holds thumbnails of created histograms </s>
|
funcom_train/37476433 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Set getSubWfIds() {
if (this.subIdCache == null){
PropertyFilter filter = new PropertyFilter();
filter.setParentWfId(this.getId());
subIdCache = new TreeSet();
subIdCache.addAll(WorkflowManager.getInstance().getWorkflowIds(filter, null));
}
return this.subIdCache;
}
COM: <s> initializes the subwf id cache and returns it </s>
|
funcom_train/3651865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object unmarshal(Element elem) {
if (elem.getName().equals("pooledExecutor")) {
return unmarshalPooledExecutor(elem);
} else if (elem.getName().equals("queuedExecutor")) {
return unmarshalQueuedExecutor(elem);
} else {
return unmarshalDirectExecutor(elem);
}
}
COM: <s> converts an executor node into one of several supported implementations </s>
|
funcom_train/27866947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testWriteAndRead() {
String name = null;
try {
DataSource dataSource = createTestDataSource();
name = dataSource.getName();
verifyTestDataSource(name);
} catch (Exception e) {
fail(e.toString());
}
try {
handler.removeObject(name);
} catch (Exception e) {
fail(e.toString());
}
}
COM: <s> test to create a data source write data and then see if it </s>
|
funcom_train/13547587 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBasepackagepath( String basepath ) throws BuildException {
// replace forward slashes with dots (if in a unix-like environment)
String bPackage = basepath.replace('/','.');
// replace forward slashes with dots (if in a windows-like environment)
this.basePackage = bPackage.replace('\\','.');
//this.basePackage = basepath;
}
COM: <s> sets the base package path used for converting the file path to </s>
|
funcom_train/1175643 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stopRtpPacketReceiver() {
this.rtpPacketReceiver.interrupt();
this.myRtpRecvPort = 0;
// Note that the interrupt call will close the socket
// if the remote rtp recv port is still open, we
// allocate a socket for it. This is because the sending
// and receiving socket are the same.
try {
if ( this.remoteRtpRecvPort > 0 )
this.myRtpSendSocket = new DatagramSocket();
} catch (SocketException ex) {
}
}
COM: <s> release the port and stop the reciever </s>
|
funcom_train/22683384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void translateKnowledgebase(Set<org.wsml.reasoner.Rule> p, RuleSet minsEngine) throws ExternalToolException, UnsupportedFeatureException {
logger.info("Translate knowledgebase :" + p);
if (p == null) {
logger.info("KB is not referenced. Assume empty KB.");
return;
}
for (org.wsml.reasoner.Rule r : p) {
translateRule(r, minsEngine);
}
}
COM: <s> translate a knowledgebase </s>
|
funcom_train/20219240 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHandleProperty() throws Exception{
PropertyHandler propertyHandler = new DateToTimeStringHandler();
Calendar calendar = Calendar.getInstance();
Date dt = new Date();
calendar.setTime(dt);
calendar.set(Calendar.HOUR_OF_DAY, 16);
calendar.set(Calendar.MINUTE, 12);
calendar.set(Calendar.SECOND, 30);
assertEquals("16:12:30", propertyHandler.doProperty(calendar.getTime()));
}
COM: <s> date to time string handler </s>
|
funcom_train/28177891 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SnmpGetRequestResult getNextRequest(String oidstr) throws RequestExecutionException{
target.setObjectID("."+oidstr);
String result = target.snmpGetNext();
//if the snmpGet() method produce an error
if(target.getErrorCode() != 0)
throw new RequestExecutionException(target.getErrorString());
if(result == null)
throw new RequestExecutionException("error : snmpGetNext() return a null string");
return new SnmpGetRequestResult(new GwOID(target.getObjectID()),result);
}
COM: <s> makes a standard single getnext request </s>
|
funcom_train/43326820 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void allocSeqs(int n) {
if (n <= sequences()) return;
char[] newseq = new char[n];
int i = 0;
// copy old seqs
if (seq != null) {
System.arraycopy(seq, 0,
newseq, 0,
seq.length);
i = seq.length;
}
// make new ones blank.
for (; i<n; i++)
newseq[i] = '-';
seq = newseq;
}
COM: <s> tell the prof res to allocate space for at least n sequences </s>
|
funcom_train/48663746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void getPersonDetails(Integer id) {
dispatcher.execute(new GetPersonDetailsCommand(id),
new AsyncCallback<GetPersonDetailsCommandResult>() {
@Override
public void onFailure(Throwable e) {
Log.error("Connection to server failed.", e);
}
@Override
public void onSuccess(GetPersonDetailsCommandResult result) {
eventBus.fireEvent(new GetPersonDetailsEvent(result));
}
});
}
COM: <s> try to get person details </s>
|
funcom_train/16787260 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTextEditorDoNotAllowWrapping(boolean showButton) throws RQLException {
if (!isHtmlText()) {
throw new WrongTypeException("Template element " + getName()
+ " is not of type HTML text. Do not allow wrapping can be enabled/disabled on HTML text elements only.");
}
if (showButton) {
textEditorSettings = textEditorSettings.clearBit(TEXT_EDITOR_DO_NOT_ALLOW_WRAPPING_BIT_INDEX);
} else {
textEditorSettings = textEditorSettings.setBit(TEXT_EDITOR_DO_NOT_ALLOW_WRAPPING_BIT_INDEX);
}
save("elteditoroptions", textEditorSettings.toString());
}
COM: <s> enabled disabled den toolbarbutton im texteditor do not allow wrapping f r textelemente </s>
|
funcom_train/10628223 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDoubleValueMinusZero() {
String a = "-123809648392384754573567356745735.63567890295784902768787678287E-400";
BigDecimal aNumber = new BigDecimal(a);
long minusZero = -9223372036854775808L;
double result = aNumber.doubleValue();
assertTrue("incorrect value", Double.doubleToLongBits(result) == minusZero);
}
COM: <s> double value of a small negative big decimal </s>
|
funcom_train/40453467 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getCmdAgregarProductoPedido() {
if (cmdAgregarProductoPedido == null) {//GEN-END:|169-getter|0|169-preInit
// write pre-init user code here
cmdAgregarProductoPedido = new Command("Agregar producto", Command.OK, 0);//GEN-LINE:|169-getter|1|169-postInit
// write post-init user code here
}//GEN-BEGIN:|169-getter|2|
return cmdAgregarProductoPedido;
}
COM: <s> returns an initiliazed instance of cmd agregar producto pedido component </s>
|
funcom_train/5420025 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public boolean isValidJavaIdentifier(String name) {
int len = name.length();
if( len == 0 )
return false;
if( ! Character.isJavaIdentifierStart( name.charAt(0) ) )
return false;
for(int i=1; i<len; i++)
{
char c = name.charAt(i);
if( ! Character.isJavaIdentifierPart( c ) )
return false;
}
return true;
}
COM: <s> check if a string is a valid java identifier </s>
|
funcom_train/35837459 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addHelpButton(UIButton oButton) {
GridBagConstraints gc = new GridBagConstraints();
gc.fill = GridBagConstraints.NONE;
gc.insets = new Insets(10,10,10,10);
gc.weightx = 30;
gc.gridwidth=1;
//gc.gridx = 0;
//gc.anchor = GridBagConstraints.WEST;
gc.anchor = GridBagConstraints.EAST;
oGridBagLayout.setConstraints(oButton, gc);
super.add(oButton);
}
COM: <s> add the given help button on the right of the panel </s>
|
funcom_train/4210354 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void appendOpenParagraphTag(String style) {
StringBuilder sb = new StringBuilder("<p");
if (style != null) {
sb.append(" style=\"");
sb.append(style);
sb.append("\"");
}
sb.append(">");
text.append(sb.toString());
}
COM: <s> appends a tag that indicates the start of a new paragraph </s>
|
funcom_train/46746447 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCostCurrencyRef(DisplayModel costCurrencyRef) {
if (Converter.isDifferent(this.costCurrencyRef, costCurrencyRef)) {
DisplayModel oldcostCurrencyRef= new DisplayModel(this);
oldcostCurrencyRef.copyAllFrom(this.costCurrencyRef);
this.costCurrencyRef.copyAllFrom(costCurrencyRef);
setModified("costCurrencyRef");
firePropertyChange(String.valueOf(ITEMLOCATIONS_COSTCURRENCYREFID), oldcostCurrencyRef, costCurrencyRef);
}
}
COM: <s> currency of cost </s>
|
funcom_train/50396003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateMetadata(String resourceName, Map<String,String>meta)throws Exception{
UpdateMetadataDocument req=UpdateMetadataDocument.Factory.newInstance();
req.addNewUpdateMetadata().setResourceName(resourceName);
req.getUpdateMetadata().setMetadata(convert(meta));
UpdateMetadataResponseDocument res=metadataManagement.UpdateMetadata(req);
return res.getUpdateMetadataResponse().getMetadataUpdated();
}
COM: <s> update metadata for the given resource with the provided new values </s>
|
funcom_train/5080738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected static final UpdateManager NO_MANAGER = new UpdateManager() {
public void addDirtyRegion (IFigure figure, int x, int y, int w, int h) { }
public void addInvalidFigure(IFigure f) { }
public void performUpdate() { }
public void performUpdate(RectD2D region) { }
public void setRoot(IFigure root) { }
public void setGraphicsSource(GraphicsSource gs) { }
};
COM: <s> an update manager that does nothing </s>
|
funcom_train/38952657 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GeneralPath generateNewEdgeShape(int edgeNumber, Edge.Type type) throws JigsawPuzzleException {
AbstractEdgeProducer producer = GameCommander.getInstance().getPreferences().getEdgeProducer();
producer.init(GameCommander.getInstance().getPreferences()
.getSideLength());
producer.produce();
edgePaths.put(edgeNumber, new GeneralPath(producer.getBothShapes()[0]));
GeneralPath copy = new GeneralPath(producer.getBothShapes()[1]);
turnToType(type, copy);
return copy;
}
COM: <s> generates a new randomly choosen edge shape as general path instance </s>
|
funcom_train/45686005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public GlobalInfo decode(char[] jsonEncoded) {
m_packageSearch.addAll(s_defaultPackages);
CharArrayReader in = new CharArrayReader(jsonEncoded);
JsonFactory fact = new JsonFactory();
try {
JsonParser parser = fact.createJsonParser(in);
JsonTypeMapper mapper = new JsonTypeMapper();
JsonNode node = mapper.read(parser);
Object root = getTypedObject(node);
if (root instanceof GlobalInfo) {
fillType(node, root);
}
else {
return null;
}
return (GlobalInfo) root;
}
catch (IOException ioe) {
m_exceptionHandler.exceptionCaught(ioe);
return null;
}
}
COM: <s> convert a character array that represents a json encoded object </s>
|
funcom_train/25249424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createSubComponents(String filePath) {
if (annotationPanel != null) {
this.remove(annotationPanel);
}
if (canvas != null) {
this.remove(canvas);
}
createImageCanvas(filePath);
createAnnotationOverlay();
createLayers();
this.imgpanel.revalidate();
this.imgpanel.repaint();
this.annotationPanel.revalidate();
this.annotationPanel.repaint();
}
COM: <s> this routine used to create the component once again for another series </s>
|
funcom_train/3913533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RolePartProperty getRolePart(Uol uol, Run run, User user, String propId) throws PropertyException {
String key = getKey(uol, run, user, propId);
RolePartProperty property = (RolePartProperty) fetchFromCache(key);
if (property == null) {
property = new RolePartProperty(uol, run, user, propId);
addToCache(key, property);
}
return property;
}
COM: <s> return a role part property based on the passed parameters </s>
|
funcom_train/40363466 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveModel() throws IOException {
synchronized (getLock()) {
if (model != null) {
FileObject fobj = dataObject.getPrimaryFile();
ModelSource source = ModelSource.create(fobj, fobj.canWrite());
ModelFactory factory = ModelProvider.getModelFactory();
ModelAccess access = factory.createAccess(source);
access.write(model);
}
}
}
COM: <s> saves the model to disk </s>
|
funcom_train/20750874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void receivedAck(AcknowledgementMessage message) {
TransmissionEntry entry = null;
synchronized (map) {
entry = (TransmissionEntry) map.get(message.getSource());
}
if (entry != null) {
entry.ackReceived(message.getNum());
} else {
debug("PANIC: Ack received from unknown nodeId " + message.getSource());
}
}
COM: <s> callback mechanism designed to be called when an ack packet </s>
|
funcom_train/2812392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printAppHeader() {
if (!headerPrinted) {
if (log != null) {
for (int i = 0; i < APP_HEADER.length; i++) {
log.info(APP_HEADER[i]);
}
} else {
for (int i = 0; i < APP_HEADER.length; i++) {
stdout.println(APP_HEADER[i]);
}
}
headerPrinted = true;
}
}
COM: <s> prints the application header on the console </s>
|
funcom_train/18582316 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getTapasGroups(String userName) {
String qry = "from TapasGroup";
List groups = this.getListResultsByQuery(qry);
for (Object elem : groups) {
TapasGroup group = (TapasGroup) elem;
if(group.getTapasUsers()!=null){
group.getTapasUsers().toArray();
}
this.initializeTapasGroups((TapasGroup)elem);
}
return groups;
}
COM: <s> returns a list of tapas group instances </s>
|
funcom_train/8123486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkup() throws ParseException {
for (Enumeration e = ports.elements() ; e.hasMoreElements() ;) {
PortDescription p = (PortDescription)e.nextElement();
if (regs.get(p.name) == null)
addWire( p.name, p.lineNo, p.msbExp, p.lsbExp,
WireDescription.defaultExpandType,
WireDescription.defaultNetType,
Delay3Description.nullDelay);
}
}
COM: <s> adds wires where not explicitely declared for ports </s>
|
funcom_train/18741527 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start(boolean complete) {
if (complete) {
reset();
}
synchronized (this.jgraph) {
prepare();
computeBranchMap();
computeRoots();
layout(this.roots, 0);
// shift the graph to the right to make it less cramped and to
// make some room for long labels
shift(this.roots, MIN_NODE_DISTANCE);
finish();
}
}
COM: <s> this implementation successively calls tt reset tt </s>
|
funcom_train/12160873 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testHistoryManagerConstructsWithNoSessionArray() throws Exception {
DefaultHistoryManager manager = getManager("testKey");
// test that we can construct the manager properly
String[] history = manager.getHistory();
assertTrue(history != null);
assertTrue(history.length == 0);
}
COM: <s> tests that the history manager is successfully instantiated when there </s>
|
funcom_train/5378502 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ConditionInfo)) {
return false;
}
ConditionInfo other = (ConditionInfo) obj;
if (!type.equals(other.type) || args.length != other.args.length)
return false;
for (int i = 0; i < args.length; i++) {
if (!args[i].equals(other.args[i]))
return false;
}
return true;
}
COM: <s> determines the equality of two code condition info code objects </s>
|
funcom_train/13275365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setQuality(int quality) {
if (this.quality != quality) {
int oldQuality = this.quality;
this.quality = Math.min(quality, getQualityLevelCount() - 1);
this.propertyChangeSupport.firePropertyChange(Property.QUALITY.name(), oldQuality, quality);
this.home.getEnvironment().setPhotoQuality(this.quality);
}
}
COM: <s> sets the rendering quality of the photo </s>
|
funcom_train/4779991 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel(new BorderLayout());
jContentPane
.add(getInstructionsPanel("addremovemembers.instructions", group.getName()), BorderLayout.NORTH);
jContentPane.add(getFormPanel(), BorderLayout.CENTER);
jContentPane.add(getButtonPanel(), BorderLayout.SOUTH);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/6261290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGeneralByOwned() {
owned1.setOwner(owner1);
owned2.setOwner(owner2);
// testing
owned1.setOwner(owner2);
assertNull(owned2.getOwner());
assertNull(owner1.getOwned());
assertEquals(owned1.getOwner(), owner2);
assertEquals(owner2.getOwned(), owned1);
}
COM: <s> tests unlinking of two associations and setting a new anoter one </s>
|
funcom_train/12067977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isReversible(int t, int c) {
if (reversible[t] == null) {
// Reversibility not yet calculated for this tile
reversible[t] = new boolean[getNumComps()];
for (int i = reversible.length - 1; i >= 0; i--) {
reversible[t][i] = isSubbandReversible(src.getSynSubbandTree(t, i));
}
}
return reversible[t][c];
}
COM: <s> returns the reversibility of the wavelet transform for the specified </s>
|
funcom_train/2807896 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Term copyForProof(AxiomSource as, Scope scope) {
Term[] newTerms = new Term[terms.length];
for (int i = 0; i < terms.length; i++) {
newTerms[i] = terms[i].copyForProof(as, scope);
}
return new ConsultingStructure(as, functor, newTerms);
}
COM: <s> create a code consulting structure code counterpart that </s>
|
funcom_train/22396462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteSelectedOutgoingServer() {
// Assume that all the focus checking has been done prior to
// this method being called.
int index = outgoingListField.getSelectedIndex();
int response = Dialog.ask(Dialog.D_DELETE);
if(response == Dialog.DELETE) {
mailSettings.removeOutgoingConfig(index);
outgoingListField.delete(index);
mailSettings.saveSettings();
}
}
COM: <s> delete the currently selected outgoing server </s>
|
funcom_train/15609138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean intersectsInAxisCoords(GeometricAlignment otherAlignment) throws IllegalArgumentException {
if ((this.orientationForwardOnAxis()) != otherAlignment.orientationForwardOnAxis()
||
(this.orientationUnknownOnAxis())
||
(otherAlignment.orientationUnknownOnAxis())) {
return false;
}
else {
return this.getRangeOnAxis().intersects(otherAlignment.getRangeOnAxis());
}
}
COM: <s> returns true if this alignment is in the same orientation </s>
|
funcom_train/35619288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateMultis(Graphics2D graphics2D) {
Vector<Integer> vrcholy=new Vector<Integer>();
for(int i=0;i<knots.size();i++){
knots.get(i).setMulti(0);
vrcholy.add(knots.get(i).xpoints[0]);
}
for(int i=0;i<knots.size();i++){
//k.xpoints[0] //hodnota na X -> počet stejných hodnot nám zjistí multiplicitu
for(Integer ii:vrcholy)
if(ii.intValue()==knots.get(i).xpoints[0])
knots.get(i).setMulti(knots.get(i).getMulti()+1);
}
}
COM: <s> draws info about knot multiplicity </s>
|
funcom_train/40427136 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void localSessionEvent(LocalSessionEvent event) {
// We only care about session destroyed events
if (!LocalSession.LOCAL_SESSION_DESTROYED_EVENT.equals(event.getType()))
return;
// Look up the single session id associated with this session (if any)
LocalSession session = event.getLocalSession();
if (debug > 0)
log("Local session destroyed on " + session);
// notify gateway that the session was destroyed.
localSessionDestroyedEvent(session);
}
COM: <s> acknowledge the occurrence of the specified event </s>
|
funcom_train/35674967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGenRedsimpt() throws Exception {
genSourceAndCheck("redsimpt", "Dfhcommarea");
String custSrce = getSource(getGetCustFilename("redsimpt"));
assertTrue(custSrce
.contains("Dfhcommarea valueObject = (Dfhcommarea) choice.getParentValueObject();"));
}
COM: <s> generate binding for redsimpt </s>
|
funcom_train/12924152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOutPoint(final Integer aNumber) {
if ((aNumber != null)
&& ((aNumber < 0) || (aNumber > Coder.USHORT_MAX))) {
throw new IllegalArgumentRangeException(0,
Coder.USHORT_MAX, aNumber);
}
outPoint = aNumber;
}
COM: <s> sets the sample number at which the sound starts to fade </s>
|
funcom_train/38963153 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void prepareStreams(Socket socket) throws IOException {
m_Input = new DataInputStream(
new BufferedInputStream(socket.getInputStream())
);
m_Output = new DataOutputStream(
new BufferedOutputStream(socket.getOutputStream())
);
m_ByteIn = new BytesInputStream(ACP.MAX_MESSAGE_LENGTH);
}//prepareStreams
COM: <s> prepares the input and output streams of this </s>
|
funcom_train/14233454 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int findClientByIPAndPort(String IP, int port) {
for (int i = 0; i < clients.length; i++) {
if (clients[i].getIP().equals(IP) && (clients[i].getPort() == port) && (port != 0)) {
return i + 1;
}
}
return -1;
}
COM: <s> finds a client as the specified ip and port </s>
|
funcom_train/31043603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createHmVersionCombo() {
GridData gridData15 = new org.eclipse.swt.layout.GridData();
gridData15.horizontalIndent = 4;
gridData15.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
gridData15.grabExcessHorizontalSpace = true;
gridData15.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
hmVersionCombo = new Combo(versionComposite, SWT.NONE);
hmVersionCombo.setLayoutData(gridData15);
}
COM: <s> this method initializes hm version combo </s>
|
funcom_train/34982210 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map toMap() throws BaseBeanException {
try {
return BeanUtils.describe(this);
}
catch (NoSuchMethodException ex) {
throw new BaseBeanException(ex);
}
catch (InvocationTargetException ex) {
throw new BaseBeanException(ex);
}
catch (IllegalAccessException ex) {
throw new BaseBeanException(ex);
}
}
COM: <s> convert data bean to data map key value set </s>
|
funcom_train/25213238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSfcode(UnicodeChar uc, Count code, boolean global) {
if (sfcodeMap == null) {
sfcodeMap = new HashMap<UnicodeChar, Count>();
}
sfcodeMap.put(uc, code);
if (global && next != null) {
next.setSfcode(uc, code, global);
}
}
COM: <s> setter for the space factor code of a character </s>
|
funcom_train/45186533 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JPanel makePropertyCheckBoxGroup(String[] names) {
JPanel panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
for(int i = 0; i < names.length; i++ ) {
JCheckBox b = makePropertyCheckBox(names[i]);
panel.add(b);
}
return panel;
}
COM: <s> adds panel with verticaly aligned radio buttons </s>
|
funcom_train/9878176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected BufferedImage createGradient(Color c1, Color c2) {
BufferedImage image = (BufferedImage) java.awt.GraphicsEnvironment
.getLocalGraphicsEnvironment().getDefaultScreenDevice()
.getDefaultConfiguration().createCompatibleImage(256, 1);
Graphics2D graphics = image.createGraphics();
GradientPaint gp = new GradientPaint(0, 0, c1, 255, 0, c2);
graphics.setPaint(gp);
graphics.drawRect(0, 0, 255, 1);
return image;
}
COM: <s> creates gradient images </s>
|
funcom_train/47833653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void subscribe(String chName, MessageListener listener) {
try {
if (pubSubManager == null) {
instantiatePubSubManager();
pubSubManager.subscribe(chName);
/*
* Add the listener to handle the interaction message arriving on the channel
*/
pubSubManager.addMessageListener(listener);
}
}
catch (MessagingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
COM: <s> subscribes to the channel where interaction events are exchanged </s>
|
funcom_train/20884482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNewUser(User user) throws CmsException, CmsDataValidationException{
if(_cmsDbQuery.isUserNameExists(user.getUserName())
|| _cmsDbQuery.isEmailExists(user.getEmail())){
throw new CmsDataValidationException("Username or Email already exists");
}
validateUser(user);
encryptPassword(user);
_em.persist(user);
}
COM: <s> add a new user to the database </s>
|
funcom_train/1326512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreatecssClass() throws ParseException {
log.info("Test la cr�ation d'une css");
Css css = new Css();
css.setLibelle("test");
css.setChemin("test");
assertTrue(!css.getLibelle().equals(""));
}
COM: <s> test de creation dune nouvelle css </s>
|
funcom_train/3391075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public InputStream resolveExdirFilename(String classname){
if(classpath.indexOf(File.pathSeparator) != -1){
//separates path
StringTokenizer st = new StringTokenizer(classpath, File.pathSeparator);
while(st.hasMoreTokens()){
String path = st.nextToken();
InputStream in = resolveExdirFilenamehelper(path, classname);
if (in != null)
return in;
}
}else return (resolveExdirFilenamehelper(classpath, classname));
return null;
}
COM: <s> resolves file name for classfile to disassemble if flag exdir is set </s>
|
funcom_train/32156867 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JScrollPane getJScrollPane2() {
if (jScrollPane2 == null) {
jScrollPane2 = new JScrollPane();
jScrollPane2.setMinimumSize(new Dimension(180, 250));
jScrollPane2.setBounds(new Rectangle(300, 45, 180, 250));
jScrollPane2.setViewportView(getSelectedKeys());
}
return jScrollPane2;
}
COM: <s> this method initializes j scroll pane2 </s>
|
funcom_train/37826987 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IPackageFragment getSelectedPackageFragment() {
IPackageFragment pkgFragment = null;
TableItem[] selection = table.getSelection();
if (selection != null && selection.length > 0) {
IPackageFragmentRoot root = (IPackageFragmentRoot)getInput();
TableItem item = selection[0];
String name = item.getText();
if (name.equals(defaultPackageText)) {
name = "";
}
pkgFragment = root.getPackageFragment(name);
}
return pkgFragment;
}
COM: <s> gets the selected item from the table and finds the </s>
|
funcom_train/8583982 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateRemoteView(AppWidgetManager appWidgetManager, int[] appWidgetIds) {
if (appWidgetIds == null || appWidgetManager == null) return;
for (int widgetId : appWidgetIds) {
RemoteViews rviews = configureRemoteView(widgetId, true /*enableTouch*/);
appWidgetManager.updateAppWidget(new int[] { widgetId }, rviews);
}
}
COM: <s> updates the clock display for the given widget ids </s>
|
funcom_train/7745746 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IDomainObject createDomainObject(Class clazz) {
Object result = null;
try {
result = clazz.newInstance();
} catch (IllegalAccessException e) {
throw new ApplicationException("Cannot instantiate object of class: " + clazz, e);
} catch (InstantiationException e) {
throw new ApplicationException("Cannot instantiate object of class: " + clazz, e);
}
return (IDomainObject)result;
}
COM: <s> create method of the factory </s>
|
funcom_train/24642400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Knowledgebase parse(String blpKbaseString, boolean fillFalseInstancesOfClauses) throws ParsingException {
LOG.debug("Parsing the BLP knowledge base string:\n" + blpKbaseString );
PrologProgram prologProg = parsePrologPart(new ANTLRStringStream(blpKbaseString));
return parseBlpPart(new ANTLRStringStream(blpKbaseString), fillFalseInstancesOfClauses, prologProg);
}
COM: <s> parses a blp knowledge base from a string </s>
|
funcom_train/7981494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkCharacter(CharSequence rcs, int i) {
int c = rcs.charAt(i);
assertTrue("Character " + Integer.toString(c) + " at offset " + i +
" unexpected.", (c % SEQUENCE_LENGTH) == (i % SEQUENCE_LENGTH));
}
COM: <s> check the character read </s>
|
funcom_train/4877886 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deleteAllProfiles(final DAOCoreType daoCoreImpl) throws LogicException {
if (daoCoreImpl == null) {
throw new LogicException(ERROR_PROCESS_DAO_CORE_IMPL_EMPTY);
} else {
try {
daoCoreImpl.getDAOFactory().getProfileDAO().deleteAllProfiles();
} catch (final PersistenceException e) {
throw new LogicException(ERROR_PROFILE_DELETEALL, e);
}
}
}
COM: <s> deletes all profiles in the persistence system </s>
|
funcom_train/5154226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double fisherExactTestDown(int k, int N, int D, int n) {
double cumulativeHG = 0;
int minTest = Math.max(n + D - N, 0);
for( int i = minTest; i <= k; i++ )
cumulativeHG += hd.hypergeometric(i, N, D, n);
return cumulativeHG;
}
COM: <s> fishers exact test for k or less lower tail </s>
|
funcom_train/41386572 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean isNameFree( String name ) {
String uri = nameToURI.get(name);
if (uri == null) {
// No entry at all so it is definitely free
return true;
} else {
// Might be a non-preferred entry
String prefname = uriToName.get(uri);
return (prefname == null) || (! prefname.equals(name));
}
}
COM: <s> test if a name is not already in use </s>
|
funcom_train/10749880 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetThreadGroup_DeadThread() {
ThreadRunning t = new ThreadRunning();
t.start();
t.stopWork = true;
try {
t.join();
} catch (InterruptedException e) {
fail(INTERRUPTED_MESSAGE);
}
assertNull("Thread group of a dead thread must be null",
t.getThreadGroup());
}
COM: <s> get the thread group of a dead thread </s>
|
funcom_train/51297003 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DocumentView getDocumentView(DocumentModel model, boolean enabled) {
DocumentView view = null;
try {
view = (DocumentView) docComponents.get(model.getDocTypeId()).viewClass
.newInstance();
view.setModel(model);
view.setEnabled(enabled);
model.setView(view);
return view;
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
return view;
}
COM: <s> retrieve doc presentation from model </s>
|
funcom_train/3830158 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean contains( GM_Position point ) {
if ( ( point.getX() >= min.getX() ) && ( point.getX() <= max.getX() ) &&
( point.getY() >= min.getY() ) && ( point.getY() <= max.getY() ) ) {
return true;
}
return false;
}
COM: <s> returns true if the bounding box conatins the specified gm point </s>
|
funcom_train/11647189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String nameSchemaType(ElementDescriptor elementDescriptor) {
// TODO: this is probably wrong. needs more thought but this stuff is still experiemental
String result="xsd:anyType";
Class type = elementDescriptor.getPropertyType();
if (type != null)
{
result = type.getName();
}
return result;
}
COM: <s> names the schema type from the type of the property </s>
|
funcom_train/42095836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void askPlayerName() {
String playerName = JOptionPane.showInputDialog(this, "Give us your name:", "High score!", JOptionPane.DEFAULT_OPTION);
if (playerName == null || playerName.equals(""))
playerName = "Anonymous";
userInterfaceEventLauncher.createPlayerNameEvent(playerName);
}
COM: <s> will ask the player name and return it to the engine </s>
|
funcom_train/3720976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setConstantValue(String constantValue) throws ProfileException {
String oldConstantValue = this.constantValue;
try {
vetoableChangeSupport.fireVetoableChange("constantValue", oldConstantValue, constantValue);
} catch (Exception e) {
throw new ProfileException(null, e);
}
this.constantValue = constantValue;
propertyChangeSupport.firePropertyChange("constantValue", oldConstantValue, constantValue);
}
COM: <s> setter for property constant value </s>
|
funcom_train/23067268 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public int nullSafeCompare(Date left, Date right) {
int ret;
if (left == null && right == null) {
ret = EQUAL;
} else if (left != null && right == null) {
ret = AFTER;
} else if (left == null && right != null) {
ret = BEFORE;
} else {
//left != null && right != null
ret = left.compareTo(right);
}
return ret;
}
COM: <s> returns a positive integer </s>
|
funcom_train/9140235 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int addMetaType(final String name) {
if (! metaMap.containsKey(name)) {
String [][] tmp = metadata;
int length = tmp.length;
metadata = new String[length+1][resultSize];
for(int i=0;i<length;i++)
{
metadata[i] = tmp[i];
}
metadata[length] = new String[resultSize];
metaMap.put(name, length);
return length;
}
return metaMap.get(name);
}
COM: <s> get the metadata index for the given name </s>
|
funcom_train/50919088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeStubAtoms() {
if (parsedDocumentAsCML != null) {
Nodes atoms = parsedDocumentAsCML.query(
"//cml:atom[not(@elementType) or not(@x2) or not(@y2)]", CML_XPATH);
for (int i = 0; i < atoms.size(); i++) {
atoms.get(i).detach();
}
}
}
COM: <s> atoms without element type or coordinates </s>
|
funcom_train/47184389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String assignHCPToHospital(String midString, String hospitalID) throws iTrustException {
try {
long hcpID = Long.valueOf(midString);
boolean confirm = hospitalsDAO.assignHospital(hcpID, hospitalID);
if (confirm) {/*
* only patient is mentioned for transaction type 0, but spec looks like personnel
* should be included too...
*/
return "HCP successfully assigned.";
} else
return "Assignment did not occur";
} catch (NumberFormatException e) {
throw new iTrustException("HCP's MID not a number");
}
}
COM: <s> assigns the mid to the hospital </s>
|
funcom_train/51162713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object load(Object fileName) {
String name = fileName.toString();
InputPort iport = Scheme.open(name);
if (iport == null) return E.warn("(load) can't open \"" + fileName + "\"");
else return load(iport);
}
COM: <s> eval all the expressions in a file </s>
|
funcom_train/12310843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getDefaultAntHome() {
IAntClasspathEntry[] entries= getDefaultAntHomeEntries();
if (entries.length > 0) {
URL antjar= entries[0].getEntryURL();
IPath antHomePath= new Path(antjar.getFile());
//parent directory of the lib directory
antHomePath= antHomePath.removeLastSegments(2);
return antHomePath.toFile().getAbsolutePath();
}
return null;
}
COM: <s> returns the absolute path of the default ant </s>
|
funcom_train/26147813 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setShouldThrowExceptionWhenNotFound(final boolean shouldThrowExceptionWhenNotFound) {
/**
* Update notFound property so that the String value and boolean
* values coincide
*/
if (shouldThrowExceptionWhenNotFound) {
notFound = NOT_FOUND_EXCEPTION;
} else {
notFound = NOT_FOUND_IGNORE;
}
this.shouldThrowExceptionWhenNotFound = shouldThrowExceptionWhenNotFound;
}
COM: <s> setter for property </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.