__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/25732093 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createImageElement() {
Document xmlDoc = DomXml.instance().getXmlDoc();
if (e == null) {
e = xmlDoc.createElement("img");
e.setAttribute("md5", md5);
e.setAttribute("filename", source.getAbsolutePath());
((Element) xmlDoc.getChildNodes().item(0)).appendChild(e);
}
}
COM: <s> creates the image element </s>
|
funcom_train/17410379 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JSonStAXReader createReader(InputStream stream, IJSonHandler initialHandler) throws IOException {
if (initialHandler == null) {
throw new IllegalArgumentException("The initial handler cannot be null");
}
JsonParser parser = factory.createJsonParser(stream);
JSonJacksonStAXReader reader = new JSonJacksonStAXReader(parser);
reader.setCurrentHandler(initialHandler);
return reader;
}
COM: <s> this instantiates the reader that uses an event based like system </s>
|
funcom_train/19066694 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ScanListEntry list(int messageindex) throws IOException, POP3Exception {
checkState(TRANSACTION);
POP3Response response;
sendCommand("LIST", new String[] {Integer.toString(messageindex)});
response = readSingleLineResponse();
if( response.isOK() ) {
try {
return ScanListParser.parse( response.getMessage() );
} catch (ParserException e) {
throw new POP3Exception( e.getMessage() );
}
}
throw new POP3Exception(response);
}
COM: <s> sends the list command with a index of a mail as parameter </s>
|
funcom_train/7602182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Panel getPnlOperation() {
if (pnlOperation == null) {
pnlOperation = new Panel();
pnlOperation.setLayout(new BoxLayout(getPnlOperation(), BoxLayout.X_AXIS));
pnlOperation.setMinimumSize(new Dimension(200, 30));
pnlOperation.setPreferredSize(new Dimension(200, 30));
pnlOperation.add(getBtnAppend(), null);
pnlOperation.add(getBtnEnter(), null);
}
return pnlOperation;
}
COM: <s> this method initializes pnl operation </s>
|
funcom_train/24051485 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public H getHelper() {
if (helper == null) {
if (!created) {
throw new IllegalStateException("A call has not been made to onCreate() yet so the helper is null");
} else if (destroyed) {
throw new IllegalStateException(
"A call to onDestroy has already been made and the helper cannot be used after that point");
} else {
throw new IllegalStateException("Helper is null for some unknown reason");
}
} else {
return helper;
}
}
COM: <s> get a helper for this action </s>
|
funcom_train/43245099 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetNOKTwoRelationship() {
System.out.println("getNOKTwoRelationship");
EmergencyContactDG2Object instance = new EmergencyContactDG2Object();
String expResult = "";
String result = instance.getNOKTwoRelationship();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get noktwo relationship method of class org </s>
|
funcom_train/44167005 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NoAddReason getNoAddReason(Locatable locatable) {
if (locatable instanceof Goods) {
// WARNING: Goods can always be added to settlements. Any
// excess Goods will be removed during end-of-turn
// processing. If Units should inherit from GoodsLocation,
// this needs to be changed.
return NoAddReason.NONE;
} else {
return super.getNoAddReason(locatable);
}
}
COM: <s> gets the reason why a given code locatable code can not be </s>
|
funcom_train/34455185 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Configuration getDefaultConfiguration() {
Configuration dCfg = super.getDefaultConfiguration();
dCfg.set("distance","cosine");
dCfg.set("useintrinsic","false");
dCfg.set("aggregation", Aggregation.ClassOnly.toString());
dCfg.set("aggregators","ratio");
return dCfg;
}
COM: <s> get the detault configuration of using a cosine distance function and aggregating </s>
|
funcom_train/18142419 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ImageIcon getImage(boolean checkValid) {
// valid or not ?
if (!checkValid||isValid()) {
if (image==null)
image = getMetaProperty().getImage();
return image;
}
// not valid
if (imageErr==null)
imageErr = getMetaProperty().getImage("err");
return imageErr;
}
COM: <s> returns the image which is associated with this property </s>
|
funcom_train/48400935 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void startAcceptingClientsTo(final NetEngineServer srv, final int maxClients) {
_status.setStatus("Accepting new clients\n");
_maxClients = maxClients;
_serv = srv;
if (_th_acceptor != null) {
return;
}
_stopAccepting = false;
_th_acceptor = new Thread(this);
_th_acceptor.start();
}//End of start()
COM: <s> starts the accept thread and adds them to the specified server </s>
|
funcom_train/367143 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printComponent(Graphics g) {
boolean wasHighQuality = m_highQuality;
try {
// Set the quality to high for the duration of the printing.
m_highQuality = true;
// Paint directly to the print graphics context.
paintDisplay((Graphics2D) g, getSize());
} finally {
// Reset the quality to the state it was in before printing.
m_highQuality = wasHighQuality;
}
} //
COM: <s> paints the graph to the provided graphics context for output to a </s>
|
funcom_train/35716182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void formatSlave(final IFormattingContext context, final IDocument document, final int offset, final int length, final String type) {
final IFormattingStrategyExtension strategy= (IFormattingStrategyExtension)fSlaves.get(type);
if (strategy != null) {
context.setProperty(FormattingContextProperties.CONTEXT_PARTITION, new TypedPosition(offset, length, type));
strategy.formatterStarts(context);
strategy.format();
strategy.formatterStops();
}
}
COM: <s> formats the document specified in the formatting context with the </s>
|
funcom_train/12923518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLineStyle(final LineStyle1 style) {
int index;
if (lineStyles.contains(style)) {
index = lineStyles.indexOf(style);
} else {
index = lineStyles.size();
lineStyles.add(style.copy());
}
lineWidth = style.getWidth();
objects.add(new ShapeStyle().setLineStyle(index + 1));
}
COM: <s> set the style used to draw lines </s>
|
funcom_train/4463165 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean checkPropertyCausingTransitionA(OWLProperty prop) {
if (prop instanceof OWLDataProperty || this.isLinkProperty(prop)) {
if (checkState(prop, STATE_O2)) {
return true;
}
}
else {
// prop is an ObjectProperty
if (checkState(prop, STATE_L21) || checkState(prop, STATE_O2)) {
return true;
}
}
return false;
}
COM: <s> a type of check to see if property causes transition </s>
|
funcom_train/32057776 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCreateTemporaryContextViewsWP() {
System.out.println("testCreateTemporaryContextViewsWP");
JGraph graph = new JGraph();
Object[] obj = new Object[5];
GraphContext context = new GraphContext(graph, obj);
Set cellSet = DefaultGraphModel.getDescendants(graph.getModel(), obj);
assertEquals("createTemporaryContextViewsWP failed", context
.createTemporaryContextViews(cellSet) != null, true);
}
COM: <s> this function tests create temporary context view wp function of graph context </s>
|
funcom_train/42516703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void advanceAll() {
timerMap.advanceState();
for (SampleAdvancer adv : registryStore.values()) {
try{
adv.advanceState();
}catch(NullPointerException ex){
throw new RuntimeException("NPE when processing "+adv.getInstanceName()+"/"+adv.getAbstractName());
}
}
timerMap.advanceOutput();
for (SampleAdvancer adv : registryStore.values()) {
adv.advanceOutput();
}
}
COM: <s> advance all registered objects first the internal state of all then </s>
|
funcom_train/2914967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getPreferredContentType(HttpServletRequest request, String serverVariants, String defaultVariant) {
this.request = request;
// decode accept
String sAccept = getStringForHeaders("Accept");
acceptContent = convertAcceptToArray(sAccept, DEL_CONTENT);
return getPreferredContentType(serverVariants, defaultVariant);
}
COM: <s> provides the preferred content type from accept header br </s>
|
funcom_train/49325613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void editContactAction() {
try {
logger.info("inside edit contact");
currentAddress = currentContact.getAddresses().get(0);
CategoryBean categoryBean = (CategoryBean) FacesUtil
.getManagedBean("categoryBean");
currentContact.populateUnselectedCategories(categoryBean
.getCategoryList());
setShowButton(SHOWBUTTON_UPDATE);
BeanUtil.getFileUploadBean().processFile(currentContact.getImage());
} catch (Exception e) {
logger.error("Error in editing contact", e);
}
}
COM: <s> action for editing action </s>
|
funcom_train/15747050 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void applyLocallyAndsentConflictingSetRecord(SetRecord toConflict) {
LinkedList<IRecord> records = new LinkedList<IRecord>();
SetRecord setRecord = new SetRecord(toConflict.getTarget(),
toConflict.getVersion());
// let's apply the conflict locally, too, to ensure a same version
setRecord.apply(document);
records.add(setRecord);
commitRecords(records);
}
COM: <s> this method sends a set record to all peers that conflicts with the </s>
|
funcom_train/18491923 | /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 ("AnaXagoraIntegrationService".equals(portName)) {
setAnaXagoraIntegrationServiceEndpointAddress(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/42899150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void disassociateAddress(String publicIp) throws EC2Exception {
Map<String, String> params = new HashMap<String, String>();
params.put("PublicIp", publicIp);
HttpGet method = new HttpGet();
DisassociateAddressResponse response =
makeRequestInt(method, "DisassociateAddress", params, DisassociateAddressResponse.class);
if (!response.isReturn()) {
throw new EC2Exception("Could not disassociate address with instance (no reason given).");
}
}
COM: <s> disassociates an address with an instance </s>
|
funcom_train/36259591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public VersionNumber highestVersionNumber(final String bundleType) {
VersionNumber version = null;
for (final VersionNumber aVersion : releases.keySet()) {
if ((version == null || aVersion.compareTo(version) > 0) && getBundleUrl(aVersion, bundleType) != null) {
version = aVersion;
}
}
return version;
}
COM: <s> get the highest version number available for a bundle type </s>
|
funcom_train/34139238 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void onDigitTyped(String digit, boolean announce) {
if (DELETE.equals(digit)) {
mFeedback.playSound(SOUND_RESOURCE_DELETED);
mFeedback.vibrate(VIBRATE_PATTERN_DELETED);
deleteNumber();
} else {
mDialedNumber = mDialedNumber + digit;
mFeedback.playSound(SOUND_RESOURCE_TYPED);
mFeedback.vibrate(VIBRATE_PATTERN_TYPED);
if (announce) {
speakDigit(digit, TextToSpeech.QUEUE_FLUSH, 100);
}
}
mPreviousValue = "";
invalidate();
}
COM: <s> called when a digit is typed </s>
|
funcom_train/49633610 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasPoint(Key key) throws NBTreeException {
try {
if (_tree.find(key) != null) {
return true;
} else {
return false;
}
} catch (IOException e) {
throw new NBTreeException("Error: Could not complete the request. Possible reason: " + e.toString());
}
}
COM: <s> method that checks if the tree has the given key object </s>
|
funcom_train/3107969 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateUploadSlots(int used, int total) {
StringBuffer str = new StringBuffer();
str.append("Used upload Slots : ").append(used).append(" / ").append(
total);
uploadSlotsText = str.toString();
if (downloadSlotsText != null) {
lblStatus1.setText(downloadSlotsText + " " + uploadSlotsText);
}
}
COM: <s> update the upload slots information label </s>
|
funcom_train/41509323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPartControl(Composite parent) {
viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL
| SWT.BORDER);
viewer.setContentProvider(new ViewContentProvider());
viewer.setLabelProvider(new ViewLabelProvider());
viewer.setInput(createDummyModel());
}
COM: <s> callback that will allow us to create the viewer and initialize it </s>
|
funcom_train/3375198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Font getFont() {
AccessibleContext ac = getCurrentAccessibleContext();
if (ac instanceof AccessibleComponent) {
return ((AccessibleComponent) ac).getFont();
} else {
Component c = getCurrentComponent();
if (c != null) {
return c.getFont();
} else {
return null;
}
}
}
COM: <s> gets the code font code of this object </s>
|
funcom_train/16959641 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int readBytes(byte[] b, int offs, int len) throws BitstreamException {
int totalBytesRead = 0;
try {
while (len > 0) {
int bytesread = source.read(b, offs, len);
if (bytesread == -1) {
break;
}
totalBytesRead += bytesread;
offs += bytesread;
len -= bytesread;
}
} catch (IOException ex) {
throw newBitstreamException(STREAM_ERROR, ex);
}
return totalBytesRead;
}
COM: <s> simlar to read fully but doesnt throw exception when eof is reached </s>
|
funcom_train/18504582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean setFocusToPreviousControl(){
Control control = getFocusedControl();
int index = controls.indexOf(control);
boolean focuseableControlFound = false;
Control controltmp = null;
while (index > 0 && !focuseableControlFound){
index--;
controltmp=(Control) controls.get(index);
focuseableControlFound = (controltmp.isFocusable());
}
if (!focuseableControlFound && goFirstToLast){
index = controls.size();
while (index > 0 && !focuseableControlFound){
index--;
controltmp=(Control) controls.get(index);
focuseableControlFound = (controltmp.isFocusable());
}
}
if (focuseableControlFound){
focusedControl=(Control) controltmp;
}
return focuseableControlFound;
}
COM: <s> set focus to the previous control </s>
|
funcom_train/19036353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addPostWatch(PID pid) {
if(isConnected()) {
try {
synchronized(this) {
this.getOutputStream().writeInt(ClientMessageCode.ADDPOSTWATCH.getIndex());
pid.sendData(this.getOutputStream());
this.getOutputStream().flush();
}
} catch (IOException e) {
this.messageFailed(e);
}
}
}
COM: <s> adds a post watch to the members account </s>
|
funcom_train/136126 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private HeatMap getCustomHeatMap() {
if (custom_heatmap == null) {
// Bottom color is not quite same as background, so it remains visible
Color bottom_color = HeatMap.interpolateColor(getBackground(), getForeground(), 0.20f);
custom_heatmap = HeatMap.makeLinearHeatmap("Custom", bottom_color, getForeground());
}
return custom_heatmap;
}
COM: <s> returns a heat map that interpolates between colors based on get color </s>
|
funcom_train/46720562 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ASTMethodDeclaration shallowCopy() {
ASTMethodDeclaration copy = new ASTMethodDeclaration(this.parser, this.id);
copy.jjtSetParent( jjtGetParent() );
for (int i=0; i < jjtGetNumChildren(); i++) {
copy.jjtAddChild(jjtGetChild(i), i);
}
return copy;
}
COM: <s> copies this astmethod declaration and leaves the children pointers alone </s>
|
funcom_train/5341442 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCellEditable(EventObject event) {
if (event instanceof MouseEvent) {
MouseEvent me = (MouseEvent)event;
LimeJTable table = (LimeJTable)_libraryTable.getTable();
return me.getClickCount() == 1 && table.isPointSelected(me.getPoint());
} else {
return event == EVENT;
}
}
COM: <s> returns a value determining whether or not the </s>
|
funcom_train/23866976 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SelectItem getDecember() {
final Locale locale = JsfExpressionUtil.evaluateExpressionGet("#{userSettingsBean.locale}", Locale.class);
final CodeDescription december = new CodeDescription(Month.DECEMBER.getCode(), Month.DECEMBER.getDescription(locale));
return new SelectItem(december, december.getDescription());
}
COM: <s> gets the month december as a single select item </s>
|
funcom_train/4918058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConflictingParameterShortName() throws Exception {
this.record_Factory("one", "optionA", "o", true);
this.record_Factory("two", "optionB", "o", false);
try {
this.doTest("");
fail("Should not parse");
} catch (IllegalStateException ex) {
assertEquals("Incorrect cause",
"Conflict in parameter 'o' requiring value",
ex.getMessage());
}
}
COM: <s> ensure not initialise if difference across commands for a parameter by </s>
|
funcom_train/4458056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String exactQuery(String name, boolean exact) {
if (exact)
return "='" + name.toLowerCase().replaceAll("'", "''") + "'";
else
return " LIKE '%" + name.toLowerCase().replaceAll("'", "''") + "%'";
}
COM: <s> returns a query for exact non exact phrases </s>
|
funcom_train/41444600 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeEvent(StatEvent eventSelected) {
for (Iterator iter = getSubFeatureEvent().iterator(); iter.hasNext();) {
EventSubFeature subFeature = (EventSubFeature) iter.next();
for (Iterator iterator = subFeature.getEventTypes().iterator(); iterator.hasNext();) {
EventType type = (EventType) iterator.next();
type.getEvents().remove(eventSelected);
}
}
}
COM: <s> remove the event from the catalog in memory </s>
|
funcom_train/47184597 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean doesFamilyMemberHaveHighCholesterol(FamilyMemberBean member) throws iTrustException {
List<HealthRecord> records = hrDAO.getAllHealthRecords(member.getMid());
if(records.size() == 0)
return false;
for(HealthRecord record : records) {
if(record.getCholesterolHDL() < 35 || record.getCholesterolLDL() > 250 )
return true;
}
return false;
}
COM: <s> checks to see if a particular family member has high cholesterol </s>
|
funcom_train/21960898 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getJPanel(), java.awt.BorderLayout.NORTH);
jContentPane.add(getJPanel2(), java.awt.BorderLayout.SOUTH);
jContentPane.add(getJPanel3(), java.awt.BorderLayout.CENTER);
}
return jContentPane;
}
COM: <s> this method initializes j content pane </s>
|
funcom_train/22718323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void remove() {
System.out.println("Removing command [" + sql.trim().substring(0, sql.indexOf(commandTerminator + commandTerminator.length())) + "]");
sql = sql.trim().substring(sql.indexOf(commandTerminator + commandTerminator.length()));
}
COM: <s> removes the last element returned by this iterator </s>
|
funcom_train/25072241 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initializeCurrentSchema(Attributes attributes) {
Integer schemaId = new Integer(Integer.parseInt(attributes.getValue("id")));
currentSchema = this.app.getSchemaById(schemaId.intValue());
this.form.getTable().addSchemaId(schemaId);
}
COM: <s> initializes the current code schema code being read in the application </s>
|
funcom_train/23894341 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
// using an Array it auto sync the map
String[] keys = getKeys().toArray(new String[0]);
StringBuffer str = new StringBuffer(this.getClass().getName() + "[");
int kl=keys.length-1;
int kc=0;
for (String key: keys) {
str.append(key).append(":").append(this.get(key));
if ((kc++) < kl) str.append(", ");
}
str.append("]");
return str.toString();
}
COM: <s> converts this catalog to a string </s>
|
funcom_train/26483966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Column findColumn(String fullName) {
Column col = getReport().findColumn(fullName);
if (col == null && !missingColumnSeen) {
missingColumnSeen = true;
ErrorHandler.error(I18N.get("ReportReader.the_column")
+ ' ' + fullName + ' '
+ I18N.get("ReportReader.column_unknown"));
}
return col;
}
COM: <s> returns the column identified by its name </s>
|
funcom_train/47037365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setModelId(String modelId) throws CoreException {
BundleDescription newModel = getModel(modelId);
if (newModel == null) {
String message = NLS.bind(Messages.exception_missingElement, modelId);
throw new CoreException(new Status(IStatus.ERROR, PI_PDEBUILD, EXCEPTION_ELEMENT_MISSING, message, null));
}
setModel(newModel);
}
COM: <s> sets model to generate scripts from </s>
|
funcom_train/20483242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long getLatestChangeSequenceNumber() {
long latestChangeNumber = 0;
if (changes.size() > 0) {
ChangeCapsule cp = changeReader.getChange(changes.get(changes.size()-1)); //access the last existing change capsule
latestChangeNumber = cp.getSequence();
}
return latestChangeNumber;
}
COM: <s> returns the sequence number of the newest change in the manager </s>
|
funcom_train/9143504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addRelation(TypesOfRelation type, String caller, String called) {
String toPutCaller = caller;
if (caller.length() != 1) {
toPutCaller = this.translator.translateBytecodeToJavaPattern(caller);
}
String toPutCalled = this.translator.translateBytecodeToJavaPattern(called);
this.design.addRelation(type, toPutCaller, toPutCalled);
}
COM: <s> adds a new code relation code on the code design code </s>
|
funcom_train/42201015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void scoreMatch(ScheduleItem match) {
// init vars
SecondTime tm = new SecondTime(match.getTime());
Map<SecondTime, ScheduleItem> schedule = getSchedule();
Iterator<Integer> it = match.getTeams().iterator();
Team team;
match.setStatus(ScheduleItem.COMPLETE);
// update schedule
synchronized (schedule) {
schedule.put(tm, match);
}
// update team scores
while (it.hasNext()) {
team = get(it.next());
if (team != null) {
team.getMatches().put(tm, match);
team.validate();
}
}
firstRank();
}
COM: <s> scores a match </s>
|
funcom_train/47746006 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void makeActions() {
clearAct = new Action() {
public void run() {
new File(Activator.getAppPath() + "/wormLog.txt").delete();
textSign.setText("");
System.out.println(new File(Activator.getAppPath()
+ "/wormLog.txt").exists());
}
};
clearAct.setText("Clear");
clearAct.setToolTipText("Clear History Log");
clearAct.setImageDescriptor(IconImg.clearIco);
}
COM: <s> make the actions that available on the main view </s>
|
funcom_train/37566122 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object nextElement() {
Object obj = null;
//
// Go through Enumerations until we find one with
// a nextElement() to return. (Or until we run out.)
//
for (; curEnum < enumerations.length; curEnum++) {
if (enumerations[curEnum].hasMoreElements()) {
obj = enumerations[curEnum].nextElement();
if (obj != null) {
break;
}
}
}
return obj;
}
COM: <s> exhaust the objects we can receive from the </s>
|
funcom_train/10050182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean store() {
boolean dirty = false;
for (ITextValue value : this.entryList) {
if (value.store()) {
dirty = true;
}
}
if (this.updateListeners != null) {
for (IPropertyUpdateListener listener:this.updateListeners) {
dirty = listener.store() || dirty;
}
}
return dirty;
}
COM: <s> saves the contents of all associated swt widgets to the properties </s>
|
funcom_train/28233145 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void mouseClicked(MouseEvent e) {
JEditorPane editor = (JEditorPane) e.getSource();
if (! editor.isEditable() && SwingUtilities.isLeftMouseButton(e)) {
Point pt = new Point(e.getX(), e.getY());
int pos = editor.viewToModel(pt);
if (pos >= 0) {
activateLink(pos, editor, e.getX(), e.getY());
}
}
}
COM: <s> called for a mouse click event </s>
|
funcom_train/17201747 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void computeHandlerLiveSet() {
if (ir.getHandlerLivenessComputed() && currentBlock.hasExceptionHandlers()) {
BasicBlockEnumeration e = currentBlock.getExceptionalOut();
while (e.hasMoreElements()) {
ExceptionHandlerBasicBlock handlerBlock = (ExceptionHandlerBasicBlock) e.next();
handlerLiveSet.add(handlerBlock.getLiveSet());
}
}
}
COM: <s> determine the set of variables live on entry to any handler </s>
|
funcom_train/9543563 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getCoordinate(int x) {
if (x < 60)
return 1;
if (x > width - 60)
return coord_x.length;
int abstand = Math.abs(coord_x[0] - x);
int abstand2;
for (int i = 1; i < coord_x.length; i++) {
abstand2 = Math.abs(coord_x[i] - x);
if (abstand2 > abstand) {
return i;
}
abstand = abstand2;
}
return coord_x.length;
}
COM: <s> gets the coordinate of the x coordinate </s>
|
funcom_train/7531757 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void noResultsFound(GUID guid) {
// get the requesting host
Thread thread = (Thread)mWaiter.get(guid);
if (thread == null) {
Constants.LOGGER.config("["+guid.toString()+"]: Unsolicited lookup message found for search results (noResultsFound)!");
} else {
// reply with not found message
Constants.LOGGER.fine("["+guid.toString()+"]: Return no results for lookup request.");
synchronized(thread) {
thread.notifyAll();
}
}
}
COM: <s> invoked when a search resulted in no results </s>
|
funcom_train/45692204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSongNumberOriginalPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Song_songNumberOriginal_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Song_songNumberOriginal_feature", "_UI_Song_type"),
EsxPackage.Literals.SONG__SONG_NUMBER_ORIGINAL,
false,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the song number original feature </s>
|
funcom_train/12560963 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void checkLeftBtn(LcduiTestCanvas canvas, Command cmd) {
display.setCurrent(canvas);
if (!canvas.awaitPaint()) {
fail("test canvas not visible");
return;
}
assertSame("Checking left button:", cmd, window.getSoftOne());
}
COM: <s> utility method that checks that the left soft button is indeed the </s>
|
funcom_train/44843937 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAll(Collection triplePatterns) {
Iterator iter = triplePatterns.iterator();
while (iter.hasNext()) {
Object o = iter.next();
if (o instanceof PathExpression) {
add( (PathExpression)o );
}
else if (o instanceof BooleanExpr) {
addConstraint( (BooleanExpr)o );
}
else {
throw new IllegalArgumentException(
"object in collection is not of type PathExpression or BooleanExpr but: " + o.getClass());
}
}
}
COM: <s> adds a collection of path expression objects to this object </s>
|
funcom_train/42381897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() {
if (this.hosts != null) {
// If we're using a bdb bigmap, the call to clear will
// close down the bdb database.
this.hosts.clear();
this.hosts = null;
}
if (this.servers != null) {
this.servers.clear();
this.servers = null;
}
}
COM: <s> called when shutting down the cache so we can do clean up </s>
|
funcom_train/9162248 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWidget(Query query, QueryWidget widget) {
// Add to the lookup
if ( m_queryWidgetMap.get(query) == null ) {
m_queryWidgetMap.put(query, new HashSet<QueryWidget>());
}
m_queryWidgetMap.get(query).add(widget);
// Also add to the reverse lookup
m_queryLookupMap.put(widget, query);
}
COM: <s> add a query widget to the store </s>
|
funcom_train/19679835 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addSongToAlbum(final Long pMemberId,final Long pAlbumId,final Long pSongId){
int nRowsUpdated = getMusicsTemplate().update(ADD_SONG_TO_ALBUM,
new PreparedStatementSetter() {
public void setValues(PreparedStatement preparedStatement)
throws SQLException {
preparedStatement.setLong(1, pAlbumId);
preparedStatement.setLong(2, pSongId);
preparedStatement.setLong(3, pMemberId);
}
});
return nRowsUpdated == 1;
}
COM: <s> note anyone can add any song to any album irrespective of album state </s>
|
funcom_train/11783314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SetsList listSets(ResumptionToken resumptionToken) throws OAIException {
try {
String query = builder.buildListSetsQuery(resumptionToken);
Document document = reader.read(query);
return new SetsList(document);
} catch (ErrorResponseException e) {
throw e;
} catch (Exception e) {
throw new OAIException(e);
}
}
COM: <s> list next set of sets not returned in the previous response from </s>
|
funcom_train/4193832 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addHeadersAfter(String str, String refer_header)
{ if (!hasHeader(refer_header)) addHeaders(str,false);
else
{ SipParser par=new SipParser(message);
par.goTo(refer_header);
int here=par.indexOfNextHeader();
message=message.substring(0,here)+str+message.substring(here);
}
}
COM: <s> adds headers after the first header i refer header i </s>
|
funcom_train/1803980 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Type getSubscriptionType() {
for (Category category : getCategories()) {
if (YouTubeNamespace.SUBSCRIPTIONTYPE_SCHEME.equals(
category.getScheme())) {
Type type = Type.fromTerm(category.getTerm());
if (type != null) {
return type;
}
}
}
return null;
}
COM: <s> gets the type of the subscription if it is of a known type </s>
|
funcom_train/18289163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRightOne() {
testEditor.setText("hello world");
testEditor.setCaretPosition(6);
//test bold button
//start with empty editor, then attempt with text in editor.
testALS[11][0].actionPerformed(null);
assertEquals(testEditor.getText(),"hello \\begin{flushright}"
+ "\r\n" + "\r\n" + "\\end{flushright}world");
}
COM: <s> test right alignment with text in editor no selection </s>
|
funcom_train/8774705 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void upD(Roster roster) {
jList1.setModel(new DefaultListModel());
Collection<RosterEntry> entries = roster.getEntries();
for (RosterEntry entry : entries) {
listmodel.addElement(entry.getUser() + " -~- " + roster.getPresence(entry.getUser()));
}
jList1.setModel(listmodel);
}
COM: <s> updates the list of contacts when its called </s>
|
funcom_train/12169058 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMigrateDirectory() throws Exception {
String resourcePath = "/fileResourceSetMigratorDir";
String[] paths = {
"fileResourceSetMigratorDir/file1.txt",
"fileResourceSetMigratorDir/file2.txt",
"fileResourceSetMigratorDir/subdir1/file3.txt",
"fileResourceSetMigratorDir/subdir1/subdir2/file4.txt"
};
doTestFileResource(resourcePath, paths);
}
COM: <s> test migration of a simple directory structure </s>
|
funcom_train/10522814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetUserWithObj4() throws Exception {
ResultsTestCtrl.CustomerWrapper cw = new ResultsTestCtrl.CustomerWrapper();
cw.c = new ResultsTestCtrl.CustomerInput2();
cw.c.userid = 22;
String c = testCtrl.getSomeUser(cw);
assertEquals("tester2", c);
}
COM: <s> param sub from nested object </s>
|
funcom_train/9373504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setRetryCount(int count) {
mRetryCount = count;
if (mRetryCount > mMaxRetryCount) {
mRetryCount = mMaxRetryCount;
}
if (mRetryCount < 0) {
mRetryCount = 0;
}
mRetryForever = false;
if (DBG) log("setRetryCount: " + mRetryCount);
}
COM: <s> set retry count to the specified value </s>
|
funcom_train/563871 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addAttributePolling(final AttributeImpl attr) throws DevFailed {
removeAttributePolling(attr);
final AttributeCache cache = new AttributeCache(MANAGER, attr, deviceName, deviceLock);
if (attr.getPollingPeriod() == 0) {
extTrigAttributeCacheMap.put(attr, cache);
} else {
attributeCacheMap.put(attr, cache);
}
updatePoolConf();
}
COM: <s> add attribute as polled </s>
|
funcom_train/21611809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testParseDeclarationNumber() throws MUParserException {
ParseTree pt = parser.parse("declaration", "var=12.3");
System.out.println("parse tree: " + pt);
checkParsing(pt, "variable", "=", "numeric");
}
COM: <s> parses a declaration on a numeric value </s>
|
funcom_train/14451329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SQLCondition filterIn(final String name, final Collection<? extends Serializable> values) {
if (values.isEmpty()) {
return new SQLCondition("1=0");
}
final StringBuilder sb = new StringBuilder(quote(name));
sb.append(" IN (");
for (int i = 0; i < values.size(); ++i) {
sb.append("?,");
}
sb.setLength(sb.length() - 1);
sb.append(')');
return new SQLCondition(sb.toString(), new ArrayList<Serializable>(values));
}
COM: <s> creates a condition representing name in values </s>
|
funcom_train/50757513 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector2d getMiddle() {
Vector2d middle = new Vector2d();
double endAng = this.endAng;
double middleAng = (startAng + endAng) / 2;
double middleX = center.x() + Math.cos(middleAng) * radius;
double middleY = center.y() + Math.sin(middleAng) * radius;
middle.set(middleX, middleY);
return middle;
}
COM: <s> returns the middle of the represented part of the track </s>
|
funcom_train/10256017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int indexOf(Object o) {
if (o == null) {
for (int i = 0; i < elementCount; i++) {
if (elementData[i] == null) {
return i;
}
}
return -1;
}
for (int i = 0; i < elementCount; i++) {
if (o.equals(elementData[i])) {
return i;
}
}
return -1;
}
COM: <s> returns the index of given object or 1 if not found </s>
|
funcom_train/16528051 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createReadTextButton() {
readTextButton = new JButton(makeReadTextAction());
CommonUI.makeButtonTransparent(readTextButton);
readTextButton.setIcon(speakActiveIcon);
readTextButton.setDisabledIcon(speakRolloverIcon);
readTextButton.setRolloverIcon(speakRolloverIcon);
readTextButton.setToolTipText("Read Text");
readTextButton.setEnabled(true);
}
COM: <s> instantiates read text button and add action listeners </s>
|
funcom_train/10889247 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stop() throws Exception {
if (servicedSocket == null) {
return; // not running
}
ListenerThread t = listenerThread;
if (t != null) {
t.shutdown();
}
synchronized (workers) {
for (Iterator<Worker> it = workers.iterator(); it.hasNext(); ) {
Worker worker = it.next();
worker.shutdown();
}
}
}
COM: <s> stops this test server </s>
|
funcom_train/37034677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() throws LifecycleException {
Container container = getContainer();
Cluster cluster = null;
if(container != null)
cluster = container.getCluster();
if(cluster != null) {
this.clusterSender = cluster.getClusterSender(getName());
this.clusterReceiver = cluster.getClusterReceiver(getName());
}
super.start();
}
COM: <s> start this manager </s>
|
funcom_train/3595918 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeHighlighted(final int type, NTextElement el) {
Predicate isAlignStyleP = new Predicate() { //make static predicates?
public boolean valid(Object o) {
return ((Style)o).getName().startsWith(highlighting_stylenames[type]);
}
};
removeStyleFromChain(el, isAlignStyleP);
//clear the set
highlights[type].remove(el);
}
COM: <s> remove the highlights from the given element for the given highlighting type </s>
|
funcom_train/31151845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean checkCmdHistory(short cmd, short tnOption) {
boolean[] history;
history = (cmd == WILL) ? willHistory : doHistory;
int c;
switch (tnOption) {
case BINARY:
c = 0;
break;
case OPT_EOR:
c = 1;
break;
default:
c = 2;
break;
}
if (history[c]) {
return (true);
}
history[c] = true;
return (false);
}
COM: <s> prevents endless request response loops as outlined in rfc 854 </s>
|
funcom_train/31339283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() {
fServerJob.cancel();
try {
if (fSocket != null)
fSocket.close();
} catch (IOException e) {
if (Activator.getDefault() != null)
Activator.getDefault().logError(e.getMessage(), e);
}
}
COM: <s> stop the application server </s>
|
funcom_train/19107198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void save(File pFile) {
try {
FileOutputStream fos = new FileOutputStream(pFile);
XMLOutputter outp = new XMLOutputter(Format.getPrettyFormat());
outp.output(mDocument, fos);
fos.close();
}
catch (Exception e) {
e.printStackTrace();
}
}
COM: <s> save in a file </s>
|
funcom_train/37841655 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeHandle(Object objectHandle) {
List currentList = null;;
Object currentObj = null;
Iterator iter = handleMap.keySet().iterator();
while(iter.hasNext()) {
currentList = (List)handleMap.get(iter.next());
if(currentList.size() > 0) {
Iterator iter2 = currentList.iterator();
while(iter2.hasNext()) {
currentObj = iter2.next();
if(currentObj.equals(objectHandle)) {
currentList.remove(objectHandle);
break;
}
}
}
}
}
COM: <s> description removes every reference to object handle from this handle manager </s>
|
funcom_train/45764209 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void cleanup( TestParameters Param, PrintWriter log) {
log.println("closing HyperlinkDialog");
try {
if (accCloseButton != null) {
accCloseButton.doAccessibleAction(0);
}
} catch(com.sun.star.lang.IndexOutOfBoundsException e) {
e.printStackTrace(log);
}
log.println("disposing xTextDoc");
if (xTextDoc != null) {
xTextDoc.dispose();
}
}
COM: <s> closes the hyperlink dialog </s>
|
funcom_train/38306745 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void registerTagAlias(String tagName, String alias) throws TagInstantiationException {
TagBuilder builder = (TagBuilder) tagTypes.get(tagName);
if (builder == null) {
throw new TagInstantiationException(null, "Unknown tag '" + tagName + "'.");
}
tagTypes.put(alias, new AliasTagBuilder(alias, builder));
}
COM: <s> registers an alias for the given document tag </s>
|
funcom_train/12813195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String getImageEnclosedConstraint(String prefix, double ra, double dec, double size_ra ) {
return "boxenclosed(" + ra + "," + dec + "," + size_ra + ", " + prefix + "pos_ra_csa," + prefix + "pos_dec_csa, " + prefix + "size_alpha_csa,"+ prefix + "size_delta_csa)";
}
COM: <s> the candidate image is entirely enclosed by the roi </s>
|
funcom_train/18479286 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCurrentView(CanvasPaneFrame h) {
if (current_view != h) {
CanvasPaneFrame old = current_view ;
current_view = h ;
for(Cell val: holders) {
val.frame.select(val.frame == h) ;
}
pcs.firePropertyChange("CurrentView",old,current_view) ;
}
}
COM: <s> sets the current canvas view </s>
|
funcom_train/4231073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void union(Node a, Node b) {
Node set1 = find(a);
Node set2 = find(b);
if (set1 != set2) {
// Limits the worst case runtime of a find to O(log N)
if (set1.getSize() < set2.getSize()) {
set2.setParent(set1);
set1.setSize(set1.getSize() + set2.getSize());
} else {
set1.setParent(set2);
set2.setSize(set1.getSize() + set2.getSize());
}
}
}
COM: <s> unifies the sets code a code and code b code in constant time </s>
|
funcom_train/2288606 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setContentAge(long contentAge) {
if (contentAge < 0) {
String ageString = Long.toString(contentAge);
throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_BAD_CONTENT_AGE_1, ageString));
}
m_contentAge = contentAge;
}
COM: <s> sets the timestamp to limit the resources to be exported by date </s>
|
funcom_train/8693259 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List getQNames() {
List answer = new ArrayList();
answer.addAll(noNamespaceCache.values());
for (Iterator it = namespaceCache.values().iterator(); it.hasNext();) {
Map map = (Map) it.next();
answer.addAll(map.values());
}
return answer;
}
COM: <s> returns a list of all the qname instances currently used </s>
|
funcom_train/4125296 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getBonusMultiplier() {
int multiplier = 0;
switch (getTypeOfSettlement()) {
case INDIAN_CAMP:
multiplier = 1;
break;
case INDIAN_VILLAGE:
multiplier = 2;
break;
case AZTEC_CITY:
case INCA_CITY:
multiplier = 3;
break;
default:
// No modifier.
}
if (isCapital()) {
multiplier++;
}
return multiplier;
}
COM: <s> get general bonus multiplier </s>
|
funcom_train/23348368 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(Stack inStack) throws ParseException {
// check the stack
checkStack(inStack);
// get the parameter from the stack
Object param = inStack.pop();
// check whether the argument is of the right type
if (param instanceof Double) {
// calculate the result
double r = ((Double)param).doubleValue() / 2;
// push the result on the inStack
inStack.push(new Double(r));
} else {
throw new ParseException("Invalid parameter type");
}
}
COM: <s> runs the square root operation on the in stack </s>
|
funcom_train/29579799 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Element getTarget(Document dom) {
Element service = (Element)dom.getElementsByTagNameNS(WSDL_NS, "service").item(0);
if (service == null) {
return null;
}
Element target = (Element)service.getElementsByTagNameNS(WSDL_NS, "port").item(0);
return target;
}
COM: <s> gets the target element from a wsdl file </s>
|
funcom_train/47588432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void removeCalendar() {
if (calendars.getSelectedValue() == null)
return;
int ask = JOptionPane.showConfirmDialog(this,
"This will delete the selected calendar from the list\n"
+ "of calendars monitored by the daemon. Continue?",
"Confirmation", JOptionPane.YES_NO_OPTION);
if (ask == JOptionPane.YES_OPTION) {
ManagedCalendar current = (ManagedCalendar) calendars
.getSelectedValue();
model.removeElement(current);
daemon.getCalendars().remove(current);
}
}
COM: <s> removes the selected calendar </s>
|
funcom_train/50738620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void service(HttpServletRequest httpRequest, HttpServletResponse response) throws ServletException, IOException {
log.info("service() - handling request for dyna graphic");
Request request = HttpRequestConverter.convertRequest(httpRequest);
manager.service(null, this, request, response);
}
COM: <s> process the http get request </s>
|
funcom_train/23271358 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireCategoryItemClickEvent(CategoryItemClickEvent event) {
Object[] listeners = this.listeners.getListeners(
CategoryItemClickListener.class);
for (int i = listeners.length - 1; i >= 0; i -= 1) {
((CategoryItemClickListener) listeners[i]).onCategoryItemClick(
event);
}
}
COM: <s> fires a category item click event </s>
|
funcom_train/31031280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearForm() {
txtPwuser.setText("");
txtPwuser.setEnabled(true);
pwdPWword.setText("");
pwdPWword.setEnabled(true);
txtUsername.setText("");
txtUsername.setEnabled(true);
pwdConfirmPassword.setText("");
pwdConfirmPassword.setEnabled(true);
/* Unset field values */
pwuser = null;
pwword = null;
username = null;
btnSubmit.setText("Create");
this.setTitle("Create a user");
this.mode = ValueConstants.CREATE_MODE;
btnSubmit.setVisible(true);
btnSubmit.setEnabled(false);
btnDelete.setVisible(false);
chkCreatePword.setSelected(false);
lblStatus.setText("");
setLabelColorToBlack();
}
COM: <s> this method clears all the fields of pword </s>
|
funcom_train/18460721 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testConstant_3() {
Vector elements = new Vector();
Term element = new Term(1, "+I", 1, '*');
elements.add(element);
String formula = getFormula(elements);
int i = Integer.parseInt(formula.substring(5));
assertTrue(i > 0);
}
COM: <s> the placeholder is expected to be replaced by a positive integer </s>
|
funcom_train/36828188 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void incrementWordCount(String word) {
if (wordMap.containsKey(word)) {
Integer count = (Integer) wordMap.get(word);
int newCount = count.intValue() + 1;
count = new Integer(newCount);
wordMap.put(word, count);
}
else {
wordMap.put(word, new Integer(1));
}
}
COM: <s> increments the counter for the word passed in </s>
|
funcom_train/51813524 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JobResult getJobResult(long wait) throws InterruptedException {
log.debug( "wait="+wait );
if ( fifo.size() == 0 )
return null;
// set computation is over this is the last job result
if ( fifo.size() == 1 )
computationIsOver();
JobResult ret = (JobResult)fifo.remove( 0 );
log.debug( "returning the job result "+ret.getId() );
return ret;
}
COM: <s> get the next job result </s>
|
funcom_train/4640978 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPointLight(String name, Point3 center, Color color) {
sunflow.parameter("center", center);
sunflow.parameter("power", colorSpace, color.getRed()/(float)255, color.getGreen()/(float)255, color.getBlue()/(float)255);
sunflow.light( name, this.LIGHT_POINT );
}
COM: <s> sets point light </s>
|
funcom_train/7709854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public class SASGetCapabilitiesWriter extends AbstractRequestWriter<GetCapabilitiesRequest>
{
@Override
public String buildURLQuery(GetCapabilitiesRequest query) throws OWSException
{
StringBuffer urlBuff = new StringBuffer(query.getGetServer());
urlBuff.append("service=" + query.getService());
urlBuff.append("&version=" + query.getVersion());
urlBuff.append("&request=" + query.getOperation());
COM: <s> p b title b br </s>
|