__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/3473015 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(Component component) {
if (! selectedComponents.contains(component)) {
selectedComponents.add(component);
Component[] addedComponents = new Component[1];
addedComponents[0] = component;
fireComponentSelectionEvent(new ComponentSelectionEvent(this,
ComponentSelectionEvent.COMPONENTS_ADDED, addedComponents));
}
}
COM: <s> adds a new component to the selection </s>
|
funcom_train/51412653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int getSelectedSDef() {
Row row = getSelectedCritTreeRow();
if(row != null) {
if(row.getRowTable() instanceof TableCompiereAspectSDef) {
return row.getPrimaryKey();
}//is sdef
if(row.getRowTable() instanceof TableCompiereAspectSCriteria) {
try {
if(MCompiereAspectCWFSCriteria.isBooleanOperationNone(row))
return MCompiereAspectCWFSCriteria.getFirstSDef(row);
} catch (CMExceptionTable e) {}
}//is scriteria
}
return -1;
}
COM: <s> gets the pkey of the selected sdef </s>
|
funcom_train/24926670 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void writeAttributes(Collection<Attribute> attributesCollection) throws IOException {
StringBuffer attributes = new StringBuffer("");
if (attributesCollection != null) {
for (Attribute attribute : attributesCollection) {
if (attribute != null) {
if (attributes.length() > 0) {
attributes.append(ParameterKeys.ATTRIBUTES_SEPARATOR);
}
try {
StringBuffer serialized = convertAttributeToString(attribute);
attributes.append(serialized);
} catch (Exception e) {
if (PrintServiceUtils.OUTPUT_LOG) {
LOG.error(e.getMessage());
}
}
}
}
}
super.write(attributes.toString());
super.flush();
}
COM: <s> writes a collection of attributes to the stream </s>
|
funcom_train/22440966 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean askUserForConfirmation(final String title, final String question) {
final boolean[] result = new boolean[1];
VSSPlugin.runSync(new Runnable() {
public void run() {
result[0] = MessageDialog.openQuestion(VSSPlugin.getInstance().getShell(), title, question);
}
});
return result[0];
}
COM: <s> method ask user for confirmation </s>
|
funcom_train/5028424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void append(int headerSize, String text) {
if ((headerSize > 6) || (headerSize < 0)) {
append(text);
} else {
buf.append("<H" + headerSize + ">" + text + "</H" + headerSize + ">");
}
}
COM: <s> add a header line to the buffer unless the header size </s>
|
funcom_train/33149179 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addChild ( AbstractServerActiveObject child ) {
//FIXME: this should log an error or throw an Exception as it is never expected to happen
if ( _children.contains ( child ) )
return ;
_children.add ( child ) ;
child.setContainer ( this ) ;
/* The child inherits our placeholders */
addPlaceholders ( child ) ;
}
COM: <s> add a code abstract server active object code object as a child </s>
|
funcom_train/2037028 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MenuItem createImportMenuItem() {
MenuItem importCommandItem = new MenuItem("Import IR Commands");
importCommandItem.setIcon(icon.importFromDB());
importCommandItem.addSelectionListener(new SelectionListener<MenuEvent>() {
public void componentSelected(MenuEvent ce) {
importIRCommand();
}
});
return importCommandItem;
}
COM: <s> creates the import menu item </s>
|
funcom_train/29936824 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void incrementNumConstraintChecks() {
Long ccs = (Long)getPropertyValue("Constraint Checks");
if(ccs == null)
ccs = new Long(0);
updateProperty("Constraint Checks", ccs.longValue() + 1);
numConstraintChecksDuringCurrentCycle++;
for(AgentPlugin plugin : plugins)
plugin.handleIncrementNumConstraintChecks();
}
COM: <s> all implementing classes should call this function once after </s>
|
funcom_train/21437407 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public ResidueType createLCleavage() {
ResidueType ret = new ResidueType();
ret.name = "#lcleavage";
ret.description = "L Cleavage";
ret.superclass = "cleavage";
ret.composition = "H2O";
ret.can_redend = false;
ret.can_parent = true;
ret.updateMolecule();
return ret;
}
COM: <s> create an l cleavage type used for labile residues </s>
|
funcom_train/47159198 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initRecentFiles() {
prefs = Preferences.userNodeForPackage(getClass());
int count = prefs.getInt("recentFileCount", 0);
for (int i=0; i < count; i++) {
String path = prefs.get("recentFile."+i, null);
if (path != null) {
recentFiles.add(new File(path));
}
}
}
COM: <s> initializes the recent files of the application </s>
|
funcom_train/40655078 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void start() {
if (stop) {
throw new IllegalStateException(
"This search was interruped or has completed. "
+ "For a new search you must create a new instance.");
}
Thread scanFilesThread = new Thread(new Runnable() {
@Override
public void run() {
scanFiles(new File(targetdir));
if (!interrupted) {
// the search was already interrupted, we don't need to
// resend the signal.
// The search has completed
handler.finished(Status.COMPLETED);
}
}
});
scanFilesThread.start();
}
COM: <s> start the search in background </s>
|
funcom_train/43337075 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addContext(InstanceContext newContext) throws InstanceException {
InstanceContext tmpCtx = contextMap.get(newContext
.getId());
if (tmpCtx != null) {
if (!(tmpCtx.equals(newContext)))
throw new InstanceException(
ExceptionConstants.EX_INSTANCE_DOUBLE_CONTEXT);
else
return; /* context already available */
} else {
if (testContext(newContext)) {
contextMap.put(newContext.getId(), newContext);
} else
throw new InstanceException(
ExceptionConstants.EX_INSTANCE_CONTEXT_INFORMATION_MISSING);
}
}
COM: <s> adds a new context to the instance </s>
|
funcom_train/50228912 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object checkout() {
Document copy = docBuilder.newDocument();
try {
Transformer transformer =
TransformerFactory.newInstance().newTransformer();
transformer.transform(new DOMSource(document),
new DOMResult(copy));
}
catch (javax.xml.transform.TransformerException e) {
e.printStackTrace();
}
return copy;
}
COM: <s> returns a cloned copy of the document </s>
|
funcom_train/13867828 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void deleteData(int offset, int count) {
try {
XMLParserImpl.deleteData(this.getJsObject(), offset, count);
} catch (JavaScriptException e) {
throw new DOMNodeException(DOMException.INVALID_MODIFICATION_ERR, e, this);
}
}
COM: <s> this function delegates to the native method code delete data code in </s>
|
funcom_train/22710431 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private IStatus showReportError(String mesg, Exception details) {
// prepare content of dialog
IStatus status = new Status(IStatus.ERROR,
CodeCoverPlugin.PLUGIN_ID, IStatus.ERROR, mesg, details);
// show in dialog (and log)
StatusManager.getManager().handle(status, StatusManager.SHOW);
return status;
}
COM: <s> popup an error dialog </s>
|
funcom_train/12541285 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void toggleQuickDiffRuler() {
boolean newSetting= !isChangeInformationShowing();
// change locally to ensure we get it right even if our setting
// does not adhere to the global setting
showChangeInformation(newSetting);
// change global setting which will inform other interested parties
// the it is changed
IPreferenceStore store= EditorsUI.getPreferenceStore();
if (store != null) {
store.setValue(AbstractDecoratedTextEditorPreferenceConstants.QUICK_DIFF_ALWAYS_ON, newSetting);
}
}
COM: <s> toggles the quick diff global preference and shows the quick diff ruler </s>
|
funcom_train/27822640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void cmd_refreshtree() throws ServletException {
try {
String treeID=m_request.getParameter("treeID");
if (treeID!=null) {
Tree tree=(Tree)m_session.getAttribute(treeID);
if (tree!=null)
tree.refresh();
}
}
catch (TreeException e) {
throw new ServletException("Error refreshing the tree.",e);
}
}
COM: <s> this method refreshes the tree </s>
|
funcom_train/3410055 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String paramString() {
String sbVisStr;
switch (scrollbarVisibility) {
case SCROLLBARS_BOTH:
sbVisStr = "both";
break;
case SCROLLBARS_VERTICAL_ONLY:
sbVisStr = "vertical-only";
break;
case SCROLLBARS_HORIZONTAL_ONLY:
sbVisStr = "horizontal-only";
break;
case SCROLLBARS_NONE:
sbVisStr = "none";
break;
default:
sbVisStr = "invalid display policy";
}
return super.paramString() + ",rows=" + rows +
",columns=" + columns +
",scrollbarVisibility=" + sbVisStr;
}
COM: <s> returns a string representing the state of this code text area code </s>
|
funcom_train/8373045 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveArticle(Article a) {
try {
PreparedStatement pstmt = con
.prepareStatement("UPDATE article SET languageId = ?, article = ? WHERE articleId = ?");
pstmt.setInt(1, a.getLanguageId());
pstmt.setString(2, a.getArticle());
pstmt.setInt(3, a.getArticleId());
pstmt.executeUpdate();
con.commit();
} catch (SQLException e) {
e.printStackTrace();
}
}
COM: <s> saves changes of an article to the database </s>
|
funcom_train/44286139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void saveactors(FactoryWriterXML xml, TransactionXML transaction, boolean demo, String iid) {
for(SecurityRole entity: securityRoles) saveEntity(xml, transaction, entity, demo, iid);
for(Actor entity: actors) saveEntity(xml, transaction, entity, demo, iid);
for(Team entity: teams) saveEntity(xml, transaction, entity, demo, iid);
}
COM: <s> save objects by file </s>
|
funcom_train/17852758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getTextFromNode(Node data) {
Node child = data.getFirstChild();
StringBuilder text = new StringBuilder();
while (child != null) {
if (child.getNodeType() == Node.TEXT_NODE) {
text.append(child.getNodeValue());
}
child = child.getNextSibling();
}
return text.toString();
}
COM: <s> gets the text within a node </s>
|
funcom_train/42178881 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer getIntegerValue(String name, Integer defaultValue) {
Integer result =
(defaultValue != null ? defaultValue : Integer.valueOf(0));
Configuration conf = configurationDao.findByName(name);
if (conf != null) {
result = conf.getIntegerValue();
}
return result;
}
COM: <s> return a value of the configuration as integer </s>
|
funcom_train/43380211 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireLoggingListener(LoggingEvent event) {
if(event.cause != null) {
event.cause.toString();
}
for(Enumeration<LoggingListener> e=loggingListeners.elements(); e.hasMoreElements(); ) {
LoggingListener l = e.nextElement();
l.loggingPerformed(event);
}
}
COM: <s> notifies the registered listener about the event </s>
|
funcom_train/32638617 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void code(StringBuffer buf) {
if_expr.code(buf);
buf.append(" if(" + ASTFunDecl.pop() + " == 1) {\n");
int size = ASTFunDecl.size;
then_expr.code(buf);
ASTFunDecl.size = size; // reset stack
buf.append(" } else {\n");
else_expr.code(buf);
buf.append(" }\n");
}
COM: <s> fourth pass produce java code </s>
|
funcom_train/33853017 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addBug(BugInstance bug) {
SourceLineAnnotation source = bug.getPrimarySourceLineAnnotation();
PackageStats stat = getPackageStats(source.getPackageName());
stat.addError(bug);
++totalErrors[0];
int priority = bug.getPriority();
if (priority >= 1) {
++totalErrors[Math.min(priority, totalErrors.length - 1)];
}
}
COM: <s> called when a bug is reported </s>
|
funcom_train/23707796 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getMniAbout() {
if (mniAbout == null) {
mniAbout = new JMenuItem();
mniAbout.setText("Versão");
mniAbout.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
getJAbout().setVisible(true);
}
});
}
return mniAbout;
}
COM: <s> this method initializes mni about </s>
|
funcom_train/1942483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTimerTextField() {
if (timerTextField == null) {
timerTextField = new JTextField();
timerTextField.setEditable(false);
timerTextField.setFont(new Font("verdana", Font.PLAIN, 25));
timerTextField.setBounds(new Rectangle(14, 146, 137, 44));
}
return timerTextField;
}
COM: <s> this method initializes timer text field </s>
|
funcom_train/3549850 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testEqualsWithDifferentTexts() {
try {
VocabNode test = new StubAbstractVocabNode(new Integer(1), "Test", "noun", Locale.GERMAN);
VocabNode test2 = new StubAbstractVocabNode(new Integer(1), "Tester", "noun", Locale.GERMAN);
Assert.assertFalse(test.equals(test2));
}
catch (VocabException ve) {
Assert.fail("VocabException produced");
}
}
COM: <s> tests equals with nodes that are identical except for text </s>
|
funcom_train/34568189 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateIdForItem(){
StringBuffer sb = new StringBuffer();
sb.append(this.timeStamp);
sb.append(getDevideChar());
sb.append(generateId(getReserveViewNumber(),getCurrentViewIdx()));
sb.append(getDevideChar());
sb.append(generateId(getReserveItemNumber(),getCurrentItemIdx()));
return sb.toString();
}
COM: <s> this method is used to generate id for every log item </s>
|
funcom_train/5075353 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doPrintFileInfo(PrintWriter out, File file, FtpSessionContext ctx) throws IOException {
int permission = getCtx().getPermission(file.getAbsolutePath());
boolean read = (permission & PRIV_READ) > 0;
boolean write = (permission & PRIV_WRITE) > 0;
String s = IOUtils.formatUnixFtpFileInfo(file, read, write);
out.println(s);
}
COM: <s> lists the contents of the current working directory if no arugment was passed </s>
|
funcom_train/854112 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createParentDirectories(final File file) throws IOException {
if (file.exists()) {
return;
}
boolean directoryWasCreated = true;
if (!file.getParentFile().exists()) {
directoryWasCreated = file.getParentFile().mkdirs();
}
if (!directoryWasCreated) {
throw new IOException(getString(R.string.exception_failed_create_directory, file
.getParentFile().toString()));
}
}
COM: <s> creates the parent directory of a file if it does not yet exist </s>
|
funcom_train/48524365 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public IndexEntry statEntry(long idx) throws IOException {
if ((idx < 0) || (idx >= numEntries))
return null;
IndexEntry ie;
pointerAtEnd = false;
indexFile.seek(idx*indexFactory.getSerializedSize());
ie = indexFactory.build(indexFile);
return ie;
}
COM: <s> retrieve information about a given record </s>
|
funcom_train/5260845 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addDefinedByPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_End_definedBy_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_End_definedBy_feature", "_UI_End_type"),
BmmPackage.Literals.END__DEFINED_BY,
true,
false,
true,
null,
null,
null));
}
COM: <s> this adds a property descriptor for the defined by feature </s>
|
funcom_train/35541842 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void toStringCondition(final StringBuilder sb) {
if (getConditionLiterals().size() > 0) {
toStringList(sb, getConditionLiterals(), "conditionLiterals");
}
if (getConditionRanges().size() > 0) {
toStringList(sb, getConditionRanges(), "conditionRanges");
}
}
COM: <s> pretty printing for a condition entry </s>
|
funcom_train/12309810 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeFeatureReference(FeatureReferenceModel feature) {
assertIsWriteable();
if (unconfiguredFeatureReferences!=null){
boolean success = remove(feature, unconfiguredFeatureReferences);
if (!success)
UpdateCore.warn(feature.getURLString()+" not part of unconfigured list."); //$NON-NLS-1$
}
if (configuredFeatureReferences != null) {
boolean success = remove(feature, configuredFeatureReferences);
if (!success)
UpdateCore.warn(feature.getURLString()+" not part of configured list."); //$NON-NLS-1$
}
}
COM: <s> removes a feature from any list </s>
|
funcom_train/45623390 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSearchPathsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ResolveAssemblyReferenceType_searchPaths_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ResolveAssemblyReferenceType_searchPaths_feature", "_UI_ResolveAssemblyReferenceType_type"),
MSBPackage.eINSTANCE.getResolveAssemblyReferenceType_SearchPaths(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the search paths feature </s>
|
funcom_train/39024041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetID() {
System.out.println("setID");
String testID="aaaID";
UID instance = new UID();
instance.setID(testID);
String expResult = ""+testID;
String result = instance.getID();
assertEquals(expResult, result);
}
COM: <s> test of set id method of class uid </s>
|
funcom_train/2844509 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Annotation getNextBaseAnnotation(Annotation a) {
for (Iterator i = view.getBaseIterator(); i.hasNext();) {
Annotation ann = (Annotation) i.next();
if (ann.compareTo(a) > 0 && !a.getSpan().contains(ann.getSpan())) {
return (ann);
}
}
return (null);
}
COM: <s> returns the base annotation after a </s>
|
funcom_train/10589135 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ValidationError buildFailMessage(Element validationRuleElement) {
Element failMessageElement = DomHelper.getChildElement(validationRuleElement,
FormsConstants.DEFINITION_NS, "failmessage");
if (failMessageElement != null) {
XMLizable failMessage = DomHelper.compileElementContent(failMessageElement);
return new ValidationError(failMessage);
}
return this.getDefaultFailMessage();
}
COM: <s> checks if the validation rule configuration contains a custom failmessage and if so </s>
|
funcom_train/41388910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected boolean vLineClear(Image entryImage, int x) {
int w = entryImage.getWidth(null);
int h = entryImage.getHeight(null);
for (int i = 0; i < h; i++) {
if (pixelMap[ (i * w) + x] != -1) {
return false;
}
}
return true;
}
COM: <s> this method is called to determine </s>
|
funcom_train/5272758 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String decodeBasicAuthorizationString(String authorization) {
if (authorization == null || !authorization.toLowerCase().startsWith("basic ")) {
return null;
} else {
authorization = authorization.substring(6).trim();
// Decode and parse the authorization credentials
return new String(Base64.decodeBase64(authorization.getBytes()));
}
}
COM: <s> decode the basic authorization string </s>
|
funcom_train/46759703 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ChargeModel getCharge(final long chargeId, final IChainStore chain, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
return BillingData.getCharge(chargeId, chain, call);
}}; return (ChargeModel) call(method, call);
}
COM: <s> same transaction return the single charge model for the primary key </s>
|
funcom_train/8008399 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void removeAll() {
int compSize = _componentsVec.size();
for (int i = 0; i < compSize; i++) {
HtmlComponent hc = (HtmlComponent) _componentsVec.elementAt(i);
if (hc instanceof HtmlTable) {
((HtmlTable) hc).removeAll();
} else if (hc instanceof HtmlContainer) {
((HtmlContainer) hc).removeAll();
}
}
_componentsVec.removeAllElements();
}
COM: <s> this method removes all the components from a container </s>
|
funcom_train/32862950 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Integer createCard(final Integer pileID, final String name) {
if (this.piles.containsKey(pileID) == true) {
final Pile pile = (Pile) this.piles.get(pileID);
final Card card = new Card(pile, name);
((Pile) (this.piles.get(pileID))).putCardOnBottom(card);
cards.put(card.getID(), card);
return card.getID();
}
return null;
}
COM: <s> creates a new card </s>
|
funcom_train/32069999 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean addDocuments(Collection<Document> documents) {
boolean addOk = getDocuments().addAll(documents);
if (addOk) {
for(Document document : documents) {
document.setGroup((DocumentGroup)this);
}
} else {
if (logger.isWarnEnabled()) {
logger.warn("add returned false");
}
}
return addOk;
}
COM: <s> add the passed documents collection to the group collection </s>
|
funcom_train/35806770 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void tableRowExport(ActionEvent arg0){
JButton btn = (JButton) arg0.getSource();
String fileName = saveDialog();
if (fileName != null){
if (!fileName.toLowerCase().endsWith(".xml"))
fileName += ".xml";
Vector<WeatherEntry> entries = new Vector<WeatherEntry>();
WeatherEntry entry = db.getSimulationEntry(Integer.parseInt(btn.getActionCommand()));
entries.add(entry);
writeXML(fileName, entries);
}
}
COM: <s> h3 table row export h3 </s>
|
funcom_train/10238088 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JButton getAboutCloseButton() {
if (aboutCloseButton == null) {
aboutCloseButton = new JButton();
aboutCloseButton.setSize(84,23);
aboutCloseButton.setText("Close");
aboutCloseButton.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
close();
}
});
}
return aboutCloseButton;
}
COM: <s> this method initializes about close button </s>
|
funcom_train/13629823 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer buf = new StringBuffer();
buf.append("SDLCDtrack[").
append("id=").append(getId()).
append(", type=").append(getType()).
append(", length=").append(getLength()).
append(", offset=").append(getOffset()).
append("]");
return buf.toString();
}
COM: <s> return a string represenation of this object </s>
|
funcom_train/24039325 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getPnlIn() {
if (pnlIn == null) {
BorderLayout borderLayout1 = new BorderLayout();
borderLayout1.setHgap(5);
jLabel = new JLabel(new ImageIcon(UserInterface.class.getResource(RSC_LOC + "in.png")));
pnlIn = new JPanel();
pnlIn.setLayout(borderLayout1);
pnlIn.add(jLabel, BorderLayout.WEST);
pnlIn.add(getPrgBarIn(), BorderLayout.CENTER);
}
return pnlIn;
}
COM: <s> this method initializes pnl in </s>
|
funcom_train/39275771 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void put(Serializable key, Serializable value) {
synchronized (this) {
softMap.put(key, value);
keySet.add(key);
}
CacheAction action = CacheAction.createPutAction(key, value);
synchronized (cacheQueue) {
cacheQueue.add(action);
cacheQueue.notify();
}
}
COM: <s> put a value in the mega map </s>
|
funcom_train/20803743 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void utf8TestSuccessFixture (String testString) throws Exception {
ByteBuffer testStringUTF8Buffer = ByteBuffer.wrap (testString.getBytes ("UTF-8"));
StringBuffer decodedBuffer = new StringBuffer();
CharacterHandler handler = new UTF8Handler();
while (testStringUTF8Buffer.hasRemaining()) {
char character = (char) handler.readCharacter (testStringUTF8Buffer);
decodedBuffer.append (character);
}
assertEquals (testString, decodedBuffer.toString());
}
COM: <s> test that decoding a utf 8 encoded string returns the original string </s>
|
funcom_train/15714854 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testDoGet() throws Exception {
System.out.println("doGet");
HttpServletRequest request = null;
HttpServletResponse response = null;
EchoBeansController instance = new EchoBeansController();
instance.doGet(request, response);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of do get method of class net </s>
|
funcom_train/9802907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer stringBuffer = new StringBuffer((levelValues.length * 2) - 1);
for (int i = 0; i < levelValues.length; i++) {
stringBuffer.append(levelValues[i]);
if (i < levelValues.length - 1) {
stringBuffer.append('.');
}
}
return stringBuffer.toString();
}
COM: <s> returns the string representation of this version </s>
|
funcom_train/8406977 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void doReadObject(Map map, ObjectInputStream in) throws IOException, ClassNotFoundException {
this.map = map;
int entrySize = in.readInt();
for (int i = 0; i < entrySize; i++) {
Object obj = in.readObject();
int count = in.readInt();
map.put(obj, new MutableInteger(count));
size += count;
}
}
COM: <s> read the map in using a custom routine </s>
|
funcom_train/17295734 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addObserver(String room, String observer, String ip){
Player newPlayer = new Player();
newPlayer.setName(observer);
newPlayer.setIP(ip);
rooms.addObserver(room, observer, ip);
if(joined!=null && joined.equals(room)){
roomPanel.setRoom(rooms.getRoom(room));
}
roomPanel.refresh();
}
COM: <s> function to add an observer to a room on the room list </s>
|
funcom_train/19408464 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public List navigableEndsFrom(MClass cls) {
List res = new ArrayList();
boolean partOfAssoc = false;
Iterator it = fAssociationEnds.iterator();
while (it.hasNext()) {
MAssociationEnd aend = (MAssociationEnd) it.next();
if (!aend.cls().equals(cls))
res.add(aend);
else {
partOfAssoc = true;
if (fIsReflexive)
res.add(aend);
}
}
if (!partOfAssoc)
throw new IllegalArgumentException("class `" + cls.name()
+ "' is not part of this association.");
return res;
}
COM: <s> returns a list of association ends which can be reached by navigation </s>
|
funcom_train/47213228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run() {
// LixeiraNew lix = testCreateLixeira();
// if (lix == null) {
// return;
// }
//
// LixeiraSent lixS = testSendLixeira(lix);
// if (lixS == null) {
// return;
// }
// testPersistLixeira(lixS);
//
// testGetLixeiraFromServer(lixS);
//
// testChangeState(lixS);
//
// testEditLixeira(lixS);
//
// testDeleteLixeira(lixS);
testGPS();
}
COM: <s> executes all the tests </s>
|
funcom_train/10280739 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSelectedRows(int[] pRows) {
KFeedTableModel lModel = (KFeedTableModel) mFeedTable.getModel();
for (int i = 0; i < pRows.length; i++) {
int j = pRows[i];
int lViewRow = lModel.mapRowIndexToTable(j);
mFeedTable.setSelection(0, lViewRow, true);
}
}
COM: <s> select multiple rows </s>
|
funcom_train/1929951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addIndConstraintGetDisjunctArrayMethod() {
Type arrayType = ArrayType.v(objectType, 1);
startMethod("getDisjunctArray", emptyList, arrayType, Modifier.PUBLIC);
// return this.disjuncts.toArray();
doReturn(getMethodCallResult(getFieldLocal(getThisLocal(), "disjuncts", setType), "toArray", arrayType));
}
COM: <s> adds a method for obtaining an array of the disjuncts on this state </s>
|
funcom_train/31530056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ICmdAction start() throws ActionStartException {
if(isSetupComplete_flag == false) {
try {
setupJNLPFile();
}
catch(InvalidAppletException invalid) {
invalid.printStackTrace();
throw new ActionStartException(invalid.getMessage());
}
}
return jnlpCmdAction.start();
}
COM: <s> start the applet </s>
|
funcom_train/39990754 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean validateBPELVariableNames_MinLength(List<?> bpelVariableNames, DiagnosticChain diagnostics, Map<Object, Object> context) {
int length = bpelVariableNames.size();
boolean result = length >= 1;
if (!result && diagnostics != null)
reportMinLengthViolation(ExecutableBPELPackage.eINSTANCE.getBPELVariableNames(), bpelVariableNames, length, 1, diagnostics, context);
return result;
}
COM: <s> validates the min length constraint of em bpel variable names em </s>
|
funcom_train/45768720 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Image getIcon(final int type) {
if ((type == java.beans.BeanInfo.ICON_COLOR_16x16) ||
(type == java.beans.BeanInfo.ICON_MONO_16x16)) {
if (icon == null)
icon = loadImage("/org/netbeans/modules/openoffice/urd.gif");
return icon;
} else {
return null;
}
}
COM: <s> get the bean icon for the loader </s>
|
funcom_train/13777312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void gatherAllDomains(List<Map<String, Object>> methodsProperties) {
for (Map<String, Object> methodProperties : methodsProperties) {
for (String propNeedDomain : domainCollectors.keySet()) {
IDomainCollector domainCollector = domainCollectors.get(propNeedDomain);
domainCollector.gatherDomains(methodProperties);
}
}
}
COM: <s> gather properties domains by domain collectors </s>
|
funcom_train/13850633 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void checkForLocalHost(final URL url, String source) {
try {
if (InetAddress.getByName(url.getHost()).isLoopbackAddress()) {
Message message = new Message(Reporter.WARNING,
getString("usedLocalhost", url),
getString("localhostExp"));
Reporter.print(message, source);
}
} catch (Exception ignore) { // accessibility check handles this failure
}
}
COM: <s> check whether the host component of code url code resolves </s>
|
funcom_train/2518041 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void orderDown(Task selectedTask) {
activate(ActivationPurpose.WRITE);
int i = subTasks.indexOf(selectedTask);
// if already at bottom index ignore
if (i < subTasks.size() - 1) {
subTasks.remove(i);
subTasks.add(i + 1, selectedTask);
}
firePropertyChange("subTaskPosition", null, selectedTask);
}
COM: <s> moves the code selected task code down one in sub tasks list </s>
|
funcom_train/5342944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Map createMap() {
ObjectInputStream ois = null;
try {
ois = new ConverterObjectInputStream(new BufferedInputStream(
new FileInputStream(CTIME_CACHE_FILE)));
return (Map)ois.readObject();
} catch(Throwable t) {
LOG.error("Unable to read creation time file", t);
return new HashMap();
} finally {
if(ois != null) {
try {
ois.close();
} catch(IOException e) {
// all we can do is try to close it
}
}
}
}
COM: <s> loads values from cache file if available </s>
|
funcom_train/4732621 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public BigInteger getPlaneDisplace(int i) throws ExceptionParameters{
if((i < 0) || (i >= super.m_M))
throw new ExceptionParameters("generating in the СMethodBlakley.getPlaneDisplace(i)");
if(m_displacement == null)
return null;
return m_displacement[i];
}
COM: <s> get displacement of i th plane </s>
|
funcom_train/9766638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void adjustHighlightRange(int offset, int length) {
if (fSourceViewer == null)
return;
if (fSourceViewer instanceof ITextViewerExtension5) {
ITextViewerExtension5 extension= (ITextViewerExtension5) fSourceViewer;
extension.exposeModelRange(new Region(offset, length));
} else if (!isVisible(fSourceViewer, offset, length)) {
fSourceViewer.resetVisibleRegion();
}
}
COM: <s> adjusts the highlight range so that at least the specified range </s>
|
funcom_train/17898988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void componentResized(ComponentEvent e) {
Dimension _size = getSize();
boolean resizeRequired = false;
if (_size.height < defaultHeight) {
_size.height = defaultHeight;
resizeRequired = true;
}
if (_size.width < defaultWidth) {
_size.width = defaultWidth;
resizeRequired = true;
}
if (resizeRequired) {
setSize(_size);
}
}
COM: <s> invoked when the components size changes </s>
|
funcom_train/37649312 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private boolean validatePriority() {
boolean flValid = true;
if (priorityCombo.getSelectionIndex() < 0) {
MessageDialog.openWarning(getShell(), getMessage(StringKeys.WARNING_TITLE),
getMessage(StringKeys.WARNING_PRIORITY_MANDATORY));
priorityCombo.setFocus();
flValid = false;
}
return flValid;
}
COM: <s> perform the priority validation </s>
|
funcom_train/24373067 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Connection getConnection() {
Connection con = null;
SQLConnectionWrapper conWrapper = new SQLConnectionWrapper();
try {
con = conWrapper.getConnection(SQLConnectionWrapper.logJNDIResourceName);
} catch (XdsInternalException ex) {
logger.error("ERROR Retrieving DB Connection: ", ex);
}
return con;
}
COM: <s> obtain database connection </s>
|
funcom_train/21106291 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private MJCheckBox getChBS_TO() {
if (chBS_TO == null) {
chBS_TO = new MJCheckBox();
chBS_TO.setText("To");
chBS_TO.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
}
return chBS_TO;
}
COM: <s> this method initializes ch bs to </s>
|
funcom_train/28199619 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean add(E o) {
if (o == null) {
size++;
nullCount++;
modcount++;
return true;
}
Entry e = object2Entry(o);
if (e != null) {
return false;
}
modcount++;
size++;
int hash = hashIt(o);
Entry<E> next = entries[hash];
iterChain = entries[hash] = new Entry<E>(this, o, refq, next, iterChain);
rehash();
return true;
}
COM: <s> adds the specified element to this set if it is not already present </s>
|
funcom_train/9537139 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUnicodeCharactersInErrorMessage() {
ActiveXComponent application = new ActiveXComponent("Word.Application");
ActiveXComponent documents = application
.getPropertyAsComponent("Documents");
String fileName = "abc\u0411\u0412\u0413\u0414def";
try {
documents.invoke("Open", fileName);
fail("Should have thrown an exception");
} catch (ComException e) {
assertTrue("Error message should contain file name with unicode "
+ "characters in it. " + e.getMessage(), e.getMessage()
.indexOf(fileName) > 0);
}
}
COM: <s> verifies that messages can now have unicode in them like when the file </s>
|
funcom_train/10626795 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInitialize_circularRedundancy() {
Encoder enc = new Encoder();
DummyPersistenceDelegate pd = new DummyPersistenceDelegate();
enc.setPersistenceDelegate(MockFooStop.class, pd);
pd.initialize(MockFoo.class, new MockFoo(), new MockFoo(), enc);
}
COM: <s> circular redundancy check </s>
|
funcom_train/35027389 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void updateBuffer() {
List<String> lines = console.getLastLines(consoleLines, 0);
int i = 0;
for (; ((i < consoleLines) && (i <lines.size())); i++) {
bufferText[i].print(lines.get(lines.size() - 1 - i));
}
for (; i < consoleLines; i++) {
bufferText[i].print ("");
}
}
COM: <s> redraws the text on the buffer </s>
|
funcom_train/20356613 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sendMail(String from, String to, String subject, String body) {
try {
MimeMessage message = new MimeMessage(session);
InternetAddress internetAddress = new InternetAddress(from);
message.setFrom(internetAddress);
message.setReplyTo(new InternetAddress[]{internetAddress});
message.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
message.setSubject(subject);
message.setText(body);
message.setSentDate(new Date());
message.saveChanges();
Transport.send(message);
} catch (MessagingException e) {
logger.warning("Mail error", e);
}
}
COM: <s> send mail via smtp </s>
|
funcom_train/2524471 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void engineReset () {
// initial values of MD4 i.e. A, B, C, D
// as per rfc-1320; they are low-order byte first
context[0] = 0x67452301;
context[1] = 0xEFCDAB89;
context[2] = 0x98BADCFE;
context[3] = 0x10325476;
count = 0L;
for (int i = 0; i < BLOCK_LENGTH; i++)
buffer[i] = 0;
}
COM: <s> resets this object disregarding any temporary data present at the </s>
|
funcom_train/21935371 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void handlePageElement(IStepList steps, PageElement pe) {
if (pe instanceof Title) {
handleTitle(steps, (Title) pe);
}
else if (pe instanceof Link) {
handleLink(steps, (Link) pe);
}
else if (pe instanceof Text) {
handleText(steps, pe);
}
else if (pe instanceof FormElement) {
handleFormElement(steps, (FormElement) pe);
}
}
COM: <s> converts one element located on a page to a list of watir steps </s>
|
funcom_train/22598461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Point2D assignPositionToVertex(Vertex vertex) {
Point2D c;
if (!visualizedVertices.contains(vertex)) {
c = getRandomPoint(((int) Math.sqrt(graph.getVertices().size()) * 50) + 1);
locations.put(vertex, c);
visualizedVertices.add(vertex);
//done = false;
countUpdates = 0;
} else
c = transform(vertex);
return c;
}
COM: <s> assigns a position to the vertex </s>
|
funcom_train/581036 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDropTag() {
p.setProperty( _TABLEINI_TAG_DROP_, "" + true );
String user;
try {
user = setup.getSqlConnection().getUser().toString();
} catch ( Exception e ){
user = "systemDrop";
}
addVersion( "drop table " + getName() + UpgradeManager._UPGRADE_SEPARATOR_, user, DateLib.today( setup ) );
}
COM: <s> create an update to drop the table the ini </s>
|
funcom_train/6318577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetJob(String applicationId, String jobName) throws Exception {
//first check if the job exists, if not throw an exception
Job job = store.getJob(applicationId, jobName);
if (job==null){
throw new GridBrokerException("No job found with name : " + jobName);
}
job.reset();
store.saveJob(job);
}
COM: <s> resets the job so that it will be re scheduled </s>
|
funcom_train/32944729 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TargetGroup newTargetGroup() {
TargetGroup group = new TargetGroup();
group.setIdentity(getNewIdentity());
group.setOwner(AuthUtil.getRemoteUserObject());
group.setState(TargetGroup.STATE_PENDING);
group.setSipType(TargetGroup.MANY_SIP);
group.setCreationDate(new Date());
group.setFromDate(new Date());
// Set the default profile on the target group.
Profile profile = profileManager.getDefaultProfile(AuthUtil.getRemoteUserObject().getAgency());
group.setProfile(profile);
return group;
}
COM: <s> create a new target group </s>
|
funcom_train/15396951 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void withImageFileName(String filename) {
shouldContainElement("Image link with the image URL ending with '" + filename
+ "' was not found from " + getContextAsString(), "//A/IMG[fn:ends-with(@SRC, '"
+ filename + "')]");
}
COM: <s> assert that the selected link wraps an image by the given file name </s>
|
funcom_train/34480688 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void enlargeChain() {
int new_length = def_type_chain.length * 2;
CDefined_type [] new_def_type_chain = new CDefined_type[new_length];
System.arraycopy(def_type_chain, 0, new_def_type_chain, 0, def_type_chain.length);
def_type_chain = new_def_type_chain;
}
COM: <s> increases the size of an auxiliary array used to detect all defined types </s>
|
funcom_train/27844984 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetViewSetsTheViewAndControllerInView() {
MockController controller = new MockController();
MockActiveView view = new MockActiveView();
controller.setView(view);
assertEquals("controller has correct view", view, controller.getView());
assertEquals("view has correct controller", controller, view.getController());
}
COM: <s> tests set view sets the view and controller in view </s>
|
funcom_train/28444294 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection build() {
Collection classes = new ArrayList();
for (Iterator i = fileManager.extractFiles().iterator(); i.hasNext();) {
File nextFile = (File)i.next();
try {
classes.addAll(buildClasses(nextFile));
} catch (IOException ioe) {
x.java.lang.System.err().println("\n" + ioe.getMessage());
}
}
return classes;
}
COM: <s> builds the code java class code instances </s>
|
funcom_train/31936953 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void add(String name, int index, LayoutPart part) {
if (!(part instanceof PartPlaceholder)) {
add(part, WidgetUtils.createGridBagConstraints(GridBagConstraints.BOTH), index);
// _tabbedPane.insertTab(name, null, part, null, index);
}
else
addPlaceholder((PartPlaceholder)part);
}
COM: <s> add a part at an index </s>
|
funcom_train/19036812 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PostCollection getChildrenPosts(PFID pfid) {
PostCollection result = new PostCollection();
StoredPostFolder parent = this.getStoredFolder(pfid);
if(parent != null) {
Iterator i = parent.getPost().iterator();
while(i.hasNext()) {
result.addPost(((StoredPost)i.next()).getPost());
}
}
return result;
}
COM: <s> returns a collection of all the post in the specified folder </s>
|
funcom_train/36930988 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void rotate(final float theAngle) {
float s = CCMath.sin(theAngle);
float c = CCMath.cos(theAngle);
float temp1 = m00;
float temp2 = m01;
m00 = c * temp1 + s * temp2;
m01 = -s * temp1 + c * temp2;
temp1 = m10;
temp2 = m11;
m10 = c * temp1 + s * temp2;
m11 = -s * temp1 + c * temp2;
}
COM: <s> applies a rotation to this matrix </s>
|
funcom_train/5661905 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private QueryNode getFirstAvailableChild() {
GroupingNode baseGroupingNode = groupingNode;
AST child = baseGroupingNode.getFirstChild();
while (child == null) {
baseGroupingNode = baseGroupingNode.getGroupingNode();
if (baseGroupingNode != null) {
child = baseGroupingNode.getFirstChild();
} else {
child = null;
break;
}
}
return (QueryNode) child;
}
COM: <s> returns the first child of a node part of a grouping </s>
|
funcom_train/23442781 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addNamespacePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ImportType_namespace_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ImportType_namespace_feature", "_UI_ImportType_type"),
SchemaPackage.Literals.IMPORT_TYPE__NAMESPACE,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the namespace feature </s>
|
funcom_train/4786150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void showHeader() {
if (myHeader == null && headerConstructor != null) {
myHeader = createInternalControl(controlHolder, headerConstructor);
fireHeaderConstructionEvent(myHeader);
if (myHeader instanceof Composite) {
Composite headerComp = (Composite) myHeader;
if (headerComp.getLayout() instanceof GridRowLayout) {
headerComp.addPaintListener(headerPaintListener);
}
}
layoutHeaderOrRow(myHeader);
}
}
COM: <s> if the header control hasnt been created yet create and show it </s>
|
funcom_train/4025954 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void command_newmodel(String[] args) throws ProfileException {
if( args.length != 1 ) {
throw new IllegalArgumentException();
}
String modelName = args[0];
createModelHandler(modelName);
System.out.println( String.format("Model '%s' created.", modelName) );
}
COM: <s> command to create a new model </s>
|
funcom_train/34564482 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateDist(final int pre, final int s) {
int p = pre;
while(p < meta.size) {
final int k = kind(p);
dist(p, k, dist(p, k) + s);
p += size(p, kind(p));
}
}
COM: <s> this method updates the distance values of the specified pre value </s>
|
funcom_train/33561327 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Bitmap fetchImageDrawable(URL url) {
try {
// Fetch it
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setDoInput(true);
conn.connect();
// Decode and return it
return BitmapFactory.decodeStream(conn.getInputStream());
} catch (IOException e) {
// TODO(rdamazio): Proper error handling
e.printStackTrace();
return null;
}
}
COM: <s> actually fetches the image and decodes it into a </s>
|
funcom_train/50251696 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean equals(Object o) {
if (o == null) {
return false;
}
if (this == o) {
return true;
}
if (!(o instanceof ActorPrincipal)) {
return false;
}
ActorPrincipal that = (ActorPrincipal) o;
if (getActor().equals(that.getActor())) {
return true;
}
return false;
}
COM: <s> compares the specified object with this code actor principal code </s>
|
funcom_train/22235893 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected double getPhysicalToViewPlatformScale() {
double vpToVirtualScale ;
targetTG.getTransform(t3dTmp) ;
t3dTmp.get(m16Tmp) ;
vpToVirtualScale = Math.sqrt(m16Tmp[0]*m16Tmp[0] +
m16Tmp[1]*m16Tmp[1] +
m16Tmp[2]*m16Tmp[2]) ;
return getPhysicalToVirtualScale() / vpToVirtualScale ;
}
COM: <s> gets the scale from physical units to view platform units </s>
|
funcom_train/35920993 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int searchMinPrice(String brand) {
int availability = 0;
Iterator<LaptopBrand> lbIterator= laptopBrandArrayList.iterator();
//iterates through all items, and if the item of the specified
//item is found, its availability is returned
while (lbIterator.hasNext()) {
LaptopBrand laptopBrand = lbIterator.next();
if (laptopBrand.getName().equalsIgnoreCase(brand))
return laptopBrand.getMinPrice();
}
return availability;
}
COM: <s> search for the minimal price for the specified brand </s>
|
funcom_train/45840666 | /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 ("OnlineMQWebserviceSoapV1Port".equals(portName)) {
setOnlineMQWebserviceSoapV1PortEndpointAddress(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>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.