__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/45209695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getCancelButton() {
if (cancelButton == null) {
cancelButton = new JButton();
cancelButton.setName("cancelButton");
cancelButton.setText("Cancel");
cancelButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().equals (cancelButton.getText())) {
System.exit(0);
}
}
});
}
return cancelButton;
}
COM: <s> return the cancel button property value </s>
|
funcom_train/8096852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Filter getFilter(int attType) {
RemoveType af = new RemoveType();
try {
af.setAttributeType(new SelectedTag(attType,
RemoveType.TAGS_ATTRIBUTETYPE));
} catch (Exception ex) {
ex.printStackTrace();
fail("Couldn't set up filter with attribute type: " + attType);
}
return af;
}
COM: <s> creates a specialized remove type </s>
|
funcom_train/9026714 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void validate(ConnectivityProperty instance) {
if (!instance.isValid()) {
errorMessage = instance.getStatusMessage();
} else {
errorMessage = ""; //$NON-NLS-1$
}
errorLabel.setText(errorMessage);
errorLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT);
}
COM: <s> validate the property set and put an appropriate error message up </s>
|
funcom_train/8037780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTotalCash() {
int i;
int size;
size = cStore.getStoreSize();
CashStoreItem item;
int qty;
int val;
int tc = 0;
Coin c;
for (i = 0; i < size; i++) {
item = (CashStoreItem) cStore.getStoreItem(i);
qty = item.getQuantity();
c = (Coin) item.getContent();
val = c.getValue();
tc = tc + qty * val;
}
return tc;
}
COM: <s> this operation returns the total cash held in the cash store </s>
|
funcom_train/2904660 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAllModuleCredits(){
StringBuffer buff = new StringBuffer(2048);
Iterator modules = majorMTable.values().iterator();
if(modules != null){
while(modules.hasNext()){
JXMajorModule major = (JXMajorModule)modules.next();
buff = buff.append(major.getCredits());
}
}
modules = minorMTable.values().iterator();
if(modules != null){
while(modules.hasNext()){
JXMinorModule minor = (JXMinorModule)modules.next();
buff = buff.append(minor.getCredits());
}
}
return buff.toString();
}
COM: <s> get all credit information for all major and minor modules </s>
|
funcom_train/20351073 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSubmissionTime(final double clockTime) {
if (clockTime < 0.0 || index < 0) {
return;
}
final Resource res = resList.get(index);
res.submissionTime = clockTime;
if (record) {
write( "Sets the submission time to " + num.format(clockTime) );
}
}
COM: <s> sets the submission or arrival time of this cloudlet into a cloud resource </s>
|
funcom_train/33517140 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public HRegion getMetaRegion(HRegionInfo metaInfo) throws IOException {
HRegion meta = metaRegions.get(metaInfo.getRegionName());
if (meta == null) {
meta = openMetaRegion(metaInfo);
LOG.info("OPENING META " + meta.toString());
this.metaRegions.put(metaInfo.getRegionName(), meta);
}
return meta;
}
COM: <s> open or return cached opened meta region </s>
|
funcom_train/5854401 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addActionListeners() {
buttonAssemble.addActionListener(this);
getStepButton().addActionListener(this);
getStopButton().addActionListener(this);
getRunButton().addActionListener(this);
buttonBinHex.addActionListener(this);
speedScroll.addAdjustmentListener(this);
}
COM: <s> add action listeners </s>
|
funcom_train/35713114 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void doContentTypeElement(XSComplexTypeDefinition xsctd, CIBean bean) {
short derivationMethod = xsctd.getDerivationMethod();
switch (derivationMethod) {
case XSConstants.DERIVATION_EXTENSION:
doPropertyAttributes(xsctd, bean);
doPropertyElements(xsctd, bean);
break;
case XSConstants.DERIVATION_RESTRICTION:
doPropertyAttributes(xsctd, bean);
doPropertyElements(xsctd, bean);
break;
default:
throw new ApplicationException(
String.format(
"Complex type definitions [%s] with derivations other than Extension/Restriction not yet supported for CIBean",
xsctd));
}
}
COM: <s> handling content type element </s>
|
funcom_train/43556486 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addWorkItem(RoutableWorkItem<String> workItem) {
try {
workItem.setStatus(-1, null); // Set status to WORK_CREATED
pendingTests.get(((Test)workItem.getResult()).os).put(workItem);
} catch (InterruptedException e) {
Thread.interrupted();
e.printStackTrace();
}
}
COM: <s> adds a work item to specified oss pending queue </s>
|
funcom_train/10584885 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void readProperties() throws IOException {
// create and load default properties
File propertiesFile = new File(getConfigurationUri(), LDAP_PROPERTIES_FILE);
if (defaultProperties == null) {
defaultProperties = new Properties();
FileInputStream in = null;
try {
in = new FileInputStream(propertiesFile);
defaultProperties.load(in);
} finally {
if (in != null) {
in.close();
}
}
}
}
COM: <s> read the properties </s>
|
funcom_train/46760207 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ScriptModel getScriptByRef(final Long scriptRefId, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
ScriptModel criteria = new ScriptModel();
criteria.setScriptRef(new DisplayModel(scriptRefId));
return BaseData.getReference().getFirstSearchResult(criteria, call);
}}; return (ScriptModel) call(method, call);
}
COM: <s> get the script for the specified reference </s>
|
funcom_train/11105895 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getMessage(String key, Locale locale) {
ResourceBundle rb = getBundle(locale);
try {
return rb.getString(key);
} catch (MissingResourceException e) {
if (log().isWarnEnabled()) {
log().warn("Key " + key + " was not found in resource bundle '" +
getName() + "' for locale '" + locale + "'");
}
return null;
}
}
COM: <s> p retrieve the specified message string for the specified locale </s>
|
funcom_train/26663671 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String makeQPD_Q22(String query, String domain) {
StringBuffer sb = new StringBuffer("QPD|IHE PDQ Query|");
sb.append((++queryTag)).append('|').append(query);
if( domain!=null ) sb.append("|||||^^^").append(domain);
return sb.toString();
}
COM: <s> make the query assuming the string is already formatted for hl7 pdq query </s>
|
funcom_train/26020335 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Uri addGroupChatTermination(List<String> participants, String sessionId){
String contacts = "";
for(String contact : participants){
contacts += contact+";";
}
return addMessage(EventsLogApi.TYPE_GROUP_CHAT_SYSTEM_MESSAGE, sessionId, null, contacts, null, InstantMessage.MIME_TYPE, null, 0, new Date(), EventsLogApi.STATUS_TERMINATED);
}
COM: <s> a group chat session was stopped </s>
|
funcom_train/8484163 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void reAlloc() {
// allocate the new array
ATSymbol[] newVarNames = new ATSymbol[free_ * 2];
// copy old content into new array
System.arraycopy(varNames_, 0, newVarNames, 0, free_);
// throw away the old array and replace it by the new one
varNames_ = newVarNames;
}
COM: <s> doubles the size of the map to make room for extra fields </s>
|
funcom_train/35848219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testPropertySet() {
if (box == null) {
return; // Inconclusive
}
boolean selected = box.isSelected();
Model.getCoreHelper().setStatic(elem, !selected);
Model.getPump().flushModelEvents();
assertEquals(!selected, box.isSelected());
}
COM: <s> tests whether a change in the modelelement is reflected in the checkbox </s>
|
funcom_train/31672653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public static AIAdapter ai_move = new AIAdapter() {
public String getID() { return "ai_move";}
public void ai(edict_t self, float dist) {
M.M_walkmove(self, self.s.angles[Defines.YAW], dist);
}
};
COM: <s> move the specified distance at current facing </s>
|
funcom_train/15621008 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String curColNameForBa(BaseAttribute ba) throws M4CompilerError {
if (ba == null)
return null;
edu.udo.cs.miningmart.m4.Column column = null;
try {
column = ba.getCurrentColumn();
}
catch (M4Exception e) {
throw new M4CompilerError(
"UnionByKey: Could not get current column of BaseAttribute '"
+ ba.getName() + "'!\n" + e.getMessage());
}
return (column == null ? null : column.getName());
}
COM: <s> helper method returning the name of the current column for a base attribute </s>
|
funcom_train/9019291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Size2D arrangeNN(BlockContainer container, Canvas g2) {
List blocks = container.getBlocks();
Block b = (Block) blocks.get(0);
Size2D s = b.arrange(g2, RectangleConstraint.NONE);
b.setBounds(new Rectangle2D.Double(0.0, 0.0, s.width, s.height));
return new Size2D(s.width, s.height);
}
COM: <s> arranges the blocks without any constraints </s>
|
funcom_train/3437649 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void close() throws IOException {
if (isClosed) {
return;
}
if (debug) {
System.out.println("StartTLS: replacing SSL " +
"streams with originals");
}
// Replace SSL streams with the original streams
ldapConnection.replaceStreams(
originalInputStream, originalOutputStream);
if (debug) {
System.out.println("StartTLS: closing SSL Socket");
}
sslSocket.close();
isClosed = true;
}
COM: <s> closes the tls connection gracefully and reverts back to the underlying </s>
|
funcom_train/24463334 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean typesAreCompatible(Class<?> classA, Class<?> superClass) {
if ((!classA.isPrimitive()) && (!superClass.isPrimitive())) {
return superClass.isAssignableFrom(classA);
}
return (classA.getSimpleName().equals(classA.getSimpleName()));
}
COM: <s> are the specified compatible </s>
|
funcom_train/19216713 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer renderItem(RssItem item) {
StringBuffer buffer = new StringBuffer();
this.renderChannelHead(item.getSource(), buffer);
this.renderChannelItem(item.getSource(), item, 0, 1, buffer);
this.renderChannelBottom(item.getSource(), buffer);
return buffer;
}
COM: <s> returns the content of the given item </s>
|
funcom_train/13210897 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected int getClientIdOfMessage(String msg) {
StringTokenizer st=new StringTokenizer(msg, ConstantValue.NETWORK_SEPARATE);
String lastPart="";
while (st.hasMoreTokens()) {
lastPart=st.nextToken();
}
int id = HGBaseTools.toInt(lastPart);
if (id==HGBaseTools.INVALID) return -1;
else return id;
}
COM: <s> returns the client id in the given message or 1 </s>
|
funcom_train/34448743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addObjectIDPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ObjectChange_objectID_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ObjectChange_objectID_feature", "_UI_ObjectChange_type"),
TracesPackage.Literals.OBJECT_CHANGE__OBJECT_ID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the object id feature </s>
|
funcom_train/39528915 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildShadeActions() {
ShadingMenuBuilder builder = new ShadingMenuBuilder() {
protected Action buildAction(int shadingCode, String mdc) {
return new ShadeAction(shadingCode, mdc,
MDCDisplayerAppliWorkflow.this);
}
};
shadeActions = builder.buildShadeActions();
ShadingMenuBuilder builder2 = new ShadingMenuBuilder() {
protected Action buildAction(int shadingCode, String mdc) {
return new ShadeSignAction(shadingCode, mdc,
MDCDisplayerAppliWorkflow.this);
}
};
shadeSignActions = builder2.buildShadeActions();
}
COM: <s> build actions for shading </s>
|
funcom_train/7272613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isSendableVersion() {
Version myVersion;
Version lastVersion;
try {
myVersion = new Version(LimeWireUtils.getLimeWireVersion());
lastVersion = new Version(BugSettings.LAST_ACCEPTABLE_VERSION.getValue());
} catch(VersionFormatException vfe) {
return false;
}
return myVersion.compareTo(lastVersion) >= 0;
}
COM: <s> determines if were allowed to send a bug report </s>
|
funcom_train/41664716 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void includeRequiredProperties() {
PropertiesConfig propertiesConfig = getConceptConfig()
.getPropertiesConfig();
for (PropertyConfig propertyConfig : propertiesConfig) {
if (!propertyConfig.isReference() && propertyConfig.isRequired()) {
PropertyView propertyView = new PropertyView(this,
propertyConfig.getCode());
if (!isDisplayPropertyIfNull()) {
propertyView.setDisplayIfNull(false);
}
}
}
}
COM: <s> includes required properties </s>
|
funcom_train/4757065 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean negativeOrNull() {
if (isNaN()) {
field.setIEEEFlagsBits(DfpField.FLAG_INVALID);
dotrap(DfpField.FLAG_INVALID, LESS_THAN_TRAP, this, newInstance(getZero()));
return false;
}
return (sign < 0) || ((mant[mant.length - 1] == 0) && !isInfinite());
}
COM: <s> check if instance is less than or equal to 0 </s>
|
funcom_train/45758089 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean resizeDocument() {
Rectangle newPosSize = xWin.getPosSize();
newPosSize.Width = newPosSize.Width - 20;
newPosSize.Height = newPosSize.Height - 20;
newPosSize.X = newPosSize.X + 80;
newPosSize.Y = newPosSize.Y + 80;
return resizeDocument(newPosSize);
}
COM: <s> resize the window in defined steps </s>
|
funcom_train/23867318 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean doesZipCodeOfCountryExistsForCountry() {
try {
ZipCodeOfCountry.valueOf(country);
return true;
} catch (final IllegalArgumentException exception) {
LOGGER.log(Level.WARNING, this.getClass().getName() + ": does not support the country:" + country);
return false;
}
}
COM: <s> determines whether a zip code of country exists for the country of this </s>
|
funcom_train/12546843 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Automaton createEmptyAutomaton(Document document) {
Map e2t = elementsToText(document.getDocumentElement());
String s = (String) e2t.get(TURING_TAPES_NAME);
if (s == null)
s = "1";
try {
int tapes = Integer.parseInt(s);
if (tapes < 1 || tapes > 5)
throw new DataException(tapes
+ " invalid # of tapes. Valid # of tapes 1-5.");
return new TuringMachine(tapes);
} catch (NumberFormatException e) {
throw new DataException("Error reading " + s
+ " as number of tapes.");
}
}
COM: <s> creates and returns an empty turing machine </s>
|
funcom_train/4831273 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Message replyMessage(String topic, String body , Message ancestor){
//Message tMsg = new Message(topic, body, ancestor, this);
Message tMsg = new Message(topic, body, ancestor, this);
ancestor.addChild(tMsg);
TBClogger.info(this.getUsername() + " has replied to message number: "+ ancestor.getId()+
"\n new message number "+ tMsg.getId()+", topic: "+topic+" , body: "+body);
return tMsg;
}
COM: <s> reply message to message in tbcforum </s>
|
funcom_train/35683173 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void handleXJBParameters(final CoxbGenJaxbOtionsDialog dialog) {
try {
initRootElements(getXsdFile());
dialogChanged();
} catch (CoreException e) {
errorDialog(getShell(), Messages.generate_error_dialog_title,
Activator.PLUGIN_ID,
Messages.page_initialization_failure_msg, e.getMessage());
}
}
COM: <s> when jaxb xjb parameters have been changed we need to reload the class </s>
|
funcom_train/29690283 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object stringToValue(String string) throws java.text.ParseException {
if (string == null)
return null;
matcher.reset(string); // set 'string' as the matcher's input
if (!matcher.matches()) // Does 'string' match the regular expression?
throw new java.text.ParseException("does not match regex", 0);
// If we get this far, then it did match.
return super.stringToValue(string);
// will honor the 'valueClass' property
}
COM: <s> if the string matches the regex than the string is returned otherwise an </s>
|
funcom_train/45469092 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isIdentity(final ClassMapping cm, final FieldMapping fm) {
String[] ids = cm.getIdentity();
String fieldName = fm.getName();
for (int j = 0; j < ids.length; j++) {
if (ids[j].equalsIgnoreCase(fieldName)) { return true; }
}
return false;
}
COM: <s> check if given field mapping is an identity at given class mapping </s>
|
funcom_train/24513531 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Action createHorizontalScrollAction() {
String actionName = getUIString(HORIZONTALSCROLL_ACTION_COMMAND);
BoundAction action = new BoundAction(actionName,
HORIZONTALSCROLL_ACTION_COMMAND);
action.setStateAction();
action.registerCallback(this, "setHorizontalScrollEnabled");
action.setSelected(isHorizontalScrollEnabled());
return action;
}
COM: <s> creates an action for horizontal scrolling </s>
|
funcom_train/46293400 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RecordHeader writeRecord(Long id, RecordData recordData) throws IOException {
lock.writeLock().lock();
try {
RecordHeader recordHeader = rawLogFile.write(id, recordData.docType, recordData.docBytes, recordData.otherType, recordData.otherBytes);
add(recordHeader);
return recordHeader;
} finally {
lock.writeLock().unlock();
}
}
COM: <s> writes the record to the log file </s>
|
funcom_train/29954471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValues(ParamObject obj) {
values = ((ValueParamObject)obj).getValues();
for (int i=0; i<fields.size(); i++) fields.get(i).setText(values.get(i));
jTextFieldComment.setText(obj.getComment());
}
COM: <s> sets and displays the values conatined in the object given as parameter </s>
|
funcom_train/7292094 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setupValueMap_map(short offset, short count) {
valueMap_map = new short[count];
for (int i=0; i<count; ++i) {
// Start of each entry. Each entry is 6 bytes long.
valueMap_map[i] = (short) (offset + i * 6);
}
}
COM: <s> the value map map must be setup in advance </s>
|
funcom_train/20733581 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteTaskTimeReports(long tasksEntryId) {
try {
List<TasksEntryTimeReport> entries = tasksEntryTimeReportPersistence.findByTasksEntryId(tasksEntryId, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
for (TasksEntryTimeReport timeReport : entries) {
deleteTasksEntryTimeReport(timeReport);
}
} catch (SystemException e) {
LOG.error(e);
}
}
COM: <s> delete time reports for specified task </s>
|
funcom_train/48423004 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String toEncodedString(Properties args) {
StringBuffer buf = new StringBuffer();
Enumeration names = args.propertyNames();
while (names.hasMoreElements()) {
String name = (String)names.nextElement();
String value = args.getProperty(name);
buf.append(URLEncoder.encode(name) + "=" + URLEncoder.encode(value));
if (names.hasMoreElements())
buf.append("&");
}
return buf.toString();
}
COM: <s> converts a properties list to a url encoded query string </s>
|
funcom_train/24239650 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void showStudentUI(){
Backend.s.loadData(); // Load all of the data for the current student
if(Backend.s.agreedToLicense){ // If the student hasn't already agreed to the license
showStudentWriteUp(); // Show the student an interface that allows them to enter their grad write up
}else{
showLicense(); // Show the license
}
}
COM: <s> show the student user interface </s>
|
funcom_train/13345861 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void clearCache() {
/*
* since we are synchronizing on this object, we have to clear it rather
* than just dump it.
*/
classMethodMaps.clear();
/*
* for speed, we can just make a new one and let the old one be GC'd
*/
cachedClassNames = new HashSet();
}
COM: <s> clears the classmap and classname caches </s>
|
funcom_train/42089336 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addFinalPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SpecCode_final_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_SpecCode_final_feature", "_UI_SpecCode_type"),
DecModelPackage.Literals.SPEC_CODE__FINAL,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the final feature </s>
|
funcom_train/24185921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void parseInput(String input) {
input = input.trim();
String[] parts = input.split(" ");
if(parts[0].equals("controller")) {
/// @todo The controller's port should be parameterizable
registerController(new TCPAddress(parts[1], Controller.PORT));
} else if(parts[0].equals("exit")) {
this.exit();
done = true;
}
else {
tellUser("The command \"" + input + "\" is not recognized!");
}
}
COM: <s> a simple function that looks at the input and determines what to </s>
|
funcom_train/16165353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addSubfolderChildren() {
this.removeAllChildren();
File file = this.getFileObject();
File[] subFiles = file.listFiles();
if (subFiles != null) {
Arrays.sort(subFiles);
for (File f : subFiles) {
if (f.isDirectory() && f.canRead()) {
this.add(new FileNode(f));
}
}
}
}
COM: <s> removes all children from this node and adds all the readable </s>
|
funcom_train/42226055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getVoltarAboutCommand() {
if (voltarAboutCommand == null) {//GEN-END:|98-getter|0|98-preInit
// write pre-init user code here
voltarAboutCommand = new Command("Voltar", Command.BACK, 0);//GEN-LINE:|98-getter|1|98-postInit
// write post-init user code here
}//GEN-BEGIN:|98-getter|2|
return voltarAboutCommand;
}
COM: <s> returns an initiliazed instance of voltar about command component </s>
|
funcom_train/43345453 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void broadcastProgress(int percent, int bytesRead, String filename) {
log.debug("Broadcasting progress [ " + percent + "% ] for file " + filename);
ProgressEvent event = new ProgressEvent(this, 0, percent, bytesRead, filename);
mModerator.fireEvent(event);
}
COM: <s> this method will send a progress event out to the world notifying </s>
|
funcom_train/18071177 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getLoadABoxMenuItem() {
if (loadABoxMenuItem == null) {
loadABoxMenuItem = new JMenuItem();
loadABoxMenuItem.setText("Load ABox");
loadABoxMenuItem
.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
loadABox();
}
});
}
return loadABoxMenuItem;
}
COM: <s> this method initializes load abox menu item </s>
|
funcom_train/37072019 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private StringBuffer highlightPureText(String body_text) {
KeywordTokenizer tokenizer = getKeywordTokenizer();
tokenizer.tokenize(body_text);
StringBuffer highlightedBuffer = new StringBuffer();
while (tokenizer.hasNext()) {
String nextToken = tokenizer.next();
if (isKeyword(nextToken)) {
highlightedBuffer.append(fontify(nextToken, getKeywordColor(nextToken)));
} else {
highlightedBuffer.append(nextToken);
}
}
return highlightedBuffer;
}
COM: <s> colorizes text by keywords </s>
|
funcom_train/34579304 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setMenu(String selected){
// Removes current menu.
removeMenu(false);
//Creates new MenuOptions JPanel.
active_menu = new MenuOptions(
JFlightWizard.create_menu.create(
Data.getMenu(selected).toArray()));
// Sets the new MenuOptions JPanel as current active_menu in the Data object.
Data.setActiveMenu(active_menu);
//Adds the AddOn buttons panels if exist .
addButtonsPanels();
// places the new MenuOptions JPanel.
update();
}
COM: <s> creates a menu options panel with the returned array of the create menu </s>
|
funcom_train/18165946 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean updateNthProperty(IMutableCDData m, int n, String value) {
Iterator<String> it = m.getMetaDataNames();
String s = "";
int x = 0;
while(x <= n) {
if (!it.hasNext()) {
return false;
}
s = it.next();
x++;
}
// update
m.setMetaData(s, value);
return true;
}
COM: <s> update the nth property using the ordering imposed by </s>
|
funcom_train/31529343 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireManagedObjectAdded(Object pObject, String id) {
Iterator _listeners = listeners.iterator();
while(_listeners.hasNext()) {
((DCContainerListener)_listeners.next()).managedObjectAdded(
new DCContainerEvent(this, DCContainerEvent.COMPONENT_ADDED, pObject, id, -1));
}
}
COM: <s> fire object added event </s>
|
funcom_train/15407902 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isCacheNotify() {
if (isBeanCaching() || isQueryCaching()) {
return true;
}
for (int i = 0; i < propertiesOneImported.length; i++) {
if (propertiesOneImported[i].getTargetDescriptor().isBeanCaching()) {
return true;
}
}
return false;
}
COM: <s> return true if the persist request needs to notify the cache </s>
|
funcom_train/18653160 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String selectAlgo() {
return (String)JOptionPane.showInputDialog(
gograph,
"Please select the algorithm you want to execute :",
"Select algorithm",
JOptionPane.PLAIN_MESSAGE,
null,
gograph.getAlgoActionMap().keys(),
null);
}
COM: <s> select an algorithm for execution </s>
|
funcom_train/20283653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadProperties(String path) {
this.clear();
// Application properties
loadProperties(path, "build.properties", prefs);
// Any node properties
File nodeFile = new File(path + "instances" + fs + node + ".properties");
if (nodeFile.exists()) {
loadProperties(path + "instances" + fs, node + ".properties", nodePrefs);
}
}
COM: <s> constructor for the application prefs object </s>
|
funcom_train/4745307 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TerminatingInstanceDescription stopInstance(String instanceId) {
// initialize the interface
Jec2 ec2 = new Jec2(getCredentials().getAwsAccessKeyId(),
getCredentials().getSecretAccessKey());
try {
return ec2.terminateInstances(new String[] { instanceId }).get(0);
} catch (Exception ex) {
Logger logger = Logger.getLogger(this.getClass().getName());
logger.log(Level.SEVERE, "Terminating instance failed: "
+ ex.getMessage());
return null;
}
}
COM: <s> stop a specific ami instance </s>
|
funcom_train/42068184 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addLanguagePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ChunkDataListTypeLabeledText_language_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ChunkDataListTypeLabeledText_language_feature", "_UI_ChunkDataListTypeLabeledText_type"),
WavPackage.Literals.CHUNK_DATA_LIST_TYPE_LABELED_TEXT__LANGUAGE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the language feature </s>
|
funcom_train/20062362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Connection connect() throws DatabaseException {
Connection conn;
try {
Class.forName("org.sqlite.JDBC");
} catch (ClassNotFoundException e) {
System.out.println("CLASS NOT FOUND!");
throw new DatabaseException(e.getMessage());
}
String dbPath = "jdbc:sqlite:" + dbfile.getAbsolutePath();
try {
conn = DriverManager.getConnection(dbPath);
return conn;
} catch (SQLException e) {
throw new DatabaseException(e);
}
}
COM: <s> connect to the database </s>
|
funcom_train/2034862 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean shouldBeHighlighted() {
if (!settings.isCompareMode())
return false;
if (view.getCurrentlySelectedNode() == null)
return false;
// Do not allow the selected node itself to be highlighted, too:
if (view.getCurrentlySelectedNode() == this.getNodeModel())
return false;
return this.getNodeModel().equalsNode(view.getCurrentlySelectedNode());
}
COM: <s> whether this node should be highlighted or not </s>
|
funcom_train/34451333 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addAssignExpressionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(), getResourceLocator(),
getString("_UI_MAssignAction_assignExpression_feature"),
getString("_UI_PropertyDescriptor_description",
"_UI_MAssignAction_assignExpression_feature",
"_UI_MAssignAction_type"),
M3ActionsPackage.Literals.MASSIGN_ACTION__ASSIGN_EXPRESSION,
true, true, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null, null));
}
COM: <s> this adds a property descriptor for the assign expression feature </s>
|
funcom_train/17386629 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void error(Error e) {
Enumeration<ErrorPlugin> enumeration = errorPlugins.elements();
while (enumeration.hasMoreElements()) {
ErrorPlugin plugin = (ErrorPlugin) enumeration.nextElement();
((ErrorCallback) plugin.getCallback()).error(e, plugin.getData());
}
}
COM: <s> this is called if there is an error </s>
|
funcom_train/11014387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSheetName(int sheetnum, String sheetname) {
checkSheets(sheetnum);
// YK: Mimic Excel and silently truncate sheet names longer than 31 characters
if(sheetname.length() > 31) sheetname = sheetname.substring(0, 31);
BoundSheetRecord sheet = boundsheets.get(sheetnum);
sheet.setSheetname(sheetname);
}
COM: <s> sets the name for a given sheet </s>
|
funcom_train/17789204 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItemSair() {
if (jMenuItemSair == null) {
jMenuItemSair = new JMenuItem();
jMenuItemSair.setText("Sair");
jMenuItemSair.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.exit(0);
}
});
}
return jMenuItemSair;
}
COM: <s> this method initializes j menu item sair </s>
|
funcom_train/21656220 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getBtFechaFirmaContrato() {
if (btFechaFirmaContrato == null) {
btFechaFirmaContrato = new JButton();
btFechaFirmaContrato.setBounds(new Rectangle(315, 360, 40, 25));
btFechaFirmaContrato.setText("...");
btFechaFirmaContrato.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
seleccionarFechaFirmaContrato();
}
});
}
return btFechaFirmaContrato;
}
COM: <s> this method initializes bt fecha firma contrato </s>
|
funcom_train/42089038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
// Make the robot green.
this.setColors(new Color(0, 110, 0), new Color(0, 110, 0), new Color(0, 110, 0));
this.enemyEnergy = 100.0;
this.dEnemyEnergy = 0.0;
while (true) {
turnRight(10.0);
}
}
COM: <s> creates a robot that will rotate its body constantly </s>
|
funcom_train/12652362 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testNotAnswered() {
Diagnosis diagnosis = new Diagnosis();
diagnosis.getValueHistory().setValue(ANATOMIC_SITE, LEFT_BREAST);
PatientHistory patientHistory = new PatientHistory();
patientHistory.getDiagnoses().add(diagnosis);
BooleanCriterion booleanCriterion = new BooleanCriterion();
booleanCriterion.setCharacteristicCode(INFLAMMATORY);
// Inverting a not-answered result would usually imply PASS, but not for inflammatory
booleanCriterion.setInvert(true);
assert FAIL.equals(new InflammatoryBooleanMatchable(booleanCriterion).matchDescriptive(patientHistory))
: "Unanswered diagnosis passed inverted criterion";
}
COM: <s> test if diagnosis available but inflammatory is not </s>
|
funcom_train/8087879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(double d) throws Exception {
if((m_heap[0].index+1)>(m_heap.length-1))
throw new Exception("the number of elements cannot exceed the "+
"initially set maximum limit");
m_heap[0].index++;
m_heap[m_heap[0].index] = new MyHeapElement(d);
upheap();
}
COM: <s> adds the distance value to the heap </s>
|
funcom_train/7929152 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String retrieveRV( StringBuffer buffer ) {
int len = buffer.length();
if ( buffer.length() > 3)
{
if ( isVowel(buffer.charAt( 0 )) && isVowel(buffer.charAt( 1 ))) {
return buffer.substring(3,len);
}
else
{
int pos = 0;
for (int c = 1; c < len; c++) {
if (isVowel( buffer.charAt( c )))
{
pos = c;
break;
}
}
if ( pos+1 < len )
return buffer.substring( pos+1, len );
else
return null;
}
}
else
return null;
}
COM: <s> retrieve the rv zone from a buffer an return the corresponding string br </s>
|
funcom_train/20342072 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getBackCommand1() {
if (backCommand1 == null) {//GEN-END:|12-getter|0|12-preInit
// write pre-init user code here
backCommand1 = new Command("Back", Command.BACK, 2);//GEN-LINE:|12-getter|1|12-postInit
// write post-init user code here
}//GEN-BEGIN:|12-getter|2|
return backCommand1;
}
COM: <s> returns an initiliazed instance of back command1 component </s>
|
funcom_train/49469279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newMonthCell(Date date) throws Exception{
// Create a cell and put a date value in it.
HSSFCell cell = createCell();
cell.setCellType(HSSFCell.CELL_TYPE_NUMERIC);
// we style the cell as a month
HSSFCellStyle style = getMonthCellStyle();
style.setFont(getNormalFont());
cell.setCellStyle(style);
if(date == null)
cell.setCellValue("");
else{
if(tz == null){
cell.setCellValue(date);
}
else{
cell.setCellValue(DateHelper.getCalendarAtTimeZone(date, tz));
}
}
}
COM: <s> create a cell with a month </s>
|
funcom_train/22950082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NeuronLayer createLayer(int neuronsNumber, LayerType layerType, int neuronId, int biasNumber,IActivationFunction activationFunction) throws Exception{
NeuronLayer newLayer = new NeuronLayer(neuronsNumber, layerType, neuronId, biasNumber, activationFunction);
this.neuronId += neuronsNumber + biasNumber;
return newLayer;
}
COM: <s> creates a neuron layer of specific property </s>
|
funcom_train/3111138 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Box getStoredTool(String top, boolean create) {
if (tools.containsKey(top)) {
return (Box) tools.get(top);
} else if (create) {
Box newTool = Box.createHorizontalBox();
tools.put(top, newTool);
if (toolNo != 0) {
complete.addSeparator();
}
complete.add(newTool);
toolNo++;
return newTool;
}
return null;
}
COM: <s> used to retreive a stored toolbar </s>
|
funcom_train/16514557 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void nodeStoreResult(Object result, INode node) {
if (result instanceof IXPathContainer) {
/* set this node variable */
node.addVariable((IXPathContainer) result);
} else
throw new RuntimeException("Cannot insert an "
+ result.getClass().getName() + " object in a node.");
}
COM: <s> store a result ixpath container in a node </s>
|
funcom_train/17208916 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTextField1() {
if (jTextField1 == null) {
jTextField1 = new JTextField(14);
jTextField1.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
int key = e.getKeyCode();
if (key == KeyEvent.VK_ENTER) {
commit.doClick();
} else if (key == KeyEvent.VK_ESCAPE) {
cancel.doClick();
}
}
});
}
return jTextField1;
}
COM: <s> this method initializes j text field1 </s>
|
funcom_train/46332301 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireChangeEvent(ChangeEvent ce) {
Object[] listeners = itsListeners.getListenerList();
for (int i = 0; i < listeners.length; i += 2) {
if (listeners[i] == ChangeListener.class) {
((ChangeListener) listeners[i + 1]).stateChanged(ce);
}
}
}
COM: <s> fire event to notify all listeners that our selection has changed </s>
|
funcom_train/22277426 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setEnabled(boolean value) {
if (value == enabled) {
return;
}
enabled = value;
if (active && enabled) {
addParts();
} else if (!enabled) {
removeParts();
} else {
return;
}
setDirty(true);
if(scrollBarOwner != null) {
if(enabled)
scrollBarOwner.scrollBarWasEnabled(this);
else
scrollBarOwner.scrollBarWasDisabled(this);
}
}
COM: <s> enables or disables the scroll bar and its constituent parts </s>
|
funcom_train/28120124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getJTextFieldLeftTime() {
jTextFieldLeftTime.setText(BUNDLE.getString("RegresiveCounter.remainingTime"));
jTextFieldLeftTime.setEditable(false);
jToolTip = new JToolTip();
jToolTip.setTipText(BUNDLE.getString("RegresiveCounter.remainingTime.tooltip"));
jToolTip.setComponent(jTextFieldLeftTime);
return jTextFieldLeftTime;
}
COM: <s> this method initializes j text field left time </s>
|
funcom_train/3156957 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RasterDataNode getRasterDataNode(String name) {
RasterDataNode rasterDataNode = getBand(name);
if (rasterDataNode != null) {
return rasterDataNode;
}
rasterDataNode = getTiePointGrid(name);
if (rasterDataNode != null) {
return rasterDataNode;
}
return null;
}
COM: <s> gets the raster data node with the given name </s>
|
funcom_train/26533084 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setPlotLinePaint(Paint paint) {
// check arguments...
if (paint==null) {
throw new IllegalArgumentException
("RadarPlot.setPlotPaint(...): "
+"null paint not allowed.");
}
// make the change...
if (!this.plotLinePaint.equals(paint)) {
this.plotLinePaint = paint;
notifyListeners(new PlotChangeEvent(this));
}
}
COM: <s> sets the plot line paint </s>
|
funcom_train/7277171 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean isIndivisible(String currKey) {
//the license-type is always indivisible.
//note that for weed licenses, this works because getKeyWordsIndivisible
//is returning a list of only 'WeedInfo.LAINFO'. the content-id & version-id
//are essentially lost & ignored.
return currKey.endsWith(XML_LICENSE_TYPE_ATTRIBUTE);
}
COM: <s> determines if this keyword value is indivisible </s>
|
funcom_train/31363523 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Vector getValues() {
Vector rVector = new Vector();
rVector.add (new Long(lMachineID));
rVector.add (strName);
rVector.add (strDescription);
rVector.add (strNote);
rVector.add (strNDSName);
rVector.add (strUNC);
rVector.add (strIPName);
return rVector;
}
COM: <s> returns a vector of values for all the cfg machine fields </s>
|
funcom_train/19435583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCoordinates(Point3d[] coordinates) {
GeometryInfo geometryInfo = new GeometryInfo(GeometryInfo.QUAD_ARRAY);
geometryInfo.setCoordinates(coordinates);
_normalGenerator.generateNormals(geometryInfo);
_stripifier.stripify(geometryInfo);
if (_first) {
setGeometry(geometryInfo.getGeometryArray());
_first = false;
}
else {
addGeometry(geometryInfo.getGeometryArray());
}
}
COM: <s> adds geometry from code </s>
|
funcom_train/12188734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetQName() throws Exception {
String prefix = "p";
String namespace = "http://foo.com";
// declare a prefix to namespace mapping
manager.startPrefixMapping(prefix, namespace);
// ensure that underlying NamespaceSupport has been
// pased the mapping
assertEquals("prefix mapping was not registered",
namespace,
manager.getNamespaceURI(prefix));
}
COM: <s> test the get qname method </s>
|
funcom_train/25290724 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDirection(float x, float y, float z) {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_DIRECTION_WRITE))
throw new CapabilityNotSetException(Ding3dI18N.getString("ConeSound3"));
((ConeSoundRetained)this.retained).setDirection(x,y,z);
}
COM: <s> sets this sounds direction from the three values provided </s>
|
funcom_train/39893460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
readonly = uidl.hasAttribute("readonly");
enabled = !uidl.hasAttribute("disabled");
after = uidl.hasAttribute("after");
paintableId = uidl.getId();
this.client = client;
super.updateFromUIDL(uidl, client);
}
COM: <s> called whenever an update is received from the server </s>
|
funcom_train/1666377 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Dimension getMinimumOptionPaneSize() {
if (minimumSize == null) {
//minimumSize = UIManager.getDimension("OptionPane.minimumSize");
// this is called before defaults initialized?!!!
return new Dimension(MinimumWidth, MinimumHeight);
}
return new Dimension(minimumSize.width, minimumSize.height);
}
COM: <s> returns the minimum size the option pane should be </s>
|
funcom_train/5723874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String addExam() {
editing = true;
examInfo = new ExamInfo();
Date deadline = DateUtils.truncate(new Date(), Calendar.DATE);
deadline = DateUtils.addWeeks(deadline, +2);
deadline = DateUtils.addSeconds(deadline, -1);
examInfo.setDeadline(deadline);
setBean(Constants.PAPERSUBMISSION_EXAM_INFO, examInfo);
return Constants.SUCCESS;
}
COM: <s> creates a new paper info object and sets it into session scope </s>
|
funcom_train/13758698 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public XSSFFont getFontOfFormattingRun(int index) {
if(st.sizeOfRArray() == 0) return null;
for(int i = 0; i < st.sizeOfRArray(); i++){
CTRElt r = st.getRArray(i);
if(i == index) return new XSSFFont(toCTFont(r.getRPr()));
}
return null;
}
COM: <s> gets a copy of the font used in a particular formatting run </s>
|
funcom_train/28661169 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleEditAndRemoveButton(String value) {
if (value.equals(Messages.getString("AlphabetsPreferencePage.11"))) { //$NON-NLS-1$
editButton.setEnabled(false);
removeButton.setEnabled(false);
} else {
editButton.setEnabled(true);
removeButton.setEnabled(true);
}
}
COM: <s> handles the enabled disabled state of the edit and remove buttons </s>
|
funcom_train/10801723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public NonPersistentMetaData addNonMappedInterface(Class<?> iface) {
if (iface == null)
return null;
if (!iface.isInterface())
throw new MetaDataException(_loc.get("not-non-mapped", iface));
if (_locking) {
synchronized (this) {
return addNonMappedInterfaceInternal(iface);
}
} else {
return addNonMappedInterfaceInternal(iface);
}
}
COM: <s> add the given non mapped interface to the repository </s>
|
funcom_train/32734251 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void incTabLength(int length) {
length = Math.abs(length);
this.tabStringLength = this.tabString.length();
this.tabStringLength += length;
this.setTabString(this.tabStringLength);
this.indentString = this.START_INDENT_STRING + this.tabString;
}
COM: <s> increase the length of the tab string by a specified amount </s>
|
funcom_train/34673250 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tidyUpTestData() {
try {
JDBCConfigurationLoader jload=(JDBCConfigurationLoader)AbstractConfigurationLoader.loadLoader();
Connection con=jload.openConnection();
Statement st=con.createStatement();
st.execute("DELETE FROM config WHERE NAMESPACE='"+this.TestNamespace+"'");
st.close();
con.close();
}
catch(Exception e) {
fail("failed to clear testnamespace from table");
}
}
COM: <s> tidy up delete the testdata generated by this set of tests </s>
|
funcom_train/15491212 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void convolve(float[] kernel, int kernelWidth, int kernelHeight) {
ImageProcessor ip2 = convertToFloat();
ip2.setRoi(getRoi());
new ij.plugin.filter.Convolver().convolve(ip2, kernel, kernelWidth, kernelHeight);
ip2 = ip2.convertToByte(false);
byte[] pixels2 = (byte[])ip2.getPixels();
System.arraycopy(pixels2, 0, pixels, 0, pixels.length);
}
COM: <s> performs a convolution operation using the specified kernel </s>
|
funcom_train/50088167 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List vertexList() {
List vertices = new ArrayList(edgeSet().size());
Object startVertex = vertexSet().iterator().next();
Object vertex = startVertex;
Object previousVertex = null;
Object nextVertex = null;
while (nextVertex != startVertex) {
vertices.add(vertex);
Edge edge = (Edge) edgesOf(vertex).get(0);
nextVertex = edge.oppositeVertex(vertex);
if (nextVertex==previousVertex) {
edge = (Edge) edgesOf(vertex).get(1);
nextVertex = edge.oppositeVertex(vertex);
}
previousVertex = vertex;
vertex = nextVertex;
}
return vertices;
}
COM: <s> returns a list of the vertices contained in this cycle </s>
|
funcom_train/37079851 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public FeatureList getFeatsWithAlignments() {
FeatureList alignFeats = new FeatureList();
for (FeatureIterator iter = featureIterator(); iter.hasNext(); ) {
SeqFeatureI feat = iter.nextFeature();
if (feat.hasAlignable()) {
alignFeats.addFeature(feat);
}
}
return alignFeats;
}
COM: <s> filters feature list for features with has alignable true and </s>
|
funcom_train/11765124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void reloadUnit(AbstractModelUnit unit) throws Exception {
//sory but since the ports of the exploded unit should be modificated, it is necesary to
//unatach the actual ports from all the Links.
Iterator links = this.getModel().getLinks().iterator();
while (links.hasNext()) {
((AbstractLink)links.next()).unlink(unit.getPorts());
}
unit.getModel().reload();
//now, rebuild this tree
this.getModel().rebuildTree();
}
COM: <s> reload a unit from it define file </s>
|
funcom_train/18465465 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void loadConfiguration(Configuration configuration) throws ConfigurationException
{ // Check element name
ConfigurationUtil.checkElementName(configuration,STRING_TABLES_ELEMENT);
// Load each string table
Configuration[] tableConfigs = configuration.getChildren(STRING_TABLE_ELEMENT);
for(Configuration tableConfig : tableConfigs)
{
StringTable stringTable = new StringTable(tableConfig);
mStringTables.put(stringTable.getName(),stringTable);
}
}
COM: <s> load this mapped devices configuration </s>
|
funcom_train/15895082 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rejectBigDecimalZero(String fieldName, BigDecimal bigDecimal, Errors errors) {
if (bigDecimal != null) {
int signum = bigDecimal.signum();
//making the fields required and not zero. must be a valid not completely zero.
//can be 0.00001234
if (signum == 0) {
//fail. can't be just zero 0.000000
errors.rejectValue(fieldName, "errors.notzero");
}
}
}
COM: <s> reject a big decimal field if it is zero </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.