__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/25065125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createPaginator() {
if (paginator == null) {
paginator = new LocalPaginator(sortableTable, pagingInProgressLabel, rowsPerPagePreferenceKey);
}
// SortableTable's sort listener should be invoked after paginator's sort listener is invoke
sortableTable.addClearListener(new SortableTableClearListener());
sortableTable.addSortListener(new SortableTableSortListener());
}
COM: <s> paginator is responsible for pagination </s>
|
funcom_train/13391893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addJARHttpmdLocation(URL resource, String location) {
if(resource==null)
throw new NullPointerException("resource is null");
if(location==null)
throw new NullPointerException("location is null");
httpmdResourceMap.put(resource.toExternalForm(), location);
}
COM: <s> add a location for a jar to compute a message digest </s>
|
funcom_train/35362031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mergeStyles(Properties styles) {
for (String token : styles.stringPropertyNames()) {
String stv = styles.getProperty(token);
try {
TokenType tt = TokenType.valueOf(token);
SyntaxStyle tokenStyle = new SyntaxStyle(stv);
put(tt, tokenStyle);
} catch (IllegalArgumentException ex) {
LOG.warning("illegal token type or style for: " + token);
}
}
}
COM: <s> you can call the merge styles method with a properties file to customize </s>
|
funcom_train/31909334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
try {
fireStartedEvent();
SVGDocument svgDocument = (SVGDocument)loader.loadDocument(url);
fireCompletedEvent(svgDocument);
} catch (InterruptedIOException e) {
fireCancelledEvent();
} catch (Exception e) {
exception = e;
fireFailedEvent();
}
}
COM: <s> runs this loader </s>
|
funcom_train/10801330 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String toBackingFieldName(String name) {
// meta is null when enhancing persistence-aware
FieldMetaData fmd = _meta == null ? null : _meta.getField(name);
if (_meta != null && isPropertyAccess(fmd)
&& _attrsToFields != null && _attrsToFields.containsKey(name))
name = (String)_attrsToFields.get(name);
return name;
}
COM: <s> if using property access see if there is a different backing field </s>
|
funcom_train/27866899 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAckRequested(boolean signed) throws SOAPException {
headerContainer.addExtensionElement(
new AckRequested(soapEnvelope, signed));
if (messageOrder != null) {
headerContainer.addExtensionElement(messageOrder);
if (!headerContainer.getMessageHeader().getDuplicateElimination()) {
headerContainer.getMessageHeader().setDuplicateElimination();
}
}
saveChanges();
}
COM: <s> add acknowledgement request element to the message </s>
|
funcom_train/46701591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Object getEmptyValue() {
if (CharSequence.class.isAssignableFrom(type)) {
return "";
}
if (type.isArray()) {
return Array.newInstance(type, 0);
}
if (List.class.isAssignableFrom(type)) {
return Collections.EMPTY_LIST;
}
return null;
}
COM: <s> returns an empty value </s>
|
funcom_train/45317510 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doUnpauseAgent(UnbreakMessage message) {
if (userName != null) {
try {
MainClass.getAsterisk().agentPause(userName, null, false);
} catch (Exception ex) {
// Catch all...
sendNotAcceptable("Unable to process unbreak command. " + ex.getLocalizedMessage());
}
} else {
sendUnauthorized("Can not unpause. You are not logged in");
}
}
COM: <s> unpause the agent </s>
|
funcom_train/35645984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeTask(WorkerTask task) {
synchronized (mutex) {
int taskIndex = tasks.indexOf(task);
if (taskIndex != -1) {
if (taskIndex == runningTaskIndex) {
throw new IllegalArgumentException("A WorkerTask couldn't remove itself");
}
tasks.removeElementAt(taskIndex);
if (taskIndex < runningTaskIndex) {
runningTaskIndex--;
}
return true;
}
return false;
}
}
COM: <s> remove the first instance of a </s>
|
funcom_train/14598964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String processLine(String line) {
String[] words = StringUtil.parseWords(line);
int length = words.length;
if (length > 0 && helpCommand.equals(words[0])) {
return processHelp(words);
} else if (length > 0) {
return processCommand(words);
}
return "";
}
COM: <s> parses the given line into words </s>
|
funcom_train/50077243 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateOverInterface(boolean first, int x, int y){
int k = first ? 0 : numPoints-1;
setButtonDragged(k);
int X = getX()+buttonList[k].getX()+x;
int Y = getY()+buttonList[k].getY()+y;
SofaaInterface overInterface = checkForInterfaces(first,X,Y);
SofaaInterface oldOverInterface = getInterfaceOver(first);
if(overInterface!=oldOverInterface && oldOverInterface!=null){
oldOverInterface.removeLink(this,first);
}
setInterfaceOver(first,overInterface);
}
COM: <s> check if there is an interface under this end point </s>
|
funcom_train/7623666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BluetoothHeadset(Context context, ServiceListener l) {
mContext = context;
mServiceListener = l;
if (!context.bindService(new Intent(IBluetoothHeadset.class.getName()), mConnection, 0)) {
Log.e(TAG, "Could not bind to Bluetooth Headset Service");
}
}
COM: <s> create a bluetooth headset proxy object </s>
|
funcom_train/20932185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeCards(ArrayList<Card> c){
this.cards.removeAll(c);
this.cards.trimToSize();
for(Card card : c){
this.remove(card);
}
if(this.cards.size() > 0){
SolitaireStack.this.getTopCard().setTurned();
}
trimToSize();
}
COM: <s> removes multiple given cards from the stack </s>
|
funcom_train/3025796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String getStringFromIDE() {
// Get the data from the window
VisualCafe vc = VisualCafe.getVisualCafe();
if (vc == null) {
return "";
}
sourceFile = vc.getFrontmostSourceFile();
if (sourceFile == null) {
return "";
}
return sourceFile.getTextString();
}
COM: <s> gets the string from ide attribute of the cafe extract method object </s>
|
funcom_train/18596086 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setScript(int index) {
if (getScripts().size() == 0) {
setScript((Script) null);
if (testSuite != null)
setStatus(Strings.get("NoScripts"), null, WARN);
}
else {
if (index >= getScripts().size())
index = getScripts().size() - 1;
setScript(getScriptAt(index));
}
}
COM: <s> set the test case to the one corresponding to the given index </s>
|
funcom_train/34339860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getPedido1() {
if (Pedido1 == null) {//GEN-END:|37-getter|0|37-preInit
// write pre-init user code here
Pedido1 = new TextField("Pedido1", null, 32, TextField.ANY);//GEN-LINE:|37-getter|1|37-postInit
// write post-init user code here
}//GEN-BEGIN:|37-getter|2|
return Pedido1;
}
COM: <s> returns an initiliazed instance of pedido1 component </s>
|
funcom_train/21699591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getNextAlarm(final Calendar c) {
if (mDays == 0)
return -1;
final int today = (c.get(Calendar.DAY_OF_WEEK) + 5) % 7;
int day = 0;
int dayCount = 0;
for (; dayCount < 7; dayCount++) {
day = (today + dayCount) % 7;
if (isSet(day)) {
break;
}
}
return dayCount;
}
COM: <s> returns number of days from today until next alarm </s>
|
funcom_train/4233073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void channelRemoved(String channelName) {
if (!xyMode) {
String channelDisplay = getChannelDisplay(channelName);
TimeSeriesCollection dataCollection = (TimeSeriesCollection)this.dataCollection;
TimeSeries data = dataCollection.getSeries(channelDisplay);
dataCollection.removeSeries(data);
colors.remove(channelDisplay);
}
setSeriesColors();
updateTitle();
updateLegend();
}
COM: <s> called when a channel has been removed </s>
|
funcom_train/4505942 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createDefaultSettings(JID workgroupJID) {
final XStream xstream = new XStream();
xstream.alias("ChatSettings", ChatSettings.class);
xstream.alias("Key", KeyEnum.class);
xstream.alias("Setting", ChatSetting.class);
createImageSettings(workgroupJID);
createTextSettings(workgroupJID);
createBotSettings(workgroupJID);
}
COM: <s> add default settings to a workgroup </s>
|
funcom_train/34536877 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addFromField(String _field, String _alias) {
QueryFieldStructure p = new QueryFieldStructure(_field, " ", _alias, "FROM");
if (this.from == null) this.from = new Vector<QueryFieldStructure>();
from.addElement(p);
}
COM: <s> adds new field to the from section of the query </s>
|
funcom_train/50313693 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isSelected (int index) {
checkWidget ();
int count = Fox.FXList_getNumItems(handle);
if (!(0 <= index && index < count))
return false;
if ((style & SWT.SINGLE) != 0)
return Fox.FXList_isItemCurrent(handle, index);
else
return Fox.FXList_isItemSelected(handle, index);
}
COM: <s> returns code true code if the item is selected </s>
|
funcom_train/49206689 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeLabel(String Label) {
if (StringUtils.isEmpty(Label)) {
return;
}
Label = formatLabel(Label);
labelsMap.remove(Label);
final Set<JobId> jobIdSet = (Set<JobId>) labelJobsMap.get(Label);
if (jobIdSet != null) {
for (final JobId jobId : jobIdSet) {
jobLabelsMap.remove(jobId, Label);
}
}
labelJobsMap.remove(Label);
notifyLabelsChangeEvent();
LabelsPersistenceHelper.persist();
}
COM: <s> removes the label </s>
|
funcom_train/24188821 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getArbritraryValueForType(final Class<?> classType) {
String parameterConstruction = null;
if(classType.isPrimitive()) {
final String simpleName = classType.getSimpleName();
if (isTypeNamePrimitiveNumber(simpleName)) {
parameterConstruction = "1";
} else if (isTypeNamePrimitiveBoolean(simpleName)) {
return "false";
// char
} else {
return "'c'";
}
} else {
parameterConstruction = getConstructionExpression(classType);
}
return parameterConstruction;
}
COM: <s> return a value for a class type </s>
|
funcom_train/6274688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int compareTo(Span s) {
if (getStart() < s.getStart()) {
return -1;
}
else if (getStart() == s.getStart()) {
if (getEnd() > s.getEnd()) {
return -1;
}
else if (getEnd() < s.getEnd()) {
return 1;
}
else {
return 0;
}
}
else {
return 1;
}
}
COM: <s> compares the specified span to the current span </s>
|
funcom_train/43188028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Format intersects(Format format) {
Format fmt;
if ((fmt = super.intersects(format)) == null)
return null;
if (!(format instanceof WavAudioFormat))
return fmt;
WavAudioFormat other = (WavAudioFormat)format;
WavAudioFormat res = (WavAudioFormat)fmt;
res.codecSpecificHeader = (codecSpecificHeader != null ?
codecSpecificHeader : other.codecSpecificHeader);
return res;
}
COM: <s> find the common attributes of two matching formats </s>
|
funcom_train/46575346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startPresentation(Document FormDocument, Document dataDocument) throws AppToyException {
NamedNodeMap nnm =FormDocument.getDocumentElement().getAttributes();
// initialize the renderer classes for all used namespaces
initNamespaces(nnm);
// initialize the script engine to process the scripts.
initScriptEngine(nnm, dataDocument);
// start the presentation
present(FormDocument);
}
COM: <s> p will be called by the controller </s>
|
funcom_train/4924006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMatchWithFiltering() {
this.recordEvent(1, MockOneListener.class, "EVENT", "MATCH");
this.recordInit(new CometInterest(MockOneListener.class.getName(),
"MATCH"));
this.recordResponse(new CometEvent(1, MockOneListener.class.getName(),
"EVENT", "MATCH"));
this.doTest();
}
COM: <s> ensure can match if match key equals the filter key </s>
|
funcom_train/9727261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isGreaterThanMinFrame(int frameNo) {
if ((frameNumbers == null) || (frameNo < 0))
return true;
else {
for (int i = 0; i < frameNumbers.length; i++)
if (frameNo >= frameNumbers[i])
return true;
return false;
}
}
COM: <s> check if the given frame number is greater than the minimum number </s>
|
funcom_train/24379212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Node getTypeAsNode(Node node, FeedbackInlineType type){
if (type != null) {
QName qname = new QName("http://www.imsglobal.org/xsd/imsqti_v2p1", "feedbackInline");
JAXBElement<FeedbackInlineType> jaxbe =
new JAXBElement<FeedbackInlineType>(qname, FeedbackInlineType.class, type);
node = getNode(node, jaxbe);
}
return node;
}
COM: <s> gets the feedback inline type as a dom node </s>
|
funcom_train/15563395 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int decideOpStartTime(Operation op){
int chosenStartTime = op.est;
int minAddtionalCost = Integer.MAX_VALUE;
for(int startTime = op.est; startTime <= op.lst; startTime++){
int addCost = 0;
for(int walk = 0; walk < op.prt; walk++){
addCost += 2*op.size*op.resource.getTimeStick(startTime+walk).taken;
}
addCost += op.size*op.size*op.prt;
if(addCost < minAddtionalCost){
chosenStartTime = startTime;
minAddtionalCost = addCost;
}
}
return chosenStartTime;
}
COM: <s> in general serial schedule generation scheme schedule an operation is not selecting </s>
|
funcom_train/12147767 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printRDF(){
resultWriter.write(" <RDF xmlns=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n");
resultWriter.write(" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"> \n");
Iterator nodekeys = nodes.keySet().iterator();
while(nodekeys.hasNext()){
String key = nodekeys.next().toString();
NodeValue value = (NodeValue)nodes.get(key);
addDescription(key, value.getSubResult());
}
resultWriter.write(" </RDF>\n");
}
COM: <s> print a rdf response to the result </s>
|
funcom_train/39275806 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void expiryThreadMain() {
long expiryThreadIntervalMillis = expiryThreadInterval * MS_PER_SECOND;
try {
while (active) {
Thread.sleep(expiryThreadIntervalMillis);
//Expire the elements
expireElements();
}
} catch (InterruptedException e) {
// Bail on interruption
if (LOG.isDebugEnabled()) {
LOG.debug(name + "Cache: Expiry thread interrupted on Disk Store.");
}
}
}
COM: <s> the main method for the expiry thread </s>
|
funcom_train/45773863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAction(Vector dataVector) {
if ((dataVector != null) && !dataVector.isEmpty()) {
DefaultTableModel tModel = (DefaultTableModel) m_table.getModel();
for (int i = 0; i < dataVector.size(); i++) {
Vector data = (Vector) dataVector.get(i);
tModel.addRow(data);
}
}
}
COM: <s> add actions for a step </s>
|
funcom_train/46112735 | /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 ("clGatewayPort".equals(portName)) {
setclGatewayPortEndpointAddress(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/20888462 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unbind(PortedPacketReceiver receiver) {
Set<Entry<Port, PortedPacketReceiver>> entrySet = portMapping.entrySet();
Iterator<Entry<Port, PortedPacketReceiver>> i = entrySet.iterator();
while (i.hasNext()) {
Entry<Port, PortedPacketReceiver> entry = i.next();
if (entry.getValue().equals(receiver)) {
i.remove();
}
}
}
COM: <s> unbinds a receiver from all ports </s>
|
funcom_train/9926795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updatePane(){
this.setUpResources();
this.setResourcesComboBox("");
// TODO monitor chkBox set to enabled or disabled dependes on the grid
//TA change 06.07.20 Fix bug #915
//delete:
//this.updateMonitorCheckBox();
//TA change end 06.07.20. Fix bug #915
// this.updateResourceTableForNewGrid();
}
COM: <s> this method is called when grid combo box is changed </s>
|
funcom_train/10268768 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public WorkItemRecord getWorkItemRecord(String itemID) {
try {
return getEngineStoredWorkItem(itemID, _sessionHandle);
}
catch (IOException ioe) {
_log.error("Exception getting WIR: " + itemID, ioe);
return null ;
}
catch (JDOMException jde) {
_log.error("Exception getting WIR: " + itemID, jde);
return null ;
}
}
COM: <s> returns the specified wir for the id passed </s>
|
funcom_train/9389483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onSettingsChanged() {
if (mSettingsPage == null) {
return;
}
mSettingsPage.retrieveSettings(mProperties);
applySettings();
saveSettings();
// In case the HTTP/HTTPS setting change, force sources to be reloaded
// (this only refreshes sources that the user has already tried to open.)
mUpdaterData.refreshSources(false /*forceFetching*/);
}
COM: <s> when settings have changed retrieve the new settings apply them and save them </s>
|
funcom_train/7518261 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ProcessoAndamento update(ProcessoAndamento entity) {
EntityManagerHelper.log("updating ProcessoAndamento instance",
Level.INFO, null);
try {
ProcessoAndamento result = getEntityManager().merge(entity);
EntityManagerHelper.log("update successful", Level.INFO, null);
return result;
} catch (RuntimeException re) {
EntityManagerHelper.log("update failed", Level.SEVERE, re);
throw re;
}
}
COM: <s> persist a previously saved processo andamento entity and return it or a </s>
|
funcom_train/40841002 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setValue(boolean[] state) {
Log.d(TAG, "setValue()");
boolean updated = false;
if (this.state == null) {
if (this.entry == null) {
updated = true;
} else if (state.length == this.entry.length) {
updated = true;
}
} else if (state.length == this.state.length) {
updated = true;
}
if (updated) {
this.state = state;
}
return (updated);
}
COM: <s> set the state to something new </s>
|
funcom_train/13246761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void openPuzzles() {
// open the store, creating it if necessary
try {
puzzlesStore = RecordStore.openRecordStore(PUZZLES_NAME, true);
} catch (RecordStoreException e) {
errorAlert.setString("Failed to open puzzles storage");
display.setCurrent(errorAlert);
puzzlesStore = null;
}
}
COM: <s> open the store that holds puzzles records </s>
|
funcom_train/9278437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String obtainDbName(String dbName) {
File tmp = new File(dbName);
final File db = tmp;
return (String)AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
return new File(SupportFilesSetup.EXTINOUT,
db.getPath()).getAbsolutePath();
}
}
);
}
COM: <s> obtain absolute path for the specified database name </s>
|
funcom_train/18745798 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addToEdge2SigMap(EdgeSignature sig) {
Map<EdgeMultDir,Edge2SigMap> maps = this.edge2SigMaps;
if (maps != null) {
Edge2SigMap map = maps.get(sig.getDirection());
for (ShapeEdge edge : getEdges(sig)) {
map.put(edge, sig);
}
}
}
COM: <s> adds mappings from all edges corresponding to a given edge signature </s>
|
funcom_train/9564446 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setType(int type) {
this.type = type;
if(headerAll != null) {
headerAll.setType(this.type);
}
if(headerFirst != null) {
headerFirst.setType(this.type);
}
if(headerLeft != null) {
headerLeft.setType(this.type);
}
if(headerRight != null) {
headerRight.setType(this.type);
}
}
COM: <s> set the type of this rtf header footer group </s>
|
funcom_train/10224556 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JMenu getSongEditorActionMenu() {
JMenu edit = new JMenu(resources.getString("menu.edit"));
edit.setMnemonic(resources.getString("menu.edit.mnemonic").charAt(0));
for (Action a : songEditor.getActions()) {
edit.add(a);
}
return edit;
}
COM: <s> returns the editors custom actions as a menu </s>
|
funcom_train/41730532 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMonomialRoundTrip() {
System.out.println("Testing monomial marshalling/unmarshalling:");
Monomial compare = new Monomial(3);
short [] cvalues = compare.getValues();
cvalues[0] = 1;
cvalues[1] = 2;
cvalues[2] = 3;
Map comparisons = new HashMap();
comparisons.put(new Integer(1), compare);
runTest("./monomial.xml",comparisons);
}
COM: <s> test of unmarshall marshall monomials </s>
|
funcom_train/28368274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getShapefile(final String layerName) {
final OMGraphicHandlerLayer layer = getLayer(layerName);
if (layer instanceof EsriLayer) {
final EsriLayer thisLayer = (EsriLayer) layer;
final Properties layerProps = thisLayer.getProperties(null);
final String shapeFile = (String) layerProps.get("shp");
return shapeFile;
}
return null;
}
COM: <s> gets the shapefile </s>
|
funcom_train/5244064 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkstate (Search search) {
if (search.isEndState() | loopendstate) {
if (outputlevel > 0) {
System.err.println("reached endstate");
System.err.println("loop state :" + loopendstate);
}
if (loopendstate) {
return (! g.acceptingLoop(currentstatenum));
}
System.err.println(acceptingstateexists);
return (! acceptingstateexists);
} else if (automatachanged) {
// If we are guaranteed an accepting run from here it is bad.
if (outputlevel > 1) {
System.err.println("checking ");
}
automatachanged = false;
return (! alwaysSatisfied);
}
return true;
}
COM: <s> helper method for check </s>
|
funcom_train/26219519 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addBotMessage(String _incomingMsg) {
String _trans = SchemeUtil.codeTransform(_incomingMsg);
_trans = SchemeUtil.findPunc(_trans);
_trans = _trans.toLowerCase();
// [ save all messages except hello ]
synchronized (msgQueue) {
msgQueue.add(_trans);
} // end of sync block ...
_alpha.addPersonalMsg(_trans);
_beta.addPersonalMsg(_trans);
} // end of the method ...
COM: <s> link between the bot process thread objects and the bot this method </s>
|
funcom_train/45302906 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleCreateFormatedOutputButton(final ActionEvent e) {
final int[] selRows = unitTable.getSelectedRows();
final DSVillage[] selVillages = new DSVillage[selRows.length];
for (int i = 0; i < selRows.length; i++) {
selVillages[i] = unitTableModel.getRowValue(i);
}
final String output = outputFormatter.format(selVillages);
getOutputWindow().getTextArea().setText(output);
getOutputWindow().setVisible(true);
}
COM: <s> handle the output creation event </s>
|
funcom_train/11702935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getName() {
if (processorName == null) {
if (metadata != null
&& Constants.DEPLOYMENT_INTEGRATED.equalsIgnoreCase(casProcessorCPEConfiguration
.getDeploymentType())) {
processorName = metadata.getName().trim();
} else {
processorName = casProcessorCPEConfiguration.getName().trim();
}
}
return processorName;
}
COM: <s> returns the name of this container </s>
|
funcom_train/33606788 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSlope() {
System.out.println("slope");
R2 p1 = null;
R2 p2 = null;
Double expResult = null;
Double result = R2.slope(p1, p2);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of slope method of class r2 </s>
|
funcom_train/15954218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPositiveByteSetString() throws BMLException,IOException{
String lsValue = "+122";
DataByte ldByte = new DataByte(flValue);
try{
ldByte.setString(lsValue);
throw new IOException("set Byte data with \"+\"! ");
}
catch(IOException e)
{ throw e;}
catch(Throwable ex)
{ }
}
COM: <s> negative test of positive byte using set string </s>
|
funcom_train/26485704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean containsReferenceTo(final UserColumn uc) {
if (startFormula != null && startFormula.refersTo(uc))
return true;
final boolean[] answer = new boolean[1];
answer[0] = false;
withSectionsDo(new SectionWalker() {
public void step(Section s) {
if (s.containsReferenceTo(uc))
answer[0] = true;
}
});
return answer[0];
}
COM: <s> returns code true code if the specified user column exists within </s>
|
funcom_train/18256603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void reset() {
Enumeration e = sweeps.elements();
while (e.hasMoreElements()) {
Sweepable sweep = (Sweepable) e.nextElement();
sweep.reset();
if (!hasNext && sweep.hasNext()) {
hasNext = true;
}
}
depth = 0;
}
COM: <s> sets the entire swep group back to its initial state </s>
|
funcom_train/20272346 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void trimCanidatesNotMeetingMinimumRequirements() {
Iterator<Entry<String, FunctionState>> i;
for (i = fns.entrySet().iterator(); i.hasNext();) {
FunctionState fs = i.next().getValue();
if (!fs.hasExistingFunctionDefinition() || !fs.canInline()) {
i.remove();
}
}
}
COM: <s> remove entries that arent a valid inline candidates from the list of </s>
|
funcom_train/23717578 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int init(String[] args) {
try {
// parse the command line arguments
log.debug("Parsing options");
cfg = cmdParser.parse(args);
if (cfg.isDoingHelpOnly()) {
cmdParser.displayHelp("BatchLauncher");
return STOP;
}
initLog4j();
loadProperties();
initContext();
return OK;
} catch (ParseException exp) {
System.err.println("Parsing command line failed. Reason: " + exp.getMessage());
cmdParser.displayHelp("BatchLauncher");
return ERROR;
} catch (IOException e) {
e.printStackTrace(System.err);
return ERROR;
}
}
COM: <s> parses the command line arguments and initializes logging loads </s>
|
funcom_train/46857053 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void SetShape(List<Point2D.Float> shapepoints) {
// If no points are defined for the shape just create an empty polygon
if (shapepoints == null) {
shapepoints = new ArrayList<Point2D.Float>();
shapepoints.add(new Point2D.Float(0, 0));
}
int total = shapepoints.size();
double[] coords = new double[total * 2];
int i = 0;
for (Point2D.Float p : shapepoints) {
coords[i++] = p.x;
coords[i++] = p.y;
}
shape = new Polygon2D.Double(coords);
}
COM: <s> creates the junctions polygon based on the supplied points </s>
|
funcom_train/19777072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double getLon(HttpServletRequest request) {
try {
return Double.parseDouble(Preconditions.checkNotNull(request
.getParameter("lon"), "parameter cannot be null: lon"));
} catch (NumberFormatException ex) {
throw new RuntimeException("lon parameter is not a valid number",
ex);
}
}
COM: <s> gets the longitude lon parameter from the request </s>
|
funcom_train/44665293 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addError(String message,HttpServletRequest request){
logger.debug("Adding error to actionErrors #" + message);
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR,new ActionError("errors.detail",message));
saveErrors(request,errors);
}
COM: <s> adds a error message to the list of errors in the request </s>
|
funcom_train/51344540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: synchronized public long findNext(final long timestamp) {
/*
* Note: can also be written using rangeIterator().next().
*/
if (timestamp < 0L)
throw new IllegalArgumentException();
// find first strictly greater than.
final int index = findIndexOf(Math.abs(timestamp)) + 1;
if (index == nentries) {
// No match.
return -1L;
}
return decodeKey(keyAt(index));
}
COM: <s> find the first commit time strictly greater than the timestamp </s>
|
funcom_train/38787251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void order_attackMove(double x, double y) {
if (orderAble()) {
Order order = new Order();
order.target = new OrderTarget(x, y);
order.ordertype = Order.OrderType.attackmove;
orderAdd(order);
}
setReturnPoint(null);
}
COM: <s> order ship attackmove to these coordinates </s>
|
funcom_train/44296535 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Name parse(final SimpleNameSpace scope, final CharSequence name) {
try {
return new CompoundName(name.toString(), ((scope != null) ? scope.factory : this).syntax);
} catch (InvalidNameException e) {
throw new IllegalArgumentException(e);
}
}
COM: <s> creates a new jndi name for the given scope and character sequence </s>
|
funcom_train/46323299 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ActionForward handleActionPerform(HttpServletRequest request, HttpServletResponse response, Action action, ActionForm form, ActionMapping mapping) throws IOException, ServletException {
if (form instanceof BaseForm) {
Locale locale = RequestUtils.getUserLocale(request, null);
MessageResources resources = ((MessageResources) request.getAttribute(Globals.MESSAGES_KEY));
BaseForm baseForm = (BaseForm)form;
baseForm.setLocale(locale);
baseForm.setMessageResources(resources);
}
return super.processActionPerform(request, response, action, form, mapping);
}
COM: <s> perform spring web flow processing prior to processing the request </s>
|
funcom_train/39314512 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetMaxUnitIncrement() {
System.out.println("testSetMaxUnitIncrement");
sp.setMaxUnitIncrement(2);
int newsize = sp.getMaxUnitIncrement();
assertEquals(2,newsize);
System.out.println("Done testSetMaxUnitIncrement");
}
COM: <s> test of set max unit increment method of class scrollable picture </s>
|
funcom_train/36134864 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initTypes(OvalDefinitions ovalDefs){
this.definitions = ovalDefs.getDefinitions();
this.tests = ovalDefs.getTests();
this.objects = ovalDefs.getObjects();
this.states = ovalDefs.getStates();
this.variables = ovalDefs.getVariables();
}
COM: <s> initializes the class members definitions tests objects states and variables </s>
|
funcom_train/804989 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(IAction action) {
IViewReference[] views=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getViewReferences();
for (int i=0;i<views.length;i++){
if (views[i].getId().equals(JmolView.ID)){
JmolView jmv=(JmolView)(views[i].getPart(false));
jmv.executeJmolCommand(command);
}
}
}
COM: <s> the action has been activated </s>
|
funcom_train/25391928 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ConcretePacket receiveMessage(){
try{
byte[] buf = new byte[1000];
DatagramPacket recv = new DatagramPacket(buf, buf.length);
socket.receive(recv);
return new ConcretePacket(recv.getAddress().getHostAddress(),
recv.getPort(), recv.getData());
}
catch(Exception e){
e.printStackTrace();
return null;
}
}
COM: <s> receive a message from this socket </s>
|
funcom_train/51299667 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getGroupId(int id) {
String sql = "SELECT group_id from measurement_unit WHERE id = " + id;
ResultSet res = null;
try {
res = DBAccessor.getInstance().makeSelect(sql);
if (res.next()) {
return res.getInt("group_id");
}
} catch (Exception e) {
e.printStackTrace();
} finally {
DBAccessor.getInstance().releaseConnection(res);
}
return 0;
}
COM: <s> returns group id of selected element </s>
|
funcom_train/20823937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void spawnLoop() {
Thread thread = new Thread() {
@Override
public void run() {
loop();
}
};
thread.setDaemon(true);
thread.setName("LassiLanboxDaemon");
thread.setPriority(Thread.currentThread().getPriority() + 1);
thread.start();
}
COM: <s> start a new thread for the communications with the lanbox </s>
|
funcom_train/18191109 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void drawCube(Graphics g, Color fgColor, Color bgColor, Color seeThroughColor, Color lineColor, double[][] matrix, boolean usePerspective) {
// draw the closing sides of the box in light gray
determineVisibility(matrix, usePerspective);
drawCubeBackground(g, fgColor, bgColor, seeThroughColor, matrix, usePerspective);
drawCubeWireFrame(g, lineColor, matrix, usePerspective, null);
}
COM: <s> draw the cube of the simulation area </s>
|
funcom_train/45562220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void activate() {
deactivate();
control.addListener(SWT.Dispose, listener);
control.addListener(SWT.MouseHover, listener);
control.addListener(SWT.MouseMove, listener);
control.addListener(SWT.MouseExit, listener);
control.addListener(SWT.MouseDown, listener);
control.addListener(SWT.MouseWheel, listener);
}
COM: <s> activate tooltip support for this control </s>
|
funcom_train/638373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireSelectedConsensusAnnotationChanged(SimpleInstance selectedConsensusAnnotation) {
logger.debug("selected consensus annotation=\"" + browserTextUtil.getBrowserText(selectedConsensusAnnotation, 100) + "\"");
SelectedConsensusAnnotationChangeEvent scace = new SelectedConsensusAnnotationChangeEvent(manager, selectedConsensusAnnotation);
for (SelectedConsensusAnnotationChangeListener scacl : selectedConsensusAnnotationChangeListeners) {
scacl.consensusAnnotationSelectionChanged(scace);
}
}
COM: <s> the preferred way of updating the currently selected consensus annotation is via </s>
|
funcom_train/43096752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addClass() {
Object target = getTarget();
if (Model.getFacade().isANamespace(target)) {
Object ns = /*(MNamespace)*/ target;
Object ownedElem = Model.getCoreFactory().buildClass();
Model.getCoreHelper().addOwnedElement(ns, ownedElem);
TargetManager.getInstance().setTarget(ownedElem);
}
}
COM: <s> create a class </s>
|
funcom_train/4085801 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addLeftEdgeWidget( Widget widget, int thickness ) {
add( widget );
int halfThickness = thickness/2;
int thicknessRemainder = thickness - halfThickness;
setWidgetLeftWidth(widget, -halfThickness, Unit.PX, thickness, Unit.PX);
setWidgetTopBottom(widget, -halfThickness, Unit.PX, -thicknessRemainder+1, Unit.PX);
}
COM: <s> adds a widget that should occupy the left edge </s>
|
funcom_train/51827144 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initialize() {
this.setSize(600, 400);
this.setTitle("BitSet");
root = new DefaultMutableTreeNode("\\");
BitSetExtensionProcessing.buildTree(root);
CBPanel = new CheckBoxPanel(getJTable(),this);
CBPanel.setBackground(java.awt.Color.lightGray);
CBPanel.setBorder(BorderFactory.createMatteBorder(5, 5, 5, 5,java.awt.Color.lightGray));
this.setContentPane(getJSplitPane());
}
COM: <s> this method initializes this </s>
|
funcom_train/39383616 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void build(String xmlContent) {
try {
if(xmlContent != null && !xmlContent.trim().equals("")) {
parseString(xmlContent);
}
} catch(Exception e) {
logger.severe("Error parsing the String " + xmlContent);
e.printStackTrace();
}
}
COM: <s> builds the data object by parsing the given string of xml content </s>
|
funcom_train/2846761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Annotation getAncestorOfType(String type) {
if (getParent() == null)
return null;
else if (AnnotationTypes.match(type, ((Annotation) getParent()).getType()))
return (Annotation) getParent();
else
return ((Annotation) getParent()).getAncestorOfType(type);
}
COM: <s> returns the first ancestor of this which is of the specified type </s>
|
funcom_train/31669047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addListeners() {
if (indVarBox != null)
indVarBox.getTextBox().addCaretListener(new VariableListener());
if (depVarBox != null)
depVarBox.getTextBox().addCaretListener(new VariableListener());
if (autoY != null)
autoY.addItemListener(
new DefaultedComponentListener(yMinBox, yMaxBox));
}
COM: <s> adds the variable listeners to the variable boxes </s>
|
funcom_train/14093269 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEvaluateMatchesString2() {
String leftside = "ABCD";
String rightside = "bc";
int operation = Operator.Operation.MATCH;
boolean ignoreCase = true;
boolean expectedReturn = true;
boolean actualReturn = Operator.evaluate(leftside, rightside, operation,
ignoreCase);
assertEquals("return value", expectedReturn, actualReturn);
}
COM: <s> test match ignore case </s>
|
funcom_train/41048375 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String encrypt(String message, BigInteger key, BigInteger N) {
String encrypted = new String("");
for(int x = 0; x < message.length(); x++)
encrypted += transformValue(BigInteger.valueOf(message.charAt(x)),key,N) + "#";
return encrypted;
}
COM: <s> encrypts the message with the given key </s>
|
funcom_train/3917489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenu createRunMenu() {
JMenu jmenu = add(new JMenu("Run"));
jmenu.setMnemonic('r');
JMenuItem item = new JMenuItem(_startPackage);
jmenu.add(item);
item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F9, 0));
item.setMnemonic('r');
jmenu.addSeparator();
item = new JMenuItem(_resetPackage);
jmenu.add(item);
item.setMnemonic('t');
return jmenu;
}
COM: <s> create the run menu </s>
|
funcom_train/2628412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetValue() {
System.out.println("getValue");
PropertyType instance = new PropertyType();
List expResult = new ArrayList();
/* Test 1 - value = null */
List result = instance.getValue();
assertEquals(expResult, result);
/* Test 2 - value != null */
instance.value = expResult;
result = instance.getValue();
assertEquals(expResult,result);
}
COM: <s> test of get value method of class property type </s>
|
funcom_train/35744120 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void setProtocolAddress(String address) {
if ((null == address) || (0 == address.length())) {
throw new IllegalArgumentException("address must be non-null and contain at least one character");
}
if (-1 != address.indexOf("/")) {
throw new IllegalArgumentException("address may not contain '/' character");
}
protocolAddress = address;
cachedToString = null;
}
COM: <s> set the protocol address </s>
|
funcom_train/2443419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean handleMousePressed(Editor source, MouseEvent evt) {
// For cross-platform reasons we must check for popup-trigger
// for mouse pressed events as well:
if (PopupMenuUtils.isPopupTrigger(evt) && popupRequestHandler != null) {
return popupRequestHandler.popupMenuRequested((Component) evt.getSource(), evt.getX(), evt.getY());
}
return false;
}
COM: <s> the default implementation forwards popup menu triggering code mouse events code to the </s>
|
funcom_train/14596501 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void shutDown() {
StagedEvent event;
try {
while ( (event = eventSource.dequeue(0)) != null) {
handler.handleEvent(event);
}
} catch (StagedEventException sex) {
if (error == null) {
error = sex;
}
}
env.decrementHandlerCount();
}
COM: <s> executes the runners shutdown sequence </s>
|
funcom_train/40463303 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getTargetText() {
if (targetText == null) {//GEN-END:|31-getter|0|31-preInit
// write pre-init user code here
targetText = new TextField("target text", "", 32, TextField.ANY);//GEN-LINE:|31-getter|1|31-postInit
// write post-init user code here
}//GEN-BEGIN:|31-getter|2|
return targetText;
}
COM: <s> returns an initiliazed instance of target text component </s>
|
funcom_train/29618274 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JList getJSynonymUseList() {
if (jSynonymUseList == null) {
jSynonymUseList = new JList();
jSynonymUseList.setFont(MgisLabel.m_font);
CountryListSelectionListener listener = new CountryListSelectionListener(jSynonymUseList);
jSynonymUseList.getSelectionModel().addListSelectionListener(listener);
jSynonymUseList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
}
return jSynonymUseList;
}
COM: <s> this method initializes j synonym use list </s>
|
funcom_train/298485 | /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 ("LitoSOAPPort".equals(portName)) {
setLitoSOAPPortEndpointAddress(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/18107836 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String parse(String inputFilePath) throws ParseContentException{
String result = "";
try{
result = FileUtil.readString(inputFilePath , KIMClientConstants.DEFAULT_ENCODING);
}
catch(IOException e) {
log.error("Error occured in ASCIIParser ", e);
e.printStackTrace();
throw new ParseContentException(e);
}
return result;
}
COM: <s> reads content of ascii file to string </s>
|
funcom_train/18887272 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: final public long getTokenOffset(int index) {
//return (context[0] != 0)
// ? (int) (vtdBuffer.longAt(context[context[0]]) & MASK_TOKEN_OFFSET)
// : (int) (vtdBuffer.longAt(rootIndex) & MASK_TOKEN_OFFSET);
return (int) (vtdBuffer.longAt(index) & MASK_TOKEN_OFFSET);
}
COM: <s> get the starting offset of the token at the given index </s>
|
funcom_train/20005074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteMessage(EventModel em) {
Message message = (Message)em.getModel();
message = getMessage(message.getMessageId());
if (message == null) return;
if(!operateMessageAuthCheck1(message)) {
em.setErrors(Constants.NOPERMISSIONS);
return;
}
super.deleteMessage(em);
}
COM: <s> delete a message </s>
|
funcom_train/11735345 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ItemDefinition getDefinition() throws RepositoryException {
if (definition == null && itemMgr != null) {
if (isNode()) {
definition = itemMgr.getDefinition((NodeState) state);
} else {
definition = itemMgr.getDefinition((PropertyState) state);
}
}
return definition;
}
COM: <s> return the associated item definition </s>
|
funcom_train/12366141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return "The server you're trying to connect to uses the j!com Communication Layer version "
+ serverVersion
+ ", but you run version "
+ Finals.VERSION
+ ".\nThese versions are not compatible. Try to use the same version as the server, either by updating or by using a previous release. You can find this on <http://j-com.sf.net>";
}
COM: <s> returns this exception as string </s>
|
funcom_train/11751993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void validateCurrent() {
if (this.currentRecord > this.objects.size() - 1 || !this.objects.contains(this.current)) {
this.currentRecord = 0;
if (!this.objects.isEmpty()) {
this.current = this.objects.get(this.currentRecord);
}
else {
this.current = null;
}
firePropertyChange(PROP_CURRENT_RECORD, null, this.objects);
}
}
COM: <s> check that the current object is still contained in the element </s>
|
funcom_train/8481098 | /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 ("TestSpringWS".equals(portName)) {
setTestSpringWSEndpointAddress(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/16744111 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean removeAlleleRecent(AmpStatus ampStatus, int minHapLength) {
minHapLength = Math.max(0, minHapLength);
byte hapLenCurr = (byte) getHaplotypeLength(ampStatus);
if (hapLenCurr <= minHapLength) return false;
setHaplotype(ampStatus, getHaplotype(ampStatus, 1));
return setHaplotypeLength(ampStatus, (byte) (hapLenCurr - 1));
}
COM: <s> this removes the most recently added allele to the haplotype </s>
|
funcom_train/1316641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String formatMessage(String message) {
if(message == null) {
message = "";
}
if((lastUpdatedDate+500) < System.currentTimeMillis()) {
lastUpdatedDate = System.currentTimeMillis();
date = new Date();
dateText = dateFormat.format(date);
}
message = message.replaceAll("\t", " ");
return "[" + dateText + "] ["+Thread.currentThread().getName()+"]: " + message;
}
COM: <s> formats a log message </s>
|
funcom_train/28170981 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testToGeneralPath() {
System.out.println("toGeneralPath");
BezierPath instance = new BezierPath();
GeneralPath expResult = null;
GeneralPath result = instance.toGeneralPath();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of to general path method of class org </s>
|
funcom_train/36376379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAutoArchiverTimeRange(String days) {
if (tenantConfigProperties.getProperty(AUTO_ARCHIVER_TIME_RANGE) == null) {
tenantConfigProperties.put(AUTO_ARCHIVER_TIME_RANGE, days);
} else {
tenantConfigProperties.setProperty(AUTO_ARCHIVER_TIME_RANGE, days);
}
}
COM: <s> sets the time range in days for actions that are moved to the </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.