__key__
stringlengths 16
21
| __url__
stringclasses 1
value | txt
stringlengths 183
1.2k
|
---|---|---|
funcom_train/7579911 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void validateFile(String sourceFileName) throws SAXException, IOException{
// sourcefile = replaceSpaces(sourcefileName); // avoids MalformedURLException if file path has spaces
// validator.validate(new StreamSource(sourcefile));
File sourceFile = new File(sourceFileName);
validateFile(sourceFile);
}
COM: <s> validates a source file against the compiled schema </s>
|
funcom_train/29629555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Thread getExecutingThread() {
if (this.executingThread == null){
this.executingThread = new Thread(this);
} else {
if ((this.state == ActionState.FINISHED) || (this.state == ActionState.CANCELLED)) {
resetAction();
this.executingThread = new Thread(this);
}
this.executingThread.setName(this.getClass().getName());
}
return this.executingThread;
}
COM: <s> returns the instance of the current thread </s>
|
funcom_train/50105497 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String formatRadioButton(String radioButton, String selectedItem) {
if (isEmpty(selectedItem))
return radioButton;
else {
// Replace <INPUT value=ssouza name=groupname type=radio>ssouza<br>
// With <INPUT value=ssouza checked name=groupname type=radio>ssouza<br>
radioButton = AppConstants.replaceString(radioButton, selectedItem+" ", selectedItem+" checked ");
return radioButton;
}
}
COM: <s> select highlight an item in an html radio button list box </s>
|
funcom_train/17976603 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JPanel getJPanel1() {
if (jPanel1 == null) {
GridLayout gridLayout = new GridLayout();
gridLayout.setRows(1);
jLabel = new JLabel();
jLabel.setText("Radius : ");
jLabel.setHorizontalAlignment(SwingConstants.TRAILING);
jPanel1 = new JPanel();
jPanel1.setLayout(gridLayout);
jPanel1.add(jLabel, null);
}
return jPanel1;
}
COM: <s> this method initializes j panel1 </s>
|
funcom_train/13190074 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JSplitPane getJSplitPane2() {
if (jSplitPane2 == null) {
jSplitPane2 = new JSplitPane();
jSplitPane2.setOrientation(JSplitPane.VERTICAL_SPLIT);
jSplitPane2.setOneTouchExpandable(true);
jSplitPane2.setTopComponent(new JScrollPane(getMovesListPanel()));
jSplitPane2.setBottomComponent(getCommentView());
jSplitPane2.setMinimumSize(new Dimension(300, 600));
}
return jSplitPane2;
}
COM: <s> this method initializes j split pane2 </s>
|
funcom_train/1340677 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Domains getDomainList() throws BudaException {
DomainsRequest metaRequest = new DomainsRequest();
try {
String xml = clientConfig.sendMetaXML(metaRequest.getXML());
Document document = XMLHandler.loadXMLString(xml);
return Domains.fromXML(XMLHandler.getSubNode(document, Domains.XML_TAG));
}
catch(Exception e) {
throw new BudaException("Unable to get domain list", e);
}
}
COM: <s> retrieve the list of domains that are available on the buda server </s>
|
funcom_train/37816504 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void editAssertion(int id, String preAssertion, String postAssertion){
UndoableEdit edit = new AssertionEdit( model, id, preAssertion, postAssertion, evaluator, this);
boolean everythingsFine = true;
try {
edit.apply();
} catch( InvalidParameterException e ){
everythingsFine = false;
setStatusText(e.getMessage());
}
if( everythingsFine ){
undoManager.addEdit( edit );
view.grayUndo(false);
if( mc != null )
mc.setSaveStatus(SaveStatus.CHANGES_TO_SAVE);
lastSave++;
}
}
COM: <s> edits assertion given from the view </s>
|
funcom_train/41262373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JMenuItem getJMenuItem() {
if (jMenuItem == null) {
jMenuItem = new JMenuItem("Entrar", this.connectIcon);
jMenuItem.setMnemonic('E');
jMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
conectar();
}
});
}
return jMenuItem;
}
COM: <s> this method initializes j menu item </s>
|
funcom_train/45833125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private BufferedImage getFailImage(final HttpServletRequest request) {
try {
// BAD BAD IMAGE!
byte[] datum = getFailImageData(request);
// and reset the image object.
ByteArrayInputStream bais = new ByteArrayInputStream(datum);
BufferedImage image = ImageIO.read(bais);
return image;
} catch (Exception e) {
LOG.error("Can't even get the freaking fail image!", e);
}
return null;
}
COM: <s> reads in the fail image as a buffered image for resizing </s>
|
funcom_train/19724997 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void run(IAction action) {
try {
IViewPart ivp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.neontoolkit.module.operators.decomposition.dependencybased.views.PartitioningView");
((PartitioningView)ivp).selectionChanged(null, selection);
} catch (PartInitException e) {
e.printStackTrace();
}
}
COM: <s> executed when the menu item is clicked </s>
|
funcom_train/13261242 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateJobNumber(Job job) {
if (jobNumPerClass != null) {
// Retrives measure (if not null)
int index = job.getJobClass().getId();
Measure m = jobNumPerClass[index];
if (m != null) {
m.update(jobsPerClass[index], NetSystem.getTime() - lastModifyNumberPerClass[index]);
}
}
if (jobNum != null) {
jobNum.update(jobs, NetSystem.getTime() - lastModifyNumber);
}
}
COM: <s> updates system job number measures </s>
|
funcom_train/37827069 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void addTypeRadioButton(Composite container, EJBType type) {
Button button = new Button(container, SWT.RADIO);
button.setText(type.getDisplayName());
button.setData(TYPE_KEY, type);
GridData ld = new GridData();
ld.horizontalSpan = 1;
button.setLayoutData(ld);
button.addSelectionListener(ejbTypeSelectionAdapter);
button.setSelection(type.equals(this.ejbType));
}
COM: <s> add an ejb type radio button </s>
|
funcom_train/46436874 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void initProjectHome() {
if (projectHome == null) {
projectHome = getServletConfig().getInitParameter("onepoint_home");
if (projectHome == null) {
ServletContext context = getServletConfig().getServletContext();
projectHome = context.getRealPath("");
}
OpEnvironmentManager.setOnePointHome(projectHome);
}
}
COM: <s> initializes the path considered to be the home of the application </s>
|
funcom_train/22284676 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAlign(int align) {
if (align==LEFT || align==RIGHT || align==CENTER ) {
if (this.align != align) {
this.align = align;
Vector fields = getElements();
for (int i = 0; i < fields.size(); i++) {
FieldElement element = (FieldElement)fields.elementAt(i);
element.setAlign(align);
}
}
}
}
COM: <s> set the alignment of the field elements </s>
|
funcom_train/22183651 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Long getSignedLong(int offset) {
try{
Integer i = 0;
i = u.mergeToSignedLong(this, offset, 4).intValue();
return i.longValue();
}catch(NdmnException e){
System.err.println(e);
return null;
}catch(ArrayIndexOutOfBoundsException e){
System.err.println(e);
return null;
}
}
COM: <s> get a signed long value from offset of the internal byte array </s>
|
funcom_train/23442944 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addMixedPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ComplexType_mixed_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ComplexType_mixed_feature", "_UI_ComplexType_type"),
SchemaPackage.Literals.COMPLEX_TYPE__MIXED,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the mixed feature </s>
|
funcom_train/46736340 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setTermText(String termText) {
if (Converter.isDifferent(this.termText, termText)) {
String oldtermText= null;
oldtermText = this.termText;
this.termText = termText;
setModified("termText");
firePropertyChange(String.valueOf(FORMRECORDS_TERMTEXT), oldtermText, termText);
}
}
COM: <s> text value if the term was free text </s>
|
funcom_train/25249919 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected String datasetToTreeFileID(Dataset ds) {
String[] nameArray;
String pathString;
nameArray = datasetToNameArray(ds);
pathString = nameArray[0];
for (int i = 1; i < nameArray.length; i++) {
pathString += "/" + nameArray[i];
}
return pathString;
}
COM: <s> builds a file id from the given dataset </s>
|
funcom_train/44880947 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getSystemId() {
return CASTOR_DTD;
/*
* Castor site moved: http://castor.codehaus.org/news.html#item20
* <!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Object Mapping DTD Version 1.0//EN"
* "http://castor.exolab.org/mapping.dtd"
*/
}
COM: <s> getter for dtds location </s>
|
funcom_train/17474421 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public LightMap render(int size) {
List<LightSource> sources = new ArrayList<LightSource>();
for (LightSource source : sourceHandler.getSources()) {
if (source.getType() == CacheType.STATIC) {
sources.add(source);
}
}
return renderer.render(sources, size, 0, 0, false, false);
}
COM: <s> render static lights to a look up light map </s>
|
funcom_train/25828640 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void delayStepToReachDefinedStepDelay(long stepProcessingTime) {
if (this.stepTimeDelay > 0) {
try {
long delay = this.stepTimeDelay - stepProcessingTime;
if (delay > 0) {
Thread.sleep(delay);
}
} catch (Exception e) {
}
}
} // delayStepToReachDefinedStepDelay
COM: <s> delays the current step if its execution time was shorter than the </s>
|
funcom_train/23452844 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setupTemplates() {
try {
Service templateService = templateSource.call();
Preconditions.checkNotNull(templateService);
java.util.List<org.mindswap.owls.process.Process> templateSlots = TemplateHelper
.findTemplateSlots(templateService.getProcess().castTo(
CompositeProcess.class));
this.templateSlots = templateSlots;
this.templateService = templateService;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
COM: <s> initializes the current tempalate builder </s>
|
funcom_train/19454607 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setActivated(boolean activated) {
/* Get the old property value for fire property change event. */
boolean oldValue = fieldActivated;
/* Set the activated property (attribute) to the new value. */
fieldActivated = activated;
/* Fire (signal/notify) the activated property change event. */
firePropertyChange("activated", new Boolean(oldValue), new Boolean(activated));
return;
}
COM: <s> sets the activated property boolean value </s>
|
funcom_train/32051876 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void merge() {
final ProfileReport profile = profilerReader.readProfile();
while (mergeReader.hasCases()) {
mergeReader.nextCase();
final ProfileCase caze = profile.getCase(mergeReader.currentCaseName());
if (caze==null) {
copyCase();
continue;
}
mergeCase(caze);
profile.removeCase(caze);
}
writeMissingCases(profile);
outputWriter.close();
}
COM: <s> merges the full profile report </s>
|
funcom_train/12652271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Result matchDescriptive(PatientHistory history) {
// Validate parameter and check metastatic status
if (history == null)
return Result.FAIL;
if (isMetastatic(history))
return invertResult(match(STAGE_IV));
// If left and right breast results differ then return PASS_SUBJECTIVE
Result left = match(getStage(history, LEFT_BREAST));
Result right = match(getStage(history, RIGHT_BREAST));
if (left == null)
return invertResult(right);
if (right == null)
return invertResult(left);
if (left != right)
return Result.PASS_SUBJECTIVE;
return invertResult(left);
}
COM: <s> returns how the patients diagnoses match to the stage requirement </s>
|
funcom_train/17984476 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void resetFrame() {
lastDispose = dispose;
lastRect = new Rectangle(ix, iy, iw, ih);
lastImage = image;
lastBgColor = bgColor;
dispose = 0;//was local
transparency = false;//was local
delay = 0;//was local
lct = null;
}
COM: <s> resets frame state for reading next image </s>
|
funcom_train/46994819 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JComboBox getFontStyle() {
if (fontStyle == null) {
javax.swing.DefaultComboBoxModel m = new javax.swing.DefaultComboBoxModel();
m.addElement("Plain");
m.addElement("Italic");
m.addElement("Bold");
m.addElement("Bold & Italic");
fontStyle = new JComboBox(m);
fontStyle.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
updateTestFont();
}
});
}
return fontStyle;
}
COM: <s> this method initializes font style </s>
|
funcom_train/19258359 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void toBack() {
if (hasPeer())
SwingUtilities.invokeSync(new Runnable() {
public void run() {
// Find another shell to make active
Shell[] s = SwingWTUtils.getDisplay().getShells();
for (int i = 0; i < s.length; i++) {
if (!s[i].equals(peer))
s[i].forceActive();
}
}
});
}
COM: <s> sends the window to the back </s>
|
funcom_train/11015909 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void newFileLink() {
_range = new CellRangeAddress(0, 0, 0, 0);
_guid = STD_MONIKER;
_linkOpts = HLINK_URL | HLINK_LABEL;
_fileOpts = 0;
setLabel("");
_moniker = FILE_MONIKER;
setAddress(null);
setShortFilename("");
_uninterpretedTail = FILE_TAIL;
}
COM: <s> initialize a new file link </s>
|
funcom_train/9760413 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void toggleQuickDiffRuler() {
// change the visibility locally if this editor is not in sync with the global preference
// toggle the preference if we are in sync.
IPreferenceStore store= EditorsUI.getPreferenceStore();
boolean current= store.getBoolean(AbstractDecoratedTextEditorPreferenceConstants.QUICK_DIFF_ALWAYS_ON);
if (current == isChangeInformationShowing())
store.setValue(AbstractDecoratedTextEditorPreferenceConstants.QUICK_DIFF_ALWAYS_ON, !current);
else
showChangeInformation(current);
}
COM: <s> toggles the quick diff global preference and shows the quick diff ruler </s>
|
funcom_train/37648666 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testRenderReportCmdNullArg6() throws CommandException {
try {
RenderReportCmd cmd = new RenderReportCmd();
cmd.setProject(this.testProject);
cmd.registerRenderer(null, null);
cmd.performExecute();
fail();
} catch (UnsetInputPropertiesException e) {
// yes cool
}
}
COM: <s> test robustness 6 </s>
|
funcom_train/491257 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void pop(char c) throws JSONException {
if (this.top <= 0 || this.stack[this.top - 1] != c) {
throw new JSONException("Nesting error.");
}
this.top -= 1;
this.mode = this.top == 0 ? 'd' : this.stack[this.top - 1];
}
COM: <s> pop an array or object scope </s>
|
funcom_train/18640945 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setExpressionValue(Object ctx, String expression, Object value) {
logger.finer("Setting expression value: ctx=" + ctx + ", expression="
+ expression + ",value=" + value);
eval.setExpressionValue(ctx, expression, value);
}
COM: <s> sets the new value of an expression evaluated on the given context </s>
|
funcom_train/14462056 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setFont(int ifn){
ifnt = (short)ifn;
byte[] nef = ByteTools.shortToLEBytes(ifnt);
this.getData()[0] = nef[0];
this.getData()[1] = nef[1];
// reset the pointer for xf's and font's brought from other workbooks.
if (this.getWorkBook()!=null) {
myFont = this.getWorkBook().getFont(ifn);
}
}
COM: <s> set the pointer to the xfs font in the work book </s>
|
funcom_train/14402764 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void halt() {
try {
abort = true;
if (mConnections != null) {
for (Connection conn : mConnections)
conn.halt();
}
if (mServerSocket != null && (!mServerSocket.isClosed())) {
mServerSocket.close();
mServerSocket = null;
}
} catch (Exception e) {
System.err.println("SocketListener.halt() failed: " + e.getMessage());
}
config = null;
mExceptionListener = null;
}
COM: <s> abborts the endless loop which listens to incomming m connections close </s>
|
funcom_train/3544125 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void detach() {
if (editor != null) {
filtersHandler.removeFilterEditor(editor);
remove(editor);
editor.getFilter().removeFilterObserver(this);
for (IFilterHeaderObserver observer : observers) {
observer.tableFilterEditorExcluded(
TableFilterHeader.this, editor, tc);
}
}
tc.removePropertyChangeListener(this);
}
COM: <s> performs any cleaning required before removing this component </s>
|
funcom_train/2615277 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setUpStart() {
//sets out the starting disks.
diskColor[3][3].setColor(DiskColor.BLACK);
diskColor[4][4].setColor(DiskColor.BLACK);
diskColor[3][4].setColor(DiskColor.WHITE);
diskColor[4][3].setColor(DiskColor.WHITE);
//set the game to not over.
isGameOver = false;
}
COM: <s> sets up the start of the game so the startingdisks </s>
|
funcom_train/12901278 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void zoomChanged(int newValue, int oldValue) {
Iterator iter = getHost().getChildren().iterator();
while (iter.hasNext()) {
EditPart child = (EditPart) iter.next();
Object modelConstraint = getChildConstraint(child);
Rectangle figureConstraint = (Rectangle) modelToFigureConstraint(modelConstraint);
setConstraintToFigure(child, figureConstraint);
}
if (gridController != null)
gridFigure.repaint(); // Also repaint the entire grid
}
COM: <s> zoom has changed need to reposition all of the children </s>
|
funcom_train/45622653 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addCertificateThumbprintPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ResolveKeySourceType_certificateThumbprint_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ResolveKeySourceType_certificateThumbprint_feature", "_UI_ResolveKeySourceType_type"),
MSBPackage.eINSTANCE.getResolveKeySourceType_CertificateThumbprint(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the certificate thumbprint feature </s>
|
funcom_train/8409540 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public StrBuilder append(String str) {
if (str == null) {
return appendNull();
}
int strLen = str.length();
if (strLen > 0) {
int len = length();
ensureCapacity(len + strLen);
str.getChars(0, strLen, buffer, len);
size += strLen;
}
return this;
}
COM: <s> appends a string to this string builder </s>
|
funcom_train/51697424 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public RSession voidEvalDetach(String cmd) throws RSrvException {
if (!connected || rt==null)
throw new RSrvException(this,"Not connected");
Rpacket rp=rt.request(Rtalk.CMD_detachedVoidEval,cmd+"\n");
if (rp==null || !rp.isOk())
throw new RSrvException(this,"detached void eval failed",rp);
RSession s = new RSession(this, rp);
close();
return s;
}
COM: <s> evaluates the given command detaches the session see </s>
|
funcom_train/24059496 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setOptimizeForPen(boolean optimizeForPen) {
if (!optimizeForPen == _optimizeForPen) {
_optimizeForPen = optimizeForPen;
_preferences.setPreference(PREFERENCE_OPTIMIZE_FOR_PEN, String.valueOf(_optimizeForPen));
_propertyChangeSupport.firePropertyChange("optimizeForPen", null, _optimizeForPen);
}
}
COM: <s> the optimize for pen state indicates that certain inputs should be </s>
|
funcom_train/3379780 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int read(int num) throws IOException{
byte[] bytes = new byte[num];
read(bytes, 0, num);
int result = 0;
for (int i = 0; i < num; i++) {
if (bigEndian) {
result |= (bytes[i] & 0xff) << (num - i - 1) * 8;
} else {
result |= (bytes[i] & 0xff) << i * 8;
}
}
return result;
}
COM: <s> reads up to the specific number of bytes from this input stream </s>
|
funcom_train/35043161 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean canBeProcessedTogether(Request other) {
if(other == null)
return false;
int other_type=other.type;
return (type == JOIN || type == LEAVE || type == SUSPECT) &&
(other_type == JOIN || other_type == LEAVE || other_type == SUSPECT);
}
COM: <s> specifies whether this request can be processed with other request simultaneously </s>
|
funcom_train/44440372 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void propertyChange(PropertyChangeEvent evt) {
if (evt.getPropertyName().equals(JFileChooser.
DIRECTORY_CHANGED_PROPERTY) ||
evt.getPropertyName().equals(JFileChooser.
SELECTED_FILE_CHANGED_PROPERTY)) {
filesTab.setRootDirectory(getSelectedFile());
}
}
COM: <s> this method gets called when a bound property is changed </s>
|
funcom_train/3272271 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void test_SelectGood() {
try {
if (VERBOSE)
System.out.println("BasicJdbcTest: about to '" + selectSql + "'");
Connection con = getConnection(driverName, url, username, password);
assertJdbcRecordCountIsNoLessThan(con, selectSql, selectThreshold);
} catch (Exception e) {
fail(e.toString());
}
}
COM: <s> get a connection to the database issue the sql statement </s>
|
funcom_train/21887175 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void fail(String message, Throwable cause) throws CommunicationException {
this.monitor.uploadFailed(new UploadEvent(image, 0, true, false, message));
if (cause != null) {
throw new CommunicationException(message, cause);
} else {
throw new CommunicationException(message);
}
}
COM: <s> notifies the monitor of failure and throws upload failed exception </s>
|
funcom_train/12191583 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public ReportingTransactionFactory createFactory() throws Exception {
String s = getConfig();
ByteArrayInputStream is = new ByteArrayInputStream(s.getBytes());
Map map = new HashMap();
map.put("reporting.config.location", is);
ReportingTransactionFactory rtf =
ReportingTransactionMetaFactory.getDefaultInstance().getReportingTransactionFactory(map);
return rtf;
}
COM: <s> create reporting transaction factory </s>
|
funcom_train/41806555 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: static public String checkName(String origName) {
String newName = sanitizeName(origName);
if (!newName.equals(origName)) {
String msg =
"The sketch name had to be modified. Sketch names can only consist\n" +
"of ASCII characters and numbers (but cannot start with a number).\n" +
"They should also be less less than 64 characters long.";
System.out.println(msg);
}
return newName;
}
COM: <s> convert to sanitized name and alert the user </s>
|
funcom_train/31682879 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public MultiStatus move(ResourceContext context, String destinationURL, boolean overwrite, Vector propertiesToMove) throws WebDAVException {
this.context = context;
context.getRequestContext().depth(Collection.deep); // (always deep for move, set it anyway)
context.getRequestContext().overwrite(overwrite ? "T" : "F");
context.getRequestContext().destination(destinationURL);
setupRequest("MOVE");
return doCopyOrMove(propertiesToMove);
}
COM: <s> move this resource to the destination url </s>
|
funcom_train/49340151 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void sizeChanged(int w, int h) {
this.w = w;
this.h = h;
// called by constructor...
centerX = w / 2;
centerY = h / 2;
borderW = w / 8;
borderH = h / 8;
diameter = (borderW < borderH ? borderW : borderH) * 4;
radius = diameter / 2;
repaint();
}
COM: <s> overrides size changed int w int h of the canvas class </s>
|
funcom_train/5668777 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void selectionListenerValueChanged(ListSelectionEvent aEvent) {
DefaultListSelectionModel selModel = (DefaultListSelectionModel) aEvent.getSource();
if (selModel.getValueIsAdjusting()) return;
//if (selModel.isSelectionEmpty()) return;
setDefaultLeftStatusMessage();
}
COM: <s> table row selection listener for table selection changes </s>
|
funcom_train/29054477 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Action createLayoutActions(Action nodeLayoutAction) {
synchronized (this) {
final ActionList layoutActions = new ActionList(Activity.INFINITY,
DefaultVizSettings.ANIMATION_STEP_TIME);
layoutActions.add(nodeLayoutAction);
if (nodeLayoutAction == continuosSpringForceLayout) {
layoutActions.setDuration(Activity.INFINITY);
} else {
layoutActions.setDuration(0);
}
layoutActions.add(edgeLayout);
layoutActions.add(nodeSelectionLayout);
layoutActions.add(new RepaintAction());
return layoutActions;
}
}
COM: <s> create layout action for visualization algorithm edge layout and node </s>
|
funcom_train/39138121 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean wasInStage(JobState pState) {
List xStages = new ArrayList(getJobStages());
for (Iterator xIter = xStages.iterator(); xIter.hasNext();) {
JobStage xStage = (JobStage) xIter.next();
if (xStage.getState().equals(pState)) {
return true;
}
}
return false;
}
COM: <s> test whether the job has been in the given state </s>
|
funcom_train/42644802 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addPidPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EmbryoMetadata_pid_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EmbryoMetadata_pid_feature", "_UI_EmbryoMetadata_type"),
EmbryomodelPackage.Literals.EMBRYO_METADATA__PID,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the pid feature </s>
|
funcom_train/35843432 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void updateReferenceText() {
Object text = null;
try {
text = facade.getReferenceState(getOwner());
} catch (Exception e) {
LOG.error(e);
}
if (text != null) {
referenceFig.setText((String) text);
} else {
referenceFig.setText("");
}
calcBounds();
setBounds(getBounds());
damage();
}
COM: <s> update the reference text </s>
|
funcom_train/37828748 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private int countIdenticalMessages(String sender, long timestamp, String message) {
int res = 0;
for (IrcMessage msg : lastMessages) {
if (msg.getSender().equals(sender) && (msg.getTimestamp() > timestamp) && msg.getMessage().equals(message)) {
res++;
}
}
return res;
}
COM: <s> counts the number of recent identical messages from the same sender </s>
|
funcom_train/1909921 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Rule findRule(Symbol s){
assert (s != null) : "Symbol in findRule is:" + s;
Iterator<Rule> iter = rules.iterator();
Rule r;
while(iter.hasNext()) {
r = iter.next();
if(r.getLHS().equals(s)) {
return r;
}
}
return null;
}
COM: <s> find a rule given a symbol </s>
|
funcom_train/25706730 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public AttachmentList getAllOfType(final int type) {
assert type == Attachment.FILE ||
type == Attachment.BOARD ||
type == Attachment.PERSON :
"list of unknown type of attachments requested";
final Iterator<Attachment> i = iterator();
final AttachmentList result = new AttachmentList();
while (i.hasNext()) {
final Attachment current = i.next();
if (current.getType() == type) {
result.add(current);
}
}
return result;
}
COM: <s> traverses the list for attachment of given type </s>
|
funcom_train/18597195 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private long getAddress(String ip) {
StringTokenizer st = new StringTokenizer(ip, ".");
long a1 = Integer.parseInt(st.nextToken());
long a2 = Integer.parseInt(st.nextToken());
long a3 = Integer.parseInt(st.nextToken());
long a4 = Integer.parseInt(st.nextToken());
return a1<<24 | a2<<16 | a3<<8 | a4;
}
COM: <s> converts an ip x </s>
|
funcom_train/12835967 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testAllFailureTrue() {
_support = new DispatcherSupport(DispatcherSupport.ALL_FAILURE, 2, _mainDispatcher);
_support.failure(null);
assertNull(_mainResult);
_support.failure(null);
assertNotNull(_mainResult);
assertEquals(new Boolean(true), _mainResult);
}
COM: <s> tests all failure mode when both clients failed </s>
|
funcom_train/20846635 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAttributeValue(PVI[] path, String name, String value) {
String key = null;
ParameterType pt = null;
if (path == null) {
key = ELEMENT_ATTRIBUTEVALUE;
pt = getType();
} else {
key = PVI.toStringWithSlashes(path);
pt = getType(key);
}
XMLSchemaAttribute attr = pt.getAttribute(name);
if (attr == null) {
return;
}
attributeValues.put(key + "_" + name, value);
}
COM: <s> sets attribute of a sub element given by the path with the passed </s>
|
funcom_train/46702080 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void copy(Ujo source, Ujo target, UjoAction action, UjoProperty... properties) {
if (properties==null) {
properties = source.readProperties().toArray();
}
for(UjoProperty p : properties) {
Object value = source.readValue(p);
final boolean enabled = source.readAuthorization(action, p, value);
if (enabled) {
setValue(target, p, value);
}
}
}
COM: <s> copy selected properties from source to target </s>
|
funcom_train/49200044 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void addWhPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DigilibImage_wh_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_DigilibImage_wh_feature", "_UI_DigilibImage_type"),
ExhibitionPackage.Literals.DIGILIB_IMAGE__WH,
true,
false,
false,
ItemPropertyDescriptor.REAL_VALUE_IMAGE,
null,
null));
}
COM: <s> this adds a property descriptor for the wh feature </s>
|
funcom_train/28500417 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setValuesD( Collection<Double>pValues ) throws JC_Exception {
Collection<String> curvals = new ArrayList<String>( mPropertyValues );
String v;
for (Double val : pValues) {
v = val.toString();
if (curvals.contains( v )==true) {
curvals.remove( v );
} else {
addValue( v, true );
}
}
return;
}
COM: <s> set values d </s>
|
funcom_train/28750483 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setLibrary(String newVal) {
if ((newVal != null && this.library != null && (newVal.compareTo(this.library) == 0)) ||
(newVal == null && this.library == null && library_is_initialized)) {
return;
}
this.library = newVal;
library_is_modified = true;
library_is_initialized = true;
}
COM: <s> setter method for library </s>
|
funcom_train/7907460 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String getAdresse(){
String adr = "";
File[] racine = File.listRoots();
adr = this.chemin;
if (racine[0].toString() != "/")
adr += "\\"+ this.nom;
else
adr += "/"+ this.nom;
if (this.extention != "")
adr += "." + this.extention;
return adr;
}
COM: <s> get the adress of picture </s>
|
funcom_train/12081620 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public TextField getBudgetAmount() {
if (BudgetAmount == null) {//GEN-END:|137-getter|0|137-preInit
// write pre-init user code here
BudgetAmount = new TextField("Budget Amount", "", 32, TextField.DECIMAL);//GEN-LINE:|137-getter|1|137-postInit
// write post-init user code here
}//GEN-BEGIN:|137-getter|2|
return BudgetAmount;
}
COM: <s> returns an initiliazed instance of budget amount component </s>
|
funcom_train/48268206 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private double dotProduct(double[] windows, double[] weights) {
assert ((windows.length == 3) && (weights.length == 3));
return (windows[2] * weights[2]) + (windows[1] * weights[1])
+ (windows[0] * weights[0]);
}
COM: <s> computes the dot product of our sliding windows and weights vectors </s>
|
funcom_train/124287 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void updateSymbol() {
if (symbol != null)
symbol.removeSymbolListener(this);
if (symbolDef != null) {
SymbolTable sTable = symbolScope.getSymbolTable(this);
if (sTable != null) {
symbol = sTable.get(symbolDef);
setJSCSArray(symbol.getJSCSArray());
symbol.addSymbolListener(this);
return;
}
}
}
COM: <s> updates the display according to the symbol </s>
|
funcom_train/18009865 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected JPanel createView() {
GamePanel gamePanel = new GamePanel();
DartsBoardController dartsBoardController = new DartsBoardController(model.getBoard());
gamePanel.setDartsBoardPanel(dartsBoardController.getView());
ScoreBoardGroupController scoreBoardGroupController = new ScoreBoardGroupController(model);
gamePanel.setScoreBoardGroupPanel(scoreBoardGroupController.getView());
return gamePanel;
}
COM: <s> p creates the game view </s>
|
funcom_train/28750738 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setAutosort(Long newVal) {
if ((newVal != null && this.autosort != null && (newVal.compareTo(this.autosort) == 0)) ||
(newVal == null && this.autosort == null && autosort_is_initialized)) {
return;
}
this.autosort = newVal;
autosort_is_modified = true;
autosort_is_initialized = true;
}
COM: <s> setter method for autosort </s>
|
funcom_train/3462373 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public EntityInterface constructIndividual(Genome newGnm) {
/* I need to copy the parent field of genome to newGnm.
* This is necessary because the new genome needs to get hold on the hierarchy
* to build creatures !! */
((EntityInterface)newGnm).setParent(this);
((BiomasCreature.Params)indiv_params).setGenome(newGnm);
return super.constructIndividual();
}
COM: <s> specifies the genome of the new creature </s>
|
funcom_train/36873910 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void split(Author author) {
Comment toRemove = null;
for (Comment c : getRideJoinComments()) {
if (c.getAuthor().getUsername().equals(author.getUsername())) {
toRemove = c;
break;
}
}
if (toRemove != null) {
getComments().remove(toRemove);
}
}
COM: <s> splits author from the ride </s>
|
funcom_train/28591119 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void handleP2PInit(P2PInitEvent event) {
try {
if (event.getDir() == Direction.DOWN) {
if (_localPeer == null) {
_localPeer = event.getLocalPeer();
_timer = new PeriodicTimer("FloodBroadCastTimer", _ttl, _channel,Direction.DOWN, this, EventQualifier.ON);
_timer.go();
}
}
event.go();
}
catch (AppiaEventException ex) {
ex.printStackTrace();
}
catch (AppiaException ex) {
ex.printStackTrace();
}
}
COM: <s> upon p2 p initialization extracts local peer information and starts the timer </s>
|
funcom_train/32750237 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public double getPosition( final AcceleratorNode node ) {
if( m_arrNodes == null || m_arrNodes.isEmpty() ) return m_dblPos + node.m_dblPos;
final AcceleratorSeq baseSequence = node.getPrimaryAncestor();
final AcceleratorSeq dummySequence = (AcceleratorSeq)_dummyMap.get( baseSequence );
return dummySequence.getPosition() + baseSequence.getPosition( node );
}
COM: <s> get the position of a node in the sequence including </s>
|
funcom_train/20350021 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void initStorageClient() {
log.debug("Retrieve the source account from the provider.");
Account sourceAccount = sap.get();
log.debug("Initialize the storage client service.");
storageClientService.setPublicKey(sourceAccount.getPublicKey());
storageClientService.setPrivateKey(sourceAccount.getPrivateKey());
storageClientService.setStorageBucket(sourceAccount.getStorageBucket());
storageClientService.setDefaultLocalSourceDirectory(context
.getSourceDirectory());
storageClientService.setDefaultLocalTargetDirectory(context
.getTargetDirectory());
}
COM: <s> initializes the storage client with the source account values </s>
|
funcom_train/37448155 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean rangeExists(RangeBean bean) {
for (RangeBean rb : myRanges)
{
// Avoid comparing to itself.
if (rb.getKey() == bean.getKey())
{
continue;
}
if (rb.isEquivalent(bean))
{
return true;
}
}
// Not equivalent; false is returned.
return false;
}
COM: <s> true if given range exists in the current display </s>
|
funcom_train/47358580 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void addAll(FractionConstraints moreConstraints) {
if(frozen)
throw new IllegalStateException("Cannot modify frozen constraint set");
this.constraints = ConsList.concat(moreConstraints.constraints, this.constraints);
if(consistent != null && consistent)
// once inconsistent, constraints cannot become consistent
consistent = null;
this.variables.addAll(moreConstraints.variables);
this.constants.addAll(moreConstraints.constants);
}
COM: <s> adds the constraints from the given set to this constraint set </s>
|
funcom_train/15892166 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Map getAssociated() {
Map map = new HashMap();
List list = new ArrayList();
map.put(SupplierContainerImpl.class, list);
Iterator itr = container.getContent().iterator();
while (itr.hasNext()) {
ProductPart bean = (ProductPart) itr.next();
Iterator pi = bean.getProducts().iterator();
while (pi.hasNext()) {
ProductBean product = (ProductBean) pi.next();
list.add(product.getSupplier());
}
}
return map;
}
COM: <s> handles the association from code product part code with code product code </s>
|
funcom_train/51000031 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public String generateDocumentCategoryID() {
/*
Generate the document category as the timestamp.
The base-32 string representation of a 64-bit integer has a maximum
length of 8 characters. This is done since the primary key
document_category_id has a maximum length of 8 characters.
*/
return Long.toString(System.currentTimeMillis(),32).toUpperCase();
}
COM: <s> generates a new document category id </s>
|
funcom_train/46327907 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void buildNaturalLanguageString(RuleNode node, StringBuilder sb) {
sb.append(node.getItem().getDescriptionShort());
sb.append(", ");
int numChildren = node.getChildren().size();
for (int i = 0; i < numChildren; i++) {
buildNaturalLanguageString(node.getChildren().get(i), sb);
}
}
COM: <s> recursively works on each node to get their natural language representation </s>
|
funcom_train/20138934 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public Bang addBang(final String theName, final int theX, final int theY, final int theWidth, final int theHeight) {
Bang myController = new Bang(controlP5, (Tab) controlP5.controlWindow.tabs().get(1), theName, theX, theY, theWidth, theHeight);
myController.registerProperty("value");
myController.getProperty("value").disable();
controlP5.register(myController);
return myController;
}
COM: <s> add a bang to control p5 </s>
|
funcom_train/9082860 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void undo(String userId) {
if (isWaveOpen()) {
if (getOpenWavelet().getParticipants().contains(new ParticipantId(userId))) {
undoLastLineBy(userId);
} else {
out.println("Error: " + userId + " is not a participant of this wave");
}
} else {
errorNoWaveOpen();
}
}
COM: <s> undo last line line elements and text sent by a user </s>
|
funcom_train/33758461 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private JProgressBar getSplashProgressBar() {
if (splashProgressBar == null) {
splashProgressBar = new JProgressBar(0, 100);
splashProgressBar.setBounds(new Rectangle(0, 539, 420, 15));
splashProgressBar.setStringPainted(true);
splashProgressBar.setBackground(Color.white);
splashProgressBar.setForeground(Color.BLACK);
}
return splashProgressBar;
}
COM: <s> this method initializes splash progress bar </s>
|
funcom_train/36616964 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isShown() {
//check midlet is running
MIDletContainer container = MIDletContainer.getMIDletContainerInstance();
MIDlet midlet = container.getMIDlet();
if (midlet == null){
return false;
}
//check the current displayable
if (this != Display.getDisplay(midlet).getCurrent()){
return false;
}
//TODO check system screens: sys menu, ime, etc
return true;
}
COM: <s> checks if the code displayable code is actually visible </s>
|
funcom_train/2677228 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private ITag injectMetaData(IMetaData meta, ITag tag) {
ByteBuffer bb = ByteBuffer.allocate(1000);
bb.setAutoExpand(true);
Output out = new Output(bb);
Serializer ser = new Serializer();
ser.serialize(out, "onMetaData");
ser.serialize(out, meta);
ByteBuffer tmpBody = out.buf().flip();
int tmpBodySize = out.buf().limit();
int tmpPreviousTagSize = tag.getPreviousTagSize();
byte tmpDataType = IoConstants.TYPE_METADATA;
int tmpTimestamp = 0;
return new Tag(tmpDataType, tmpTimestamp, tmpBodySize, tmpBody,
tmpPreviousTagSize);
}
COM: <s> injects metadata other than cue points into a tag </s>
|
funcom_train/25789324 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public boolean isUserInRole(String roleName) {
if (roleChecker != null) {
return roleChecker.isInRole(getUserPrincipal(), roleName);
}
Role role = Application.getCurrent().getRole(roleName);
return (role != null)
&& this.request.getClientInfo().getRoles().contains(role);
}
COM: <s> returns a boolean indicating whether the authenticated user is included </s>
|
funcom_train/26432763 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void printList( String str, Object[] list ) {
if( list == null )
this.context.debug( str + " <null>" );
else if( list.length == 0 )
this.context.debug( str + " <none>" );
else
for( int i = 0; i < list.length; i++ )
this.context.debug( str + list[i].toString() );
}
COM: <s> method for printing an array of string </s>
|
funcom_train/14310618 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testUpdateDomainWithSecurityAccessDenied() throws Exception {
//set configuration
setSecureConfig();
//authentication with wrong role role
authenticateUserWithRole("TEST\\test", "WRONG_ROLE");
Domain testDomain = new Domain();
testDomain.setName("CUBICLE");
testDomain.setDescription("updated description");
try {
domainService.updateDomain(testDomain);
} catch (ServiceException e) {
//exception raised : test is ok
return;
}
fail("Wrong role security check");
}
COM: <s> test of update domain method with security but access denied of class org </s>
|
funcom_train/20788376 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public int addClass(String className) {
classesNames.add(className);
templates.add(null);
if(classesNames.size() > distances.length) {
double[][] tmp = new double[2*distances.length][2*distances.length];
for (int i = 0; i < distances.length; i++) {
for (int j = 0; j < distances[0].length; j++) {
tmp[i][j] = distances[i][j];
}
}
distances = tmp;
}
invalidateDistance(className);
return classesNames.size() - 1;
}
COM: <s> adds a class of gestures to this classifier </s>
|
funcom_train/15614378 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private PageNode convertToPageNode(Node nodeAnnotation, Class<? extends AbstractViewManagedBean> managedBean) {
AssertUtil.assertNotNull(nodeAnnotation);
return new PageNode(
this.i18nUtil.getText(nodeAnnotation.currentNodeTextKey()),
nodeAnnotation.currentNodeAction(),
managedBean
);
}
COM: <s> convert node annotation to page node </s>
|
funcom_train/43753141 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void clearChildStyles(AxisPanel2 p) {
p.axisChildsStyles = null;
p.axisDescendsStyles = null;
p.axisChildsCssClasses = null;
p.axisDescendsCssClasses = null;
p.layoutChildsStyles = null;
p.layoutDescendsStyles = null;
p.layoutChildsCssClasses = null;
p.layoutDescendsCssClasses = null;
}
COM: <s> clears all the child and descendent styles recorded for the specified panel </s>
|
funcom_train/15606000 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void setBaseAt(int seqIndex, char base, long location){
ViewerSequence seq = (ViewerSequence)dataVector.get(seqIndex);
seq.set(location, SequenceHelper.charToBase(seq, base));
int row = (int)locationToRow(location);
this.fireTableCellUpdated(row, row);
}
COM: <s> sets a base in the given sequence to another value </s>
|
funcom_train/41090859 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: protected void setFrameElementsOffset(JRPrintFrame frame, boolean relative)
{
if (relative)
{
setElementOffsets(0, 0);
}
else
{
int topPadding = frame.getLineBox().getTopPadding().intValue();
int leftPadding = frame.getLineBox().getLeftPadding().intValue();
setElementOffsets(getOffsetX() + frame.getX() + leftPadding, getOffsetY() + frame.getY() + topPadding);
}
}
COM: <s> sets the offsets for exporting elements from a </s>
|
funcom_train/17759809 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void testCompleteTaskWithMultipleTransitionsAllNamedById() {
deployJpdlXmlString(MULTIPLE_NAMED_TRANSITIONS_PROCESS);
executionService.startProcessInstanceByKey(MULTIPLE_NAMED_TRANSITIONS_PROCESS_NAME);
Task task = taskService.createTaskQuery().assignee("johndoe").uniqueResult();
try {
taskService.completeTask(task.getId());
fail();
} catch (JbpmException e) {
// Exception is expected
}
}
COM: <s> if a task has multiple outgoing transitions all are named then </s>
|
funcom_train/36684626 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public void notifyLobbyIsFull(String gameName, long lobbyID) {
synchronized (myLobbies) {
Set<String> lobbyists = myLobbies.get(gameName).get(lobbyID)
.getOccupants();
int count = 1;
for (String s : lobbyists) {
try {
notify(s, new GameStartingNotification(lobbyID, count++,
lobbyists.size()));
} catch (Exception e) {
e.printStackTrace();
}
}
closeLobby(gameName, lobbyID, false);
}
}
COM: <s> notifies users that lobby if full </s>
|
funcom_train/24141582 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private GridJobFuture setupAndRunMockGridJobInBackgroundThread() throws InterruptedException {
TestGridHelper.CancellableGridJobHelper helper=new TestGridHelper.CancellableGridJobHelper();
GridJobFuture future =helper.getSut();
helper.start();
//wait for other thread to start
Thread.sleep(500);
return future;
}
COM: <s> since we need a job that will run until </s>
|
funcom_train/50156411 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: private void mkdirs(String path) {
String subpath;
int previx;
int ix;
previx = 0;
while (true) {
ix = path.indexOf("/", previx);
if (ix < 0) {
subpath = path;
}
else {
subpath = path.substring(0, ix);
}
File dirfile = new File(subpath);
if (!dirfile.exists()) {
if (bugs >= 1) {
prtln("mkdir: \"" + dirfile + "\"");
}
dirfile.mkdir();
}
if (ix < 0) {
break;
}
ix++;
previx = ix;
}
}
COM: <s> creates the directories shown in path </s>
|
funcom_train/27825622 | /tmp/hf-datasets-cache/medium/datasets/31837353763449-config-parquet-and-info-apcl-funcom-java-long-1b0b1ae9/downloads/d42b7d3130dd02820b64692a8810efdf479c66e589141ea4cfe3cb3bba421716 | TDAT: public SetTracker getSubConceptsTracker() {
if (m_subConcepts==null)
m_subConcepts=new SetTracker() {
protected Set loadSet() throws KAONException {
return getVirtualConcepts(getConcept().getSubConcepts(),true);
}
};
return m_subConcepts;
}
COM: <s> returns the tracker for direct subconcepts of this concept </s>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.