__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/50579180 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void flush() throws IOException {
//log.trace("flush() @ CompressionResponseStream");
if (closed) {
//throw new IOException("Cannot flush a closed output stream");
log.warn("Cannot flush a closed output stream");
}
if (gzipstream != null) {
gzipstream.flush();
}
}
COM: <s> flush any buffered data for this output stream which also causes the </s>
|
funcom_train/29380273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean supports(Class clazz) {
boolean canSupport = validatorFactory.hasRulesForBean(getFormName(clazz), getLocale());
if (log.isDebugEnabled()) {
log.debug("validatorFactory " + (canSupport ? "does" : "does not")
+ " support class " + clazz + " with form name " + getFormName(clazz));
}
return canSupport;
}
COM: <s> checks if the validator factory is configured to handle this class </s>
|
funcom_train/34874743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean data(byte[] sequenceID){
try{
byte[] fragment = new byte[fragmentSize];
byte[] fileContent = new byte[fragmentSize - 4];
int length = fis.read(fileContent);
if(length != -1){
ByteManipulation.concat(fragment, sequenceID, fileContent);
send(fragment, (length + 4));
return true;
}
else {
return false;
}
}
catch (IOException e){
System.out.println(e.getMessage());
System.exit(-1);
return false;
}
}
COM: <s> send the content of the file to server </s>
|
funcom_train/5734426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long getOffset(OutputStream out) throws IOException {
if(out instanceof ByteArrayOutputStream) {
return ((ByteArrayOutputStream)out).size();
} else if(out instanceof SeekableOutputStream) {
return ((SeekableOutputStream)out).getFilePointer();
} else {
// Shouldn't happen.
throw new IllegalStateException();
}
}
COM: <s> returns the current offset in the supplied output stream </s>
|
funcom_train/38976387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String readStream() throws IOException {
// HTML files from Mr. Bernitzki were determined to be UTF-16LE encoded (Windows)
InputStreamReader reader = new InputStreamReader(inStream, Charset.forName("UTF-16LE"));
StringBuffer strBuf = new StringBuffer();
char buf[] = new char[BLK_SIZE];
int cnt = 0;
while(true) {
int n;
n = reader.read(buf);
if(-1 == n)
break;
strBuf.append(buf, 0, n);
cnt += n;
}
String content = strBuf.toString();
return content;
}
COM: <s> reads the entire input stream as one big blob </s>
|
funcom_train/41728132 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkIfLoggedIn() {
LoginServiceAsync loginService = GWT.create(LoginService.class);
loginService.login(GWT.getHostPageBaseURL(),
new AsyncCallback<LoginInfo>() {
public void onFailure(Throwable error) {
}
public void onSuccess(LoginInfo result) {
loginInfo = result;
if (loginInfo.isLoggedIn()) {
loadLoggedInForm();
} else {
loadLoginForm();
}
}
});
}
COM: <s> check if logged in </s>
|
funcom_train/17679487 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SelectExp getSingleSelectExp(SelectExp exclude) {
SelectExp a = childList.getSingleSelectExp(exclude);
SelectExp b = childList.next.getSingleSelectExp(exclude);
if (b == null || b == exclude) return a;
if (a == null || a == exclude) return b;
return a == b ? a : null;
}
COM: <s> if this expression involves a single table only then return the </s>
|
funcom_train/36073887 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addCommandList(final List<Cmd> list) {
synchronized (COMMAND_MONITOR) {
commands.addAll(list);
}
logger.info(String.format("Player %s has now %d new commands in cache",
this.getID(),
list.size()));
}
COM: <s> add a list of commands to the list of commands for this robot </s>
|
funcom_train/50206888 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
if (BYTES_FLAVOUR.isMimeTypeEqual(flavor)) {
final ByteArrayOutputStream stream = new ByteArrayOutputStream(2048 * records.length);
write(records, new DataOutputStream(stream));
return new ByteArrayInputStream(stream.toByteArray());
}
throw new UnsupportedFlavorException(flavor);
}
COM: <s> the returned object may be cast to code byte code </s>
|
funcom_train/1565747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private HttpResponse getImageResponse(String contentType, byte[] imageBytes) {
HttpResponse originalResponse = new HttpResponseBuilder()
.setHeader(CONTENT_TYPE_HEADER, contentType)
.setHttpStatusCode(HttpResponse.SC_OK)
.setResponse(imageBytes)
.create();
return originalResponse;
}
COM: <s> makes a new </s>
|
funcom_train/18599413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void getWMC(HttpServletResponse httpServletResponse, String id) throws IOException {
final File file;
synchronized (tempFiles) {
file = tempFiles.get(id);
}
if (file == null) {
error(httpServletResponse, "File with id=" + id + " unknown", 404);
return;
}
sendWmcFile(httpServletResponse, file);
}
COM: <s> to get the wmc created previously </s>
|
funcom_train/39802337 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Rectangle getMonthHeaderBounds(Date date, boolean includeInsets) {
Point position = getMonthGridPosition(date);
if (position == null) return null;
Rectangle bounds = getMonthBounds(position.y, position.x);
bounds.height = getMonthHeaderHeight();
if (!includeInsets) {
}
return bounds;
}
COM: <s> returns the bounds of the month containing the given date </s>
|
funcom_train/47366330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBackbutt() {
if (backbutt == null) {
backbutt = new JButton();
backbutt.setBounds(new Rectangle(315, 210, 75, 29));
backbutt.setText("Back");
backbutt.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
back();
}
});
}
return backbutt;
}
COM: <s> this method initializes backbutt </s>
|
funcom_train/38777736 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int countTotal() {
int cnt=0;
synchronized(mapUsers) {
Collection c=mapUsers.values();
Iterator i=c.iterator();
while (i.hasNext()) {
LinkedList l=(LinkedList)i.next();
if (l!=null)
cnt+=l.size();
} //i.hasNext()
} //synchronized(mapUsers)
return cnt;
} //countTotal
COM: <s> obtains a total count of messages stored for offline delivery </s>
|
funcom_train/19323711 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetDataSource() {
DataSourceServiceImpl dsService = new DataSourceServiceImpl(serviceLocator);
try {
assertNotNull(dsService.getDataSource(null));
} catch (DataSourceConfigurationException e) {
e.printStackTrace();
} catch (ServiceLocatorException e) {
e.printStackTrace();
}
}
COM: <s> test for method get data source string data source name </s>
|
funcom_train/18741897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelected(Collection<Entry> entries, boolean selected) {
Set<GraphJCell> changedCells = new HashSet<GraphJCell>();
for (Entry label : entries) {
changedCells.addAll(getSelection(label, selected));
}
notifyIfNonempty(changedCells);
}
COM: <s> sets the selection status of a given set of labels and notifies </s>
|
funcom_train/42570483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sendNow(final MidiMessage midiMessage, Transmitter transmitter) {
// perform sanity checks
if (null == transmitter) {
throw new IllegalArgumentException("Transmitter expected.");
}
final Receiver receiver = transmitter.getReceiver();
if (null == receiver) {
throw new IllegalStateException("Receiver not initialized.");
}
/*
* This may eventually use another thread if needed
*/
receiver.send(midiMessage, -1); // timestamp not currently supported
}
COM: <s> sends a given midi message to a given transmitter </s>
|
funcom_train/1884271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadMultiLinesOfText(StringTree st, List<String> listOfString) {
if (st.value != null) {
listOfString.add(st.value);
}
for (StringTree ch : st.children) {
if ("CONC".equals(ch.tag) || "CONT".equals(ch.tag)) {
listOfString.add(ch.value);
} else {
unknownTag(ch);
}
}
}
COM: <s> load multiple continued lines of text from a string tree node </s>
|
funcom_train/30035929 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkInterested() {
boolean newInterested = false;
boolean[] myStatus = manager.getPiecesStatus();
for (int i = 0; i < myStatus.length; i++) {
if (!myStatus[i] && available[i]) {
newInterested = true;
}
}
if (newInterested && !interested) {
logger.log(
componentID,
evtProtocol,
Logger.SENT,
ip + " is interesting");
sendSimpleCommand(BT_INTERESTED);
} else if (!newInterested && interested) {
logger.log(
componentID,
evtProtocol,
Logger.SENT,
ip + " is not interesting");
sendSimpleCommand(BT_UNINTERESTED);
}
interested = newInterested;
}
COM: <s> global check interested method </s>
|
funcom_train/5342322 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handleHeaderColumnReleased(Point p) {
TABLE.setPressedColumnIndex(-1);
JTableHeader th = TABLE.getTableHeader();
int col = th.columnAtPoint(p);
if (col != -1)
// force the table to redraw the column header
th.repaint(th.getHeaderRect(col));
}
COM: <s> tell the table something is not pressed </s>
|
funcom_train/20885138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testElementListForSet() {
ElementListWithSetField list = new ElementListWithSetField();
list.set = new HashSet<String>();
for (int i = 0; i < 10; i++) {
list.set.add("stringValue" + i);
}
JSefaTestUtil.assertRepeatedRoundTripSucceeds(XML, list);
}
COM: <s> tests an element list for a field of type code set code </s>
|
funcom_train/33296805 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getViewNameForUrlPath(String urlPath) {
String viewName = (String) this.viewNameCache.get(urlPath);
if (viewName == null) {
viewName = extractViewNameFromUrlPath(urlPath);
viewName = postProcessViewName(viewName);
this.viewNameCache.put(urlPath, viewName);
}
return viewName;
}
COM: <s> returns view name based on the url filename </s>
|
funcom_train/35838779 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setHideIcons(PCSession session, String sViewID, Vector vtPositions, boolean bHide) throws SQLException {
//
// DBConnection dbcon = getDatabaseManager().requestConnection(session.getModelName()) ;
//
// boolean successful = DBViewNode.setHideIcons(dbcon, sViewID, vtPositions, bHide);
//
// getDatabaseManager().releaseConnection(session.getModelName(),dbcon);
return true;
}
COM: <s> set hiding icons for the given node position objects </s>
|
funcom_train/11663367 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean getBooleanValue(boolean defValue) {
try {
return "[true][yes][1][y][on]".indexOf("[" + getValue().toLowerCase() + "]") != -1;
} catch (Exception e) {
return defValue;
}
}
COM: <s> get boolean value returns the value from the configuration node </s>
|
funcom_train/27974926 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AnimalProxy createAnimalProxy(Object channel, String animalUrl) {
try {
try {
return new SOAPAnimalProxy(animalUrl);
} catch (MalformedURLException e) {
System.err.println("Problem with the given url"+ animalUrl);
return null;
}
}
catch (java.rmi.RemoteException e) {
return null;
} // Should not happen
}
COM: <s> creates an animal proxy </s>
|
funcom_train/17676047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getElementTypeQName() {
if (elementType == null) return null;
int i = elementType.indexOf('.');
if (i >= 0) return elementType;
String packageName = parent.parent.parent.name;
if (packageName.length() == 0) return elementType;
return packageName + '.' + elementType;
}
COM: <s> get the fully qualified name of our element type or null if none </s>
|
funcom_train/14465724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setHasFrozenPanes(boolean b) {
this.mysheet.getWindow2().setFreezePanes(b);
if (!b && this.mysheet.getPane()!=null) {
this.mysheet.removePane(); // remove pane rec if unfreezing ... can also convert to plain splits, but a bit more complicated ...
}
}
COM: <s> set whether there are freeze panes in the output sheet </s>
|
funcom_train/46737030 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setServiceRef(DisplayModel serviceRef) {
if (Converter.isDifferent(this.serviceRef, serviceRef)) {
DisplayModel oldserviceRef= new DisplayModel(this);
oldserviceRef.copyAllFrom(this.serviceRef);
this.serviceRef.copyAllFrom(serviceRef);
setModified("serviceRef");
firePropertyChange(String.valueOf(FORMS_SERVICEREFID), oldserviceRef, serviceRef);
}
}
COM: <s> hospital or medical service </s>
|
funcom_train/21087564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_SNI_Element_name_feature"),
getString("_UI_SNI_Element_name_description"),
SNI_Package.Literals.SNI_ELEMENT__NAME, true, false, false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
getString("_UI_ElementPropertyCategory"), null));
}
COM: <s> this adds a property descriptor for the name feature </s>
|
funcom_train/46737469 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDialogRef(DisplayModel dialogRef) {
if (Converter.isDifferent(this.dialogRef, dialogRef)) {
DisplayModel olddialogRef= new DisplayModel(this);
olddialogRef.copyAllFrom(this.dialogRef);
this.dialogRef.copyAllFrom(dialogRef);
setModified("dialogRef");
firePropertyChange(String.valueOf(FORMTYPES_DIALOGREFID), olddialogRef, dialogRef);
}
}
COM: <s> dialog defining the form type controls </s>
|
funcom_train/18119184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Uri getChildHref(String name)
{
Obj kid = get(name);
if (kid == null)
throw new IllegalStateException("Missing child object: " + name);
if (kid.getHref() == null)
throw new IllegalStateException("Child missing href : " + name);
return kid.getNormalizedHref();
}
COM: <s> lookup a sub object by name and return its href </s>
|
funcom_train/48875499 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void completeSuccessfully() {
if (state == StepExecutionState.STEP_EXECUTION_FAILED) {
throw new IllegalStateException("Try to set the state of this StepExecution to 'STEP_EXECUTION_SUCCESSFUL', however has previously been set to 'FAILED'.");
}
state = StepExecutionState.STEP_EXECUTION_SUCCESSFUL;
completedTime = new Date();
}
COM: <s> called by the execute method implementation to indicate successful completion </s>
|
funcom_train/28954593 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean sendMsg(Message msg) throws IOException {
Enumeration ids = agents.keys();
boolean success = true;
while (ids.hasMoreElements()) {
Identity id = (Identity) ids.nextElement();
logger.debug("mh: Attempting send to peer " + id);
if (!sendMsg(msg, id.getId())) {
logger.error("mh: Sending failed. Peer: " + id);
success = false;
}
else {
logger.debug("mh: Sent message to peer " + id);
}
}
return success;
}
COM: <s> broadcast a message to all connected agents </s>
|
funcom_train/17287399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContext(final RepositoryContext context) {
/*
try {
if(this.repoInstance != null) this.repoInstance.setConfiguration(context);
if(this.searchInstance != null) this.searchInstance.setConfiguration(context);
if(this.indexerInstance != null) this.indexerInstance.setConfiguration(context);
} catch (RhizomeInitializationException rie) {
this.repoInstance = null;
this.searchInstance = null;
this.indexerInstance = null;
}
*/
this.context = context;
}
COM: <s> set the repository context </s>
|
funcom_train/50221565 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addGPrimitives(TagTable table, Graphics g, GraphObject element, boolean selected) {
if (element instanceof Vertex) {
if (vgg != null)
vgg.addGPrimitives(table, g, this, element, selected);
} else {
if (egg != null)
egg.addGPrimitives(table, g, this, element, selected);
}
}
COM: <s> rebuild the primitives associated with the node </s>
|
funcom_train/25707255 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void moreButtonPressed() {
if (moreExtended) {
moreButton.setText(language.getString("DialogWithDetails.button.more") + " >>");
contentPanel.remove(getMorePanel());
pack();
moreExtended = false;
} else {
contentPanel.add(getMorePanel(), BorderLayout.SOUTH);
moreButton.setText(language.getString("DialogWithDetails.button.less") + " <<");
pack();
moreExtended = true;
}
}
COM: <s> this method is executed when the more less button is pressed </s>
|
funcom_train/5678598 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisible(boolean visible) {
// if we have to hide we wait that minimal time is passed
if (! visible) {
while ((System.currentTimeMillis() - start_) < minTime_) {
try { Thread.sleep(100); }
catch (InterruptedException e) { }
}
}
window_.setVisible(visible);
// if we have to view we set the start time
if (visible) start_ = System.currentTimeMillis();
}
COM: <s> view hide the splashscreen </s>
|
funcom_train/10865638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCustomStopwords() throws Exception {
PersianAnalyzer a = new PersianAnalyzer(TEST_VERSION_CURRENT, asSet("the", "and", "a"));
assertAnalyzesTo(a, "The quick brown fox.", new String[] { "quick",
"brown", "fox" });
}
COM: <s> test that custom stopwords work and are not case sensitive </s>
|
funcom_train/25332791 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetShortName() {
DBSpecies instance = new DBSpecies();
assertEquals(instance.getShortName(),"");
assertEquals(instance.getDisplayName(),"");
instance.setShortName("bob");
assertEquals(instance.getShortName(),"bob");
assertEquals(instance.getDisplayName(),"bob");
}
COM: <s> test of set short name method of class dbspecies </s>
|
funcom_train/12117252 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void connEtoC40(java.awt.event.ActionEvent arg1) {
try {
// user code begin {1}
// user code end
this.speseViveAggiungiJButton_ActionPerformed(arg1);
// user code begin {2}
// user code end
} catch (java.lang.Throwable ivjExc) {
// user code begin {3}
// user code end
handleException(ivjExc);
}
}
COM: <s> conn eto c40 spese vive aggiungi jbutton </s>
|
funcom_train/27948538 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ObjectOutputStream getObjectOutput() {
if (objectOutput == null) {
try {
// !! can I buffer a socket ?
objectOutput = JudeDb.getObjectOutputStream(serverSocket.getOutputStream(), getLogger());
} catch (Exception ex) {
getLogger().addErrorMessage(ex);
}
}
return objectOutput;
}
COM: <s> gets the object output attribute of the run time enviroment object </s>
|
funcom_train/19059534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUnicodeRangeByString(String[] strings) {
if (strings.length > 0) {
String string = strings[0];
setUnicodeRange(string);
for (int i = 1;i < strings.length;i++) {
string = strings[i];
addUnicodeRange(string);
}
}
}
COM: <s> sets the property value by string array </s>
|
funcom_train/44665242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String doAction(ActionForm inform, HttpServletRequest request) {
String result = Consts.FORWARD_SUCCESS;
ReviewRosterForm form = (ReviewRosterForm)inform;
String action = form.getFormAction();
logger.debug("Doing action -" + action);
result = loadReviewRoster(form);
return result;
}
COM: <s> action handler method for the review roster form class </s>
|
funcom_train/39162654 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setAspectRatio(String camName, float aspectRatio) {
ICamera camera = getOgreCam(camName);
if (camera == null) {
return;
}
camera.setAspectRatio(aspectRatio);
if (!sceneIsInCreation) {
// tell renderloop
OgreSystem.getDefault().redraw();
}
}
COM: <s> sets the aspect ratio for the frustum viewport </s>
|
funcom_train/44823122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setVisibility(String visibility) {
modifiers &= ~Modifier.PRIVATE;
modifiers &= ~Modifier.PROTECTED;
modifiers &= ~Modifier.PUBLIC;
if ("private".equals(visibility)) {
modifiers |= Modifier.PRIVATE;
} else if ("protected".equals(visibility)) {
modifiers |= Modifier.PROTECTED;
} else if ("public".equals(visibility)) {
modifiers |= Modifier.PUBLIC;
}
}
COM: <s> setter for visiblity property </s>
|
funcom_train/22664984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Data getData() {
Data data = null;
ObjectInputStream inFromClient = null;
if (!socket.isClosed()) {
try {
// Get reader for the socket, and then read a line from
// the socket
inFromClient = new ObjectInputStream(socket.getInputStream());
try {
data = (Data) inFromClient.readObject();
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Cannot receive data.",
"Error", JOptionPane.ERROR_MESSAGE);
}
} catch (Exception e) {
}
}
return data;
}
COM: <s> receives data sent from the remote source </s>
|
funcom_train/31236601 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public DefaultMutableTreeNode addObject(Object child) {
DefaultMutableTreeNode parentNode = null;
TreePath parentPath = tree.getSelectionPath();
if (parentPath == null)
{
parentNode = rootNode;
} else
{
parentNode = (DefaultMutableTreeNode)
(parentPath.getLastPathComponent());
while(!parentNode.getAllowsChildren())
{
System.out.println ("while...");
parentNode = (DefaultMutableTreeNode)parentNode.getParent();
}
}
return addObject(parentNode, child, true);
}
COM: <s> add child to the currently selected node </s>
|
funcom_train/12172118 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Element getFirstChildElement(Element element) {
if (element == null) {
return null;
}
Node node = element.getHead();
while ((node != null) && !(node instanceof Element)) {
node = node.getNext();
}
// Either null or Element
return (Element) node;
}
COM: <s> find the first code element code for the element passed in </s>
|
funcom_train/25575798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getString(final String key) {
final String value = this.translations.get(key);
if (value != null && !value.isEmpty()) {
return value;
}
/*
* in case the searched entry does not exist in the current active
* language file, the last part of the key is returned
*/
final String[] keyParts = key.split("[.]");
return keyParts[keyParts.length - 1];
}
COM: <s> gets the entry in the language file for the specified key </s>
|
funcom_train/10750176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetPriorityLower() {
Thread t = new Thread();
int p = t.getPriority();
int newPriority = p - 1;
if (newPriority >= Thread.MIN_PRIORITY) {
t.setPriority(newPriority);
assertEquals(newPriority, t.getPriority());
}
}
COM: <s> verify the set priority method with new priority lower </s>
|
funcom_train/22359401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeShips(Collection<Ship> ships) throws IOException {
if (ships == null)
return;
List<Ship> sorted = new ArrayList<Ship>(ships);
Comparator<Ship> sortIndexComparator = new SortIndexComparator<Ship>(IDComparator.DEFAULT);
Collections.sort(sorted, sortIndexComparator);
for (Ship ship : sorted) {
writeShip(ship);
}
}
COM: <s> write a sequence of ship schiff blocks to the underlying stream </s>
|
funcom_train/43220471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLevel(int pLevel) {
if(pLevel < Deflater.DEFAULT_COMPRESSION || pLevel > Deflater.BEST_COMPRESSION) {
throw new IllegalArgumentException("Invalid compression level: " + pLevel);
}
hasCompressionLevelChanged = (this.fLevel != pLevel);
this.fLevel = pLevel;
}
COM: <s> sets the compression level for subsequent entries </s>
|
funcom_train/2558405 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Variable remove(String label) throws Exception{
Variable variable = alias.remove(label);
if(variable != null) {
Collection<String> options = variable.getNames(context);
String path = variable.getPath(context);
for(String option : options) {
alias.remove(option);
}
registry.remove(path);
}
return variable;
}
COM: <s> this is used to remove the code variable code from this </s>
|
funcom_train/16462335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void selectionChanged(Object list, Object panel) {
for (Object item : controller.getItems(panel)) {
String name = controller.getName(item);
if (!"btNew".equals(name)
&& !"btCancel".equals(name)) {
controller.setEnabled(item, controller.getSelectedItem(list) != null);
}
}
}
COM: <s> enables disables fields from panel according to list selection </s>
|
funcom_train/3514819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SMTPResponse sendMessage(SMTPMessage message, String... extraHeaders) throws UnknownHostException, IOException, SMTPStateException, SMTPCommandException {
sendMailFrom(message.getSender());
for (String recipient : message.getRecipients()) {
sendRcptTo(recipient);
}
sendData();
return sendBody(message.getBody(), extraHeaders);
}
COM: <s> send an smtpmessage </s>
|
funcom_train/44161528 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pasteTextField(ActionEvent ae) {
this.actionName =
((ElementForm)getSession()
.getAttribute("elemForm")).getActionName();
((SimpleElements)getSession()
.getAttribute(this.actionName))
.pasteTextField(this.attributes);
getSession().removeAttribute("elemForm");
}
COM: <s> paste text field pastes textfield into actions container </s>
|
funcom_train/9805946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toEdif(EdifPrintWriter epw) {
epw.printlnIndent("(interface");
epw.incrIndent(); // indent 3
for (EdifPort p : _portList) {
if (p.getWidth() > 0)
p.toEdif(epw);
}
epw.decrIndent(); // indent 3
epw.printlnIndent(")"); // End of interface
}
COM: <s> write the edif representation of this edif cell object to the </s>
|
funcom_train/32759290 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String pad(String strLabel) {
int szLbl = strLabel.length();
StringBuffer bufLabel = new StringBuffer(strLabel);
for (int i = szLbl; i < INT_LABEL_LEN; i++)
bufLabel.append(" ");
return bufLabel.toString();
}
COM: <s> pads the given string with whitespace until it </s>
|
funcom_train/778066 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String compareOntology( ACLMessage msg1, ACLMessage msg2 ) {
String ontology1 = msg1.getOntology();
String ontology2 = msg2.getOntology();
if ( !strEqualsIgnoreCaseNullOK( ontology1, ontology2 ) ) {
return
"first message ontology \"" + ontology1 +
"\" not equal to " +
"second message ontology \"" + ontology2 + "\"";
}
else {
return null;
}
}
COM: <s> compare just the ontology slot of two messages </s>
|
funcom_train/26093407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init(Properties props) {
tournament = (Tournament) props.newObjectProperty(TOURNAMENT_CLASS_KEY);
transcriber =
(PlayerTranscriber) props.newObjectProperty(TRANSCRIBER_CLASS_KEY);
maxFitness = props.getIntProperty(MAX_FITNESS_KEY, Integer.MAX_VALUE);
nonChromosomeContestants =
props.newObjectListProperty(NONCHROMOSOME_CONTESTANTS_KEY,
new ArrayList());
}
COM: <s> see a href </s>
|
funcom_train/13596764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JCheckBox getCbAmbiguous() {
if (cbAmbiguous == null) {
cbAmbiguous = new JCheckBox(Messages
.getString("Dictionary.WordData.StatusAmbiguous")); //$NON-NLS-1$
cbAmbiguous.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent e) {
filterState();
}
});
}
return cbAmbiguous;
}
COM: <s> this method initializes j check box2 for displaying ambiguous words </s>
|
funcom_train/21888762 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getLabelpanel() {
if (labelpanel == null) {
GridLayout gridLayout7 = new GridLayout();
gridLayout7.setRows(2);
labelpanel = new JPanel();
labelpanel.setLayout(gridLayout7);
labelpanel.add(new CluedHelpLabel("Explanation: ", "description"),
null);
labelpanel
.add(
new CluedHelpLabel("Condition: ",
"for now a text field for entering the condtion for the transformation"),
null);
}
return labelpanel;
}
COM: <s> this method initializes labelpanel </s>
|
funcom_train/48336537 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void playOutSound () {
// incredibly, we need a graphic component to play a sound in Java :-(
Label javaSucks = new Label ();
if (DEBUG) {
System.out.println ("Playing out sound");
}
javaSucks.getToolkit().beep();
try {
Thread.sleep (1000);
} catch (InterruptedException ie) {
}
javaSucks.getToolkit().beep();
}
COM: <s> this method plays an outgoing sound two beeps </s>
|
funcom_train/24554169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void putToKey(Object key, ErrorType error, boolean mustBeSingle) {
if (keyedErrors == null)
keyedErrors = new HashMap();
Object value = keyedErrors.get(key);
if (value == null || mustBeSingle) {
keyedErrors.put(key, error);
} else if (value instanceof List) {
((List) value).add(error);
} else {
List newValue = new ArrayList(2);
newValue.add(value);
newValue.add(error);
keyedErrors.put(key, newValue);
}
}
COM: <s> manages key errors </s>
|
funcom_train/50502869 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save() {
XDocletProjectSettings bpi = (XDocletProjectSettings) project.getSettings(XDocletProjectSettings.class);
if(bpi != null) {
bpi.setSmallIcon(smallIconField.getText());
bpi.setLargeIcon(largeIconField.getText());
}
}
COM: <s> saves the settings for this project </s>
|
funcom_train/17200521 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public URL getResource(String resName) {
String nm = resName.toString(); // NPE if null
URL foundResource = (parentClassLoader == null)
? BootstrapClassLoader.getBootstrapClassLoader().findResource(nm)
: parentClassLoader.getResource(nm);
return foundResource == null ? findResource(nm) : foundResource;
}
COM: <s> answers an url which can be used to access the resource described by </s>
|
funcom_train/11672386 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
String str =
"Reported error: \"" + message + "\"";
if (lineNumber != -1) {
str += " at line " + lineNumber + " column " + colNumber;
}
if (exception != null) {
str += (" with exception " + exception);
}
return str;
}
COM: <s> string representation of error item </s>
|
funcom_train/41980664 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void lookUpCustomer (long phone) {
if (Customer.onRecord(phone)) {
Customer temp = Customer.lookUpCustomer(phone);
System.out.println("Customer Information on Record");
System.out.println("Customer Name: " + temp.getName());
System.out.println("Customer Address: " + temp.getAddress());
} else {
System.out.println("Customer ID " + phone + " Not on Record.");
}
}
COM: <s> a method of the text based ui for displaying a customers information </s>
|
funcom_train/19295176 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel() {
if (jPanel == null) {
jPanel = new JPanel();
jPanel.setLayout(new BorderLayout());
jPanel.add(getJPanel1(), java.awt.BorderLayout.CENTER);
jPanel.add(getJPanel2(), java.awt.BorderLayout.SOUTH);
}
return jPanel;
}
COM: <s> this method initializes j panel </s>
|
funcom_train/42941480 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String render(Integer value) {
int ver = value.intValue();
int release = ver % 100000;
int minor = (ver / 100000) % 100;
int major = (ver / 10000000);
String minstr = Integer.toString(minor);
String relstr = Integer.toString(release);
while (minstr.length() < 2) {
minstr = "0" + minstr;
}
while (relstr.length() < 5) {
relstr = "0" + relstr;
}
return major + "." + minstr + "." + relstr;
}
COM: <s> render the attribute </s>
|
funcom_train/10297144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeObserver(Object key) {
try {
try {
server.securityCheck(session);
} catch (RemoteException e) {
server.login(username, password);
}
server.removeObserver(this, Serializer.serialize(key), session);
} catch (RemoteException ex) {
System.out.println(ex);
}
}
COM: <s> causes the client not to be notified anymore when the given object is </s>
|
funcom_train/26267737 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Enumeration getHeaders(String name) {
final String[] values = headers.get(name.toLowerCase());
if (values == null) return null;
return new Enumeration() {
int position = 1;
public Object nextElement() {
return values[position++];
}
public boolean hasMoreElements() {
return position < values.length;
}
};
}
COM: <s> return the the values for the header with the given name </s>
|
funcom_train/13558682 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object otherObj) {
if (otherObj == null) { return false; }
if (otherObj == this) { return true; }
if (!this.getClass().equals(otherObj.getClass())) { return false; }
return this.publicKey.equals(((CVCPublicKey)otherObj).publicKey);
}
COM: <s> determines if this key equals the other object </s>
|
funcom_train/10953305 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMethodInjectorWithSecurityEnabled() throws Exception {
// not needed, already set
//System.setSecurityManager(new SecurityManager());
MethodCheck methodCheck = new MethodCheck();
try {
c.inject(methodCheck);
assertEquals(methodCheck.getName(), "Lukasz");
fail("Exception sould be thrown!");
} catch (DependencyException expected) {
// that was expected
}
}
COM: <s> inject values into method under security manager </s>
|
funcom_train/23899647 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void read() throws IOException {
BufferedReader r = new BufferedReader(new FileReader(configFile));
String line;
INIFileSection currentSection = new INIFileSection(GLOBAL_SECTION);
sections.add(currentSection);
while ((line = r.readLine()) != null) {
line = line.trim();
Matcher m = SECTION_PATTERN.matcher(line);
if (m.matches()) {
String sectionName = m.group(1);
currentSection = new INIFileSection(sectionName);
sections.add(currentSection);
} else {
currentSection.lines.add(line);
}
}
r.close();
}
COM: <s> reads ini file contents </s>
|
funcom_train/34782006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void operationSUB(final int data) {
final int value = (this.a - data) & 0xff;
this.f = ((value == 0 ? ZERO : 0) + NEGATIVE + ((this.a & 0x0f) < (data & 0x0f) ? HALFCARRY : 0) + (value > this.a ? CARRY : 0));
this.a = value;
}
COM: <s> subtract without carry </s>
|
funcom_train/44522772 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(Color color) {
String result = "";
//if (getIsCoordinatePresent() == true) {
/* TODO SVG render inclusion */
//}
result += "[PushPin]\n";
result += "PushPin.coordinate: "+this.coordinate+"\n";
result += "PushPin.isChecked: "+this.isChecked+"\n";
result += "PushPin.isCoordinatePresent: "+this.isCoordinatePresent+"\n";
return result;
}
COM: <s> return the svg representation of the push pin in color </s>
|
funcom_train/25099266 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addImpedancePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_HardwarePin_impedance_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_HardwarePin_impedance_feature", "_UI_HardwarePin_type"),
HardwaremodelingPackage.Literals.HARDWARE_PIN__IMPEDANCE,
true,
false,
false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the impedance feature </s>
|
funcom_train/27674923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void basicApply( final Machine mc, final int nargs, final boolean newline ) {
if ( nargs == 1 ) {
final PrintWriter pw = new PrintWriter( System.out, true );
FormatPrint.show( pw, mc.popObject() );
if ( newline ) {
pw.println( "" );
} else {
pw.flush();
}
} else {
checkNargs( mc, 1, nargs );
}
}
COM: <s> performs the basic show function </s>
|
funcom_train/7520279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void deliverUniform(Channel channel) {
final ListIterator<MessageContainer> it = receivedMessages.listIterator();
while (it.hasNext()) {
final MessageContainer nextMsg = it.next();
if (isUniform(nextMsg)) {
try {
// deliver uniform notification
new UniformServiceEvent(channel, Direction.UP, this, nextMsg.getSendableEvent().getMessage()).go();
} catch (AppiaEventException e) {
e.printStackTrace();
}
it.remove();
}
}
}
COM: <s> tries to deliver uniform messages </s>
|
funcom_train/1883751 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JProgressBar getStatusProgressBar() {
if (this.statusProgressBar == null) {
this.statusProgressBar = new JProgressBar();
this.statusProgressBar.setPreferredSize(new Dimension(148, 45));
this.statusProgressBar
.setComponentOrientation(java.awt.ComponentOrientation.LEFT_TO_RIGHT);
this.statusProgressBar.setValue(50);
}
return this.statusProgressBar;
}
COM: <s> this method initializes status progress bar </s>
|
funcom_train/20508067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToCatalogTagCloud(String catalog, SortedMap<TimeRange, List<TagCloudEntry>> tagIndex) {
CatalogTagCloud catalogTagCloud = catalogTagClouds.get(catalog);
if (null == catalogTagCloud) {
catalogTagCloud = new CatalogTagCloud();
}
catalogTagCloud.setTagIndex(tagIndex);
catalogTagClouds.put(catalog, catalogTagCloud);
}
COM: <s> add an index to the catalog holder </s>
|
funcom_train/8296494 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Spring createspring(NamedNodeMap nodeMap) {
Mass start = (Mass) myMassMap.get(getAttrString(nodeMap, "a"));
Mass end = (Mass) myMassMap.get(getAttrString(nodeMap, "b"));
double restlength = getAttrDouble(nodeMap, "restlength");
double springyness = getAttrDouble(nodeMap, "springyness");
return new Spring(start, end, restlength, springyness);
}
COM: <s> creates spring from data must only call after my mass map initialized </s>
|
funcom_train/18586687 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void Restart() {
this.bringDown();
if (!Startup()) {
Log.error("Failed to restart network!");
state = ERROR;
listeners.nlNetworkError("Failed to restart network.");
} else {
Log.trace(Log.NETWORK_GROUP, "Connection: Network restarted.");
}
}
COM: <s> restarts the network connection </s>
|
funcom_train/22489399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreate () throws Exception {
final String TESTDATA =
"<?XML version=\"1.0\"?>\n" +
"<empty/>";
final EXmlParserFactory factory = EXmlParserFactory.newInstance();
final byte[] data = TESTDATA.getBytes();
assertEquals(data.length,
factory.makeParser().parse(data, 0, new EXmlDefaultTag()));
}
COM: <s> check creation of a parser </s>
|
funcom_train/42134843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAG3Venue(String ag3Venue, String connectionId) {
this.ag3Venue = ag3Venue;
this.connectionId = connectionId;
try {
this.ag3Updater = new ClientUpdateThread(new Venue(ag3Venue),
connectionId);
} catch (MalformedURLException e) {
logger.error(ERROR_MESSAGE, e);
}
}
COM: <s> sets the ag3 venue in use </s>
|
funcom_train/47129848 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void doSaveAs() {
if (getActivePage() == DESIGN_PAGE && contentModified) {
updateSourceFromDesign();
}
setContentModified(false);
editor.doSaveAs();
setInput(editor.getEditorInput());
updateTitle();
if (getActivePage() == SOURCE_PAGE) {
recreateDesignPage();
}
refresh();
}
COM: <s> saves the multi page editors document as another file </s>
|
funcom_train/14058857 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canBeClosed() {
String[] apps = JEANFramework.getLoadedApplicationNames();
boolean ret = false;
if (apps.length > 1) {
String[] tmp = (String[]) Utilities.inBothAAndB(apps,getReferencesFrom());
ret = (tmp == null) || (tmp.length == 0);
}
return ret;
}
COM: <s> check if the application can be closed </s>
|
funcom_train/31105122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printUsagePrintOutput() {
System.err.println("USAGE: -print [-Dstart=i] [-Dend=i] [-Dcopies=i] [-Deven=true|false] "
+ " org.apache.fop.apps.Fop (..) -print\n"
+ "Example:\n"
+ "java -Dstart=1 -Dend=2 org.apache.Fop.apps.Fop infile.fo -print ");
}
COM: <s> shows the options for print output </s>
|
funcom_train/36887914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RecurrentChargesAddDto convert(RecurrentChargesAddView view){
RecurrentChargesAddDto dto = null;
if (view != null){
dto = new RecurrentChargesAddDto();
dto.setPlantId(view.getPlantId());
dto.setTransportId(view.getTransportId());
dto.setCostElementId(view.getCostElementId());
dto.setCurrencyId(view.getCurrencyId());
dto.setVersionId(view.getVersionId());
}
return dto;
}
COM: <s> convert view to dto </s>
|
funcom_train/50054532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void onChange(Widget sender) {
this.compositeChart = new CompositeChartPanel(this.session,
this.chartServicesListBox.getItemText(this.chartServicesListBox.getSelectedIndex()),
this.chartServicesListBox.getValue(this.chartServicesListBox.getSelectedIndex()));
this.compositeChart.init();
}
COM: <s> this method repsonds to the listbox changes </s>
|
funcom_train/3173921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JPanel getDialogContent() {
JPanel result = new JPanel(new NestedBlockLayout("<col><confirm wx=\"1\" wy=\"1\"/><enter wx=\"1\"/></col>"));
// prepare textfield for formar
hierarchy = new TextFieldWidget(place.getFormatAsString());
result.add(getConfirmComponent());
result.add(hierarchy);
// done
return result;
}
COM: <s> override content components to show to user </s>
|
funcom_train/38536307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setNumberForIndex(Number num) {
// determine index of node to set
int nodeIdx = 0;
for (int i=0; i<indices.length; i++)
nodeIdx += indices[i].currentVal() * indexOffsets[i];
vals[nodeIdx]=(MutableNumber)num;
}
COM: <s> method that allows setting number according to the current index instead of passing </s>
|
funcom_train/130949 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setGripper (int cmd) {
try {
sendHeader (PLAYER_MSGTYPE_CMD, cmd, 0);
os.flush ();
} catch (IOException e) {
throw new PlayerException
("[Gripper] : Couldn't send state command request: " +
e.toString(), e);
}
}
COM: <s> the gripper interface accepts 5 different commands with codes </s>
|
funcom_train/25220293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rule getRule(State start,String label){
CommonTree ruleNode=creator.createRule(label);
CommonTree block=creator.createBlock();
creator.addChild(ruleNode, block);
browse(block,start);
creator.addChild(ruleNode, creator.createEndOfBlock());
creator.addChild(ruleNode, creator.createEndOfRule());
return new Rule(ruleNode,label);
}
COM: <s> returns the rule that created from the given path automaton </s>
|
funcom_train/26322439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected PyObject getslice(int start, int stop, int step) {
PyObject startObject = (start >= 0) ? Py.newInteger(start) : Py.None;
PyObject stopObject = (stop >= 0) ? Py.newInteger(stop) : Py.None;
return __getitem__(new PySlice(startObject, stopObject, Py.newInteger(step)));
}
COM: <s> return a slice of a py object </s>
|
funcom_train/257191 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getColumnName(int col) {
if (this.singleRowMap < 0) {
if (this.headerMap[col] < 0)
return ""; //columnNames[col];
else
return this.dataSet.getColumnName(headerMap[col]);
} else
return columnNames[col];
}
COM: <s> returns the name of a column in the data model </s>
|
funcom_train/8904423 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected DataFrame createBeaconFrame() {
DataFrame controlFrame = new DataFrame();
controlFrame.setBeacon();
controlFrame.setSrcAddress(_datagramSocket.getLocalAddress());
controlFrame.setSrcPort(_datagramSocket.getLocalPort());
controlFrame.setDestAddress(_upstreamNeighborAddress);
controlFrame.setDestPort(_upstreamNeighborPort);
return controlFrame;
}
COM: <s> used to nofity users of a fauly in the ring </s>
|
funcom_train/34340860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getCantidad() {
if (cantidad == null) {//GEN-END:|40-getter|0|40-preInit
// write pre-init user code here
cantidad = new TextField("cantidad", null, 3, TextField.NUMERIC);//GEN-LINE:|40-getter|1|40-postInit
// write post-init user code here
}//GEN-BEGIN:|40-getter|2|
return cantidad;
}
COM: <s> returns an initiliazed instance of cantidad component </s>
|
funcom_train/34281189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void swapLayerDown(int index) {
if (index - 1 < 0) {
throw new RuntimeException(
"Can't swap down when already at the bottom.");
}
MapLayer hold = layers.get(index - 1);
layers.set(index - 1, getLayer(index));
layers.set(index, hold);
}
COM: <s> moves the layer at code index code down one in the vector </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.