__key__ stringlengths 16 21 | __url__ stringclasses 1 value | txt stringlengths 183 1.2k |
|---|---|---|
funcom_train/2513329 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAction(Action action) {
actionMap.put(action.getName(), action);
if (logger.isLoggable(Level.FINE)) {
StringBuilder sb = new StringBuilder();
sb.append("Added action with name: " + action.getName());
sb.append(" and pattern: "
+ action.getPattern().getPattern().pattern());
logger.log(Level.FINE, sb.toString());
}
}
COM: <s> puts an action into the action map </s>
|
funcom_train/41648723 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long parseLong() throws IOException {
int sign = 1;
int ch = read();
if (ch == '-') {
sign = -1;
ch = read();
}
long value = 0;
for (; ch >= '0' && ch <= '9'; ch = read())
value = 10 * value + ch - '0';
_peek = ch;
return sign * value;
}
COM: <s> parses a 64 bit long value from the stream </s>
|
funcom_train/33601412 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public PublicKey loadPublicKey(int id) throws Exception {
PublicKey ret = this.pubKeys.get(id);
if (ret == null) {
BufferedReader r = new BufferedReader(new FileReader(path + "publickey" + id));
String tmp = "";
String key = "";
while ((tmp = r.readLine()) != null) {
key = key + tmp;
}
r.close();
ret = getPublicKeyFromString(key);
this.pubKeys.put(id, ret);
}
return ret;
}
COM: <s> loads the public key of some processes from configuration files </s>
|
funcom_train/1104297 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addGlobalActionsGen(IMenuManager menuManager) {
menuManager.insertAfter("additions-end", new Separator("ui-actions")); //$NON-NLS-1$ //$NON-NLS-2$
menuManager.insertAfter("ui-actions", showPropertiesViewAction); //$NON-NLS-1$
refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
menuManager.insertAfter("ui-actions", refreshViewerAction); //$NON-NLS-1$
super.addGlobalActions(menuManager);
}
COM: <s> this inserts global actions before the additions end separator </s>
|
funcom_train/4923498 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testTemplateExtension() throws Exception {
// Add HTTP template
HttpTemplateAutoWireSection template = this.source.addHttpTemplate(
this.getClassPath("Extension.ofp"),
MockExtensionTemplateLogic.class, "template");
// Add template extension
HttpTemplateAutoWireSectionExtension extension = template
.addTemplateExtension(MockHttpTemplateSectionExtension.class);
extension.addProperty("name", "value");
// Open
this.source.openOfficeFloor();
// Ensure extend the template
this.assertHttpRequest("/template", 200, "extended");
}
COM: <s> ensure able to provide </s>
|
funcom_train/22655124 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireLogEventAdded (LogEvent logEvent) {
uniqueLogCriteria.add(logEvent);
this.processedEventCount += 1;
// inform the controller of events being added only if this model
// is the current one
if (this.controller.getCurrentLogEventModel() == this){
this.controller.notifyLogEventOccurred(logEvent);
} else {
// inform the Controller to simply update the status
this.controller.setStatus();
}
}
COM: <s> this method is called when a new event is added to the model </s>
|
funcom_train/33519057 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private Long generateMatchID() {
Long maxActualID = 0l;
for (Long id : leaguesMap.keySet()) {
League league = leaguesMap.get(id);
Long maxMatchId = league.getMaxMatchId();
if (maxMatchId > maxActualID) {
maxActualID = maxMatchId;
}
}
return ++maxActualID;
}
COM: <s> this method is used to generate a new valid id for a match </s>
|
funcom_train/3814387 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addExitPoint(ContextPair cp, SentenceHMMState state) {
List<SearchState> list = exitPoints.get(cp);
if (list == null) {
list = new ArrayList<SearchState>();
exitPoints.put(cp, list);
}
list.add(state);
}
COM: <s> adds an exit point to this gstate </s>
|
funcom_train/39296237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testInvalidResponse() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest("GET", "/data/features/notype.json");
MockHttpServletResponse response = new MockHttpServletResponse();
request.addParameter("typeName", "notype");
request.addParameter("restViewType", "json");
servlet.service(request, response);
assertTrue("The response status must contain error", response.getStatus() != 200);
}
COM: <s> no data ingested into repository </s>
|
funcom_train/12194267 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testFormattingToString() {
String array [] = {"one", "two", "three"};
String result = ArrayUtils.toString(array, ", ", true);
assertEquals("\"one\", \"two\", \"three\"", result);
result = ArrayUtils.toString(array, ", ", false);
assertEquals("one, two, three", result);
}
COM: <s> test the formatting version of to string </s>
|
funcom_train/50935218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Reader getReader() {
try {
return new FileReader(input);
}
catch (FileNotFoundException fnfe) {
System.err.println("Unable to find the file specified by " + getKey());
return null;
}
catch (Exception ioe) {
System.err.println("Unable to create the file " + getKey());
return null;
}
}
COM: <s> return the input stream </s>
|
funcom_train/8022279 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void printTaskResults(String value, String units, String lastUpdate) {
System.out.format("%20s: %30s %7s %8s %s (WattDepot: %s, GData: %s)%n",
name, sourceName, value, units, lastUpdate, wattDepotElapsedTime, gdataElapsedTime);
}
COM: <s> the standard string to be printed out when a task finishes processing </s>
|
funcom_train/2959787 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void overloadChecking() throws ContradictionException {
sortRTasks(makeRLatestCompletionTimeCmp());
setupMasterTree(disjTreeT, ECT);
for (IRTask t : rtasks) {
final ITask i = t.getTaskVar();
disjTreeT.insertInTheta(i);
if (disjTreeT.getTime() > i.getLCT()) {
t.fail();
}
}
setMakespanLB(disjTreeT);
}
COM: <s> overload checking rule </s>
|
funcom_train/4135853 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addSchoolPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ThesisBibTexEntry_school_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ThesisBibTexEntry_school_feature", "_UI_ThesisBibTexEntry_type"),
BibtexPackage.Literals.THESIS_BIB_TEX_ENTRY__SCHOOL,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the school feature </s>
|
funcom_train/49670725 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createLabelHomePage() {
labelHomePage = new Label(shell, SWT.NONE);
labelHomePage.setText("Homepage:");
labelHomePage.setFont(SharedStyle.FONT_BOLD);
labelHomePage.setLayoutData(SharedStyle.relativeTo(labelReleased, logo));
}
COM: <s> creates label that says homepage </s>
|
funcom_train/10238324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JRadioButton getJRadioButtonModifiedByMe() {
if (jRadioButtonModifiedByMe == null) {
jRadioButtonModifiedByMe = new JRadioButton();
jRadioButtonModifiedByMe.setBounds(new Rectangle(220, 351, 27, 24));
jRadioButtonModifiedByMe.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
listModifiedFiles();
}
});
}
return jRadioButtonModifiedByMe;
}
COM: <s> this method initializes j radio button modified by me </s>
|
funcom_train/22977422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString(){
String res = "";
res += "id : " + id;
res += ", ";
res += "Name : " + name;
res += ", ";
res += "Category : " + category;
res += ", ";
res += "startTime : " + startTime;
res += ", ";
res += "endTime : " + this.endTime;
res += ", ";
res += "comments : " + this.comments;
return res;
}
COM: <s> return the object in a string format </s>
|
funcom_train/44493611 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setDefaultVariableValue(String attributeName, String attributeValue){
if (isContextVariableNull(attributeName)) {
context.setVariable(attributeName,attributeValue);
}else{
log.debug("setDefaultVariableValue: Not setting variable \""+attributeName+"\" with value \""+attributeValue+"\" because it has already been set");
}
}
COM: <s> sets the variable to a default value in the context </s>
|
funcom_train/3329914 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean hasFacet(String name) {
if (name == null) return false;
for (int i = 0; i < facets.size(); i++) {
Facet facet = (Facet) facets.get(i);
if (name.equals(facet.getName())) return true;
}
return false;
} //-- hasFacet
COM: <s> returns true if this simpletype has a specified facet </s>
|
funcom_train/10785550 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testMapping() {
assertStrategy(PersistentRelation.class, "source", HandlerFieldStrategy.class, UntypedPCValueHandler.class);
assertStrategy(PersistentRelation.class, "target", HandlerFieldStrategy.class, UntypedPCValueHandler.class);
assertStrategy(PersistentRelation.class, "attrs", HandlerHandlerMapTableFieldStrategy.class, null);
}
COM: <s> verifies that fields are mapped with expected strategy or value handlers </s>
|
funcom_train/2624638 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetForTreeTab() {
homeLayer.setVisible(false);
for (Widget w : vd.getWidgetsMap().values()) {
w.setVisible(true);
}
for (Window w : vd.getWindows()) {
w.setVisible(true);
}
edgeLayer.setVisible(true);
eventLayer.setVisible(true);
labelLayer.setVisible(true);
windowLayer.setVisible(true);
for (TestCase currTestCase : vd.getTestCases()) {
currTestCase.getSelfLayer().setVisible(false);
}
}
COM: <s> resets the pvisualization canvas for use with the visualization tree </s>
|
funcom_train/9196054 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void calculateVega() {
// Initialize the options variable again as entered by the users
initializeOptionsVariable();
// Increment the value of volatility by 1% and calculate the new option prices by this change.
volatility = volatility + 0.01;
// Re-calculate the option parameters again to consider the change to volatility
calculateOptionsParameters();
// Calculate the option price again due to change in volatility
calculateOption();
vega = (treeNode[0][0].optionPrice - actualOptionPrice)/(0.01 * 100);
}
COM: <s> calculate the greek letter vega </s>
|
funcom_train/6337948 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void parse(String path) {
StringTokenizer tok = new StringTokenizer(path, "/");
Map m = map;
while (tok.hasMoreTokens()) {
String token = tok.nextToken();
Map n = (Map)m.get(token);
if (n == null) {
n = new HashMap();
m.put(token, n);
}
m = n;
}
}
COM: <s> parses given path into tokens </s>
|
funcom_train/32800275 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addOperationNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_OperationCallBaseExpCS_operationName_feature"),
getString("_UI_PropertyDescriptor_description",
"_UI_OperationCallBaseExpCS_operationName_feature",
"_UI_OperationCallBaseExpCS_type"),
OclPackage.Literals.OPERATION_CALL_BASE_EXP_CS__OPERATION_NAME,
true, false, true, null, null, null));
}
COM: <s> this adds a property descriptor for the operation name feature </s>
|
funcom_train/46761489 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ReportModel getReport(final long reportId, final ServiceCall call) throws Exception {
IBeanMethod method = new IBeanMethod() { public Object execute() throws Exception {
if (call.isStoreAudit()) {
BaseData.getSecurity().storeAudit(call.getUserRefId(), reportId, "Viewed Report", call);
}
return ReportsData.getReport(reportId, call);
}}; return (ReportModel) call(method, call);
}
COM: <s> return the single report model for the primary key </s>
|
funcom_train/17279278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
StringBuffer text = new StringBuffer();
if(multiPara) {
text.append(plainText);
}
else {
int i;
for(i=0;i<clipText.size();i++) {
text.append((String) clipText.elementAt(i));
}
}
return text.toString();
}
COM: <s> get a string containing all chunks of text contained in this object </s>
|
funcom_train/17714117 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String transformStatus(String status) {
if (status.equals("D")) {
return "DRAFT";
} else if (status.equals("A")) {
return "ACCEPTED";
} else if (status.equals("I")) {
return "INTERVIEWED";
} else if (status.equals("R")) {
return "REJECTED";
} else {
return "";
}
}
COM: <s> transform the status </s>
|
funcom_train/14517134 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Collection getCAIdsWithCMSServiceActive(){
ArrayList retval = new ArrayList();
Collection caids = caadminsession.getAvailableCAs(administrator);
Iterator iter = caids.iterator();
while(iter.hasNext()){
Integer caid = (Integer) iter.next();
retval.add(caid);
}
return retval;
}
COM: <s> method returning all ca ids with cms service enabled </s>
|
funcom_train/20215665 | /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:|90-getter|0|90-preInit
// write pre-init user code here
backCommand1 = new Command("Back", Command.BACK, 2);//GEN-LINE:|90-getter|1|90-postInit
// write post-init user code here
}//GEN-BEGIN:|90-getter|2|
return backCommand1;
}
COM: <s> returns an initiliazed instance of back command1 component </s>
|
funcom_train/37246323 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Score makeMusic() {
Score score = new Score();
// prompt to read in a file
FileDialog fd = new FileDialog(new Frame(),
"Select a MIDI file to open.",
FileDialog.LOAD);
fd.show();
if (fd.getFile() != null) {
Read.midi(score, fd.getDirectory() + fd.getFile());
}
return score;
}
COM: <s> create a score and return it to the calling class </s>
|
funcom_train/10594591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected Object getConfiguration(CopletInstance coplet, String key) {
final CopletDefinition copletDefinition = coplet.getCopletDefinition();
Object data = copletDefinition.getAttribute( key );
if ( data == null) {
data = copletDefinition.getCopletType().getCopletConfig().get( key );
}
return data;
}
COM: <s> get a configuration value </s>
|
funcom_train/50189018 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void fireStartResultDocument() {
if (hasTraceListeners()) {
// count of registered tracelisteners
int countListener = traceListeners.size();
for (int i = 0; i < countListener; i++) {
TraceListener currentListener =
(TraceListener) traceListeners.elementAt(i);
// call the according method on tracelistener
currentListener.startResultDocument();
}
}
}
COM: <s> indicates the begin of the result document </s>
|
funcom_train/37556422 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copy() {
checkWidget();
int length = selection.y - selection.x;
if (length > 0) {
try {
setClipboardContent(selection.x, length);
}
catch (SWTError error) {
// Copy to clipboard failed. This happens when another application
// is accessing the clipboard while we copy. Ignore the error.
// Fixes 1GDQAVN
// Rethrow all other errors. Fixes bug 17578.
if (error.code != DND.ERROR_CANNOT_SET_CLIPBOARD) {
throw error;
}
}
}
}
COM: <s> copies the selected text to the clipboard </s>
|
funcom_train/87090 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void resetSavePoint() throws StandardException {
if (SanityManager.DEBUG)
{
if (SanityManager.DEBUG_ON("traceSavepoints"))
{
SanityManager.DEBUG_PRINT(
"GenericStatementContext.resetSavePoint()",
internalSavePointName);
}
}
if (inUse && setSavePoint)
{
// RESOLVE PLUGIN ???. For the plugin, there will be no transaction controller
if ( tc != null ) { tc.setSavePoint(internalSavePointName, null); }
// stage buffer management
}
}
COM: <s> resets the savepoint to the current spot if it is </s>
|
funcom_train/20874695 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String cat() {
StringBuffer s = new StringBuffer();
for (int i = 0; i < iBase; i++)
if (iCnt[i] > 0) {
s.append((char) ('A' + i));
s.append(iCnt[i]);
}
return s.toString();
}
COM: <s> category of a sequence i </s>
|
funcom_train/28752964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setCdnartlotnum(String newVal) {
if ((newVal != null && this.cdnartlotnum != null && (newVal.compareTo(this.cdnartlotnum) == 0)) ||
(newVal == null && this.cdnartlotnum == null && cdnartlotnum_is_initialized)) {
return;
}
this.cdnartlotnum = newVal;
cdnartlotnum_is_modified = true;
cdnartlotnum_is_initialized = true;
}
COM: <s> setter method for cdnartlotnum </s>
|
funcom_train/50484944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ColumnType getTypeFromString(DatabaseConnection dbc, String s) {
ColumnType[] types = getColumnTypes(dbc);
for (int i=0; i<typeCache.length; i++)
if (types[i].toString().equals(s))
return types[i];
return getDefaultColumnType();
}
COM: <s> given a type string return the column type that matches it </s>
|
funcom_train/18023800 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setSlopeMin(Datum slopeMin) {
Datum oldVal= this.slopeMin;
if ( !this.slopeMin.equals( slopeMin ) ) {
this.slopeMin = slopeMin;
PropertyChangeEvent e= new PropertyChangeEvent( this, "slope", oldVal, slopeMin );
firePropertyChangeListenerPropertyChange( e );
recalculateSoon();
}
}
COM: <s> setter for property slope min </s>
|
funcom_train/51197347 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String toString() {
return super.toString() + "(" + this.cMinY + "," + this.cMaxY + "," +
this.cMinSlope + "," + this.cMaxSlope + "," + this.cSteps + ")";
}
COM: <s> return a string describing the current instance giving the values </s>
|
funcom_train/14156686 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void stateChanged(ChangeEvent e) {
String txt = new String(jTextArea_Log.getText());
if (!txt.equals(before)) {
jScrollPane1.getVerticalScrollBar().setValue(jTextArea_Log.getDocument().getLength());
before = txt;
}
}
COM: <s> invoked when new text is appended </s>
|
funcom_train/32785740 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextPane getJTextPane() {
if (jTextPane == null) {
jTextPane = new JTextPane();
jTextPane.setBounds(19, 8, 222, 84);
jTextPane.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.SystemColor.activeCaption,2));
}
return jTextPane;
}
COM: <s> this method initializes j text pane </s>
|
funcom_train/856860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void checkScreenResolution(){
if (screenSize.getHeight() < PropertiesEditor.Default_height_2_Langs ||
screenSize.getWidth() < PropertiesEditor.Default_width) {
JOptionPane.showMessageDialog(null, I18n.tr("screenResolution.dfmCreatorMain"),
I18n.tr("screenResolutionTitle.dfmCreatorMain"), JOptionPane.INFORMATION_MESSAGE);
}
}
COM: <s> check screen resolution checks the resolution </s>
|
funcom_train/46764710 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getControlPanel() {
if (controlPanel == null) {
controlPanel = new JPanel();
controlPanel.setLayout(new BorderLayout());
controlPanel.add(getAutofocusCheckBox(), BorderLayout.NORTH);
controlPanel.add(getResetButton(), BorderLayout.SOUTH);
controlPanel.setBorder(BorderFactory.createTitledBorder("Steuerung"));
}
return controlPanel;
}
COM: <s> this method initializes control panel </s>
|
funcom_train/19338577 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean categoryDoesntExist (String name) {
boolean doesntExist = true;
for (int i = 0; i < categories.size(); i++) {
if (((Category) categories.get(i)).getName().equals(name)) {
doesntExist = false;
}
}
return doesntExist;
}
COM: <s> checks whether a category exists or not </s>
|
funcom_train/3875653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int findSeries(Series series) {
boolean found = false;
int pos = -1;
Series item;
for (int i = 0; i < result.size() && !found; i++) {
item = (Series) result.get(i);
found = item.toString().equals(series.toString());
if (found) {
pos = i;
}
}
return pos;
}
COM: <s> looks for the series in the </s>
|
funcom_train/16178011 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void shutdown() {
stopSim();
model.setup();
if (model != null) {
String modelName = model.getClass().getName();
FrameFactory.saveFrameData(modelName);
ChartArchiver.saveCharts(modelName, chartModels);
}
model = null;
System.gc();
if (console != null) {
console.dispose();
console = null;
}
}
COM: <s> exits the simulation but does not exit the jvm </s>
|
funcom_train/20043415 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void _setParentStyle() {
boolean result = true ;
try {
oObj.setParentStyle(oMyStyle.getName());
} catch (com.sun.star.container.NoSuchElementException e) {
log.println("Exception occured while method call: " + e);
result = false ;
}
tRes.tested("setParentStyle()",result);
}
COM: <s> sets the style name which was passed as relation </s>
|
funcom_train/11393576 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void list() throws IOException {
String dirName = dirs.get(r.nextInt(dirs.size()));
long startTime = System.currentTimeMillis();
fc.listStatus(new Path(dirName));
executionTime[LIST] += (System.currentTimeMillis()-startTime);
totalNumOfOps[LIST]++;
}
COM: <s> the list operation randomly picks a directory in the test space and </s>
|
funcom_train/21080761 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addModuleDescriptor(File zip, ModuleDescriptor md) throws IOException {
LOGGER.debug("Adding content for moduleDescriptor" + md);
String dest = getBaseDir(md);
LOGGER.debug("Extracting zip file in " + dest);
ZipHelper.extract(zip, "", dest);
LOGGER.info("Content added for moduleDescriptor" + md);
}
COM: <s> add a module descriptor in content file system </s>
|
funcom_train/34340107 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Command getEnvio() {
if (Envio == null) {//GEN-END:|18-getter|0|18-preInit
// write pre-init user code here
Envio = new Command("Ok", Command.OK, 0);//GEN-LINE:|18-getter|1|18-postInit
// write post-init user code here
}//GEN-BEGIN:|18-getter|2|
return Envio;
}
COM: <s> returns an initiliazed instance of envio component </s>
|
funcom_train/26098020 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextField getTxtProxyChainPassword() {
if (txtProxyChainPassword == null) {
txtProxyChainPassword = new JPasswordField();
txtProxyChainPassword.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
proxyDialog.saveAndClose();
}
});
}
return txtProxyChainPassword;
}
COM: <s> this method initializes txt proxy chain password </s>
|
funcom_train/42660437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void fireOnAfterRemoveEvent(E obj) {
// generate after remove event
if (this.onAfterRemoveEvent != null
&& 0 < this.onAfterRemoveEvent.getListenerCount()) {
// create event
ActionEventAfter_1x0<E> e = new ActionEventAfter_1x0<E>(this,
eventID++, CM_AFTER_REMOVE);
e.setData(obj);
this.onAfterRemoveEvent.fire(e);
}
}
COM: <s> fires on after remove event </s>
|
funcom_train/43245383 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetECTwoWorkPhone() {
System.out.println("getECTwoWorkPhone");
EmergencyContactDG4Object instance = new EmergencyContactDG4Object();
String expResult = "";
String result = instance.getECTwoWorkPhone();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of get ectwo work phone method of class org </s>
|
funcom_train/51071452 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void application_enqueue (SinkIF sink, QueueElementIF item) {
final String tag = this.tag + ".application_enqueue";
if (DEBUG) logger.debug (tag + ": enqueuing " + item + " to " + sink);
classifier.dispatch_later(new EnqueueEvent (sink, item), 0);
}
COM: <s> code application enqueue code calls </s>
|
funcom_train/43245357 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testSetMeanTest() {
System.out.println("setMeanTest");
boolean meanTest = true;
FamilyDemographicDependentObject instance = new FamilyDemographicDependentObject();
instance.setMeanTest(meanTest);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
COM: <s> test of set mean test method of class org </s>
|
funcom_train/1773049 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void printEngagementGoal(Engagement engagement) {
System.out.println("\n\t----- Engagement Goal -----");
System.out.println(
"\n\tGoal Type = " + engagement.getType() +
"\n\tGoal Comparison = " + engagement.getComparison() +
"\n\tGoal Threshold = " + engagement.getThresholdValue());
}
COM: <s> prints the important information for engagement goals </s>
|
funcom_train/34422113 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fireProcessChanged(int aEvent, WorkItem aitem) {
for (Iterator all = processListeners.iterator(); all.hasNext();) {
IProcessListener listener = (IProcessListener) all.next();
try {
listener.processChanged(new WorkItemEvent(aEvent, aitem));
} catch (Exception aEx) {
// remove bad service listenr
aEx.printStackTrace();
this.removeProcessListener(listener);
}
}
}
COM: <s> fires a work item created event </s>
|
funcom_train/45897766 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void pan(int dx, int dy) {
mapRect.x = Math.max(0, Math.min(mapRect.x + dx, mapRect.width - width));
mapRect.y = Math.max(0, Math.min(mapRect.y + dy, mapRect.height - height));
}
COM: <s> pan the view by the given amount in each direction </s>
|
funcom_train/35831814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paint( Graphics g ) {
super.paint( g );
g = drawingCanvas.getGraphics();
drawingCanvas.setBackground(Color.white);
g.setColor(Color.red);
if (root == null) {
g.drawString("NOTHING TO DRAW!!!", 20, 50);
} else {
Rectangle drawingArea = drawingCanvas.getBounds();
setPositions( drawingArea );
Iterator it = preOrderPositionIterator();
while (it.hasNext()) {
((DrawableBTNode)it.next()).drawNode( g, true );
}
}
}
COM: <s> paints the tree on the canvas </s>
|
funcom_train/43886863 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getTileHeight(final int imageIndex) throws IOException {
if (!isInitialized)
initialize();
final SubDatasetInfo sdInfo = sourceStructure
.getSubDatasetInfo(retrieveSubDatasetIndex(imageIndex));
final long[] chunkSize = sdInfo.getChunkSize();
// TODO: Change this behavior
if (chunkSize != null) {
final int rank = sdInfo.getRank();
return (int) chunkSize[rank - 1];
} else
return Math.min(512, sdInfo.getHeight());
}
COM: <s> returns the height of a tile in the given image </s>
|
funcom_train/45692218 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPatternLengthPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Pattern_patternLength_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Pattern_patternLength_feature", "_UI_Pattern_type"),
EsxPackage.Literals.PATTERN__PATTERN_LENGTH,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the pattern length feature </s>
|
funcom_train/37189287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private SectionPanel displayWindow(){
SectionPanel p = new SectionPanel("Display Window");
//title ?
p.addNear(new JLabel("Title ?"));
p.addNear(title);
//subtitle ?
p.addBelow(new JLabel("Subtitle ?"));
p.addNear(subtitle);
//width
p.addBelow(new JLabel("Width (mm)"));
p.addNear(width);
//height
p.addBelow(new JLabel("Height (mm)"));
p.addNear(height);
return p;
}
COM: <s> build a jpanel where you can specify the window parameters </s>
|
funcom_train/17850449 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSpinner getDefaultPostrollSpinner() {
if (defaultPostrollSpinner == null) {
defaultPostrollSpinner = new JSpinner();
SpinnerNumberModel spinnerModel = new SpinnerNumberModel();
spinnerModel.setMinimum(0);
spinnerModel.setMaximum(90);
defaultPostrollSpinner.setModel(spinnerModel);
}
return defaultPostrollSpinner;
}
COM: <s> this method initializes default postroll spinner </s>
|
funcom_train/870529 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String addArgumentDocumentation() {
String explanation = "You MUST use the Oracle Berkeley XML data store with this example.\n";
explanation += "Arguments (optional ones marked with an *):\n";
explanation += "-database\t\tPath to directory containing the database\n";
explanation += "-container\t\tName of the database container\n";
explanation += "-cache\t\t\tPath to directory containing the XBRL cache\n";
return explanation;
}
COM: <s> provides documentation of the usage of the utility </s>
|
funcom_train/16783852 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void replaceIngredientElements(String[] ingredients, String[] amounts) {
if (xmlExists()) {
List<Element> ingredientList = xmlRoot.getChild(INGREDIENTS).getChildren();
ingredientList.clear();
for (int i = 0; i <= ingredients.length - 1; i++) {
createSingleIngredientElement(ingredients[i], amounts[i]);
}
}
}
COM: <s> replaces all ingredient content from the xml file and creates new ingredient </s>
|
funcom_train/3417483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StringBuffer append(CharSequence s) {
// Note, synchronization achieved via other invocations
if (s == null)
s = "null";
if (s instanceof String)
return this.append((String)s);
if (s instanceof StringBuffer)
return this.append((StringBuffer)s);
return this.append(s, 0, s.length());
}
COM: <s> appends the specified code char sequence code to this </s>
|
funcom_train/24535219 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dispose() {
// Need to check if we are already in the process of the hosting frame
// disposing it's children (including this dialog). This is a hack to
// avoid an possible infinite loop since the Frame doesn't know this dialog
// has already been disposed.
if (!isDisposing) {
isDisposing = true;
super.dispose();
if (fHostingFrame != null)
fHostingFrame.dispose();
isDisposing = false;
}
}
COM: <s> disposes the parent a frame that was instantiated at construction time </s>
|
funcom_train/12127925 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
try {
byte[] ser = PObjectOutputStream.toByteArray(this);
return (PNode) new ObjectInputStream(new ByteArrayInputStream(ser)).readObject();
}
catch (IOException e) {
e.printStackTrace();
}
catch (ClassNotFoundException e) {
e.printStackTrace();
}
return null;
}
COM: <s> the copy method copies this node and all of its descendents </s>
|
funcom_train/19895564 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void executeRequest(HttpGet get, ResponseHandler handler) throws IOException {
HttpEntity entity = null;
HttpHost host = new HttpHost(API_HOST, 80, "http");
try {
final HttpResponse response = mClient.execute(host, get);
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
entity = response.getEntity();
final InputStream in = entity.getContent();
handler.handleResponse(in);
}
} finally {
if (entity != null) {
entity.consumeContent();
}
}
}
COM: <s> executes an http request on flickrs web service </s>
|
funcom_train/7270439 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void createSharingFilesLabel() {
_sharedFiles.setHorizontalAlignment(SwingConstants.LEFT);
// don't allow easy clipping
_sharedFiles.setMinimumSize(new Dimension(24, 20));
// add right-click listener
_sharedFiles.addMouseListener(STATUS_BAR_LISTENER);
// initialize tool tip
_sharedFiles.updateToolTip(0);
}
COM: <s> sets up the sharing x files label </s>
|
funcom_train/20577226 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void invitationReplyEventHandler(InvitationReplyEventArgs args) {
if (args.getInvitation().getSender().getLogin().equals(this.getLogin()) ||
args.getInvitation().getDestiny().getLogin().equals(this.getLogin())) {
this.send(args.getOriginalMessage());
}
}
COM: <s> handles the invitation reply event </s>
|
funcom_train/21471704 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void executeCommand(String ID) {
ICommandService com = (ICommandService) PlatformUI.getWorkbench()
.getService(ICommandService.class);
Command c = com.getCommand(ID);
ExecutionEvent e = new ExecutionEvent(c, new HashMap<String, String>(),
null, null);
try {
c.executeWithChecks(e);
} catch (Exception err) {
err.printStackTrace();
}
}
COM: <s> helper method to execute a command with the given id that has no </s>
|
funcom_train/7980774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getIgnoredSeeds() {
File ignoredFile = new File(getDirectory(),
AbstractFrontier.IGNORED_SEEDS_FILENAME);
if(!ignoredFile.exists()) {
return null;
}
try {
return FileUtils.readFileAsString(ignoredFile);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}
}
COM: <s> utility method to get the stored list of ignored seed items if any </s>
|
funcom_train/30005769 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JTextArea getTargetStateArea() {
if (this.targetStateArea == null) {
this.targetStateArea = new JTextArea();
this.targetStateArea.setEditable(false);
this.targetStateArea.setLineWrap(true);
this.targetStateArea.setWrapStyleWord(true);
}
return this.targetStateArea;
}
COM: <s> gets the target state pane </s>
|
funcom_train/38535591 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int getEarliestStartTime(int operationID, int resourceID) {
int opIdx = getVerifiedOperationIdxForID(operationID);
if (opIdx < 0)
return opIdx;
int resIdx = getVerifiedResourceIndexForIDPerOperationIndex(opIdx, resourceID);
if (resIdx < 0)
return resIdx;
return ((ActOperationDomain) operations.get(opIdx)).getEarliestStartTime(resIdx);
}
COM: <s> returns the earliest start time for the given operation and resource id combination </s>
|
funcom_train/41825047 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void process(int[] input, int[] output, int size) {
for (int i = 0; i < size; i++){
output[i] = outputHalfValue + (int) (fidlib.run(id, (input[i] - inputHalfValue) / inputHalfRange) * outputHalfRange);
//System.out.println("f: in=" + input[i] + " out=" + output[i]);
}
}
COM: <s> perform method comment </s>
|
funcom_train/3944314 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void unit() {
for (int r = 0; r < this.rows; r++) {
for (int c = 0; c < this.columns; c++) {
if (r == c) {
mat[r][c] = 1.0;
} else {
mat[r][c] = 0.0;
}
}
}
}
COM: <s> make matrix a unit matrix by setting its values to 1 </s>
|
funcom_train/45453923 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void createPartControl(Composite parent) {
// Text commandInput = new Text(parent,SWT.BORDER);
// commandInput.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.setContentProvider(new ViewContentProvider());
viewer.setLabelProvider(new ViewLabelProvider());
viewer.setSorter(new NameSorter());
viewer.setInput(getViewSite());
makeActions();
hookContextMenu();
hookDoubleClickAction();
contributeToActionBars();
}
COM: <s> this is a callback that will allow us </s>
|
funcom_train/26528814 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void dataPointsComplete() {
if (dataPointsList == null) {
dataPoints = new DataPoint[0];
numSamples = 0;
} else {
dataPoints = new DataPoint[dataPointsList.size()];
dataPoints = (DataPoint[]) dataPointsList.toArray(dataPoints);
numSamples = dataPoints.length;
}
}
COM: <s> this method should be called after the last historical data point </s>
|
funcom_train/18338778 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Ontology deleteIntersectionGT(Goal intersectionGT, Ontology sdcGraph){
deleteGoalTemplate(intersectionGT, sdcGraph);
List<Instance> iGTarcs = getGoalGraphArcByTarget(intersectionGT, sdcGraph);
for (Instance aIGTarcs : iGTarcs) {
deleteGoalGraphArc(sdcGraph, aIGTarcs);
}
return sdcGraph;
}
COM: <s> deletes an intersection goal templates also the 2 incoming goal graph arcs </s>
|
funcom_train/7275924 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean writeBlock(WriteRequest request) {
if(!validateState(request))
return true;
request.startProcessing();
updateState(request.in);
boolean canWrite = diskController.get().canWriteNow();
if(canWrite)
return writeBlockImpl(request);
else // do not try to write if something else is waiting.
return false;
}
COM: <s> writes bytes to the underlying file </s>
|
funcom_train/13447276 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setParent(MutableTreeNode parent) {
//TODO: get rid of this log
//log.log(Level.WARNING, "how did we get here", new Throwable().fillInStackTrace());
super.setParent(parent);
if (parent != null) {
path =
((FHTreeStateNode) parent).getTreePath().pathByAddingChild(
getUserObject());
addMapping(this);
}
}
COM: <s> messaged when this node is added somewhere resets the path and adds </s>
|
funcom_train/1281280 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void attributeAdded(HttpSessionBindingEvent event) {
if (event.getName().equals(EVENT_KEY) && !isAnonymous()) {
SecurityContext securityContext = (SecurityContext) event.getValue();
if (securityContext.getAuthentication().getPrincipal() instanceof User) {
User user = (User) securityContext.getAuthentication().getPrincipal();
addUsername(user);
}
}
}
COM: <s> this method is designed to catch when users login and record their name </s>
|
funcom_train/37017534 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ImageIcon createImageIcon(String path) {
java.net.URL imgURL = ToolEditorPrivilegedUserPanel.class.getResource(path);
if (imgURL != null) {
return new ImageIcon(imgURL);
} else {
logger.error("Couldn't find file: " + path);
return null;
}
}
COM: <s> create the icons </s>
|
funcom_train/37609104 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void sortLegs(int index) {
OCity ccc = JavaDriver.getCity();
OLeg xleg = null;
int lgct = zleg.size();
if (lgct <= 0) return;
OLeg[] aleg = zleg.toArray(new OLeg[lgct]);
zleg.clear();
phxlt.clear();
for (int jjj = 0; jjj < lgct; jjj++)
this.addLeg(aleg[(jjj+index)%lgct]);
legtab = null;
this.clearBRSeq();
this.seqLegs();
} // sortLegs()
COM: <s> reorganizes the tt oleg tt vector </s>
|
funcom_train/40501150 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void makeUser(String userName) throws Exception {
String email = userName + testdomain;
SensorBaseClient.registerUser(this.host, email);
SensorBaseClient client = new SensorBaseClient(host, email, email);
client.authenticate();
client.setTimeout(100000);
client.deleteSensorData(email);
clients.put(userName, client);
shells.put(userName, makeShell(email));
}
COM: <s> registers the user with the test domain suffix at the host </s>
|
funcom_train/29954571 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testGetShapeType() {
System.out.println("getShapeType");
ShapeObject instance = new ShapeObject(el);
EnumShapeType expResult = EnumShapeType.SINGLESTEP;
EnumShapeType result = instance.getShapeType();
System.out.println(result);
assertEquals(expResult, result);
}
COM: <s> test of get shape type method of class hbm </s>
|
funcom_train/11769518 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void init() throws UsbProtocolException {
if (isInit) {
return;
}
// Initialisation
GarminUsbDevice.init();
// Verification presence du protocol
if (!GarminUsbDevice.getDevice().containsProtocol(getProtocolName())) {
log.error("Pas de protocole " + getProtocolName());
throw new UsbProtocolException(UsbProtocolException.ERR_NO_PROTOCOL);
}
isInit = true;
}
COM: <s> initialisation avant r eacute cup eacute ration des courses </s>
|
funcom_train/10211774 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Object clone() {
Int16PrimitiveVector v = (Int16PrimitiveVector)super.clone();
if (vals != null) {
v.vals = new short[vals.length];
System.arraycopy(vals, 0, v.vals, 0, vals.length);
}
return v;
}
COM: <s> returns a clone of this code int16 primitive vector code </s>
|
funcom_train/21883932 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private String getSettingType(final String type, final String name) {
final StringBuffer sb = new StringBuffer();
sb.append("setting.").append(type + ".").append(name + ".").append(Constants.PROPERTY_SET_TYPE_FIELD);
return getProject().getProperty(sb.toString());
}
COM: <s> returns the setting type </s>
|
funcom_train/26019392 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void receiveImageSharingInvitation(SipRequest invite) {
if (logger.isActivated()) {
logger.info("Receive an image sharing session invitation");
}
// Test image size
// TODO
// Create a new session
ContentSharingTransferSession session = new TerminatingContentSharingSession(this, invite);
// Start the session
session.startSession();
// Notify listener
getImsModule().getCore().getListener().handleContentSharingTransferInvitation(session);
}
COM: <s> receive an image sharing invitation </s>
|
funcom_train/27824384 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected ConceptPropertiesTable createConceptPropertiesTable(boolean from) {
ConceptPropertiesTable properties=new ConceptPropertiesTable(m_oimodelerViewable,from);
new JTablePopupMenuManipulator(properties,m_oimodelerViewable.getModule().getAppDriver().createPopupMenu("popup.oimodeler.selection"));
new DoubleClickSelectionFocuser(m_oimodelerViewable,properties);
return properties;
}
COM: <s> creates an code concept properties table code for from or to properties </s>
|
funcom_train/41979253 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void paintComponent (Graphics g) {
super.paintComponent (g);
Graphics2D g2d = (Graphics2D) g;
g2d.setColor (Color.BLACK);
if (controller.getPuzzle() != null) {
controller.getPuzzle().draw (g2d);
}
setPreferredSize (getPreferredSize ());
revalidate();
}
COM: <s> draws everything on the output panel </s>
|
funcom_train/14243504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public JPanel makePanel(int newStep) {
switch (newStep) {
case 1:
if (_step1 == null) {
Vector names = new Vector();
int size = _mes.size();
for (int i = 0; i < size; i++) {
MModelElement me = (MModelElement) _mes.elementAt(i);
names.addElement(me.getName());
}
_step1 = new WizStepManyTextFields(this, _instructions, names);
}
return _step1;
}
return null;
}
COM: <s> create a new panel for the given step </s>
|
funcom_train/38907288 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public long storeSpecificationFromFile(String specFileURL, String specResultsURL) throws TransformerException, XPathExpressionException {
Document specification = transformXMLFileToDocument(specFileURL);
Document results = transformXMLFileToDocument(specResultsURL);
long id;
try {
id = storeSpecification(specification, results);
} catch (SQLException e) {
e.printStackTrace();
return -1;
}
return id;
}
COM: <s> this method stores a simulation specification and its results in the database </s>
|
funcom_train/5875038 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void endModing() {
if (_moding) {
assert D.OFF || _mode != EMBEDDED;
if (_mode == MODAL)
Executions.notifyAll(_mutex);
if (_mode == MODAL)
response(null, new AuEndModal(this));
else if (_mode == POPUP)
response(null, new AuEndPopup(this));
else
response(null, new AuEndOverlapped(this));
_moding = false;
}
}
COM: <s> ends the modal mode </s>
|
funcom_train/22929437 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String componentsToPath(List components) {
if (components.size() == 1) {
String first = (String) components.get(0);
if (first.length() == 0 || isRoot(first)) {
return first + this.getSeparator();
}
}
return StringUtil.join(components, this.getSeparator());
}
COM: <s> build a path from the specified list of path components </s>
|
funcom_train/22742182 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void connect(String deviceName) throws IOException{
String url = (String) serviceTable.get(deviceName);
log("con.url:" + url);
connection = (StreamConnection) Connector.open(url);
log("physical con ok");
in = connection.openDataInputStream();
out = connection.openDataOutputStream();
}
COM: <s> connect to the given device </s>
|
funcom_train/3318874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addNoteItem (NoteItem noteItem) {
// does the note have a parent, if so remove it from that parent
if (noteItem.getParent() != null) {
Note noteParent = noteItem.getParent();
try {
noteParent.removeNoteItem(noteItem);
} catch (NoteItemNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
noteItem.setParent(this);
noteItems.add (noteItem);
}
COM: <s> this method adds the supplied note item to this note </s>
|
funcom_train/47804752 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void loadWordList( URL filename ) throws IOException {
URLConnection conn = filename.openConnection();
conn.setReadTimeout( 5000 );
InputStream input = conn.getInputStream();
input = new InflaterInputStream( input );
input = new BufferedInputStream( input );
loadPlainWordList( input, "UTF8" );
}
COM: <s> load the directory from a compressed list of words with utf8 encoding </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.